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

Porting nRF52833 code to BL653

Hi,
I have a firmware that runs well on nRF52833 dev kit (SDK 17.02) and I am trying to port it to a Laird BL653 dev kit.
The firmware has a bootloader and it can perform DFU over Bluetooth.

The main difference between the nRF52833DK and the BL653 board is that the BL653 module does not use a crystal so I changed the following in sdk_config.h:


NRF_SDH_CLOCK_LF_SRC 0
NRF_SDH_CLOCK_LF_RC_CTIV 16
NRF_SDH_CLOCK_LF_RC_TEMP_CTIV 2
NRF_SDH_CLOCK_LF_ACCURACY 1
NRFX_CLOCK_CONFIG_LF_SRC 0
CLOCK_CONFIG_LF_SRC 0

If I apply these changes to the nRF52833DK it works fine.


After loading bootloader and softdevice on BL653, I can connect to DFU_Targ and send the ZIP package.
It all works fine until I power cycle the board, then Bluetooth stops advertising (but the microcontroller still executes my code).
The only way to restore the Bluetooth is by pressing the reset button.
Can anyone suggest where I should focus my attention?


I am quite new to Nordic devices so for this first project I hired a developer which did a good job but has not been able to help me with this issue.

  • Hi Francesco, 

    It is strange if it works after a soft reset but not after the power-on reset.

    Jhonny23 said:
    - Examples provided by Nordic (EG: ble_app_uart) work perfectly on BL653 dev ki

    I would suggest you use SDK examples like  ble_app_template or ble_app_uart as the base if they can work on the BL653 dev kit. 

    -Amanda H.

  • What could be the problem with this BL653 dev kit?

    That's a Laird product, isn't it?

    https://community.arm.com/developer/ip-products/system/f/embedded-forum/3257/debugging-a-cortex-m0-hard-fault

    So you'd need to contact Laird for support with their dev kit

  • Hi Jhonny23,

    I found this blog post when trying to fix a similar problem - it could also solve your problem...

    I was using the Segger IDE to program a Laird BL653 module on a customer's board - I was able to connect to it via Bluetooth - once. After doing an "--eraseall" command it never advertised itself over Bluetooth again.

    Looking at the armgcc Makefile showed that when programming the application hex file there is a 

    "--sectorerase" option. I have not found a way to specify this option within the Segger IDE.

    You can use the nRFconnect command line tools and a Windows batch file :

    REM nRF52833 firmware load script 
    REM Put this file here : ...\nRF5_SDK_17.0.2_d674dde\examples\ble_peripheral\MyApp
    del log.log
    nrfjprog.exe -f NRF52 --log -v
    nrfjprog.exe -f NRF52 --log --ids
    nrfjprog.exe -f NRF52 --log --expand --ids
    nrfjprog.exe -f NRF52 --log --recover
    nrfjprog.exe -f NRF52 --log --deviceversion
    nrfjprog.exe -f NRF52 --log --eraseall
    nrfjprog.exe -f NRF52 --log --program ..\..\..\components\softdevice\s113\hex\s113_nrf52_7.2.0_softdevice.hex
    nrfjprog.exe -f NRF52 --log --program .\pca10100\s113\ses\Output\Debug\Exe\MyApp.hex --sectorerase
    nrfjprog.exe -f NRF52 --log --rbp ALL
    nrfjprog.exe -f NRF52 --pinreset

    It seems that the order of events is

    1. erase all

    2. program the softdevice

    3. program the application hex, specifying only erase the necessary sectors ( --sectorerase )

    So it looks like programming the softdevice also programs something else (UICR?) that is erased by certain types of erase.

    I hope this helps :-)

    Cheers,

    Howerd

Related