这个项目基于我们之前的 STM32 项目 (https://github.com/smart-sensor-devices-ab/stm32_bleuio_example),在 .ioc 文件中有这些变化: 在引脚视图中,我们将 GPIO PE4 设置为 OUTPUT 并将其标记为“灯泡”。 在USB_HOST\usb_host.c 中的 USBH_CDC_ReceiveCallback 函数中,我们将 CDC_RX_Buffer 复制到一...
Using USBlyzer all the descriptor info seems ok but windows will only recognise the CDC (virtual com port). The port gets enumerated and I can open and close it but data goes to the wrong endpoint no matter how I swap them around. Also, windows completely ignores the MSC unless I disabl...
USB有主机(Host)和设备(Device)之分。一般电脑的USB接口为主机接口,而键盘、鼠标、U盘等则为设备。 部分型号的STM32芯片有1~2个USB接口。像STM32F103系列的有一个USB Device接口,STM32F407系列的有2个USB接口,既可以作为HOST,又可以作为Device,还可以作为OTG接口。 在Middleware中选择USB_DEVICE设置,在Class For ...
在“中间件”下,“USB_HOST”-“FS IP 类”设置为“通信主机类(虚拟端口Com)”。 为了确保主机能够识别引导加载程序何时完成且 BleuIO 固件正在运行,这已添加到“usb_host.c”中的 USBH_UserProcess 函数中(位于“USB_HOST”->“App”文件夹下): static void USBH_UserProcess (USBH_HandleTypeDef *phost,...
这个项目基于我们之前的 STM32 项目 (https://github.com/smart-sensor-devices-ab/stm32_bleuio_example),在 .ioc 文件中有这些变化: 在引脚视图中,我们将 GPIO PE4 设置为 OUTPUT 并将其标记为“灯泡”。 在USB_HOST\usb_host.c 中的 USBH_CDC_ReceiveCallback 函数中,我们将 CDC_RX_Buffer 复制到一...
什么是CDC类 (Communication Device Class)USB的CDC类是USB通信设备类 (Communication Device Class)的简称。CDC类是USB 王伟012023-06-15 07:02:43 ch559作为USBhost识别CDCusb时出错怎么解决? 大家好,我们的需求是使用CH559作为host端,然后插入一个由STM32模拟的CDCusb设备。 但是在进行检测时一直出错,主要是在...
2 STM32的USB简介 3 USB实现类 3.1 USB-CDC 4 代码分析 4.1 stm32f4-discovery-usb-cdc-example分析 4.1.1 main.c 4.1.2 usbd_desc.h 4.1.3 usbd_desc.c 4.1.4 stm32f4xx_it.c 4.1.5 usb_bsp.c 4.1.6 usb_conf.h 4.1.7 usbd_conf.h ...
发送接口比较简单,经阅读 ST 对虚拟串口的实现了解到往 USB 发送数据,使用 CDC_Transmit_FS 接口即可,所以实现如下: int vSerialPutString(xComPortHandle xPort, signed char *pMessage, unsigned short len) { xPort = xPort; retry: if(0x00 != CDC_Transmit_FS(pMessage, len)) { osDelay(10); goto...
引入usbd_core.h和usbd_cdc_if.h库。 声明一个 USB 设备句柄。 在MX_USB_DEVICE_Init函数中,初始化 USB。 4. Android开发环境配置 在你的计算机上安装 Android Studio,并确保 SDK 和 NDK 已正确配置。创建一个新项目(选择空白 Activity 模板),在build.gradle文件中添加 USB 权限: ...
stm32f429i disc usb cdc vcp 虚拟串口 example project (CubeMX Hal) https://github.com/ghosoft/STM32F429I-DISC0_usb_vcp