USB fuction controller 驱动里 UfnPdd_Init 函数里 pContext->attachedState = UFN_DETACH;
之后 中断来了 ISTMain 进入 HandleUSBEvent函数 有这样的代码
if (bUSBBusIrqStat & USB_RESET_INTR) {
pContext->fSpeedReported = FALSE;
WriteReg(pContext, USB_INT_REG_OFFSET, USB_RESET_INTR);
// If the cable was connected to a host at boot, the attach interrupt
// will be missed. Generate it here.
if (pContext->attachedState == UFN_ATTACH) {
pContext->pfnNotify(pContext->pvMddContext,
UFN_MSG_BUS_EVENTS, UFN_DETACH);
pContext->attachedState = UFN_DETACH;
}