使用中断方式收发,只要一发送,就会一直进中断,在中断中看了,是ginnakeff标志为1,也就是GINAKEFF中断,大家看看这是怎么回事
Bit 6 GINAKEFF: Global IN non-periodic NAK effective
Indicates that the Set global non-periodic IN NAK bit in the Device control register (SGINAK bit
in OTG_FS_DCTL), set by the application, has taken effect in the core. That is, the core has
sampled the Global IN NAK bit set by the application. This bit can be cleared by clearing the
Clear global non-periodic IN NAK bit in the Device control register (CGINAK bit in
OTG_FS_DCTL).
This interrupt does not necessarily mean that a NAK handshake is sent out on the USB. The
STALL bit takes precedence over the NAK bit.
Note: Only accessible in Device mode. |