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

Erase Failed: Flash Download Failed - Flashing SoftDevice with Keil (CMSIS-DAP)

Hello!

I'm trying to flash my SeeedStudio Tiny BLE board (nRF51822 QFAA) with SoftDevice S110 using Keil but it doesn't look like it's going to let me. I'm just getting the following error:

Erase Failed! Error: Flash Download Failed - "Cortex-M0"

I've read that it happens when you try to flash a program over SoftDevice but I'm actually trying to flash SoftDevice itself...

It's letting me do a full chip erase but it's not helping at all, I just keep getting that error whenever I try to flash something, SoftDevice or any program, really. The IROM1 and IRAM1 settings are correct, they match the information provided in the datasheet: IROM1: 0x0 (size: 0x40000) IRAM1: 0x20000000 (size: 0x4000)

I'd appreciate any sort of advice here. Thank you

  • Hi.

    • How exactly are you trying to flash your SoftDevice? Are you using nrfGo Studio?
    • Have you chosen correct debugger and device?
    • Do you provide power to your device?
    • What sort of debugger do you use and how have you wired it up?

    image description

    • No, I'm not using nRFGo Studio.
    • Yes, I'm using the CMSIS-DAP debugger, it's the appropriate one for the board I'm using, because it has a built-in CMSIS-DAP programmer.
    • Yes, it has power.
    • Again, using built-in CMSIS-DAP debugger

    The settings that you've shown me match mine (with the exception of the debugger itself)

  • Yes, though in the troubleshooting section it says that I'm supposed to do something specific to that mbed kit board, something I can't really do on mine.

    Anyway, I've got it now. Compiling using GCC and then merging the hex file with the SoftDevice (using SRecord) works just fine!

  • Hi! I'm glad you got i working. I have been asking around and think I might have found the cause to your original problem. Try the following:

    1. Open "Target options -> Debug -> Settings -> Flash Download".
    2. Remove the entry in the "Programming Algorithm" list.
    3. Click "Add" and add "nRF51xxx External Connectivity Board" instead to the list.
    4. Make sure "Erase Full Chip" is enabled in "Download Function".
Related