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

Hardfault ble_nus_send_data

Hello!

Im getting a hardfault when trying to send 10 bytes data via NUS. I receive the data, but the app crashes:

0> <error> hardfault: HARD FAULT at 0x00000000
0> <error> hardfault: R0: 0x20008170 R1: 0x00000000 R2: 0x00000000 R3: 0x00000002
0> <error> hardfault: R12: 0x000001F4 LR: 0x0003F75F PSR: 0x00000000
0> <error> hardfault: Cause: The processor has attempted to execute an instruction that makes illegal use of the EPSR.

Im using FreeRTOs + SD132 v 6.1.1 and SDK 15.3

Any idea where to look at?

Parents
  • This looks like a POP instruction gone wrong, mostly happens when the POP instruction put garbage values in PC to return to the previous context. Hard to say what caused the stack corruption with the information you provided. Can you run your program on nRF52840 to see if this problem goes away. If it does, then we can be sure that this is caused by a stack overflow

Reply
  • This looks like a POP instruction gone wrong, mostly happens when the POP instruction put garbage values in PC to return to the previous context. Hard to say what caused the stack corruption with the information you provided. Can you run your program on nRF52840 to see if this problem goes away. If it does, then we can be sure that this is caused by a stack overflow

Children
Related