Quantcast
Channel: Tools
Viewing all articles
Browse latest Browse all 91752

Forum Post: Seeking ARM interrupt handler example and setup in C ?

$
0
0

Can anyone *please* point me to a C example implementation of an ARM interrupt handler in C ?

All I have figured out is:

interrupt void timer0InterruptHandler(void) { }

I do not know how to configure the interrupt vector table or enable a desired interrupt.   According to the ARM subsystem doc Table 9-1. AINTC Interrupt Connections, interrupt number 32 is TINT0 Timer 0 - TINT12.  Can I simply assign the function pointer address of timer0InterruptHandler to the TINT0 location in the vector table at offset of (32*4)? 

void init_vect()    {   
#ifdef UBL_USE_NOR_BOOT volatile Uint32 *ivect = (volatile Uint32 *)0x8000; *ivect++ = 0xEAFFFFFE; /* Reset @ 0x00*/ #else volatile Uint32 *ivect = (volatile Uint32 *)0x8004; #endif
*ivect++ = 0xEAFFFFFE; /* Undefined Address @ 0x04 */ *ivect++ = 0xEAFFFFFE; /* Software Interrupt @0x08 */ *ivect++ = 0xEAFFFFFE; /* Pre-Fetch Abort @ 0x0C */ *ivect++ = 0xEAFFFFFE; /* Data Abort @ 0x10 */ *ivect++ = 0xEAFFFFFE; /* Reserved @ 0x14 */ *ivect++ = 0xEAFFFFFE; /* IRQ @ 0x18 */ *ivect = 0xEAFFFFFE; /* FIQ @ 0x1C */ }

I am using the Davinci DM6466 ARM ( not the DSP ).  This is for bare-metal embedded. I do not want to use Linux , SYS/BIOS or other RTOS. There is no StarterWare support for the DM6446.

Thank you for any assistance,

-Ed

CCS v5.5

DM6466


Viewing all articles
Browse latest Browse all 91752

Trending Articles



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