Learn MoreFAQsTutorials

6 posts / 0 new
Last post
exxfuture
Offline
Last seen: 1 month 6 days ago
Joined: 2020-03-16 15:14
Can't erase/flash DA14531

Hello,

 

I think I might have bricked my DA14531 USB DevKit by flashing inappropriately modified SW onto it.

Now, when I try Connectiong through SmartSnippets Toolbox (v5.0.14) it prints the following:

[INFO     General            @20-10-18 10:30:46] Could not measure total IR len. TDO is constant high.
[ERROR    General            @20-10-18 10:30:46] No known chip found while opening JLink connection. Terminating proccess...
[ERROR    SPI Flash          @20-10-18 10:30:46] Failed downloading firmware file to the board.

 

Also, when trying to erase/program with the Flash Programmer tool it gives the following error:

[ERROR   General          @20-10-18 23:40:29] No known chip found while opening JLink connection. Terminating proccess...

And when re-configuring the USB kit to use 2 wire UART - I can connect to the device with SST, but upon requesting Erase, the following error is given:

Unknown opcode 0x87 in received packet.

And when trying Burn or Burn/Verify, I get:

[INFO     SPI Flash          @20-10-19 11:48:30] Started erasing from 0x00 to 0x39000 (57 sectors)
[INFO     SPI Flash          @20-10-19 11:48:30] Connection to COM3 port has successfully opened.
[ERROR    SPI Flash          @20-10-19 11:48:30] Unknown opcode 0x87 in received packet.
[INFO     Booter             @20-10-19 11:48:30] Successfully disconnected from port COM3.
[ERROR    SPI Flash          @20-10-19 11:48:30] Memory erasing failed.
[INFO     SPI Flash          @20-10-19 11:48:30] Check if memory empty...
[INFO     SPI Flash          @20-10-19 11:48:30] Connection to COM3 port has successfully opened.
[ERROR    SPI Flash          @20-10-19 11:48:32] CRC of received data does not match with estimated CRC.
[INFO     Booter             @20-10-19 11:48:32] Successfully disconnected from port COM3.
[ERROR    SPI Flash          @20-10-19 11:48:32] Error: Failed reading 16384 bytes from offset 0x00
[WARNING  SPI Flash          @20-10-19 11:48:32] Warning: Failed to check existing memory contents.

Is there any other way I can try to erase/program the flash?

Device: 
PM_Dialog
Offline
Last seen: 35 min 20 sec ago
Staff
Joined: 2018-02-08 11:03
Hi exxfuture,

Hi exxfuture,

Could you please indicate what kind of firmware is burnt in the DA14531? Is it any of the SDK or SW examples? Does the firmware disable the JTAG?  You could use the CLI – http://lpccs-docs.dialog-semiconductor.com/UM-B-083/cli/command_line_if.html

Are you able to download fw in the System-Ram thought JTAG? When opening the SmartSnippets Toolbox in order to connect over JTAG interface, the JTAG SN should be displayed. Did you try to bunt the SPI through UART? Can you also share the DIP switches configuration?

Thanks, PM_Dialog

exxfuture
Offline
Last seen: 1 month 6 days ago
Joined: 2020-03-16 15:14
I based the FW on the example

I based the FW on the example project "DA14531-DA14585-586_Measuring_Temperature" and tried to add app_suota to it. The JTAG serial number is 483056516 . The FW shouldn't disable JTAG.

When I use the JTAG for anything with the DEFAULT DIP switch configuration as specified in https://www.dialog-semiconductor.com/sites/default/files/um-b-125_da1453... get those errors:

[INFO     General            @20-10-18 10:30:46] Could not measure total IR len. TDO is constant high.
[ERROR    General            @20-10-18 10:30:46] No known chip found while opening JLink connection. Terminating proccess...
[ERROR    SPI Flash          @20-10-18 10:30:46] Failed downloading firmware file to the board.

