Problem with migrating project from custom board based on nRF52832 to a custom board nRF52833

I have a working project on a custom board based on nRF52832 ( PCA10040, S132). This board is a BLE Peripheral.

My task is to migrate this to a custom board based on nRF52833 ( PCA10100, S113).

The current status is I am able to compile the code on SEGGER (without any errors) for the target board and also compile a secure bootloader for the target board.

I have used a nRF52 DK (based on nRF52832) can connected my custom board to SWD on the DK to flash the target board. (Not sure if this is right for the target board but just followed what worked for me when I flashed the custom board based nRF52832). 

The flashing process did not give me any errors.

End result was the app does not work as I do not see BLE Device name on nrf-Connect on my mobile.

Grateful if you can give me additional pointers to check.

  • Hi,

    Have you tried debugging your project, and see where it fails?

    See e.g. this video on how to debug: https://www.youtube.com/watch?v=uP8RYgYGRvI&ab_channel=NordicSemiconductor

  • Sigurd,

    Thanks for the reply. I was struggling to get debug output inspite of enabling NRF_LOG_ENABLE and NRF_LOG_BACKEND_RTT. I had to flash the board first then 'Attach Debugger` to make it work.

    Here is the debug output:

    <info> app: Kosha Device main()
    <info> app: <app> info : Reset Status 2 
    
    <info> app: Setting vector table to bootloader: 0x00078000
    <info> app: Setting vector table to main app: 0x0001C000
    <debug> app: ble dfu service interupts enabled
    <info> app_timer: RTC: initialized.
    <debug> app: timer initialised
    <debug> app: power management initialised
    <debug> app: Got RAM Start address
    <warning> nrf_sdh_ble: Insufficient RAM allocated for the SoftDevice.
    2608 to 0x20002638.
    C8.
    
    <error> app: End of error report

    I am reading this tutorial  to see how I can make adjustments to RAM

  • I adjusted the RAM_START as below:

    The Application size 112536 byes as indicated on bootloader setting. Assumed 114k or 0x1C800

    Therefore RAM_START = 0x20020000 - 0x1C800 = 0x200003800 (I am not entirely sure if this method of arriving at RAM_START value is correct)

    The debug output suggested new values for RAM_START and RAM_SIZE

    <info> app: 
    
    ------------------
     Logging initiated
     Starting main()
    <info> app:  Reset Status 2 
    
    <info> app: Setting vector table to bootloader: 0x00078000
    <info> app: Setting vector table to main app: 0x0001C000
    <debug> app:  BLE DFU service interupts enabled
    <info> app_timer: RTC: initialized.
    <debug> app:  Timer initialised
    <debug> app:  Power management initialised
    <debug> app: Attempting BLE Stack init
    <debug> nrf_sdh: State request: 0x00000000
    <debug> nrf_sdh: Notify observer 0x00033080 => ready
    <debug> nrf_sdh: State change: 0x00000000
    <debug> nrf_sdh: State change: 0x00000001
    <debug> app: RAM Start Address 0x20003800
    <debug> app: nrg_sdh_ble_default_cfg_set: returned : 0
    <debug> nrf_sdh_ble: RAM starts at 0x20003800
    <debug> nrf_sdh_ble: RAM start location can be adjusted to 0x20002638.
    <debug> nrf_sdh_ble: RAM size for application can be adjusted to 0x1D9C8.
    

    After changing the RAM_START and RAM_SIZE I was able to proceed. Thanks for the help.

Related