Skip to main content
nir2
Associate
July 20, 2010
Question

Hard fault after loading application with IAP

  • July 20, 2010
  • 4 replies
  • 841 views
Posted on July 20, 2010 at 16:24

Hard fault after loading application with IAP

    This topic has been closed for replies.

    4 replies

    trevor23
    Associate III
    May 17, 2011
    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?.

    bernard239955_st
    Visitor II
    May 17, 2011
    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
    nir2Author
    Associate
    May 17, 2011
    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.

    nir2
    nir2Author
    Associate
    May 17, 2011
    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.