stm32 USB的CDC类传输掉数据
STM32F105 USB接收数据不断进入中断,出现“死机”现象
关于STM32CubeMX配置的USB例程电脑无法识别问题
STM32F407 USB-HS-OTG是否不外接PHY可以做虚拟串口?
如何做一个USB从机键盘用stm32f407
用STM32F4 Cube MX生成的USB Device C代码的BUG
USB Device + FatFS + SDIO 模拟U盘意外只读问题
USB Device + FatFS + SDIO 问题
STM32H7配置成USB DEVICE时,连接电脑时不进入中断
STM32F446 USB和串口1 冲突
但是PC认到了,而且也能通信。我用串口调试软件跑了15个小时都没有问题的。不过那是在超级循环里面用USBD_CDC_ACM_ReadData函数读,然后用USBD_CDC_ACM_WriteData函数原样返回。后来发现有USBD_CDC0_ACM_DataReceived这个回调函数,就想使用这个回调函数。然后就出现这个问题了,不知道是哪里设置不对还是keil库的bug。
void USBD_CDCn_ACM_DataReceived ( uint32_t len )
Function indicating new data was received by USB CDC class Device (Virtual COM Port)
Parameters
[in] len number of bytes available to read.
Returns
none.
The function USBD_CDCn_ACM_DataReceived notifies that there is newly received data available.
The argument len is number of bytes available to read. Modify this function to the application needs.
Note
Callback when new data is received on Bulk OUT Endpoint.
恭喜楼主啊