2014-11-04 08:01 AM
I am using the STM32L1 Discovery Board (this one http://uk.farnell.com/stmicroelectronics/stm32l152c-disco/stm32l-discovery-eval-board/dp/2317987). I have written a program for USART communication on the two pins PB6 and PB7 (USART1_TX and USART1_RX respectively).
Is there any way to use the USB port of the board (the one for swd programming) to create a virtual COM for USART communication with my PC? Or the only way is to create a circuit with MAX232 (interface with PB6 and PB7 pins) and a serial connector?Thanks.2014-11-04 08:44 AM
Hi
''Is there any way to use the USB port of the board (the one for swd programming) to create a virtual COM for USART communication with my PC?
'' No. The USB connector is not connected to the STM32, it is connected to a ST-LINK (which just happens to be another STM32). ''Or the only way is to create a circuit with MAX232 (interface with PB6 and PB7 pins) and a serial connector?
'' Yes.2014-11-04 09:23 AM
The VCP functionality is enabled on the Nucleo boards, but not the Disco's
You could uses an RS232 level conversion solution, or a USB-to-CMOS Serial solutionhttp://www.amazon.com/PL2303HX-RS232-Cable-Module-Converter/dp/B008AGDTA4
2014-11-05 12:01 AM
> The VCP functionality is enabled on the Nucleo boards, but not the Disco's
Recently I have played with a STM32L053-DISCO, and I'm pretty sure the CDC (VCP) works on it. Its debug STM32F103 comes with the STLinkV2-1 firmware, and I can confirm that the programming-through-MSC works well. I've tried mbed as well, and not surprisingly, it works with it too. So it's not the question of board but firmware in the debug STM32F103. I'd not be surprised if other discos could be updated to the v2-1 firmware, but due to lack of time I'm not going to pursue this now. Btw. it's something ST should be interested in doing and disseminating the news... JW PS. The SWO functionality is in fact a simplex Rx-only UART, so that should be (ab)usable on the older DISCOs, too; it's not that flexible as the transmitter has to imitate the (rather simplistic) protocol. Unfortunately, the SWO implementation in STLink2 appears to be buggy - https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=https%3a%2f%2fmy.st.com%2fpublic%2fSTe2ecommunities%2fmcu%2fLists%2fcortex_mx_stm32%2fST%20Link%20utility%20Serial%20Wire%20Viewer%20feature%20via%20ST%20Link%202&FolderCTID=0x01200200770978C69A1141439FE559EB459...http://www.amazon.com/PL2303HX-RS232-Cable-Module-Converter/dp/B008AGDTA4