When I use the Optional 2-/4-Wire UART DIP switch configuration I can flash a FW to the SYS-RAM, but I don't have any useful FW to flash on the SYS-RAM which could recover the SPI flash (or whatever the problem is - maybe restoring it with the default FW will solve the problem, but I am not sure how to do that through a program in the SYS-RAM).

With this DIP switch configuration I tried also the cli tool with the following arguments:

SmartSnippetsToolbox.exe -type spi -chip DA14531 -com_port 3 -cmd write -file "C:\Some\Path\file.hex" -uart P0_0 -bootable

But it gives me:

Connection to COM3 port has successfully opened.
Timeout while waiting to receive the least significant byte of packet length (10000 msecs)
Successfully disconnected from port COM3.
Failed setting the following values to SPI Flash gpios: CLK=P0_4, CS=P0_1, MISO=P0_3, MOSI=P0_0.
Read 22740 bytes from file C:\Some\Path\file.hex.
Added bootable header to image.
Started burning memory with 22852 bytes of data at address 0x00000.
Connection to COM3 port has successfully opened.
Timeout while waiting to receive the most significant byte of packet length (10000 msecs)
Successfully disconnected from port COM3.
Failed configuring SPI ports and pins.
Connection to COM3 port has successfully opened.
Timeout while waiting to receive the most significant byte of packet length (10000 msecs)
Successfully disconnected from port COM3.
Fail write 16384 bytes at offset 0x00
Memory burning failed.

With this Optional 2-/4-Wire UART DIP switch config in SST when I try to burn/verify the flash it gives me:

[INFO     SPI Flash          @20-10-19 11:48:30] Started erasing from 0x00 to 0x39000 (57 sectors)
[INFO     SPI Flash          @20-10-19 11:48:30] Connection to COM3 port has successfully opened.
[ERROR    SPI Flash          @20-10-19 11:48:30] Unknown opcode 0x87 in received packet.
[INFO     Booter             @20-10-19 11:48:30] Successfully disconnected from port COM3.
[ERROR    SPI Flash          @20-10-19 11:48:30] Memory erasing failed.
[INFO     SPI Flash          @20-10-19 11:48:30] Check if memory empty...
[INFO     SPI Flash          @20-10-19 11:48:30] Connection to COM3 port has successfully opened.
[ERROR    SPI Flash          @20-10-19 11:48:32] CRC of received data does not match with estimated CRC.
[INFO     Booter             @20-10-19 11:48:32] Successfully disconnected from port COM3.
[ERROR    SPI Flash          @20-10-19 11:48:32] Error: Failed reading 16384 bytes from offset 0x00
[WARNING  SPI Flash          @20-10-19 11:48:32] Warning: Failed to check existing memory contents.

and when i try only to erase:

Unknown opcode 0x87 in received packet.

 

PM_Dialog
Offline
Last seen: 35 min 20 sec ago
Staff
Joined: 2018-02-08 11:03
Hi exxfuture,

Hi exxfuture,

Please try to boot with a different firmware from 1-wire UART on P05 which a prior step than booting from the external SPI Slave in the booting sequence. Please see section 6 Booting from 1-wire UART from the following application note.

https://www.dialog-semiconductor.com/sites/default/files/an-b-072-da14531_booting_options_v1.4.pdf

You could use any of the SDK projects, for instance the ble_app_barebone project.

Once the device booted, then try to connect to the SPI flash and erase it.

Are you able to connect? 

Would it be possible to share screenshots with the steps you are following?

When opening the SST, did you connect over UART or JTAG?

Thanks, PM_Dialog

exxfuture
Offline
Last seen: 1 month 6 days ago
Joined: 2020-03-16 15:14
Hi,

Hi,

 

It worked! I successfully flashed the SPI flash through 1 wire UART and choosing P05.

 

Thank you so much for the assistance!

PM_Dialog
Offline
Last seen: 35 min 20 sec ago
Staff
Joined: 2018-02-08 11:03
Hi exxfuture,

Hi exxfuture,

Glad that you got it working and thanks for accepting my answer.

Thanks, PM_Dialog