bluetoothiotnrf51

ble_app_uart Can not be loaded completely on nRF 51822


I have problem flashing main program and SoftDevice on the nrf 51822 module. I have Keil version 5.24 and I am using SDK v12.3 .

I can flash SoftDevice easily but after that I can not flash the main program on the device. in the Keil it just shows the error erase failed, flash download failed - "cortex-m0" . But if i try to do this process by the nRFgo studio after that i flashed SoftDevice, when i try to flash the main program it shows the error : This hex file has data in SoftDevice region. Try programming using "Program SoftDevice", or erase all before programming.

Could it be cause because of ROM memory area configuration and addresses? If so how can i fix it?

Thank for your attention.


Solution

  • After a while, I finally found out where the problem was laid. I tried to change the ROM memory allocation for SoftDevice and main program and it finally works.

    Basically SoftDevice allocation must be bellow the main program in the memory. For example if we have memory form 0x00 to 0xff, The SoftDevice can be allocated from 0x00 to 0x2f and the remained area from 0x2f to the end must be reserved for main program.

    Depending on which SoftDevice(SD) you use eg. S110, S130 etc. , The size of SDs can vary So the memory allocation of SDs start from 0x00 but the ending point depends on which SD you use, So I changed the memory allocation address in Kiel, And can get information about SDs compatibility with nRF devices and SDs features in the site :

    https://infocenter.nordicsemi.com

    Here is another helpful link :

    https://devzone.nordicsemi.com/f/nordic-q-a/38067/ble_app_uart-can-not-be-loaded-completely-on-nrf-51822