This repository has been archived on 2025-04-28. You can view files and clone it, but cannot push or open issues or pull requests.
CMS/1.Software/STM32/USB_HS _ TEST
2024-11-19 17:19:21 +08:00
..
Core 机舱采集器——不在使用 2024-11-19 17:19:21 +08:00
Drivers 机舱采集器——不在使用 2024-11-19 17:19:21 +08:00
MDK-ARM 机舱采集器——不在使用 2024-11-19 17:19:21 +08:00
Middlewares/ST/STM32_USB_Device_Library 机舱采集器——不在使用 2024-11-19 17:19:21 +08:00
USB_DEVICE 机舱采集器——不在使用 2024-11-19 17:19:21 +08:00
VM_App 机舱采集器——不在使用 2024-11-19 17:19:21 +08:00
readme.txt 机舱采集器——不在使用 2024-11-19 17:19:21 +08:00
USB_HS.ioc 机舱采集器——不在使用 2024-11-19 17:19:21 +08:00

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

USB数据传输采用USBCDC类虚拟串口进行传输上位机可以直接通过串口与下位机通讯也能使用USB协议与下位机通讯


USB通讯采用端点传输方式具体参数可在 "usbd_cdc.h"中进行修改
USB通过“usbd_cdc_if.c”中的static int8_t CDC_Receive_HS(uint8_t* Buf, uint32_t *Len)函数接受数据通过uint8_t CDC_Transmit_HS(uint8_t* Buf, uint16_t Len)发送数据

当上位机向单片机发送/接受数据时单片机进入“void OTG_HS_IRQHandler(void)”中断执行HAL_PCD_IRQHandler(&hpcd_USB_OTG_HS) 函数

**单片机向上位机发送的数据不能是64的整数倍

参考资料http://t.csdn.cn/4oRNV