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

JLink Info: Reset: Halt core after reset via DEMCR.VC_CORERESET.

Hello,

We are using the nRF52 DK board and Keil uvision 5. 

Using SDK 17.0.0 we can successfully load and build the `examples`. If we choose `examples/peripherals` we can build and run these projects.

However, if you use examples/ble_peripherals and say choose ble_app_hts we get the following:

* JLink Info: Device "NRF52832_XXAA" selected.

JLink info:
------------
DLL: V6.46 , compiled May 23 2019 17:49:56
Firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Jan 7 2019 14:07:15
Hardware: V1.00
S/N : 682371969

* JLink Info: Found SW-DP with ID 0x2BA01477
* JLink Info: Found SW-DP with ID 0x2BA01477
* JLink Info: Scanning AP map to find all available APs
* JLink Info: AP[2]: Stopped AP scan as end of AP map has been reached
* JLink Info: AP[0]: AHB-AP (IDR: 0x24770011)
* JLink Info: AP[1]: JTAG-AP (IDR: 0x02880000)
* JLink Info: Iterating through AP map to find AHB-AP to use
* JLink Info: AP[0]: Core found
* JLink Info: AP[0]: AHB-AP ROM base: 0xE00FF000
* JLink Info: CPUID register: 0x410FC241. Implementer code: 0x41 (ARM)
* JLink Info: Found Cortex-M4 r0p1, Little endian.
* JLink Info: FPUnit: 6 code (BP) slots and 2 literal slots
* JLink Info: CoreSight components:
* JLink Info: ROMTbl[0] @ E00FF000
* JLink Info: ROMTbl[0][0]: E000E000, CID: B105E00D, PID: 000BB00C SCS-M7
* JLink Info: ROMTbl[0][1]: E0001000, CID: B105E00D, PID: 003BB002 DWT
* JLink Info: ROMTbl[0][2]: E0002000, CID: B105E00D, PID: 002BB003 FPB
* JLink Info: ROMTbl[0][3]: E0000000, CID: B105E00D, PID: 003BB001 ITM
* JLink Info: ROMTbl[0][4]: E0040000, CID: B105900D, PID: 000BB9A1 TPIU
* JLink Info: ROMTbl[0][5]: E0041000, CID: B105900D, PID: 000BB925 ETM
ROMTableAddr = 0xE00FF000
* JLink Info: Reset: Halt core after reset via DEMCR.VC_CORERESET.
* JLink Info: Reset: Reset device via AIRCR.SYSRESETREQ.

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

Erase Done.
Programming Done.
Verify OK.
* JLink Info: Reset: Halt core after reset via DEMCR.VC_CORERESET.
* JLink Info: Reset: Reset device via AIRCR.SYSRESETREQ.
Application running ...
Flash Load finished at 14:17:17

and the application does not run!!!

Why are we getting 

JLink Info: Reset: Halt core after reset via DEMCR.VC_CORERESET and JLink Info: Reset: Reset device via AIRCR.SYSRESETREQ?

I have seen some other posts mentioning these two, but it is usually complicated with something else or not clearly answered.

Thanks

T

  • You've most likely not flashed the SoftDevice, Keil does not do that automatically. 

  • OK, so in Keil I have two targets to select 'flash_s132_nrf52_7.0.1_softdevice' and 'nrf52832_xxaa'. I get the error when building/running 'nrf52832_xxaa'. Are you saying that I need to somehow build/program 'flash_s132_nrf52_7.0.1_softdevice'  first?

    When I try and build this I get this error:

    Build target 'flash_s132_nrf52_7.0.1_softdevice'
    error - cannot create command input file '..\..\..\..\..\..\components\softdevice\s132\hex\main.__i'
    Target not created.
    Build Time Elapsed: 00:00:00

  • The softdevice is prebuilt, you only need to flash it. 

    See sdk/components/softdevice/s132/hex/s132_nrf52_7.0.1_softdevice.hex, use nrfjprog or nrf_programmer appi in nRF Connect For Desktop to flash it. 

  • I downloaded the nRF Connect For Desktop and that programmed the softdevice. BUT still when I go back to Keil and try and load/run an application I still get the same project.

    In each of the Keil projects that Nordic have provided there is a "softDevice" and a "nrf52832_xxaa" target. I tried flashing the "softDevice" without building and it has the error:

    **Error: Flash Download failed - "Cortex-M4"**

    See full log here.

    JLink info:
    ------------
    DLL: V6.46 , compiled May 23 2019 17:49:56
    Firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Mar 17 2020 14:43:00
    Hardware: V1.00
    S/N : 682371969

    * JLink Info: Found SW-DP with ID 0x2BA01477
    * JLink Info: Found SW-DP with ID 0x2BA01477
    * JLink Info: Scanning AP map to find all available APs
    * JLink Info: AP[2]: Stopped AP scan as end of AP map has been reached
    * JLink Info: AP[0]: AHB-AP (IDR: 0x24770011)
    * JLink Info: AP[1]: JTAG-AP (IDR: 0x02880000)
    * JLink Info: Iterating through AP map to find AHB-AP to use
    * JLink Info: AP[0]: Core found
    * JLink Info: AP[0]: AHB-AP ROM base: 0xE00FF000
    * JLink Info: CPUID register: 0x410FC241. Implementer code: 0x41 (ARM)
    * JLink Info: Found Cortex-M4 r0p1, Little endian.
    * JLink Info: FPUnit: 6 code (BP) slots and 2 literal slots
    * JLink Info: CoreSight components:
    * JLink Info: ROMTbl[0] @ E00FF000
    * JLink Info: ROMTbl[0][0]: E000E000, CID: B105E00D, PID: 000BB00C SCS-M7
    * JLink Info: ROMTbl[0][1]: E0001000, CID: B105E00D, PID: 003BB002 DWT
    * JLink Info: ROMTbl[0][2]: E0002000, CID: B105E00D, PID: 002BB003 FPB
    * JLink Info: ROMTbl[0][3]: E0000000, CID: B105E00D, PID: 003BB001 ITM
    * JLink Info: ROMTbl[0][4]: E0040000, CID: B105900D, PID: 000BB9A1 TPIU
    * JLink Info: ROMTbl[0][5]: E0041000, CID: B105900D, PID: 000BB925 ETM
    ROMTableAddr = 0xE00FF000
    * JLink Info: Reset: Halt core after reset via DEMCR.VC_CORERESET.
    * JLink Info: Reset: Reset device via AIRCR.SYSRESETREQ.

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

    Erase Failed!
    Error: Flash Download failed - "Cortex-M4"
    Flash Load finished at 08:30:00

    We are wanting to develop our own product around this chip. Using nRF Connect Desktop can get the evaluation board to work, but we are interested in getting it working at the lower level through Keil ... otherwise we cannot develop a product.

    I would have thought that the Keil examples you provided would work more smoothly with your own evaluation board?

  • You should only need to flash the SoftDevice once, then Keil will do a sector erase whenever you need to flash your application, f.ex when you do a build&run. 

Related