STM32 cdc_receive_fs回调从未调用
我正在尝试在STM32Cube上使用USB设备库,但是当我使用调试器执行执行或尝试在CDC_RECEIVE_FS中打开LED时,它永远不会达到这一点。
这是我设置每个设置的方式:
- 我的板是一个nucleo-f746zg,
- 我启用了
device_only
模式,激活的_vbus
_SOF 。默认情况下,启用了GO FS Global Intrupt上的所有其他所有内容,并且USB已启用!
- 我设置USB_DEVICE:fs ip 的类
类设置为
虚拟端口com
,默认情况下将所有内容留在默认的 - 主循环中,左空
cdc_receive_fs
:将brekaspoint放在其中和/或hal_gpio_writepin(ld1_gpio_port,ld1_pin,gpio_pin_set);
- 我已经设置了TIM2为我想做的事情设置了我想做的
事情串行
以921600的福音,但一无所获。然后将腻子与9600的波特奶酪一起使用,仍然什么都没有...
如果有人有任何线索,我整天一直在挣扎。
这是整个项目: https://ecloud.global/s/cjgyqk6z9g58lm4
I am trying to use the USB Device library on STM32Cube but when I execute using the debugger or that I try to turn an LED on in CDC_Receive_FS, it never reaches that point.
Here is how I set up everyting:
- My board is a NUCLEO-F746ZG
- I enabled USB_OTG_FS in
Device_Only
mode, activated_VBUS
and_SOF
. Left everything else by default andUSB On The Go FS global interrupt
is enabled! - I set up USB_DEVICE:
Class For FS IP
set toVirtual Port Com
, left everything by default - Main loop left empty
CDC_Receive_FS
: put breakpoint in it and/orHAL_GPIO_WritePin(LD1_GPIO_Port, LD1_Pin, GPIO_PIN_SET);
- I have TIM2 set up for the things I would like to do when it will work
Then I tried to send data to the board, first using Python using serial
with a baudrate of 921600 but got nothing. Then using PuTTY with a baudrate of 9600, still nothing...
If anyone has a clue, I have been struggling with it the whole day.
Here is the whole project: https://ecloud.global/s/cjGYqK6z9g58Lm4
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论