通常我们使用CYFX3BOOTUSBSTART(CyTr..,…),选项“重新枚举将不被完成”,并按预期工作。
在异常的情况下,设备上电,启动它的USB连接周期,在CYFX3BOOTUSTBSTART,CYFX3BOOTUBBConnect之后,但在设备变得模糊不清之前,出现一个非常短的USB断开/重新连接。从这一刻起,设备就不会启动它的枚举周期,固件停留在引导加载程序,等到USB连接就绪。
在调用CYFX3BOOTUBSCON
tiON之后,通过重新启动调试会话,可以在调试会话中很容易地再现这种行为。从下到下一个设备复位(
电源周期或CYFX3BOOTDEVICESESET),不会触发USB枚举。在调试器中重新加载固件将无法修复。
如果我们调用CYFX3BOOTUSBSTART(CyFalm,…),选择“重新枚举”将比它在任何情况下都能工作。
是否有一种方法在第二阶段引导加载程序中复位USB,以确保与第一次启动后一样的行为?用CYFX3BOOTUSBSTART选项“撤销枚举”将不会撤销更改吗?
以上来自于百度翻译
以下为原文
Normally we use CyFx3BootU***Start( CyTrue, ..) with option "Re-Enumeration will NOT be done" and it works as expected.
At the unusual situation where the device power up, start it's USB connect cycle, short after CyFx3BootU***Start, CyFx3BootU***Connect but before device became emumerated, a very short USB disconnect / re-connect occur. From this moment on, the device don't start it's enumeration cycle, firmware stay at bootloader and wait until USB connection is ready.
This behaviour can be easily reproduced within a debug session, by restarting the debug session directly after CyFx3BootU***Connect have been called. From than till next device reset (power cycle or CyFx3BootDeviceReset), no USB enumeration will be triggered. Further firmware reloads within the debugger won't fix that.
If we call CyFx3BootU***Start( CyFalse, ..) with option "Re-Enumeration will be done" than it seems to work in any situation.
Is there a way to reset the USB within Second Stage Bootloader to ensure the same behavior like after first power up? Any thing to undo the changes cause by CyFx3BootU***Start - option "Re-Enumeration will NOT be done"?