Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs

Flashing the code to nRF52832 BLE module.

Hi, I need some help on flashing the code to nRF52832 BLE module.
I would like to mention that I am flashing the code to nRF module using ST-link v2 debugger with the help of open-OCD tool.
Whenever, I flash the example hex file provided by nordic (i.e. ble_app_uart_pca10040_s112.hex file), it is flashed successfully and I could see "Nordic_UART" while scanning for BLE.
However, when I try to flash my custom nRF application, only on repetitive flashing I could see the BLE advertisement.
May I know why it occurs this way? i.e. only after flashing the same code multiple times, it's working?
Please help. Thanks in advance.

  • Hello,

    This is not really a debugger that we support, but it seems like you get it to almost work, if it is advertising. Did you remember to reset the nRF chip after you have programmed it? I don't know how you program it exactly, but you can try to power cycle the nRF52832 after it has been programmed.

    Best regards,

    Edvin

  • Thank you very much for your response. 

    I would like to mention that I'm resetting the nRF chip every time after programming it. 

    May I know if there are any other solutions that would help? Thanks in advance!

  • Perhaps you are not flashing the softdevice? I don't know what softdevice your application is using, but I guess it is either S132 or S112 (you should be able to tell from your project settings. If not, let me know what example your application started from).

    Try flashing the softdevice before flashing your application. The softdevices are found in (depending on which one you are using):

    SDK\components\softdevice\s132\hex\s132_nrf52_7.2.0_softdevice.hex

    SDK\components\softdevice\s112\hex\s112_nrf52_7.2.0_softdevice.hex

    (the softdevice version, which is 7.2.0 may differ from your case, depending on what SDK version you are using. These names are from SDK17.1.0).

    Best regards,

    Edvin

  • Thank you for the response. 

    Yes, I'm using S112 softdevice, and SDK17.1.0 only.  I'm using ble_app_uart example. 

    As you suggested, I tried flashing the softdevice from SDK\components\softdevice\s112\hex\s112_nrf52_7.2.0_softdevice.hex and then flashed my application. But no changes were seen. It shows chip is programmed and target has been reset but BLE broadcasting is not seen.

  • Did you do any modifications to the application (ble_app_uart)? How do you flash the .hex files? And where exactly do you find the .hex file for the application?

    And you are sure that the flash is not erased between flashing the softdevice and the application? 

Related