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
  • It is the SVC handler of the softdevice that reads the wrong memory. In the blinky project, locations 0x20000000 and 0x20000004 is initialized when the software enters the application main. In my project it is not. If I initializes these two addresses at the beginning of application the handler works fine with SVC below 0x10 being forwarded to me. I suspect the problem is in my project settings and not code.

Reply
  • It is the SVC handler of the softdevice that reads the wrong memory. In the blinky project, locations 0x20000000 and 0x20000004 is initialized when the software enters the application main. In my project it is not. If I initializes these two addresses at the beginning of application the handler works fine with SVC below 0x10 being forwarded to me. I suspect the problem is in my project settings and not code.

Children
No Data
Related