_int_unexpected_isr

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

_int_unexpected_isr

956 Views
oldone1
Contributor II

1. has anybody rewritten (int_unx.c) to use some type of raw serial so that it will work with interrupt serial (ittyx) instead of just polled (ttyx).

 

2. Is there a document describing the data you get from _int_unexpected_isr to help determine the problem.

 

3. Spent about 3 hours yesterday in _int_unexpected_isr because of a gpio_ioctl(read) on a const GPIO_PIN_STRUCT, the const made the structure end up in read only memory and gpio_ioctl(read) caused access to read only memory and that is how I ended up in _int_unexpected_isr

 

cheers,

1 Reply

415 Views
egoodii
Senior Contributor III

You will want to add these prints to int_unx.c:

printf ("BFAR = %x\n", (*((volatile unsigned long *)(0xE000ED38))));
printf ("CFSR = %x\n", (*((volatile unsigned long *)(0xE000ED28))));
printf ("HFSR = %x\n", (*((volatile unsigned long *)(0xE000ED2C))));
printf ("DFSR = %x\n", (*((volatile unsigned long *)(0xE000ED30))));
printf ("AFSR = %x\n", (*((volatile unsigned long *)(0xE000ED3C))));

 

I have found the first 8 words of the first memory dump to generally be the exception stack R0/1/2/3/12/LR/PC/PSP in order.

 

An apnote to understand it all:

http://www.keil.com/appnotes/files/apnt209.pdf