Cypress Boot Programmer Device Not Found

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
SimonP
Level 3
Level 3
25 replies posted 25 sign-ins 10 replies posted

Hello,

I have both the CX3 DVK and a custom board with a CX3 and both an EEPROM on the I2C interface and an Flash on the SPI interface following instructions.

I have a firmware image that I can program with no problem on the devkit using the USB Control Center on both USB, I2C and Flash.

I tried to program my custom board but I cannot program either memories(EEPROM and Flash).

Here are the steps I follow :

- Start the USB Control Center

- Seet the PMODE of the custom board to 110 for USB Bootloader.

- Connect the custom board. The board appear as "Cypress FX3 USB BootLoader Device".

- I select "Program -> FX3 -> SPI FLASH".

- The device is not visible anymore in the USB Control Center and a message "Waiting for Cypress Boot Programmer device to enumerate..." is displayed at the bottom left.

- After a few moments, the message change to "Cypress Boot Programmer Device Not Found". I checked the Device Manager and the board is not visible anymore.

- If I unplug the board and plug it again, it appears again as "Cypress FX3 USB BootLoader Device".

- I followed the same steps with the I2C EEPROM option with the same result.

How can I fix this to be able to flash my device correctly ?

Let me know if you need any additional information.

Best regards,

SimonP

0 Likes
1 Solution
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted

Hello SimonP,

Please refer to section 8.4 of https://www.cypress.com/file/139936/download 

It mentions "There should be no pull-up on SPI MISO/MOSI lines to allow FX3 to boot from SPI flash. It is recommended to include a pull-down resistor on the MISO line"

Regards,
Rashi

View solution in original post

28 Replies
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted

Hello,

From the description, it seems that there is some problem on USB interface on the custom board as Cypress Boot Programmer Device is not found

Seet the PMODE of the custom board to 110 for USB Bootloader.

>> Please confirm that PMODE[2:0] - Z11 for USB boot . 

To debug the problem, please try programming FX3's RAM (from Control Center: Program -> FX3 -> RAM) with USBFlashProg example  (Path: FX3 SDK Installation Path \Cypress\EZ-USB FX3 SDK\1.3\firmware\basic_examples\cyfxflashprog) of the FX3 SDK and let me know if the device enumerates in control center and device manager.

Regards,
Rashi
0 Likes
SimonP
Level 3
Level 3
25 replies posted 25 sign-ins 10 replies posted

Hello Rashi,

the PMODE[2:0] is indeed Z11.

I tried to program CX3's RAL with the USBFlashProg example. It displays the message "Programming Suceeded" at the bottom left.

Unfortunately the device does not enumerates afterwards and is not present in the Device Manager either. This is the same behavior as when I try to program SPI or I2C memories.

 

Best regards,

SimonP

0 Likes
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted

Hello SimonP.

It seems that there is some problem on the USB interface.

Unfortunately the device does not enumerates afterwards and is not present in the Device Manager either. 

>> Please confirm if the device doesn't enumerate at all or comes up with some warning(yellow)mark.

Please try programming UsbBulkSrcSink (path: ..\Cypress\EZ-USB FX3 SDK\1.3\firmware\basic_examples\cyfxbulksrcsink ) firmware of the FX3 SDK and share the UART logs for us to check. The firmware logs the USB logs from the device side.

Regards,
Rashi
0 Likes

Hello Rashi.

I confirm the device does not enumerate at all (no refresh at all of the device list in the device manager and no connection sound).

I tried to program UsbBulkSrcSink firmware and the device appeared as "Cypress FX3 USB StreamerExample Device" !

I couldn't get the UART logs, could you indicate me what is the baudrate I should select ?

Best regards,

SimonP

0 Likes
lock attach
Attachments are accessible only for community members.
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted

Hello SimonP,

Please find the attached UART settings

Please let me know if device enumerates every time CX3 is programmed with UsbBulkSrcSink or enumeration fails sometimes?

If UsbBulkSrcSink (programmed to CX3's RAM) enumerates every time, please share the UART logs with USBFlashProg firmware (programmed to CX3's RAM)

Regards,
Rashi
0 Likes

Hi Rashi,

