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

[nrf51422]beginner: blinky example not working on pca10028

Hi,

Just received my nrf51 DK board today and was trying to load the blinky example from my Mac (El Capitan ). It did not seem to work.

I first configures the compiler path as follow in Makefile.posix:

GNU_INSTALL_ROOT := /Users/developer/Tools/Compilers/gcc/gcc-arm-none-eabi-4_9-2014q4
GNU_VERSION := 4.9

After building the blinky example in "nRF51_SDK_9/examples/peripheral/blinky/pca10028/armgcc", I erase the flash on board with the folvogin command:

w4 4001e504 2
w4 4001e50c 1
sleep 100
r
exit

The erase commands seems to be executed correctly, with the following output:

SEGGER J-Link Commander V5.02j ('?' for help)
Compiled Nov  6 2015 19:02:07

Script file read successfully.
DLL version V5.02j, compiled Nov  6 2015 19:02:02
Firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Aug 28 2015 19:26:24
Hardware: V1.00
S/N: 681013717 
Emulator has Trace capability
VTarget = 3.300V
Info: TotalIRLen = ?, IRPrint = 0x..000000000000000000000000
Info: TotalIRLen = ?, IRPrint = 0x..000000000000000000000000
No devices found on JTAG chain. Trying to find device on SWD.
Info: Found SWD-DP with ID 0x0BB11477
Info: Found Cortex-M0 r0p0, Little endian.
Info: FPUnit: 4 code (BP) slots and 0 literal slots
Info: CoreSight components:
Info: ROMTbl 0 @ F0000000
Info: ROMTbl 0 [0]: F00FF000, CID: B105100D, PID: 000BB471 ROM Table
Info: ROMTbl 1 @ E00FF000
Info: ROMTbl 1 [0]: FFF0F000, CID: B105E00D, PID: 000BB008 SCS
Info: ROMTbl 1 [1]: FFF02000, CID: B105E00D, PID: 000BB00A DWT
Info: ROMTbl 1 [2]: FFF03000, CID: B105E00D, PID: 000BB00B FPB
Info: ROMTbl 0 [1]: 00002000, CID: B105900D, PID: 000BB9A3 ???
Cortex-M0 identified.
Target interface speed: 100 kHz
Processing script file...

Writing 00000002 -> 4001E504

Writing 00000001 -> 4001E50C

Sleep(100)

Reset delay: 0 ms
Reset type NORMAL: Resets core & peripherals via SYSRESETREQ & VECTRESET bit.


Script processing completed.

I then precedes to upload the blinky binary:

r
loadbin nRF51_SDK_9/examples/peripheral/blinky/pca10028/armgcc/_build/nrf51422_xxac.bin 0
r
g
exit

Here is the output:

SEGGER J-Link Commander V5.02j ('?' for help)
Compiled Nov  6 2015 19:02:07

Script file read successfully.
DLL version V5.02j, compiled Nov  6 2015 19:02:02
Firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Aug 28 2015 19:26:24
Hardware: V1.00
S/N: 681013717 
Emulator has Trace capability
VTarget = 3.300V
Info: TotalIRLen = ?, IRPrint = 0x..000000000000000000000000
Info: TotalIRLen = ?, IRPrint = 0x..000000000000000000000000
No devices found on JTAG chain. Trying to find device on SWD.
Info: Found SWD-DP with ID 0x0BB11477
Info: Found Cortex-M0 r0p0, Little endian.
Info: FPUnit: 4 code (BP) slots and 0 literal slots
Info: CoreSight components:
Info: ROMTbl 0 @ F0000000
Info: ROMTbl 0 [0]: F00FF000, CID: B105100D, PID: 000BB471 ROM Table
Info: ROMTbl 1 @ E00FF000
Info: ROMTbl 1 [0]: FFF0F000, CID: B105E00D, PID: 000BB008 SCS
Info: ROMTbl 1 [1]: FFF02000, CID: B105E00D, PID: 000BB00A DWT
Info: ROMTbl 1 [2]: FFF03000, CID: B105E00D, PID: 000BB00B FPB
Info: ROMTbl 0 [1]: 00002000, CID: B105900D, PID: 000BB9A3 ???
Cortex-M0 identified.
Target interface speed: 100 kHz
Processing script file...

Reset delay: 0 ms
Reset type NORMAL: Resets core & peripherals via SYSRESETREQ & VECTRESET bit.

Downloading file [/Users/developer/Projects/Nordic_NRF51_DK/nRF51_SDK_9/examples/peripheral/blinky/pca10028/armgcc/_build/nrf51422_xxac.bin]...Failed to open file.

Reset delay: 0 ms
Reset type NORMAL: Resets core & peripherals via SYSRESETREQ & VECTRESET bit.



Script processing completed.

However, after the flashing, there is no change on the board. The less do not blink. I have no idea why this did not work. I also have the old pca10001 board with nrf51822, which I was able to successfully upload the blinky example with idk 6.0.1. Did I do something wrong? Can that be the OS X version I am using (el capitan)?

I also check state after each command, they are identical as follow:

J-Link>h
PC = FFFFFFFE, CycleCnt = 00000000
R0 = FFFFFFFF, R1 = FFFFFFFF, R2 = FFFFFFFF, R3 = FFFFFFFF
R4 = FFFFFFFF, R5 = FFFFFFFF, R6 = FFFFFFFF, R7 = FFFFFFFF
R8 = FFFFFFFF, R9 = FFFFFFFF, R10= FFFFFFFF, R11= FFFFFFFF
R12= FFFFFFFF
SP(R13)= FFFFFFD8, MSP= FFFFFFD8, PSP= FFFFFFFC, R14(LR) = FFFFFFF9
XPSR = C1000003: APSR = NZcvq, EPSR = 01000000, IPSR = 003 (HardFault)
CFBP = 00000000, CONTROL = 00, FAULTMASK = 00, BASEPRI = 00, PRIMASK = 00

I do not know how to interpret this. If this is no change of state after uploading the blinky binary, does that mean it is failed?

It has been really frustrating after receiving the board, your help is much appreciated.

Related