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

Hardfault on sd_softdevice_disable

Hi,

I am trying to run several applications sequentially on the nRF51822. I have another microcontroller controlling the nRF51822 by SPI. I init the stack, the services, advertise and my first application works well. Then the microcontroller tells the nRF51822 to disable the stack and I get an Hardfault before asking to init it again and to init then my new services for my second application. How could disabling the soft device cause an hard fault ?

Parents
  • Good! I couldn't quite imagine any way that a call to the sd_softdevice_disable() should cause a HardFault, so I did suspect something else being the real problem.

    For future reference, if you end up in the HardFault handler, that ususally means that you have triggered the MPU in some way, by writing to a protected peripheral, protected RAM or protected flash.

    To clear things up, I'll mark this answer as accepted.

Reply
  • Good! I couldn't quite imagine any way that a call to the sd_softdevice_disable() should cause a HardFault, so I did suspect something else being the real problem.

    For future reference, if you end up in the HardFault handler, that ususally means that you have triggered the MPU in some way, by writing to a protected peripheral, protected RAM or protected flash.

    To clear things up, I'll mark this answer as accepted.

Children
Related