This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

"Error - flash download failed - Cortex M0

I get following message when I try to program with the Blinky project a nrf51822 chip: "Error - flash download failed - Cortex M0.

What is wrong?

  • Hi,

    Still problem... this is what I have tried:

    (i). I erased the chip fully (soft device + application), then (ii). programmed with Kiel the HRS demo. Now it did not complain (for the first time!) and said "programming was succesful" (iii). Next I tried to run the Master Control Panel to scan if the chip could be communicating. This was not the case as the soft device must (?) be programmed too in order to obtain transmission. (iv). So then I went back to program the soft device, which went successful. (v). Then I tried to run the Master Control Panel to scan if the chip could be communicating. This was not the case again. (vi). So then I tried again to program with Kiel the HRS demo. Now this time (!) it did complain "Error - flash download failed - Cortex M0.

    I think maybe it could be the soft device hex file? I downloaded it and its name is S110_nRF51822_1.0.0.alpha6_softdevice.hex Could that be the source of the problem?

    Best Regards,

    Stanley

  • That is most definitely the trouble. 1.0.0 is extremely old, and you should make sure that you have the latest softdevice, version 5.2.0 (production version) or 6.0.0 (currently alpha). This is available from the regular web site here, after having signed in: https://www.nordicsemi.com/eng/nordic/Products/nRF51822-Development-Kit/nRF51822-SD/19504

    For future reference, the reason it fails is that version 1.0.0 of the softdevice was set up to use 128 kB of the flash, while later versions only use 80 kB. If you then try to use a new SDK with an old softdevice, the application will try to overwrite the softdevice, and causes an error.

    Also, you should always make sure that you program the softdevice first and then the application. The application can be programmed as many times as wanted on top of a softdevice, but programming a new softdevice will do an erase all first, meaning any application will be deleted.

  • Hi,

    Thanks for the softdevice update. I

    (i). programmed this time around with the 5.2.0 version (s110_nrf51822_5.2.0_softdevice.hex) to be conservative. Programming was successful.

    (ii). Then programmed with Kiel the HRS demo. Now this time again (!) it did complain "Error - flash download failed - Cortex M0.

    I am very confused now. Thought the problem was solved. It must be something more fundamental problem. What is your analysis?

    Best Regards,

    Stanley

  • Are you sure that you use the latest SDK as well, version 4.3.0? Can you please upload a screenshot of your project's target settings? You should make sure that IROM starts at 0x14000 and that IRAM starts at 0x20002000.

    If this is correct, and you still have trouble, can you please try to flash the application hex file using nRFgo Studio? Remember to use program application, not program softdevice.

  • I program the softdevie first and then the application. But still shows this message :Error: Flash Download failed - "Cortex-M0"

Related