2016-06-14 10:00 AM
Board: STM32F407VGT
OS: Ubuntu 14.04 HAL Library (Not SPL) I am having difficulties getting output from the STM32F4 to communicate with my terminal via ''cat /dev/tty*'', putty, or ckermit. I am using USART2 from PA2 (Tx) and PA3 (Rx) to communicate to the USB. My computer recognizes the USB in the /dev directory but none of the outputs work. I have tried to find HAL tutorials and examples that work but none of them have... What is wrong with my code? http://pastebin.com/jCaEU4y1 #no-hablo-hal2016-06-14 01:57 PM
Per your earlier thread, you'd want a CMOS Serial (3V) adapter, and not an RS232 one
2016-06-15 03:37 AM
I ended up buying a CP2102 USB 2.0 to UART TTL 6PIN Module Serial Converter Adapter (from your recommendation) but that's not what I am worried about right now. I have an led attached to the UART2 Tx pin and during execution, HAL_UART_Transmit is called repeatedly but the led does not blink at all. Clearly there is something wrong with my code...
2016-06-15 04:09 AM
>I have an led attached to the UART2 Tx pin ... but the led does not blink at all.
Perhaps because the GPIO can't drive a LED directly in UART Tx mode ? Check the datasheet, and compare with your LED current requirements.
2016-06-15 10:50 AM
Really can't help you with the HAL stuff, I've posted a host of working SPL examples here.
Review signalling with a scope.The TX of the STM32 likely needs to go to the RX of receiver.2016-06-17 09:14 AM
My USB to USART came in and I still can't get output to /dev/ttyUSB0, kermit, putty, or screen. Does anyone have a known good example of STM32f4 Disco HAL_UART_Transmit example?
2016-06-17 10:33 AM
You could try sending a continuous stream of characters and scoping that.
That something ''doesn't work'' really doesn't help anyone diagnose what you are doing wrong. Show the complete code you are using, and diagram exactly the connectivity you have externally, not prose, not a video, a wiring diagram.