This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

HardFault_Handler with s120

Hi all, I am using nrf51822, on pca10005 board, and debuging the s120/ble_app_hrs exple. I charged s120 v2.0 in memory. The problem that I have is when ble_stack_init() is executed, I get a HardFault_Handler. I triyed also with s120 v1.0 but I got the same problem. Could anyone help me please ?

  • Hi mohBOSS,

    If you S120 v2.0 you may want to update the API headers file in the components\softdevice\s120\headers to the ones come with the s120 v2.0.

    Could you step into the ble_stack_init() function to see which function cause the issue ?

    Have you got a relatively new PCA10005 board? The S120 might not work well on an older version of the chip (XLR1)

  • Hi Hung Bui, thank you for replying. In fact, the SOFTDEVICE_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_XTAL_75_PPM, false) is causing the probleme, and precisely when calling sd_nvic_EnableIRQ(SWI2_IRQn) function. I think that the API headers are updated, and the board is pca10005 rev 2.2.0.

  • It's pretty strange. Which SDK are you using ? Could you try to use SDK v6.1 with S120 v1.0 production ? Are you sure you haven't modified the source code, the example source code came with SOFTDEVICE_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_XTAL_20_PPM, false);

    I assume that you are testing s120/ble_app_hrs_c example, to allow the example to work you would need to connect the UART line properly and has a terminal running on the PC. Otherwise the simple uart may get stuck in the simple_uart_get loop.

  • I have already used SDK v6.1 with S120 v1.0. But, I am using this clock NRF_CLOCK_LFCLKSRC_XTAL_75_PPM. I'll change it, but I still doubting about the result.

    Thank you Hung.

  • I reused the S120 v1.0 with SDK v6, and things are better. However, when debugging, the program stops in the simple_uart_put(uint8_t cr) function (in simple_uart.c file), exactly in the while loop, but I didn't understand the reason.

Related