Smart Snippets Command-line read flash problem

Learn MoreFAQsTutorials

4 posts / 0 new
Last post
DDaor
Offline
Last seen: 9 months 1 week ago
Joined: 2018-05-17 06:46
Smart Snippets Command-line read flash problem

Hi, Dialog Support Team:
I am using DA14581,external flash,MX25V1006F,1M-BIT [x 1/x 2] CMOS SERIAL NOR FLASH. and when I use Smart Snippets Command-line (Vesion 3.9) to download my hex file(30716 bytes), it shows that "Communication timed out: Requested 6144 bytes, received 0 bytes !". But it can dowload sucessfully when i use Smart Snippets with UI.
I alse discover a very weird phenomenon.when I use Smart Snippets Command-line to read 30716 bytes flash, it shows the same error, even if the flash has been erased. But when it can read 30717 bytes flash sucessfully,or other length, not 30716 bytes.
when i use Smart Snippets with UI to download hex file,it read 32kB to verify. when I use Smart Snippets Command-line,it read the same size of hex file(30716 bytes).But why can't read 30716 bytes with Smart Snippets Command-line.
I spy the data in SPI line when it read 30716 bytes with Smart Snippets Command-line.There is absolutely right.

The following is the log.Please help me analyze the problem,thanks a lot.
******************************************
Command-line:SmartSnippets.exe -type spi -chip DA14581 -clk P0_0 -cs P0_4 -miso P0_5 -mosi P0_6 -jtag 325235 -firmware jtag_programmer.bin -cmd write -gpio P1_2 -file .\ble.hex -y -verify
log:
Could not measure total IR len. TDO is constant high.
Could not measure total IR len. TDO is constant high.
Found SWD-DP with ID 0x0BB11477
FPUnit: 4 code (BP) slots and 0 literal slots
Found Cortex-M0 r0p0, Little endian.
BTLE device selected.
Firmware File jtag_programmer.bin has been selected for downloading.
Successfully downloaded firmware file to the board.
Using default baudrate: 57600 Bd.
Successfully set SPI Flash gpios: CLK=P0_0, CS=P0_4, MISO=P0_5, MOSI=P0_6.
Read 30412 bytes from file .\ble.hex.
Started burning memory with 30716 bytes of data at address 0x00008.
Memory burning completed successfully.
Reading memory to verify its contents after burn....
Communication timed out: Requested 6144 bytes, received 0 bytes !
Failed reading memory at address 20000000.
******************************************
******************************************
Command-line:SmartSnippets.exe -type spi -chip DA14581 -clk P0_0 -cs P0_4 -miso P0_5 -mosi P0_6 -jtag 325235 -firmware jtag_programmer.bin -cmd read -gpio P1_2 -file flash.hex -length 30716 -y
log:
Found SWD-DP with ID 0x0BB11477
FPUnit: 4 code (BP) slots and 0 literal slots
Found Cortex-M0 r0p0, Little endian.
BTLE device selected.
Firmware File jtag_programmer.bin has been selected for downloading.
Successfully downloaded firmware file to the board.
Using default baudrate: 57600 Bd.
Successfully set SPI Flash gpios: CLK=P0_0, CS=P0_4, MISO=P0_5, MOSI=P0_6.
Started reading 30716 bytes from SPI FLASH offset 0x0.
Communication timed out: Requested 6144 bytes, received 0 bytes !
Failed reading memory at address 20000000.
SPI FLASH memory reading has failed.
******************************************
******************************************
Command-line:SmartSnippets.exe -type spi -chip DA14581 -clk P0_0 -cs P0_4 -miso P0_5 -mosi P0_6 -jtag 325235 -firmware jtag_programmer.bin -cmd read -gpio P1_2 -file flash.hex -length 30717 -y
log:
Found SWD-DP with ID 0x0BB11477
FPUnit: 4 code (BP) slots and 0 literal slots
Found Cortex-M0 r0p0, Little endian.
BTLE device selected.
Firmware File jtag_programmer.bin has been selected for downloading.
Successfully downloaded firmware file to the board.
Using default baudrate: 57600 Bd.
Successfully set SPI Flash gpios: CLK=P0_0, CS=P0_4, MISO=P0_5, MOSI=P0_6.
Started reading 30717 bytes from SPI FLASH offset 0x0.
SPI FLASH memory reading has finished. Read 30717 bytes.
******************************************

