We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I'm trying to override the standard method provided in SAM7.S in a RealView project for an ATMEL AT91SAM7S processor that vectors to the interrupt service routines. I've found a couple of references on the subject, but am struggling to try something simple to take my first step.
Basically, I'm trying to create either a C or ASM function that just reads the interrupt vector from the AIC and calls that function. The default method provided in SAM7.S vector table is:
; LDR PC,IRQ_Addr LDR PC,[PC,#-0xF20] ; LDR PC,FIQ_Addr LDR PC,[PC,#-0xF20]
I've read in app notes, etc. how the above works by branching to the IRQ vector obtained by reading it from FFFFF100, but that's not what I want to do. Ultimately, I want to branch to a function that can save the processor's context, service the interrupt, restore a context and return. For now, I'd be happy with a function that just read the IRQ vector and called the ISR and returned. I'm using a ULINK in my RealView project, but I can't seem to get a breakpoint to break in the interrupt vector table (even if I use the default SAM7.S provided method, which does work in my app, when I opt to use it), so I can't step through the code and figure out why it doesn't work. I always end up in the PAbt_Handler if I comment out the two uncommented lines and uncomment the two commented lines. I did write C functions named IRQ_Addr and FIQ_Addr, declare them as EXTERN in SAM7.S. These changes build without any errors or warnings, but setting a breakpoint in those functions doesn't ever stop the debugger there. Can anyone provide me the bare bones minimum changes to a RealView project for an ATMEL AT91SAM7S processor to the interrupt vector table in SAM7.S to implement custom IRQ and FIQ handlers. All I need (or would like to see) is a set of C functions for those two handlers that read the IRQ vector from the AIC, call the ISR and return, and that included the min ISR entry/exit code. I think that'd be enough to get me started. Thanks for any help. Dave.
Does this help you ? :www.arm.com/.../DAI0030A_sw_int.pdf
Perhaps... I printed it out and am about to try to digest it. I'll let you know.
Thanks Viktor!!
I made some modifications to that example to use with LPC2148 and is working fine. If you want a copy of it send me your e-mail
Regards
Viktor
Thanks Viktor, I'd appreciate that. You can send it to funbotix at yahoo dot com. I've been reading the doc you recommended all day, and now my brain hurts. Quite a bit of good info there.
Dave.
Hi Viktor!
Please can you send me a copy too? My addrss: thomas.temp at surfeu.at
Thanks Thomas
Hello viktor
i face similar problem, can u please send me a copy also.....
my id is s.sachin@lohiagroup.com
Thanks a lot sachin