The device enumerates every time with UsbBulkSrcSink (tried a dozen times) but it never enumerates with USBFlashProg.

I tried to listen to the UART port with the settings you sent but I don't get any message at all.

Best regards,

SimonP

0 Likes
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted

Hello SimonP,

Please check if the program control enters CyFxFlashProgInit API in the USBFlashProg example.

If the CyFxFlashProgInit is called, please try calling CyU3PDeviceReset(CyFalse); after to check if CyFxFlashProgI2cInit and CyFxFlashProgSpiInit have executed without failure.

If the CyU3PDeviceReset is not executed i.e. the device doesn't reset, means that any one of these API have failed due to which the USB enumeration  (done after calling CyU3PConnectState API) didn't  happen.

Please check and let me know the results

Regards,
Rashi
0 Likes

Hello Rashi,

We did some investigation yesterday by testing different chunk of codes between the working project (UsbBulkSrcSink) and a non-working project and found out which part was needed.

UsbBulkSrcSink calls CyU3PDeviceInit with a specific clock configuration while most of the other projects do not give any clock configuration.

After using the same clock configuration the project seems to be working fine when loading to RAM.

This is probably where the program get stuck before reaching any following API calls.

Do you know why this clock configuration is not needed for the Devkit ? What would we need to change on our board to not need this specific configuration ?

This clock configuration is most likely not present in the CyBootProgrammer.img at "C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\application\c_sharp\controlcenter" so we still cannot program anything to the EEPROM or Flash memory. Is there a workaround for this ? Maybe rebuilding this image with the clock configuration ?

 

Best regards,

SimonP

 

0 Likes
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted

Hello SimonP,

From your response I understand that CyU3PDeviceInit fails. Is that correct? If yes, please let me know the return code when programmed with UsbFlashProg

CyU3PDeviceInit (NULL) and the clock configuration in the UsbBulkSrcSink is same. When NULL is passed, the CyU3PDeviceInit  API will internally initialize the clock configurations.

Regards,
Rashi
0 Likes

Hello Rashi,

I could not get the error code as I am currently unable to use debug mode with my J-Link.

However we found out that the issue was due to the two external clocks being swapped on the board. After swapping them to the correct place, things are working much better. We cab program any software to the RAM and get the "Cypress Boot Programmer Device Not Found" when trying to write into the SPI Flash.

Unfortunately, I am still unable to write to the SPI Flash. The programming ends well with the message "Programming of SPI FLASH Succeeded" but when I try to restart on the SPI with PMODE[2:0] = 101 it fails and fallback to the USB bootloader with no error message. Our SPI Flash is the S25FS128S recommended for the CX3.

Do you have any clue of why it may fail ?

Best regards,

SimonP

0 Likes
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted

Hello SimonP,

However we found out that the issue was due to the two external clocks being swapped on the board

>> Glad to hear that programming RAM succeeded after 

Do you have any clue of why it may fail ?

>> Please refer to this KBA  FX3 SPI boot fails when S25FS128S flash is used – ... - Cypress Developer Community  and let me know if it helps

Regards,
Rashi
0 Likes

Hi Rashi,

I tried to follow the steps in your link with no success. Even with the new CyBootProgrammer image I am still unable to program/boot on my Flash memory.

Best regards,

SimonP

0 Likes
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted

Hello SimonP,

Please refer to point 3 of  this KBA  Troubleshooting SPI / I2C Programming in FX3 – KBA... - Cypress Developer Community   and let me know the results

Regards,
Rashi
0 Likes

Hello Rashi,

Thanks for the reference link. I used the troubleshooting program of point 3 and confirmed that the read,write and erase functions works correctly on my flash memory.

I tried to start reading the first page of memory before erasing and there was already some data. I suppose it corresponded to the previous firmware image I tried to write on the memory.

I have the feeling the problem does not comes from the flash memory itself but either from the firmware image format or from the bootloader trying to start/detect the image on the flash memory.

Regards,

SimonP

0 Likes
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted

Hello SimonP,

Please refer to table 23 of this app note https://www.cypress.com/file/201991/download and check the image format.

You can also  try programming usbbulksrcsink default .img from the FX3 SDK.

