文件名称:STM32F103-DualCDC
介绍说明--下载内容来自于网络,使用问题请自行百度
STM32F103 USB转双串口。使用CDC类。插上电脑后,会出来两个虚拟串口,如果提示找不到驱动,指定驱动路径到inf文件夹即可。
相比ST官方提供的只有1路串口的例程,方便了很多
用到的IO定义如下:
串口1:PA9和PA10
const GPIO_InitTypeDef TX1_pin { GPIO_Pin_9, GPIO_Speed_50MHz, GPIO_Mode_AF_PP }
const GPIO_InitTypeDef RX1_pin { GPIO_Pin_10, GPIO_Speed_50MHz, GPIO_Mode_IN_FLOATING }
串口2:PA2和PA3
const GPIO_InitTypeDef TX2_pin { GPIO_Pin_2, GPIO_Speed_50MHz, GPIO_Mode_AF_PP }
const GPIO_InitTypeDef RX2_pin { GPIO_Pin_3, GPIO_Speed_50MHz, GPIO_Mode_IN_FLOATING }
USB使能脚:PC15
#define USB_DISCONNECT GPIOC
#define USB_DISCONNECT_PIN GPIO_Pin_15 //GPIO_Pin_12
#define RCC_APB2Periph_GPIO_DISCONNECT RCC_APB2Periph_GPIOC
你可以根据自己板子的定义自行修改,修改办法是搜索上面这些宏定义,找到地方直接改掉并重新编译即可-STM32F103 USB to 2 Uart
相比ST官方提供的只有1路串口的例程,方便了很多
用到的IO定义如下:
串口1:PA9和PA10
const GPIO_InitTypeDef TX1_pin { GPIO_Pin_9, GPIO_Speed_50MHz, GPIO_Mode_AF_PP }
const GPIO_InitTypeDef RX1_pin { GPIO_Pin_10, GPIO_Speed_50MHz, GPIO_Mode_IN_FLOATING }
串口2:PA2和PA3
const GPIO_InitTypeDef TX2_pin { GPIO_Pin_2, GPIO_Speed_50MHz, GPIO_Mode_AF_PP }
const GPIO_InitTypeDef RX2_pin { GPIO_Pin_3, GPIO_Speed_50MHz, GPIO_Mode_IN_FLOATING }
USB使能脚:PC15
#define USB_DISCONNECT GPIOC
#define USB_DISCONNECT_PIN GPIO_Pin_15 //GPIO_Pin_12
#define RCC_APB2Periph_GPIO_DISCONNECT RCC_APB2Periph_GPIOC
你可以根据自己板子的定义自行修改,修改办法是搜索上面这些宏定义,找到地方直接改掉并重新编译即可-STM32F103 USB to 2 Uart
(系统自动生成,下载前可以参看下载内容)
下载文件列表
使用说明.txt
inf/STM32F1-vcom.inf
inf/STM32F1-vcom_amd64.cat
inf/STM32F1-vcom_x86.cat
Libraries/CMSIS/Core/CM3/core_cm3.c
Libraries/CMSIS/Core/CM3/core_cm3.h
Libraries/CMSIS/Core/CM3/startup/arm/startup_stm32f10x_cl.s
Libraries/CMSIS/Core/CM3/startup/arm/startup_stm32f10x_hd.s
Libraries/CMSIS/Core/CM3/startup/arm/startup_stm32f10x_ld.s
Libraries/CMSIS/Core/CM3/startup/arm/startup_stm32f10x_md.s
Libraries/CMSIS/Core/CM3/startup/gcc/startup_stm32f10x_cl.s
Libraries/CMSIS/Core/CM3/startup/gcc/startup_stm32f10x_hd.s
Libraries/CMSIS/Core/CM3/startup/gcc/startup_stm32f10x_ld.s
Libraries/CMSIS/Core/CM3/startup/gcc/startup_stm32f10x_md.s
Libraries/CMSIS/Core/CM3/startup/iar/startup_stm32f10x_cl.s
Libraries/CMSIS/Core/CM3/startup/iar/startup_stm32f10x_hd.s
Libraries/CMSIS/Core/CM3/startup/iar/startup_stm32f10x_ld.s
Libraries/CMSIS/Core/CM3/startup/iar/startup_stm32f10x_md.s
Libraries/CMSIS/Core/CM3/stm32f10x.h
Libraries/CMSIS/Core/CM3/system_stm32f10x.c
Libraries/CMSIS/Core/CM3/system_stm32f10x.h
Libraries/CMSIS/Core/Documentation/CMSIS_Core.htm
Libraries/CMSIS/License.doc
Libraries/STM32F10x_StdPeriph_Driver/inc/misc.h
Libraries/STM32F10x_StdPeriph_Driver/inc/stm32f10x_adc.h
Libraries/STM32F10x_StdPeriph_Driver/inc/stm32f10x_bkp.h
Libraries/STM32F10x_StdPeriph_Driver/inc/stm32f10x_can.h
Libraries/STM32F10x_StdPeriph_Driver/inc/stm32f10x_crc.h
Libraries/STM32F10x_StdPeriph_Driver/inc/stm32f10x_dac.h
Libraries/STM32F10x_StdPeriph_Driver/inc/stm32f10x_dbgmcu.h
Libraries/STM32F10x_StdPeriph_Driver/inc/stm32f10x_dma.h
Libraries/STM32F10x_StdPeriph_Driver/inc/stm32f10x_exti.h
Libraries/STM32F10x_StdPeriph_Driver/inc/stm32f10x_flash.h
Libraries/STM32F10x_StdPeriph_Driver/inc/stm32f10x_fsmc.h
Libraries/STM32F10x_StdPeriph_Driver/inc/stm32f10x_gpio.h
Libraries/STM32F10x_StdPeriph_Driver/inc/stm32f10x_i2c.h
Libraries/STM32F10x_StdPeriph_Driver/inc/stm32f10x_iwdg.h
Libraries/STM32F10x_StdPeriph_Driver/inc/stm32f10x_pwr.h
Libraries/STM32F10x_StdPeriph_Driver/inc/stm32f10x_rcc.h
Libraries/STM32F10x_StdPeriph_Driver/inc/stm32f10x_rtc.h
Libraries/STM32F10x_StdPeriph_Driver/inc/stm32f10x_sdio.h
Libraries/STM32F10x_StdPeriph_Driver/inc/stm32f10x_spi.h
Libraries/STM32F10x_StdPeriph_Driver/inc/stm32f10x_tim.h
Libraries/STM32F10x_StdPeriph_Driver/inc/stm32f10x_usart.h
Libraries/STM32F10x_StdPeriph_Driver/inc/stm32f10x_wwdg.h
Libraries/STM32F10x_StdPeriph_Driver/src/misc.c
Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_adc.c
Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_bkp.c
Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_can.c
Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_crc.c
Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_dac.c
Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_dbgmcu.c
Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_dma.c
Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_exti.c
Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_flash.c
Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_fsmc.c
Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_gpio.c
Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_i2c.c
Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_iwdg.c
Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_pwr.c
Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_rcc.c
Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_rtc.c
Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_sdio.c
Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_spi.c
Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_tim.c
Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_usart.c
Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_wwdg.c
Libraries/STM32_USB-FS-Device_Driver/inc/otgd_fs_cal.h
Libraries/STM32_USB-FS-Device_Driver/inc/otgd_fs_dev.h
Libraries/STM32_USB-FS-Device_Driver/inc/otgd_fs_int.h
Libraries/STM32_USB-FS-Device_Driver/inc/otgd_fs_pcd.h
Libraries/STM32_USB-FS-Device_Driver/inc/otgd_fs_regs.h
Libraries/STM32_USB-FS-Device_Driver/inc/usb_core.h
Libraries/STM32_USB-FS-Device_Driver/inc/usb_def.h
Libraries/STM32_USB-FS-Device_Driver/inc/usb_init.h
Libraries/STM32_USB-FS-Device_Driver/inc/usb_int.h
Libraries/STM32_USB-FS-Device_Driver/inc/usb_lib.h
Libraries/STM32_USB-FS-Device_Driver/inc/usb_mem.h
Libraries/STM32_USB-FS-Device_Driver/inc/usb_regs.h
Libraries/STM32_USB-FS-Device_Driver/inc/usb_sil.h
Libraries/STM32_USB-FS-Device_Driver/inc/usb_type.h
Libraries/STM32_USB-FS-Device_Driver/src/otgd_fs_cal.c
Libraries/STM32_USB-FS-Device_Driver/src/otgd_fs_dev.c
Libraries/STM32_USB-FS-Device_Driver/src/otgd_fs_int.c
Libraries/STM32_USB-FS-Device_Driver/src/otgd_fs_pcd.c
Libraries/STM32_USB-FS-Device_Driver/src/usb_core.c
Libraries/STM32_USB-FS-Device_Driver/src/usb_init.c
Libraries/STM32_USB-FS-Device_Driver/src/usb_int.c
Libraries/STM32_USB-FS-Device_Driver/src/usb_mem.c
Libraries/STM32_USB-FS-Device_Driver/src/usb_regs.c
Libraries/STM32_USB-FS-Device_Driver/src/usb_sil.c
Project/DualCDC/inc/hw_config.h
Project/DualCDC/inc/stm32f10x_conf.h
Project/DualCDC/inc/stm32f10x_it.h
Project/DualCDC/inc/usb_conf.h
Project/DualCDC/inc/usb_desc.h
Project/DualCDC/inc/usb_istr.h
Project/DualCDC/inc/usb_prop.h
Project/DualCDC/inc/usb_pwr.h
P
inf/STM32F1-vcom.inf
inf/STM32F1-vcom_amd64.cat
inf/STM32F1-vcom_x86.cat
Libraries/CMSIS/Core/CM3/core_cm3.c
Libraries/CMSIS/Core/CM3/core_cm3.h
Libraries/CMSIS/Core/CM3/startup/arm/startup_stm32f10x_cl.s
Libraries/CMSIS/Core/CM3/startup/arm/startup_stm32f10x_hd.s
Libraries/CMSIS/Core/CM3/startup/arm/startup_stm32f10x_ld.s
Libraries/CMSIS/Core/CM3/startup/arm/startup_stm32f10x_md.s
Libraries/CMSIS/Core/CM3/startup/gcc/startup_stm32f10x_cl.s
Libraries/CMSIS/Core/CM3/startup/gcc/startup_stm32f10x_hd.s
Libraries/CMSIS/Core/CM3/startup/gcc/startup_stm32f10x_ld.s
Libraries/CMSIS/Core/CM3/startup/gcc/startup_stm32f10x_md.s
Libraries/CMSIS/Core/CM3/startup/iar/startup_stm32f10x_cl.s
Libraries/CMSIS/Core/CM3/startup/iar/startup_stm32f10x_hd.s
Libraries/CMSIS/Core/CM3/startup/iar/startup_stm32f10x_ld.s
Libraries/CMSIS/Core/CM3/startup/iar/startup_stm32f10x_md.s
Libraries/CMSIS/Core/CM3/stm32f10x.h
Libraries/CMSIS/Core/CM3/system_stm32f10x.c
Libraries/CMSIS/Core/CM3/system_stm32f10x.h
Libraries/CMSIS/Core/Documentation/CMSIS_Core.htm
Libraries/CMSIS/License.doc
Libraries/STM32F10x_StdPeriph_Driver/inc/misc.h
Libraries/STM32F10x_StdPeriph_Driver/inc/stm32f10x_adc.h
Libraries/STM32F10x_StdPeriph_Driver/inc/stm32f10x_bkp.h
Libraries/STM32F10x_StdPeriph_Driver/inc/stm32f10x_can.h
Libraries/STM32F10x_StdPeriph_Driver/inc/stm32f10x_crc.h
Libraries/STM32F10x_StdPeriph_Driver/inc/stm32f10x_dac.h
Libraries/STM32F10x_StdPeriph_Driver/inc/stm32f10x_dbgmcu.h
Libraries/STM32F10x_StdPeriph_Driver/inc/stm32f10x_dma.h
Libraries/STM32F10x_StdPeriph_Driver/inc/stm32f10x_exti.h
Libraries/STM32F10x_StdPeriph_Driver/inc/stm32f10x_flash.h
Libraries/STM32F10x_StdPeriph_Driver/inc/stm32f10x_fsmc.h
Libraries/STM32F10x_StdPeriph_Driver/inc/stm32f10x_gpio.h
Libraries/STM32F10x_StdPeriph_Driver/inc/stm32f10x_i2c.h
Libraries/STM32F10x_StdPeriph_Driver/inc/stm32f10x_iwdg.h
Libraries/STM32F10x_StdPeriph_Driver/inc/stm32f10x_pwr.h
Libraries/STM32F10x_StdPeriph_Driver/inc/stm32f10x_rcc.h
Libraries/STM32F10x_StdPeriph_Driver/inc/stm32f10x_rtc.h
Libraries/STM32F10x_StdPeriph_Driver/inc/stm32f10x_sdio.h
Libraries/STM32F10x_StdPeriph_Driver/inc/stm32f10x_spi.h
Libraries/STM32F10x_StdPeriph_Driver/inc/stm32f10x_tim.h
Libraries/STM32F10x_StdPeriph_Driver/inc/stm32f10x_usart.h
Libraries/STM32F10x_StdPeriph_Driver/inc/stm32f10x_wwdg.h
Libraries/STM32F10x_StdPeriph_Driver/src/misc.c
Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_adc.c
Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_bkp.c
Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_can.c
Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_crc.c
Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_dac.c
Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_dbgmcu.c
Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_dma.c
Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_exti.c
Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_flash.c
Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_fsmc.c
Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_gpio.c
Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_i2c.c
Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_iwdg.c
Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_pwr.c
Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_rcc.c
Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_rtc.c
Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_sdio.c
Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_spi.c
Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_tim.c
Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_usart.c
Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_wwdg.c
Libraries/STM32_USB-FS-Device_Driver/inc/otgd_fs_cal.h
Libraries/STM32_USB-FS-Device_Driver/inc/otgd_fs_dev.h
Libraries/STM32_USB-FS-Device_Driver/inc/otgd_fs_int.h
Libraries/STM32_USB-FS-Device_Driver/inc/otgd_fs_pcd.h
Libraries/STM32_USB-FS-Device_Driver/inc/otgd_fs_regs.h
Libraries/STM32_USB-FS-Device_Driver/inc/usb_core.h
Libraries/STM32_USB-FS-Device_Driver/inc/usb_def.h
Libraries/STM32_USB-FS-Device_Driver/inc/usb_init.h
Libraries/STM32_USB-FS-Device_Driver/inc/usb_int.h
Libraries/STM32_USB-FS-Device_Driver/inc/usb_lib.h
Libraries/STM32_USB-FS-Device_Driver/inc/usb_mem.h
Libraries/STM32_USB-FS-Device_Driver/inc/usb_regs.h
Libraries/STM32_USB-FS-Device_Driver/inc/usb_sil.h
Libraries/STM32_USB-FS-Device_Driver/inc/usb_type.h
Libraries/STM32_USB-FS-Device_Driver/src/otgd_fs_cal.c
Libraries/STM32_USB-FS-Device_Driver/src/otgd_fs_dev.c
Libraries/STM32_USB-FS-Device_Driver/src/otgd_fs_int.c
Libraries/STM32_USB-FS-Device_Driver/src/otgd_fs_pcd.c
Libraries/STM32_USB-FS-Device_Driver/src/usb_core.c
Libraries/STM32_USB-FS-Device_Driver/src/usb_init.c
Libraries/STM32_USB-FS-Device_Driver/src/usb_int.c
Libraries/STM32_USB-FS-Device_Driver/src/usb_mem.c
Libraries/STM32_USB-FS-Device_Driver/src/usb_regs.c
Libraries/STM32_USB-FS-Device_Driver/src/usb_sil.c
Project/DualCDC/inc/hw_config.h
Project/DualCDC/inc/stm32f10x_conf.h
Project/DualCDC/inc/stm32f10x_it.h
Project/DualCDC/inc/usb_conf.h
Project/DualCDC/inc/usb_desc.h
Project/DualCDC/inc/usb_istr.h
Project/DualCDC/inc/usb_prop.h
Project/DualCDC/inc/usb_pwr.h
P
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.