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

Flash download failed - "Cortex-M4"

I successfully used my nrf52DK with latest production SD 132 and latest SDK (12.2.0), everything is on latest Keil v5. Then I needed to program another board (nRF51 Dongle) by using the same Keil, I failed with that and eventually wanted to switch back to my nrf52DK but I am no longer able to program the board by using the same project which was used prior to the Dongle "exercise" now my attempt to load the program results in image description

so I went to Options->Debug->Settings combobox and saw there ULINK2/ME Cortext Debugger, I don't think I explicitly made change there, seems like that setting was somehow got corrupted from my previous experiments with the Dongle. So I changed that value to J-Link/J-Trace Cortext but now my attempt to Load results in:

image description

These are my settings: image description

Why did this issue started appearing and how to fix it? And would also be good to figure out how to avoid such problems in future.

[Edit/Addition] This is the target settings for the Dongle: image description

This is the Debug settings for the Dongle: image description

And this Target for the nrf52DK: image description

And this is Debug for the nrf52DK: image description

  • I am using the sample from nRF5_SDK_12.2.0_f012efa\examples\ble_peripheral\ble_app_template\nRF5_SDK_12.2.0_f012efa\examples\ble_peripheral\ble_app_template\pca10040\s132\arm5_no_packs, it uses Soft Device and my DK is loaded with that (S132) softdevice. The project worked with no problems, the problems started appearing AFTER I opened and tried to use (with my NRF51 Dongle) the project from nRF5_SDK_12.2.0_f012efa\examples\ble_peripheral\ble_app_template\pca10028\s130\arm5_no_packs

    which is also leveraging SD but another one, so, once I returned to the first project (for 10040) it started producing those symptoms I described in the question. Now I looked into another example and coplied IROM1, IRAM1 settings from there to be 0x1F000/0x61000 0x20002128/0xDED8 My project can now be loaded into the device, the problem is fixed. Thank you.

Related