Atmel website | ARM Community | AVR freaks | Technical Support
Banner
Welcome to AT91SAM Community Forum
http://www.at91.com/samphpbb/

Writing exception handlers
http://www.at91.com/samphpbb/viewtopic.php?f=8&t=2041
Page 1 of 1

Author:  Shiplord [ Tue Aug 01, 2006 6:04 pm ]
Post subject:  Writing exception handlers

I want to write a handler for 0x4, 0x10, 0xC exceptions on a AT91RM9200 and I code something like this:

Code:
...
void my_exception_handler()
{
 // do something...
}
...


void init ()
{
  ...
  AT91F_AIC_SetExceptionVector((unsigned int *)0x0C, &my_exception_handler);
  AT91F_AIC_SetExceptionVector((unsigned int *)0x10, &my_exception_handler);
  AT91F_AIC_SetExceptionVector((unsigned int *)0x4, &my_exception_handler);
...
}


it compiles/link fine but if an exception is thrown I can see within the debugger that it jumps to 0x10 but from that point my own handler will be not executed. What did I wrong?

Page 1 of 1 All times are UTC + 1 hour [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/