This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

SVC and fault handling not passed to application

First step of trying to integrate S132 to a small OS is failing completely.

When I use SVC the system ends up in hanging in hard fault.

The SoD handler ends up trying to read branch address from location 0xa891be2c - which causes the hardfault. (The hardfault handler itself has the same problem)

The SoD it not enabled - for now I have just moved the OS to 0x1f000/0x20002128.

Am I supposed to do any initialization for this?

The invalid memory location comes from the SVC handler reading @0x20000000 - why? I would have expected that passing handler is done to fixed vector table address at 0x1f000?

Parents
  • at 0x20000000 you have MBR vector forwarding address which is 0x1000 where the softdevice is located in flash. at 0x20000004 it is softdevice vector forwarding address which is the starting address of your of you OS (application) in flash. As the names suggest you need these for interrupt forwarding to any place within the flash as these are need to perform OTA DFU .

    Not sure how you managed to corrupt them, but it seems that there is some bug hiding somewhere in your implementation. Can you please dig into you code and see which part of your OS touched 0x20000000 and 0x20000004 just to be sure.

Reply
  • at 0x20000000 you have MBR vector forwarding address which is 0x1000 where the softdevice is located in flash. at 0x20000004 it is softdevice vector forwarding address which is the starting address of your of you OS (application) in flash. As the names suggest you need these for interrupt forwarding to any place within the flash as these are need to perform OTA DFU .

    Not sure how you managed to corrupt them, but it seems that there is some bug hiding somewhere in your implementation. Can you please dig into you code and see which part of your OS touched 0x20000000 and 0x20000004 just to be sure.

Children
No Data
Related