AVR DA Interrupt Vector Names for GCC C Compiler (Studio 7)

Go To Last Post
5 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

 

I am looking for the formal names of the Interrupt Vectors for the AVR128DA64 used by the GCC C Compiler (for Studio 7).  There is so much information it's hard to find what I want to find.  I have a project in which I will have several interrupts running; hence the need for interrupt service routines.  Also, where can I find the LIBc library document (AVR/GNU C Compiler : 5.4.0) which describes all of the library functions?

 

Thanks!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It is defined in ioavr128da64.h.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 

A quick way to that header file is to simply build something/anything for the 128D464, even just the "empty program" and as long as it builds without errors the "Dependencies" will be populated:

 

 

As you'll find in there (easiest to search "_vect") there is:

 

 

Or by knowing where the file is located:

 

 

Go to that location and grep for _vect:

 

C:\Program Files (x86)\Atmel\Studio\7.0\packs\atmel\AVR-Dx_DFP\1.5.74\include\avr>grep _VECTOR ioavr128da64.h
#define NMI_vect      _VECTOR(1)  /*  */
#define BOD_VLM_vect      _VECTOR(2)  /*  */
#define RTC_CNT_vect      _VECTOR(3)  /*  */
#define RTC_PIT_vect      _VECTOR(4)  /*  */
#define CCL_CCL_vect      _VECTOR(5)  /*  */
#define PORTA_PORT_vect      _VECTOR(6)  /*  */
#define TCA0_LUNF_vect      _VECTOR(7)  /*  */
#define TCA0_OVF_vect      _VECTOR(7)  /*  */
#define TCA0_HUNF_vect      _VECTOR(8)  /*  */
#define TCA0_CMP0_vect      _VECTOR(9)  /*  */
#define TCA0_LCMP0_vect      _VECTOR(9)  /*  */
#define TCA0_CMP1_vect      _VECTOR(10)  /*  */
#define TCA0_LCMP1_vect      _VECTOR(10)  /*  */
#define TCA0_CMP2_vect      _VECTOR(11)  /*  */
#define TCA0_LCMP2_vect      _VECTOR(11)  /*  */
#define TCB0_INT_vect      _VECTOR(12)  /*  */
#define TCB1_INT_vect      _VECTOR(13)  /*  */
#define TCD0_OVF_vect      _VECTOR(14)  /*  */
#define TCD0_TRIG_vect      _VECTOR(15)  /*  */
#define TWI0_TWIS_vect      _VECTOR(16)  /*  */
#define TWI0_TWIM_vect      _VECTOR(17)  /*  */
#define SPI0_INT_vect      _VECTOR(18)  /*  */
#define USART0_RXC_vect      _VECTOR(19)  /*  */
#define USART0_DRE_vect      _VECTOR(20)  /*  */
#define USART0_TXC_vect      _VECTOR(21)  /*  */
#define PORTD_PORT_vect      _VECTOR(22)  /*  */
#define AC0_AC_vect      _VECTOR(23)  /*  */
#define ADC0_RESRDY_vect      _VECTOR(24)  /*  */
#define ADC0_WCMP_vect      _VECTOR(25)  /*  */
#define ZCD0_ZCD_vect      _VECTOR(26)  /*  */
#define PTC_PTC_vect      _VECTOR(27)  /*  */
#define AC1_AC_vect      _VECTOR(28)  /*  */
#define PORTC_PORT_vect      _VECTOR(29)  /*  */
#define TCB2_INT_vect      _VECTOR(30)  /*  */
#define USART1_RXC_vect      _VECTOR(31)  /*  */
#define USART1_DRE_vect      _VECTOR(32)  /*  */
#define USART1_TXC_vect      _VECTOR(33)  /*  */
#define PORTF_PORT_vect      _VECTOR(34)  /*  */
#define NVMCTRL_EE_vect      _VECTOR(35)  /*  */
#define SPI1_INT_vect      _VECTOR(36)  /*  */
#define USART2_RXC_vect      _VECTOR(37)  /*  */
#define USART2_DRE_vect      _VECTOR(38)  /*  */
#define USART2_TXC_vect      _VECTOR(39)  /*  */
#define AC2_AC_vect      _VECTOR(40)  /*  */
#define TCB3_INT_vect      _VECTOR(41)  /*  */
#define TWI1_TWIS_vect      _VECTOR(42)  /*  */
#define TWI1_TWIM_vect      _VECTOR(43)  /*  */
#define PORTB_PORT_vect      _VECTOR(44)  /*  */
#define PORTE_PORT_vect      _VECTOR(45)  /*  */
#define TCA1_LUNF_vect      _VECTOR(46)  /*  */
#define TCA1_OVF_vect      _VECTOR(46)  /*  */
#define TCA1_HUNF_vect      _VECTOR(47)  /*  */
#define TCA1_CMP0_vect      _VECTOR(48)  /*  */
#define TCA1_LCMP0_vect      _VECTOR(48)  /*  */
#define TCA1_CMP1_vect      _VECTOR(49)  /*  */
#define TCA1_LCMP1_vect      _VECTOR(49)  /*  */
#define TCA1_CMP2_vect      _VECTOR(50)  /*  */
#define TCA1_LCMP2_vect      _VECTOR(50)  /*  */
#define ZCD1_ZCD_vect      _VECTOR(51)  /*  */
#define USART3_RXC_vect      _VECTOR(52)  /*  */
#define USART3_DRE_vect      _VECTOR(53)  /*  */
#define USART3_TXC_vect      _VECTOR(54)  /*  */
#define USART4_RXC_vect      _VECTOR(55)  /*  */
#define USART4_DRE_vect      _VECTOR(56)  /*  */
#define USART4_TXC_vect      _VECTOR(57)  /*  */
#define PORTG_PORT_vect      _VECTOR(58)  /*  */
#define ZCD2_ZCD_vect      _VECTOR(59)  /*  */
#define TCB4_INT_vect      _VECTOR(60)  /*  */
#define USART5_RXC_vect      _VECTOR(61)  /*  */
#define USART5_DRE_vect      _VECTOR(62)  /*  */
#define USART5_TXC_vect      _VECTOR(63)  /*  */
#define _VECTOR_SIZE 4 /* Size of individual vector. */
#define _VECTORS_SIZE (64 * _VECTOR_SIZE)

