Toolbox, SPI flash erase.

⚠️
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.wsdof.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
7 posts / 0 new
Last post
ciano
Offline
Last seen:16 hours 39 min ago
Joined:2014-10-03 08:13
Toolbox, SPI flash erase.

Hello,

We are using the SPI Flash MX25R1635F, which is 16Mbit.
When erasing the flash from SmartSnippet I get the error message "SPI Memory erasing failed".
I then started investigating the cause. I build the jtag_programmer_585.bin from the SDK, where I set the SPI FLASH default values to match the MX25R1635F :

#define MX25R1635F_SIZE 2097152 // 0x1000000Mbit / 8 = 0x200000 = 2097152 Mbyte
#define MX25R1635F_PAGE 256

#define SPI_FLASH_DEFAULT_SIZE MX25R1635F_SIZE // SPI Flash memory size in bytes
#define SPI_FLASH_DEFAULT_PAGE MX25R1635F_PAGE // SPI Flash memory page size in bytes

I guess the above is needed, since the SDK flash programmer does not autodetect our Flash, and instead of adding our flash to the autodetect array, it was easier to add it as a default setting.

Now I tried the flash erase command(complete erase) from SmartSnippet again, and I still get the same error.
Next I added a breakpoint in the 'ACTION_SPI_ERASE' switch-case, so that I could read the result variable from the ACTION_SPI_ERASE. The returned result is 0, so everything is good, and the FLASH does get erased. The spi_flash_chip_erase() does not timeout, even that we are using a 16Mbit flash, which takes longer to erase. However, now I observed that SmartSnippet outputs the error message "SPI Memory erasing failed." before the spi_flash_chip_erase() returns, so I am guessing, that it is a timeout inside SmartSnippet, which generates the error message, and not the jtag_programmer_585.bin

Could you confirm my conclusion, that it is an internal timeout inside SmartSnippet, which is causing the error, and if 'yes' is there a way for me to change the timeout setting in SmartSnippet?

Best Regards,
Ciano Frost

Device:
lizhuobin
Offline
Last seen:2 months 3 weeks ago
Joined:2014-08-15 05:08
I have the same problem.

I have the same problem.

PM_Dialog
Offline
Last seen:12 hours 19 min ago
Staff
Joined:2018-02-08 11:03
Hi ciano,

Hi ciano,

Could you please check if you have configured correctly the SPI flash pins? You can configure the SPI Flash pins from “Board Setup” tap of SmartSnippets Toolbox (version 4.8.3). (Tools -> Board Setup).

Thanks, PM_Dialog

ciano
Offline
Last seen:16 hours 39 min ago
Joined:2014-10-03 08:13
Hi Dialog,

Hi Dialog,

Yes I can confirm, that the SPI Flash pins are setup correctly.

Best Regards,
Ciano Frost

lizhuobin
Offline
Last seen:2 months 3 weeks ago
Joined:2014-08-15 05:08
The spi flash chip erase time

spi flash芯片擦除时间是15秒。
工具箱wait time is 10s.
The spi flash erase time is much longer than the toolbox waite time.
工具箱timeout.

Here is the spec of the spi flash.

Here is the log for erase.

SmartSnippetsToolbox.exe -type spi -chip DA14585-00 -com_port 16 -cmd erase -max 2097152
Launching SmartSnippets Toolbox v 4.8.3.1804
四月 11, 2018 4:40:44 下午 java.util.prefs.WindowsPreferences
WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.
Using default baudrate: 57600 Bd.
Connection to COM16 port has successfully opened.
Successfully disconnected from port COM16.
Successfully set SPI Flash gpios: CLK=P0_0, CS=P0_3, MISO=P0_5, MOSI=P0_6.
Connection to COM16 port has successfully opened.
Timeout while waiting to receive the most significant byte of packet length (10000 msecs)
Successfully disconnected from port COM16.
SPI闪存擦除失败了。

Attachment:
MT_dialog
Offline
Last seen:2 months 2 days ago
Staff
Joined:2015-06-08 11:34
Hi,

Hi,

I am trying to confirm the value of the timeout through the external team that deals with the tools but apparently its taking some time, but since the flash is getting properly erased then its safe to assume the same (the Smart Snippets introduces a timeout in the procedure and the timeout elapses due to the flash size). I know for sure that older versions of the tool had this timeout and i am quite sure that this is the case for the newer versions as well, sorry for not being able to verify this 100% percent but getting in touch with them is quite difficult.

由于MT_Dialog

ciano
Offline
Last seen:16 hours 39 min ago
Joined:2014-10-03 08:13
Hi Dialog,

Hi Dialog,

I will wait your reply from the team that deals with the tools.
As mentioned above, it is probably an issue with a fixed/constant timeout in the tool.
The timeout could be user configurable or simple set based on the selected flash size.

I will keep this thread open and be looking forward to read your answer / solution.
In the meantime, I will simply ignore the error.

Thank you and Best Regards,
Ciano Frost