Smart Snippets Command-line read flash problem

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.xmece.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
4 posts / 0 new
Last post
DDaor
Offline
Last seen:1 year 6 months ago
加入: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.
******************************************
命令行: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写-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.
读取内存以验证其内容刻录后....
通信超时:请求6144字节,收到0字节!
Failed reading memory at address 20000000.
******************************************
******************************************
命令行: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.
通信超时:请求6144字节,收到0字节!
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:3 days 55 min ago
Staff
加入: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 thelatest versionwhich 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:1 year 6 months ago
加入: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 -length30716.- 我
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.
通信超时:请求6144字节,收到0字节!
Failed reading memory at address 20000000.
Failed reading chunk with offset 0x00 and size 0x77FC bytes from memory.
SPI FLASH memory reading has failed.
**********************************************************************************

********************************************************************************
成功读取30717字节:
> 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 -length30717- 我
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.
从SPI闪存偏移0x0开始读取30717字节。
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:3 days 55 min ago
Staff
加入: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