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!

Related