4 posts / 0 new
Last post
ddustin
Offline
Last seen: 1 month 55 min ago
Joined: 2016-04-20 22:12
Custom Board SWD Can't Burn Image

I have a custom board with VDD, GND, SW_CLK, and SWDIO lines attached to a J-Link device. I'm able to connect with JLinkExe and get this message upon conneting:

Connecting to target via SWD
Found SW-DP with ID 0x0BB11477
Scanning AP map to find all available APs
AP[1]: Stopped AP scan as end of AP map has been reached
AP[0]: AHB-AP (IDR: 0x04770021)
Iterating through AP map to find AHB-AP to use
AP[0]: Core found
AP[0]: AHB-AP ROM base: 0xE00FF000
CPUID register: 0x410CC200. Implementer code: 0x41 (ARM)
Found Cortex-M0 r0p0, Little endian.
FPUnit: 4 code (BP) slots and 0 literal slots
CoreSight components:
ROMTbl[0] @ E00FF000
ROMTbl[0][0]: E000E000, CID: B105E00D, PID: 000BB008 SCS
ROMTbl[0][1]: E0001000, CID: B105E00D, PID: 000BB00A DWT
ROMTbl[0][2]: E0002000, CID: B105E00D, PID: 000BB00B FPB
Cortex-M0 identified.

But I am unable to read or write data. Using SmartSnippets toolbox and attempting to read the partition table (as a test of basic functioning) gives me this error:

[INFO    General           @19-05-01 12:53:28] TotalIRLen = ?, IRPrint = 0x..000000000000000000000000
[INFO    General           @19-05-01 12:53:28] TotalIRLen = ?, IRPrint = 0x..000000000000000000000000
[INFO    General           @19-05-01 12:53:28] Found SWD-DP with ID 0x0BB11477
[INFO    General           @19-05-01 12:53:28] FPUnit: 4 code (BP) slots and 0 literal slots
[INFO    General           @19-05-01 12:53:28] Found Cortex-M0 r0p0, Little endian.
[INFO    General           @19-05-01 12:53:28] BTLE device selected.
[INFO    QSPI Flash        @19-05-01 12:53:38] Succesfully connected to JLinkGDBServer on localhost: 2331
[INFO    QSPI Flash        @19-05-01 12:53:38] Firmware file C:\DiaSemi\SmartSnippetsStudio\Toolbox\common_resources\uartboot.bin has been selected.
[INFO    QSPI Flash        @19-05-01 12:53:43] Started reading 32768 bytes from memory.
[ERROR   QSPI Flash        @19-05-01 12:53:47] Failed reading memory. Error: invalid data received from GDB Server
[WARNING QSPI Flash        @19-05-01 12:53:47] Connection with JLinkGDBServer has been lost. Reconnecting...
[INFO    QSPI Flash        @19-05-01 12:53:53] Succesfully connected to JLinkGDBServer on localhost: 2331
[INFO    QSPI Flash        @19-05-01 12:53:53] Firmware file C:\DiaSemi\SmartSnippetsStudio\Toolbox\common_resources\uartboot.bin has been selected.

What's the next step to getting this working?

Device: 
PM_Dialog
Offline
Last seen: 8 hours 31 min ago
Staff
Joined: 2018-02-08 11:03
Hi ddustin,

Hi ddustin,

Could you please let me know if this question is related with your forum thread below?

https://support.dialog-semiconductor.com/forums/post/dialog-smartbond-bluetooth-low-energy-%E2%80%93-hardware-device-reference-designs/jtag

Are you able to download your firmware into the System-RAM through Keil IDE?  Please navigate to Project-> Options for target->Debug and you should see that you are using the J-Link. Please check the attached snapshots. If you press the setting, you should see the J-Link serial number (SN). Could you please make sure that you can see the SN?  Also, when opening the SmartSnippets toolbox and connected over JTAG, you should see the J-Link serial number as well. The DA14583 doesn’t have QSPI flash, but SPI Flash, so can you please double check that you have chosen the DA14583 device from the initial pop up window? Which version of SmartSnippets toolbox are you using? If you try to download firmware over UART, is that procedure is successfully completed?

Thanks, PM_Dialog

Attachment: 
ddustin
Offline
Last seen: 1 month 55 min ago
Joined: 2016-04-20 22:12
Thanks for the help. I don't

Thanks for the help. I don't have the Keil IDE but I am using the SmartSnippets IDE, I tried using the J-Link debug option there but it failed.

You're correct that I used the wrong device, accidentally selected DA14683. I restarted SmartSnippets Toolbox with the correct version number and got further.

