I've been through that document when initially setting up my FX3 firmware. I did find it a bit confusing where it says "Therefore, the bootloader must have the same descriptors as the main firmware.". Does this imply that my main firmware and my 2nd stage bootloader firmware must have the same descriptors (VID, PID, Manufacturer, Product)? If this is the case then my device would then be recognised as a bootloader device, rather than a streamer application device.
The ways of using the second stage bootloader:
1. The first parameter of CyFx3BootUsbStart is CyTrue:
- In this case there won't be re-enumeration when the final firmware starts executing.
- You can jump back to second stage bootloader whenever required during the execution of the main firmware
(Details of how to do it is mentioned in the KBA pointed in the previous post)
- So, in this case, since there is no re-enumeration in the final firmware, the second stage bootloader should supply the descriptors of the main firmware during it's enumeration.
2. The first parameter of CyFx3BootUsbStart is CyFalse:
- In this case there will be re-enumeration when the final firmware starts executing.
So, in this case, the bootloader need not have the same descriptors as the final firmware.
- Jump to second stage bootloader during final firmware execution is also not possoible.
Hope this is clear.
Having, said the same, if you intend to use CyFalse in your second stage bootloader, then please let us know what problem you are facing?
Thanks for the reply. So my design is using option number 2 that you mentioned above. My problem occurs when loading my main firmware onto the fx3, whilst my 2nd stage bootloader is running (through the Cy Control Centre). Most of the time, the programming of the ram works correctly and re-enumeration occurs. However about 1/4 attempts to program the RAM will yield a "Programming Failed" result in the Cy Control Centre.
Thanks for clarifying the descriptor confusion.
I might also add, that it doesn't seem to be a hardware issue or a problem with my final firmware. As I've connected Jumper J$, so that the Fx3 loads the default bootloader. Then I can continue to load my main firmware into ram, with 100% success rate.