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

Problem with nRFgo v1.16.1 and nRF51822 SDK 6.0.0

Everything was fine until I updated to the latest SDK version 6.0.0 and the new nRFGo ap version 1.16.1. Now when I try and connect to my device I get J-LinkV4.52c Error "Could not read AHB-AP Id. Could not connect to target". I found that if I click "Recover" it usually works after that, but I'm not super confident...

I also have problems with Keil downloading of firmware, saying "Cannot Load Flash Device Description!". I now get lots of error loading software packs errors saying things like this:

C:\Keil\ARM\PACK\NordicSemiconductor\nRF_DeviceFamilyPack\1.0.3\NordicSemiconductor.nRF_DeviceFamilyPack.pdsc(145):Error parsing node '#text' :value 'IOs' not in enumeration

  • I got further by installing Keil C version 5.10.

    But when I attempt to download the program I still get "JLink - Cortex Error: C:\Keil\ARM\flash\nrf51xxx.flm Cannot Load Flash Device Description"

    And this file "nrf51xxx.flm" does not exist. but I do have the Keil pack for cortex M0. Here's the complete output:

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

    Target info:

    Device: nRF51822_xxAA VTarget = 3.351V 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

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

  • Have you seen this question? Also note my comment there; if the wrong device is selected in the device selection tab, you may not see the correct flash algorithm. Also see the attached screenshots.

    device-selection.png

    flash-algorithm.png

  • thanks for the link and screen shots, I tried all that so my setup matches yours but I still get :

    Error: Flash Download failed - "Cortex-M0"

    The odd thing is it seems to succeed, my downloaded program is running, I can pair with my BLE device.

    But I can't debug it. Here's the output when I try and start debugging:

    • JLink Info: Device "NRF51822_XXAA" selected (257 KB flash, 16 KB RAM).

    JLink info:

    DLL: V4.82 , compiled Mar 10 2014 19:07:45 Firmware: J-Link Lite-Cortex-M V8 compiled Aug 29 2012 15:24:23 Hardware: V8.00 S/N : 518001045 Feature(s) : GDB

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

    Target info:

    Device: nRF51822_xxAA VTarget = 3.351V 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

    Erase Done. Programming Failed! Error: Flash Download failed - "Cortex-M0"

  • Found the solution. Turns out the old Keil C 5.0 projects don't "migrate" to the new Keil C 5.1. So I picked up the new HRS sample app from Nordic SDK, copied the .uvproj file, and replaced the source files with my project, and wha-la, everything started working properly, flashing, debugging, etc. Doing a "diff" I see a bunch of niggly little settings had changed which probably explains why it didn't work without this "hand-migration"...

  • Great that you got things working! I'll definitely keep this in mind for future questions.

    Feel free to accept your own answer to clear up this question, since this is what actually ended up helping you!

Related