- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Cypress,
I have been programming my FX3 SuperSpeed microcontroller, with the help from the CyControl Center. When I build my C-program and create a .img file, I can put it on by programming it via RAM. But this means, when I remove power, it will delete the program off the board (and I have to reprogram it every time I give it power).
How do I program it with an .img file, such that the program runs automatically on boot / when it gets power?
I've also tried to proram it via I2C E2PROM and SPI FLASH, but I don't think that's how you should do it, and I can't get it to work either by programming it that way.
Best regards,
Søren
Solved! Go to Solution.
- Labels:
-
USB Superspeed Peripherals
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Søren,
I find that you are using Superspeed Explorer Kit. This kit does not support SPI boot. This is because the kit does not have an onboard flash. Also, the PMODE pins cannot be configured for SPI boot. So, you can make use of I2C boot only using this kit.
PMODE lines for USB and I2C boot are configured by using J4. If J4 is inserted, then it will configure the PMODE pins for USB boot. If J4 is removed, then the PMODE pins will be configured for I2C boot. So, for using I2C boot, you can follow the steps given below:
1. Insert J4 to the kit. This will enable USB boot.
2. Using control center application, download the firmware to I2C EEPROM.
3. Wait for the firmware download to be completed.
4. Once the firmware download is completed, remove J4 and press the reset button.
This will make the device boot from I2C EEPROM. Please let me know if you face any difficulties in implementing this procedure.
Jayakrishna
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Your understanding is correct. If you directly load the firmware to FX3 RAM (USB Boot) using control center, then the firmware image will be erased upon each power cycle of the device. This is expected.
However, if you want to have a automatic boot of the .img file, then do the following procedure:
1. Configure the PMODE pins for USB Boot (PMODE: Z11).
2. Open the control center application and download the firmware to I2C EEPROM or SPI Flash.
3. After the firmware download is complete, change the PMODE pins for I2C/SPI boot. It should be Z1Z for I2C boot and 0Z1 for SPI boot.
4. Power cycle the device. FX3 will boot from on board I2C EEPROM/SPI flash depending on the state of the POMODE pins when the device is powered. If the firmware image is not valid, then FX3 will fallback to USB boot.
Please let me know if you have any questions on this.
Jayakrishna
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi again,
How do I configure the PMODE pins for USB Boot? I have found the pins on the board, is it PM_0/1/2 at the middle left of the picture or is it PMODE J4 at the bottom right - but how do I proceed from here?
I've put the following on PMODE:
And I tried programming it via SPI Flash, but this programming failed (according to the USB Control Center status bar). When I program it of I2C EEPROM, it succeeds. Is the correct in "configuring PMODE pins for USB boot?
Same goes for after the firmware download is complete, how do I change the PMODE pins for I2C/SPI boot? Is there a preference, or does it not matter?
How should the setup look like when changing it such that we have PMODE pins for I2C/SPI boot? How do I make it so it is Z1Z for I2C boot and 0Z1 for SPI boot?
Best regards,
Søren
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Søren,
I find that you are using Superspeed Explorer Kit. This kit does not support SPI boot. This is because the kit does not have an onboard flash. Also, the PMODE pins cannot be configured for SPI boot. So, you can make use of I2C boot only using this kit.
PMODE lines for USB and I2C boot are configured by using J4. If J4 is inserted, then it will configure the PMODE pins for USB boot. If J4 is removed, then the PMODE pins will be configured for I2C boot. So, for using I2C boot, you can follow the steps given below:
1. Insert J4 to the kit. This will enable USB boot.
2. Using control center application, download the firmware to I2C EEPROM.
3. Wait for the firmware download to be completed.
4. Once the firmware download is completed, remove J4 and press the reset button.
This will make the device boot from I2C EEPROM. Please let me know if you face any difficulties in implementing this procedure.
Jayakrishna
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi again,
I don't know if you saw my recent edits to my reply above (now that I look for it, it seems I accidently deleted it)... It copy pasted it here below:
-----------------------------------------------------------------------------
Hi again,
How do I configure the PMODE pins for USB Boot? I have found the pins on the board, is it PM_0/1/2 at the middle left of the picture or is it PMODE J4 at the bottom right - but how do I proceed from here?
I've put the following on PMODE:
And I tried programming it via SPI Flash, but this programming failed (according to the USB Control Center status bar). When I program it of I2C EEPROM, it succeeds. Is the correct in "configuring PMODE pins for USB boot?
Same goes for after the firmware download is complete, how do I change the PMODE pins for I2C/SPI boot? Is there a preference, or does it not matter?
How should the setup look like when changing it such that we have PMODE pins for I2C/SPI boot? How do I make it so it is Z1Z for I2C boot and 0Z1 for SPI boot?
Best regards,
Søren
-----------------------------------------------------------------------------
But it works fine now: I programmed it by inserting the J4 to the kit, programming it, removing it and resetting the device.
Now if I want to go back to the bootloader (the standard/default boot), how would I do that?
Best regards,
Søren
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
For this, you can re-insert J4 and press the rest button. This will make the device enumerate again as USB Bootloader device.
Jayakrishna