- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey guys,
I have a problem regarding SPI flash programming with the new SDK 1.3.4 on Linux:
With SDK 1.3.3 and cyusb_linux 1.0.4 I used to program cyusb_linux_1.0.4/fx3_images/cyfxflashprog.img into RAM. Afterwards I used the download_fx3 example to program my image to SPI flash. This worked pretty well for SDK 1.3.3.
But as soon as I use the cyfxflashprog.img from SDK 1.3.4 and cyusb_linux 1.0.5, it will not erase the SPI flash anymore (I2C still works). I get this output from download_fx3:
Working with old image
./download_fx3 -i /opt/cypress_1.3.3/cyusb_linux_1.0.4/fx3_images/cyfxflashprog.img -t ram
FX3 firmware programming to ram completed
./download_fx3 -i ./myimage.img -t spi
Info: Found FX3 flash programmer
Info: Erased sector 0 of SPI flash
Info: Erased sector 1 of SPI flash
Info: Erased sector 2 of SPI flash
Failing with new image:
./download_fx3 -i /opt/cypress/cyusb_linux_1.0.5/fx3_images/cyfxflashprog.img -t ram
FX3 firmware programming to ram completed
./download_fx3 -i ./myimage.img -t spi
Info: Found FX3 flash programmer
Error: SPI sector erase failed
Error: Failed to erase SPI flash
Error: FX3 firmware programming failed
I am using a Cypress S25FL128,, which should be compatible...
The FX3 does not print anything regarding SPI on its UART, just
Device initialized. Firmware ID: 50 33 58 46 0 47 4F 52
Just as if it never received the USB vendor requests regarding SPI. When I compile the cyfxflashprog.c source code example from SDK 1.3.4 myself it works perfectly. Can anybody confirm this issue or is it a layer 8 problem? J
Best regards,
Michael
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Yes, there is some issue with CyU3PSpiTransmitWords, which is the reason for flashing to SPI failure.
This has been fixed in the attached modified library.
Replace the existing libcyu3lpp.a in the default library (FX3 SDK Windows - C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\fw_lib\1_3_4\fx3_debug) with that of the attached one and build the cyfxflashprog project.
A similar issue is reported in CyU3PSpiTransmitWords bug (SDK library 1.34)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for notifying.
We will test and get back to you.
Regards,
Sridhar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I meet the same problem with SDK 1.3.4.
I read back the flash content, and compare with the original img. And I find that some byte in the end of the page is not correct. It seems the erase is work, but the write is not finished.
Refer to the picture, left is original img, the right is read back from SPI flash.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
BTW, I am using SPI Reg mode to perform flash write and read.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I was able to work around this issue by increasing the SPI clock speed from 8MHz to 16 and 32MHz. Still seems like an issue with the SDK still, as it's not allowing the full packet to be transferred...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Yes, there is some issue with CyU3PSpiTransmitWords, which is the reason for flashing to SPI failure.
This has been fixed in the attached modified library.
Replace the existing libcyu3lpp.a in the default library (FX3 SDK Windows - C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\fw_lib\1_3_4\fx3_debug) with that of the attached one and build the cyfxflashprog project.
A similar issue is reported in CyU3PSpiTransmitWords bug (SDK library 1.34)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I am having the same issue. As erli_1414226 pointed out, it is the last 3 bytes in a flash page that fails. Our upgrade workflow worked in previous version of the SDK. After updating, we are seeing this error.
I saw release notes saying, "Updated CyU3PSpiTransmitWords() and CyU3PSpiReceiveWords() implementation to speed up data transfers." Did you ever resolve this issue?
Thanks,
David