Problems in CyU3PUsbStart() and CyFx3BootUsbStart() in case of no re-enumeration | Cypress Semiconductor
Problems in CyU3PUsbStart() and CyFx3BootUsbStart() in case of no re-enumeration
Summary: 2 Replies, Latest post by kalev on 17 Sep 2012 05:25 AM PDT
Verified Answers: 0
07 Sep 2012 04:18 AM PDT#1
I detected two concurrency problems in CyU3PUsbStart() and CyFx3BootUsbStart() related to jumping from one program to another without USB re-enumeration.
1) When host initiates Control request before calling CyU3PUsbStart()/CyFx3BootUsbStart(), this request hangs forever at host side. Seems like the functions clear pending SETUP packet flag without invoking respective processing handlers.
2) CyU3PUsbStart()/CyFx3BootUsbStart() enable processing of SETUP packets immediately, making it impossible to register user callbacks beforehand.
Currently API preserves Boot Loader descriptors and there is no need to register descriptors again in application. In practice, application should match boot loader descriptors and therefore it can register these descriptors again itself as well. And, while no re-enumeration is needed, typically there are also some user/application specific data that must be passed between programs, so the designers have to invent their own methods for exchanging data anyway.
In my opinion, enabling USB without re-enumeration should follow the same logic as with enumeration - actual USB enabling should be performed in CyU3PConnectState/CyFx3BootUsbConnect, after the application has performed complete initialization.