Device: 
PM_Dialog
Offline
Last seen: 20 hours 24 min ago
Staff
Joined: 2018-02-08 11:03
Hi Ddaor,

Hi Ddaor,

The version 3.9 of Smart Snippets that you are using is quite obsolete. It is strongly recommended to use the latest version which can be found in the Software & Tools Tab in the Tools version. Could you please let me know if you face the same problem with the lates version of Smart Snippets?

Thanks, PM_Dialog

DDaor
Offline
Last seen: 9 months 1 week ago
Joined: 2018-05-17 06:46
The latest version

hi!
The latest version SmartSnippets Toolbox v 4.8.3.1804 has the same problem, log is following:
****************************************************
Read 30716 byte failed:
>SmartSnippetsToolbox.exe -type spi -chip DA14581-00 -clk P0_0 -cs P0_4 -miso P0_5 -mosi P0_6 -jtag 123456 -firmware jtag_programmer.bin -cmd read -gpio P1_2 -file flash_20180524122154.hex -length 30716 -y
Launching SmartSnippets Toolbox v 4.8.3.1804
Could not measure total IR len. TDO is constant high.
Could not measure total IR len. TDO is constant high.
Found SWD-DP with ID 0x0BB11477
FPUnit: 4 code (BP) slots and 0 literal slots
Found Cortex-M0 r0p0, Little endian.
BTLE device selected.
Found SWD-DP with ID 0x0BB11477
FPUnit: 4 code (BP) slots and 0 literal slots
Found Cortex-M0 r0p0, Little endian.
Firmware File jtag_programmer.bin has been selected for downloading.
Successfully downloaded firmware file to the board.
Using default baudrate: 57600 Bd.
Successfully set SPI Flash gpios: CLK=P0_0, CS=P0_4, MISO=P0_5, MOSI=P0_6.
Started reading 30716 bytes from SPI FLASH memory offset 0x0.
Communication timed out: Requested 6144 bytes, received 0 bytes !
Failed reading memory at address 20000000.
Failed reading chunk with offset 0x00 and size 0x77FC bytes from memory.
SPI FLASH memory reading has failed.
**********************************************************************************

********************************************************************************
Read 30717 bytes Successfully:
>SmartSnippetsToolbox.exe -type spi -chip DA14581-00 -clk P0_0 -cs P0_4 -miso P0_5 -mosi P0_6 -jtag 123456 -firmware jtag_programmer.bin -cmd read -gpio P1_2 -file flash_20180524122306.hex -length 30717 -y
Launching SmartSnippets Toolbox v 4.8.3.1804
Could not measure total IR len. TDO is constant high.
Could not measure total IR len. TDO is constant high.
Found SWD-DP with ID 0x0BB11477
FPUnit: 4 code (BP) slots and 0 literal slots
Found Cortex-M0 r0p0, Little endian.
BTLE device selected.
Found SWD-DP with ID 0x0BB11477
FPUnit: 4 code (BP) slots and 0 literal slots
Found Cortex-M0 r0p0, Little endian.
Firmware File jtag_programmer.bin has been selected for downloading.
Successfully downloaded firmware file to the board.
Using default baudrate: 57600 Bd.
Successfully set SPI Flash gpios: CLK=P0_0, CS=P0_4, MISO=P0_5, MOSI=P0_6.
Started reading 30717 bytes from SPI FLASH memory offset 0x0.
Read chunk with offset 0x00 and size 0x77FD bytes from memory.
SPI FLASH memory reading has finished. Read 30717 bytes.
****************************************************************************

PM_Dialog
Offline
Last seen: 20 hours 24 min ago
Staff
Joined: 2018-02-08 11:03
Hi DDaor,

Hi DDaor,

We don’t have the SPI flash that you are using, so I am not able to replicate your problem. Although, I did some test with the DA1581 connected with a Pro development board, and I was able to read every length of bytes from the SPI flash.

Thanks, PM_Dialog