Please let me know if the programming of SPI FLASH is successful from the Control center

Regards,
Rashi
0 Likes

Hello Rash,

I used the correct image format, building it with EZ USB Suite. I confirmed it by programming it to the SPI Flash of the Devkit and booting correctly on it.

I tried the exact same thing on my custom board and get the message "Programming Succeeded" at the end from the Control center. When trying to boot on the SPI with PMODE[2:0]=101, the board immediately boot back to the USB Bootloader.

 

Best regards,

SimonP

0 Likes
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted

Hello SimonP,

When trying to boot on the SPI with PMODE[2:0]=101, the board immediately boot back to the USB Bootloader.

>> For SPI boot with USB fallback, the PMODE lines should be configured as PMODE[2:0] = 0F1 

Please configure the PMODE lines correctly and probe the SPI line to check if the data is read from the SPI FLASH while booting is started i.e. Reading from SPI FLASH

Regards,
Rashi
0 Likes

Hi Rashi,

yes, I meant PMODE[2:0] = 0F1 (switches position are 101).

I checked the SPI lines during boot. Clock and MOSI are OK but MISO has no signal. It seems like the Flash is not answering.

I suspected that the issue was related to the hybrid sector format and tried to change the configuration register to have an uniform sector size instead of using the special bootprogrammer. After a first try it looked like it was working and I was able to boot on SPI.

Unfortunately I tried to switch to the USB bootloader to update my firmware and switch back to SPI boot but it doesn't work anymore. I checked the value of the CR3NV register and it remains at 0x00 even after I try to enable write and update it to 0x08.

Best regards,

SimonP

0 Likes
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted

Hello SimonP,

Please try replacing CyBootProgrammer.img. with the image file attached with the KBA and let me know if that works.

Copy and paste this file to the following location: C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\bin. Create a backup of the existing CyBootProgrammer.img in this location so that it can be used with other SPI flash devices.

Regards,
Rashi
0 Likes

Hi Rashi,

I tried it before and tried it again today but this image is not working.

During compilation, I noticed that there is a rdBuf array that is initialized but not used and I think the code of the KBA is incomplete.

Regards,

SimonP

0 Likes
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted

Hello SimonP,

Can you please check if the CR3NV is written with 0x08 value when you are using the image file attached with the KBA?

If yes, the boot from SPI Flash should be successful provided the problem is due to hybrid sector. 

Regards,
Rashi
0 Likes

Hello Rashi, the image file attached with the KBA has the same problem as me. The content of the CR3NV remains the same(0x00) and is not modified even though the WRAR command return with no error.

Regards,

SimonP

0 Likes
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted

Hello SimonP,

Please probe and share the traces of  the SPI lines and confirm if the register is written properly.

Please let me know if the SPI Flash can be replaced with a different SPI flash to check if the problem is not due to a particular flash

Regards,
Rashi
0 Likes

Hello Rashi,

I tried with another board and problem is not related to this flash in particular. I also tried with a W25Q32JW flash instead and the default image file but it failed too.

I will try to find to get traces of the SPI lines while writing to the registers.

Best regards,

SimonP

0 Likes
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted

Hello SimonP,

Please share the schematics of the SPI part of your board.

As you mentioned that UsbSpiDmaMode/UsbSpiRegMode example works fine, which means that the SPI communication is working properly. Can you check reading and writing more bytes (i.e. writing/reading to multiple pages of Flash)? 

Regards,
Rashi
0 Likes
lock attach
Attachments are accessible only for community members.

Hi Rashi,

Attached is the schematics of the SPI part on the Flash side and on the CX3 side.

I checked writing and reading multiple pages and it worked fine.

Best regards,

SimonP

 

0 Likes
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted

Hello SimonP,

Please refer to section 8.4 of https://www.cypress.com/file/139936/download 

It mentions "There should be no pull-up on SPI MISO/MOSI lines to allow FX3 to boot from SPI flash. It is recommended to include a pull-down resistor on the MISO line"

Regards,
Rashi

Hello Rashi,

This was indeed the source of the issue and I am now able to program the flash correctly, thanks !

Best regards,

SimonP

0 Likes