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

Keil Can Erase nRF51822 but not Program?

I find this strange but I can program the HRM demo fine but with my own code it compiles with no errors or warnings but will not program with Error: Flash Download failed - "Cortex-M0".

The funny thing is after getting that error i can still erase the chip which means it is detected:

[i]JLink info:

DLL: V4.72 , compiled Jun 12 2013 15:47:08 Firmware: J-Link OB-SAM3U128 V1 compiled Feb 5 2013 15:27:51 Hardware: V1.00 S/N : 480203173

  • JLink Info: Found SWD-DP with ID 0x0BB11477
  • JLink Info: FPUnit: 4 code (BP) slots and 0 literal slots
  • JLink Info: Found Cortex-M0 r0p0, Little endian. ROMTableAddr = 0xE00FF003

Target info:

Device: nRF51822_xxAA VTarget = 3.300V State of Pins: TCK: 0, TDI: 0, TDO: 1, TMS: 1, TRES: 1, TRST: 1 Hardware-Breakpoints: 4 Software-Breakpoints: 8192 Watchpoints: 2 JTAG speed: 1000 kHz

Full Chip Erase Done.[/i]

Is my project set up wrong? I copied the HRM code and have been modifying it to create a new service.

Thanks everyone!

Parents
  • So that was a problem as well. The reason i couldnt program my code even though the HRM code worked was because for some reason the Read Only Memory Areas options changed from the HRM project when i copied it (not sure why). Once i put them back to the same values as the HRM code it worked fine.

    On that note, how can we calculate the Read Only Memory Areas? Im not sure what is IROM1,IROM2,IRAM1,IRAM2? I didnt see anything on this in the spec sheet for the nRF51822.

Reply
  • So that was a problem as well. The reason i couldnt program my code even though the HRM code worked was because for some reason the Read Only Memory Areas options changed from the HRM project when i copied it (not sure why). Once i put them back to the same values as the HRM code it worked fine.

    On that note, how can we calculate the Read Only Memory Areas? Im not sure what is IROM1,IROM2,IRAM1,IRAM2? I didnt see anything on this in the spec sheet for the nRF51822.

Children
No Data
Related