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

Hardfault error while executing example from BLE Characteristics tutorial

Hi,

I modified the code from the tutorial at devzone.nordicsemi.com/.../ to send measurements from my RHT sensor but encountered some basic difficulties. After fitting the example code from github to my requirements, I tried flashing it with the default memory ranges set in Keil project, but it is generating hardfault error (of course I do it after flashing s130 softdevice). After modifying the ranges the same way as in SoftDevice Specification for my softdevice version (S130_SDS_v2.0), my program flashed properly and doesn't generate hardfault while running but still don't react in any way. So I tried running the example code from github (CompletedCode from BLE characteristics tutorial from Nordic) without any changes (only filling it with the memory ranges from SDS), but it still doesn't give me any reaction as I expect. Changing a number of LED in nrf_gpio_pin_toggle() in timer_timeout_handler() causes no reaction, it still blinks the same LED_0 (number of pins with LEDs are set properly). MCU without flashing softdevice and any BLE utilisation works fine (the program providing the communication via I2C with RHT sensor runs without any problems). I'll be very thankful for any advice what I should do next to run this example.

I'm using:

nRF5_SDK_11.0.0,

BLE 400 with NRF51822 board

Parents
  • I'm using pca10028. I needed to edit the pca10028.h, according to the schematics for BLE400 board, found here - www.waveshare.com/.../BLE400-Schematic.pdf In the example from tutorial, the LED_0 isn't used but it blinks anyway despite not being defined. Furthermore, changing the used LED_4 by example to LED_3 etc brings no reaction, neither of other LEDs than LED_0 is blinking! This is confusing for me, too. The debugger shows the MCU ending in hardfault handler. I've set breakpoint in the beginning of main but I think that I can’t reach this breakpoint, executing of the program during debug session is stopping in 0x202A4. Then if I stop and rerun executing, program stuck in loop between 0x1CB84 and 0x1CB8A. As for trying the other examples, I tried running the ble_app_pwr_profiling example (with command for LED toggling) but it has the same effect as previously. In this case, however, every diode flash, without toggling.

Reply
  • I'm using pca10028. I needed to edit the pca10028.h, according to the schematics for BLE400 board, found here - www.waveshare.com/.../BLE400-Schematic.pdf In the example from tutorial, the LED_0 isn't used but it blinks anyway despite not being defined. Furthermore, changing the used LED_4 by example to LED_3 etc brings no reaction, neither of other LEDs than LED_0 is blinking! This is confusing for me, too. The debugger shows the MCU ending in hardfault handler. I've set breakpoint in the beginning of main but I think that I can’t reach this breakpoint, executing of the program during debug session is stopping in 0x202A4. Then if I stop and rerun executing, program stuck in loop between 0x1CB84 and 0x1CB8A. As for trying the other examples, I tried running the ble_app_pwr_profiling example (with command for LED toggling) but it has the same effect as previously. In this case, however, every diode flash, without toggling.

Children
No Data
Related