FX3 second stage boot-loader

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

cross mob
IlPa_4625406
Level 1
Level 1
First like given

Hi Cypress,

I am trying to implement a custom I2C boot using the second stage boot-loader. I am looking to address a failure case wherein the EEPROM firmware needs an update or is corrupted. This firmware now needs to be updated using the second stage boot-loader. I could jump to the second stage boot-loader using the CyU3PJumpBackToBooter() API but I need to know how I could access the I2C EEPROM so that I can burn my new firmware image over the USB interface.

Thanks,

IP

0 Likes
1 Solution

Hello,

Please try the following and let me know if it helps.

1. In the second stage bootloader code, define both macros i.e I2C boot and USB boot. This is used to fallback to USB boot when I2C boot fails. Now, combine the image files of the second stage bootloader and the application firmware and load it into I2C EEPROM. Upon resetting the device, the second stage bootloader will be loaded to RAM first followed by the application firmware.

2. Whenever, the firmware needs an update, just make the I2C boot fail. For this, In the application firmware  use a vendor command to change the first byte of the EEPROM where the application firmware is stored. The first byte of a valid image will be 'C' . The second byte will be 'Y'. If this byte is changed, the I2C boot will fail. Now upon jumping back to the second stage bootloader, I2C boot will fail. Then USB boot can be used. The device will enumerate as Bulkloop example device.

3. Now, load a dummy firmware to RAM by using control center. This dummy firmware should accept a vendor command so as to update the EEPROM with the new image file. After successfully updating the EEPROM with the new firmware, jump back to the second stage bootloader. This time, I2C boot will not fail as the CY signature will be proper.

We do not have any examples to update the EEPROM inside the second stage bootloader so please use the procedure mentioned above and let me know the result.

Best Regards,

Jayakrishna

Best Regards,
Jayakrishna

View solution in original post

12 Replies