(and that's the list you are looking for by the way!)

 

Last Edited: Tue. Feb 2, 2021 - 05:31 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have a tool to convert atdf to xlsx.   See attached and click the [+] to expand the peripheral of interest.  The vectors should be at the bottom.

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 

PS well I was going to say that on the whole Microchip try to give the vector names in the headers the same names as in their datasheets so:

 

 

but it seems that some moron has gone and broken what was actually a good idea in previous tiny/mega AVRs and put in the datasheet an entirely different set of names to the ATDF and .h files (the .h being generated from the ATDF)

 

Of course it could be the atdf and .h that weren't "done right":

:\Program Files (x86)\Atmel\Studio\7.0\packs\atmel\AVR-Dx_DFP\1.5.74\atdf>grep "<interrupt index" AVR128DA64.atdf
        <interrupt index="1" module-instance="CRCSCAN" name="NMI"/>
        <interrupt index="2" module-instance="BOD" name="VLM"/>
        <interrupt index="3" module-instance="RTC" name="CNT"/>
        <interrupt index="4" module-instance="RTC" name="PIT"/>
        <interrupt index="5" module-instance="CCL" name="CCL"/>
        <interrupt index="6" module-instance="PORTA" name="PORT"/>
        <interrupt index="7" module-instance="TCA0" name="LUNF"/>
        <interrupt index="7" module-instance="TCA0" name="OVF"/>
        <interrupt index="8" module-instance="TCA0" name="HUNF"/>
        <interrupt index="9" module-instance="TCA0" name="CMP0"/>
        <interrupt index="9" module-instance="TCA0" name="LCMP0"/>
        <interrupt index="10" module-instance="TCA0" name="CMP1"/>
        <interrupt index="10" module-instance="TCA0" name="LCMP1"/>
        <interrupt index="11" module-instance="TCA0" name="CMP2"/>
        <interrupt index="11" module-instance="TCA0" name="LCMP2"/>
        <interrupt index="12" module-instance="TCB0" name="INT"/>
        <interrupt index="13" module-instance="TCB1" name="INT"/>
        <interrupt index="14" module-instance="TCD0" name="OVF"/>
        <interrupt index="15" module-instance="TCD0" name="TRIG"/>
        <interrupt index="16" module-instance="TWI0" name="TWIS"/>
        <interrupt index="17" module-instance="TWI0" name="TWIM"/>
        <interrupt index="18" module-instance="SPI0" name="INT"/>
        <interrupt index="19" module-instance="USART0" name="RXC"/>
        <interrupt index="20" module-instance="USART0" name="DRE"/>
        <interrupt index="21" module-instance="USART0" name="TXC"/>
        <interrupt index="22" module-instance="PORTD" name="PORT"/>
        <interrupt index="23" module-instance="AC0" name="AC"/>
        <interrupt index="24" module-instance="ADC0" name="RESRDY"/>
        <interrupt index="25" module-instance="ADC0" name="WCMP"/>
        <interrupt index="26" module-instance="ZCD0" name="ZCD"/>
        <interrupt index="27" module-instance="PTC" name="PTC"/>
        <interrupt index="28" module-instance="AC1" name="AC"/>
        <interrupt index="29" module-instance="PORTC" name="PORT"/>
        <interrupt index="30" module-instance="TCB2" name="INT"/>
        <interrupt index="31" module-instance="USART1" name="RXC"/>
        <interrupt index="32" module-instance="USART1" name="DRE"/>
        <interrupt index="33" module-instance="USART1" name="TXC"/>
        <interrupt index="34" module-instance="PORTF" name="PORT"/>
        <interrupt index="35" module-instance="NVMCTRL" name="EE"/>
        <interrupt index="36" module-instance="SPI1" name="INT"/>
        <interrupt index="37" module-instance="USART2" name="RXC"/>
        <interrupt index="38" module-instance="USART2" name="DRE"/>
        <interrupt index="39" module-instance="USART2" name="TXC"/>
        <interrupt index="40" module-instance="AC2" name="AC"/>
        <interrupt index="41" module-instance="TCB3" name="INT"/>
        <interrupt index="42" module-instance="TWI1" name="TWIS"/>
        <interrupt index="43" module-instance="TWI1" name="TWIM"/>
        <interrupt index="44" module-instance="PORTB" name="PORT"/>
        <interrupt index="45" module-instance="PORTE" name="PORT"/>
        <interrupt index="46" module-instance="TCA1" name="LUNF"/>
        <interrupt index="46" module-instance="TCA1" name="OVF"/>
        <interrupt index="47" module-instance="TCA1" name="HUNF"/>
        <interrupt index="48" module-instance="TCA1" name="CMP0"/>
        <interrupt index="48" module-instance="TCA1" name="LCMP0"/>
        <interrupt index="49" module-instance="TCA1" name="CMP1"/>
        <interrupt index="49" module-instance="TCA1" name="LCMP1"/>
        <interrupt index="50" module-instance="TCA1" name="CMP2"/>
        <interrupt index="50" module-instance="TCA1" name="LCMP2"/>
        <interrupt index="51" module-instance="ZCD1" name="ZCD"/>
        <interrupt index="52" module-instance="USART3" name="RXC"/>
        <interrupt index="53" module-instance="USART3" name="DRE"/>
        <interrupt index="54" module-instance="USART3" name="TXC"/>
        <interrupt index="55" module-instance="USART4" name="RXC"/>
        <interrupt index="56" module-instance="USART4" name="DRE"/>
        <interrupt index="57" module-instance="USART4" name="TXC"/>
        <interrupt index="58" module-instance="PORTG" name="PORT"/>
        <interrupt index="59" module-instance="ZCD2" name="ZCD"/>
        <interrupt index="60" module-instance="TCB4" name="INT"/>
        <interrupt index="61" module-instance="USART5" name="RXC"/>
        <interrupt index="62" module-instance="USART5" name="DRE"/>
        <interrupt index="63" module-instance="USART5" name="TXC"/>

As you can see the names in the .h are just "<module-instance>_<name>_vect" in fact taken from this.

 

Last Edited: Tue. Feb 2, 2021 - 05:43 PM