还是有关STM32F103 BluePill最小板和UART/VCP的小程序。
上次做的两路VCP-UART的:【源码】STM32F103 USB转UART,双VCP(CDC)
使用起来发现不是太方便,你要为每一个UART开一个终端程序。
同时,F103 BluePill 还有一个UART3没有利用起来。
于是就有了今次的程序。https://github.com/RadioOperator/STM32F103_1VCP-3UART
- Monitoring other UARTs Rx/Tx lines, use 1 terminal window only.
- Hardware: STM32F103 Bluepill
- All 3 UART Rx, go to 1 USB-VCP.
- USB-VCP Tx, goes to Uart-1 PA9.
- ====================================
- Uart-1: Rx-PA10 Tx-PA9
- Uart-2: Rx-PA3 -
- Uart-3: Rx-PB11 -
- short PB7-PB8, print in Hex mode, or
- short PB8-PB9, print in ASCII mode
- Uart speed = USB-VCP speed.
- ====================================
- USB-VCP Rx Terminal Sample
- ASCII mode:
- Uart-1: 1111 1111 1111 1111
- Uart-2: 2222 2222 2222 2222
- Uart-3: 3333 3333 3333 3333
- HEX mode:
- Uart-1: 31 31 31 31 20 31 31 31 31 20 31 31 31 31 20 31 31 31 31
- Uart-2: 32 32 32 32 20 32 32 32 32 20 32 32 32 32 20 32 32 32 32
- Uart-3: 33 33 33 33 20 33 33 33 33 20 33 33 33 33 20 33 33 33 33
复制代码
|