STM32F407 作USB host 驱动 声卡 问题
STM32F407 USB 的FIFO究竟有多少空间?
stm32f103 usb iap
USBH CDC通讯,如何修改通讯波特率?
STM32F407 USB的IN端点只能是0x81么?
求技术解答,STM32H723的USB模拟U盘应用过程遇到了问题。
请问一下,我的nucleo板子连接usb线,找不到target,一直无法下载程序怎么回事呢?
请问一下,stm32WB有可以驱动声卡的驱动程序吗(声卡是PCM2704)?
STM32F407 USB怎么测试接口的极限速度
我的电脑识别不到STM32的ST-LINK驱动(特指针对芯片stm32wle5ccu6)
评分
查看全部评分
我的USB模块虽然和stm32用的是相同的IP核,但实现方式很不一样,没有像stm32这样分的很清楚,它是在一个otg_endpoint_creat函数中:
otg_endpoint_index = endpoint -> ux_slave_endpoint_descriptor.bEndpointAddress & ~UX_ENDPOINT_DIRECTION;
/* Fetch the address of the physical endpoint. */
ed = &dcd_otg -> ux_dcd_otg_ed[otg_endpoint_index];
先通过上面两个语句确定端点方向和ID号
然后再构建端点DIEP或DOEP寄存器,在再通过switch函数来case宏,如UX_CONTROL_ENDPOINT、UX_BULK_ENDPOINT等等,其中如批量端点,
case UX_BULK_ENDPOINT:
put_string("UX_BULK_ENDPOINT");
/* Set the MPS field. */
otg_endpoint_register |= endpoint -> ux_slave_endpoint_descriptor.wMaxPacketSize;
/* Set the SD0PID flag. */
otg_endpoint_register |= UX_DCD_OTG_FS_DIEPCTL_SD0PID;
/* Bulk endpoint. Set the USBAEP and SNAK fields. */
otg_endpoint_register |= UX_DCD_OTG_FS_DIEPCTL_EPTYP_BULK ||UX_DCD_OTG_FS_DIEPCTL0_USBAEP | UX_DCD_OTG_FS_DIEPCTL0_SNAK;
/* Store the endpoint type. */
ed -> ux_dcd_otg_ed_type = UX_BULK_ENDPOINT;
break;
这样是不是只通过这一个函数,就可以将在描述符中设置的端点都能初始化吗?
这里对结构体变量进行赋值,赋值完了再进行配置吧
是的,所以想,这样似乎不需要像stm32里添加一个端点就需要添加一个对应的初始化函数等等吧。。。