cancel
Showing results for 
Search instead for 
Did you mean: 

Hard fault after loading application with IAP

nir2
Associate II
Posted on July 20, 2010 at 16:24

Hard fault after loading application with IAP

4 REPLIES 4
trevor23
Associate III
Posted on May 17, 2011 at 13:59

some code would be useful! Please provide the code you use to do the jump.

Are you sure interrupts are disabled before the jump?.

nir2
Associate II
Posted on May 17, 2011 at 13:59

Yes, interrupts are disabled before jump. Anyway, I found the source of the problem - changing some settings in NVIC which are different from reset state.

bernard239955_st
Associate
Posted on May 17, 2011 at 13:59

Hello,

   I have a similar problem (I try to run freeRTOS after an other OS). What is the problem with changing some NVIC settings?

PS: also if you know can you teach me about the SVC instruction (I know this is equivalent to SWI but I don't understand where it jumps and why).

Thank you.

nir2
Associate II
Posted on May 17, 2011 at 13:59

Hello,

I was getting the hard fault after enabling USART2 IRQ in NVIC - I am not sure if this or combination of this with other setting caused the hard fault. The point is that jumping from the bootloader to application should be done with register settings as close as possible to register settings after reset.

Upon calling SVC instruction, CPU enters supervisor mode and jumps to the SVC handler which should have a reference in the vector table.