[INFO    General           @19-05-02 13:46:54] TotalIRLen = ?, IRPrint = 0x..000000000000000000000000
[INFO    General           @19-05-02 13:46:54] TotalIRLen = ?, IRPrint = 0x..000000000000000000000000
[INFO    General           @19-05-02 13:46:54] Found SWD-DP with ID 0x0BB11477
[INFO    General           @19-05-02 13:46:54] FPUnit: 4 code (BP) slots and 0 literal slots
[INFO    General           @19-05-02 13:46:54] Found Cortex-M0 r0p0, Little endian.
[INFO    General           @19-05-02 13:46:54] BTLE device selected.
[INFO    EEPROM            @19-05-02 13:47:00] Found SWD-DP with ID 0x0BB11477
[INFO    EEPROM            @19-05-02 13:47:00] FPUnit: 4 code (BP) slots and 0 literal slots
[INFO    EEPROM            @19-05-02 13:47:00] Found Cortex-M0 r0p0, Little endian.

...

[INFO    SPI Flash         @19-05-02 13:51:53] Found SWD-DP with ID 0x0BB11477
[INFO    SPI Flash         @19-05-02 13:51:53] FPUnit: 4 code (BP) slots and 0 literal slots
[INFO    SPI Flash         @19-05-02 13:51:53] Found Cortex-M0 r0p0, Little endian.
[INFO    SPI Flash         @19-05-02 13:51:53] Firmware File C:\DiaSemi\SmartSnippetsStudio\Toolbox\common_resources\jtag_programmer.bin has been selected for downloading.
[INFO    SPI Flash         @19-05-02 13:51:53] Successfully downloaded firmware file to the board.
[INFO    SPI Flash         @19-05-02 13:51:53] Successfully configured SPI Flash ports and pins.
[INFO    SPI Flash         @19-05-02 13:51:56] Started reading 32768 bytes from memory.
[INFO    SPI Flash         @19-05-02 13:51:57] Reading has finished. Read 32768 bytes.
[INFO    SPI Flash         @19-05-02 13:52:08] Read 119008 bytes from file ble_peripheral.bin.
[INFO    SPI Flash         @19-05-02 13:52:13] Started burning memory with 119016 bytes of data at address 0x00000.
[ERROR   SPI Flash         @19-05-02 13:52:22] Burning of block 1 (16000 bytes) failed.
[ERROR   SPI Flash         @19-05-02 13:52:33] Burning of block 2 (16000 bytes) failed.
[ERROR   SPI Flash         @19-05-02 13:52:43] Burning of block 3 (16000 bytes) failed.
[ERROR   SPI Flash         @19-05-02 13:52:53] Burning of block 4 (16000 bytes) failed.
[ERROR   SPI Flash         @19-05-02 13:53:04] Burning of block 5 (16000 bytes) failed.
[ERROR   SPI Flash         @19-05-02 13:53:14] Burning of block 6 (16000 bytes) failed.
[ERROR   SPI Flash         @19-05-02 13:53:24] Burning of block 7 (16000 bytes) failed.
[ERROR   SPI Flash         @19-05-02 13:53:34] Burning of block 8 (7016 bytes) failed.

I can read from flash and eeprom successfully but I can't burn to either.

[INFO    SPI Flash         @19-05-02 15:09:14] Started reading 32768 bytes from memory.
[INFO    SPI Flash         @19-05-02 15:09:15] Reading has finished. Read 32768 bytes.
[INFO    EEPROM            @19-05-02 15:09:21] Started reading 32768 bytes from memory.
[INFO    EEPROM            @19-05-02 15:09:27] Reading has finished. Read 32768 bytes.

How can I make burning work? Do I need to attach more wires or something?

PM_Dialog
Offline
Last seen: 8 hours 31 min ago
Staff
Joined: 2018-02-08 11:03
Hi ddustin,

Hi ddustin,

Which version of SmartSnippets toolbox are you using? Please check0 the attached snapshots and make sure that you have the same configurations. I worked on SmartSnippets studio v2.0.7 and toolbox v5.0.7.2268. Please try to reset you board after trying to connect with the SPI flash. Be aware that the DA14583 has an embedded SPI flash and it is paced on standards pins. Please check the board setup. These pins must be defined in the source code in user_periph_setup.h as well. When you pressed the “Connect” button, try to “Read” and “Erase” the flash and you should see 0xFF in all the addresses. After that are you able to burn it? In addition, can you give a try to program the SOI flash through UART?

Thanks, PM_Dialog

Attachment: