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
  • What project are you using? pca10028 or pca10040? I think pca10028 should work out of the box. It shouldn't be necessary to modify the memory ranges. I'm a bit confused why you are saying it still toggles LED_0. The unmodifed example toggles LED_4. LED_0 is not even defined. Is it advertising? Have you tried the debugger? Try setting a breakpoint in the start of main(). Do other BLE examples from SDK11 work?

Reply
  • What project are you using? pca10028 or pca10040? I think pca10028 should work out of the box. It shouldn't be necessary to modify the memory ranges. I'm a bit confused why you are saying it still toggles LED_0. The unmodifed example toggles LED_4. LED_0 is not even defined. Is it advertising? Have you tried the debugger? Try setting a breakpoint in the start of main(). Do other BLE examples from SDK11 work?

Children
No Data
Related