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

Unable to program the NRF51422 using J-link

Hi The j-link detects the chip, but for not obvious reason the j-link and keil will trough an error when I want to program the chip, here is the j-link out put. do you have any idea?

Load "C:\Users\ASiDesigner\Desktop\Test\SmartLamp\MCU\Smart Lamp.axf" Set JLink Project File to "C:\Users\ASiDesigner\Desktop\Test\SmartLamp\MCU\JLinkSettings.ini"

  • JLink Info: Device "NRF51422_XXAC" selected. JLink info: ------------ DLL: V6.14c, compiled Mar 31 2017 17:45:52 Firmware: J-Link ARM V8 compiled Nov 28 2014 13:44:46 Hardware: V8.00 S/N : 16864320 Feature(s) : RDI,FlashDL,FlashBP,JFlash,GDB
  • JLink Info: Found SW-DP with ID 0x0BB11477
  • JLink Info: AP-IDR: 0x04770021, Type: AHB-AP
  • JLink Info: AHB-AP ROM: 0xF0000000 (Base addr. of first ROM table)
  • JLink Info: Found Cortex-M0 r0p0, Little endian.
  • JLink Info: FPUnit: 4 code (BP) slots and 0 literal slots
  • JLink Info: CoreSight components:
  • JLink Info: ROMTbl[0] @ F0000000
  • JLink Info: ROMTbl[0][0]: E00FF000, CID: B105100D, PID: 000BB471 ROM Table
  • JLink Info: ROMTbl[1] @ E00FF000
  • JLink Info: ROMTbl[1][0]: E000E000, CID: B105E00D, PID: 000BB008 SCS
  • JLink Info: ROMTbl[1][1]: E0001000, CID: B105E00D, PID: 000BB00A DWT
  • JLink Info: ROMTbl[1][2]: E0002000, CID: B105E00D, PID: 000BB00B FPB
  • JLink Info: ROMTbl[0][1]: F0002000, CID: B105900D, PID: 000BB9A3 ??? ROMTableAddr = 0xF0000000 Target info: ------------ Device: nRF51422_xxAC VTarget = 3.300V State of Pins: TCK: 0, TDI: 0, TDO: 0, TMS: 1, TRES: 1, TRST: 1 Hardware-Breakpoints: 4 Software-Breakpoints: 8192 Watchpoints: 2 JTAG speed: 1000 kHz Full Chip Erase Done. Programming Failed! Error: Flash Download failed - "Cortex-M0" Flash Load finished at 18:25:03
Parents
  • the problem was solved, there was a soft device programmed on the device, but why not supply the j-link ini setup file integrated into keils project so the keil could erase the chip too!!!!

  • Hi,

    The Keil flashing-algorithm has a check that stops it from overwriting an existing SoftDevice with the application firmware. This is a safety mechanism put in place that prevents the application firmware to be flashed to the flash-region where the SoftDevice is located.

    The “peripheral” examples in the SDK usually doesn’t use the SoftDevice, and is by default placed in the same flash-region where the SoftDevice is located (at the start of the flash). If you in this case have already flashed the SoftDevice, you will either need to move the application above the SoftDevice region, or erase the SoftDevice with nrfjprog using the eraseall command.

    Note that you can use Keils integrated command line functionality with nrfjprog. See this blog post for more information about that.

Reply
  • Hi,

    The Keil flashing-algorithm has a check that stops it from overwriting an existing SoftDevice with the application firmware. This is a safety mechanism put in place that prevents the application firmware to be flashed to the flash-region where the SoftDevice is located.

    The “peripheral” examples in the SDK usually doesn’t use the SoftDevice, and is by default placed in the same flash-region where the SoftDevice is located (at the start of the flash). If you in this case have already flashed the SoftDevice, you will either need to move the application above the SoftDevice region, or erase the SoftDevice with nrfjprog using the eraseall command.

    Note that you can use Keils integrated command line functionality with nrfjprog. See this blog post for more information about that.

Children
No Data
Related