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

The Question of app_error_fault_handler.

Hello Nordic!

I'm developing with nrf52840, s340, and SDK 15.3.0

Sometimes, I got an error in app_error_fault_handler. 

This is information that gives me in app_error_fault_handler.

Received a fault! id: 0x00001001, pc: 0x00061c94, info: 0x00000000

SOFTDEVICE: INVALID MEMORY ACCESS

I know this problem is violate at softdevice section. 

pc location is memset fuction.  I want to know return address sins memset finised.

How to do that ? 

Parents
  • Hello, 

    It sounds like your program is either passing an invalid pointer or the wrong number of bytes to memset. I did a quick test here, and it does not seem to be possible unwind the call stack to find the return address. But you may see the memset pattern in RAM if this is caused by a buffer overrun which would help you find the start pointer. The fault is triggered as soon as the app writes into the Softdevice's RAM region.

    Another option is to verify the arguments each time you call memset in your code.  

Reply
  • Hello, 

    It sounds like your program is either passing an invalid pointer or the wrong number of bytes to memset. I did a quick test here, and it does not seem to be possible unwind the call stack to find the return address. But you may see the memset pattern in RAM if this is caused by a buffer overrun which would help you find the start pointer. The fault is triggered as soon as the app writes into the Softdevice's RAM region.

    Another option is to verify the arguments each time you call memset in your code.  

Children
Related