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

nRF52840 based MDBT50Q flashing error.

Sir,

I have a MDBT50Q-UFL evaluation board. I am using Keil uVision 5 and flashing is done through ST-Link. I downloaded the example files from http://developer.nordicsemi.com/nRF51_SDK/nRF5_SDK_v15.x.x/nRF5_SDK_15.0.0_a53641a.zip . I taken the UART example from the path nRF5_SDK_15.0.0_a53641a\examples\ble_peripheral\ble_app_uart\pca10040\s132\arm5_no_packs\ble_app_uart_pca10040_s132 . When I build it, it is ok and bulided. Then I flashed the softdevice it shows "No J-link found".

Then in Project > Option for Target > Debug I changed J-LINK to ST-LINK Debugger. 

After then I flashed, then it shows a new error.

In my learning I understand that something want to change in this window:

Option for Target > Debug > Settings(Near ST-Link Debugger) > Flash Download > Programming Algorithm

Please HELP ME to solve this.

  • Hello,

    You should be using the pca10056 project files, as these are intended for the nRF52840. I know it is a bit confusing, but PCA10056 is the name of the development kit with the nRF52840, while PCA10040 is the name of the development kit with the nRF52832.

    It seems like you have forgotten to flash the softdevice first before programming your application. The "Coretex M4" error is a typical error message to get when the softdevice is missing.

    The softdevice is the .hex file found in:

    SDK\components\softdevice\s140\hex\

    Note that it is the s140 softdevice that is used on the nRF52840.

    Now to flash it, I have never tried this using an ST link, but maybe you can try to open the same project in segger embedded studio.

    Open:

    SDK\examples\ble_peripheral\ble_app_uart\pca10056\ses\

    And open the project file. Segger embedded studio (full version) is free to use for nRF5 development. Please see this guide on how to install, and activate the license.

    Segger embedded studio will automatically upload the softdevice for you.

    Alternatively, you can try Nordic Command Line Tools or nRFgo Studio, but I don't know whether any of them work with the ST link.

    Your last option is to figure out how to upload .hex files with ST Firmware, and upload the .hex files that way.

    Best regards,

    Edvin

  • Sir,

    Thank you for your reply. I solved the issue by the following steps.

    1. Do as I documented above(the question).

    2. In this window Option for Target > Debug > Settings(Near ST-Link Debugger) > Flash Download > Programming Algorithm click Add and select nRF52xxx SoftDevice Error and nRF52xxx_UICR if the target is Soft Device. If the target is Project file then select nRF52xxx and nRF52xxx_UICR.

    3. Then change the size of RAM to 0x2000.

    4. Build the project file.

    5. Flash the soft device.

    6. Flash the Project file.

Related