Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 262198

Interrupt offset (9*1u) or (9*2u)

$
0
0

I am trying to understand which is the correct offset for interrupts (for example Timer0_A3 should be 0FFF2h.

The msp430g2553.h file has:

ifdef __ASM_HEADER__ /* Begin #defines for assembler */

#define TIMER0_A0_VECTOR        ".int09"                    /* 0xFFF2 Timer0_A CC0 */

#else

#define TIMER0_A0_VECTOR        (9 * 1u)                     /* 0xFFF2 Timer0_A CC0 */

/*#define TIMER0_A0_ISR(func)     ISR_VECTOR(func, ".int09")  */ /* 0xFFF2 Timer0_A CC0 */ /* CCE V2 Style */

#endif

The offset is vector address is 0FFE0 the following was found on the internet

************************************************************
* Interrupt Vectors (offset from 0xFFE0)
************************************************************/
#define PORT1_VECTOR                (2 * 2u)  /* 0xFFE4 Port 1 */
#define PORT2_VECTOR               (3 * 2u)  /* 0xFFE6 Port 2 */
#define USI_VECTOR                     (4 * 2u)  /* 0xFFE8 USI */
#define ADC10_VECTOR               (5 * 2u)  /* 0xFFEA ADC10 */
#define TIMERA1_VECTOR          (8 * 2u)  /* 0xFFF0 Timer A CC1, TA */
#define TIMERA0_VECTOR         (9 * 2u)  /* 0xFFF2 Timer A CC0 */
#define WDT_VECTOR                  (10 * 2u) /* 0xFFF4 Watchdog Timer */
#define NMI_VECTOR                   (14 * 2u) /* 0xFFFC Non-maskable */
#define RESET_VECTOR              (15 * 2u) /* 0xFFFE Reset [Highest Priority] */
***************************************************************

The internet offset (9*2u) makes sense but the msp430g2553.h file works  I am so Confused 0FFE0 + 18 (0012h) = 0FFF2 not ( 0FFFEh +9)

 


Viewing all articles
Browse latest Browse all 262198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>