2015-04-02 02:31 AM
Hello there,
For many hours now I am trying to send couple bytes using uart on stm32f4 board. I tried Usart1 and Uart4 but it doesnt send anything. I have a scope attached to TX pin and there is nothing. Here is my code: I am using HAL. The clock is configured correctly, even if it wasnt I would see anything on the TX pin... I would really aprichiate all help, I have searched everywhere for an answer. #stm32 #uart #hal2015-04-02 05:12 AM
Hi
I have GPIO_InitStruct.Speed = GPIO_SPEED_FAST;in my Usart1 at 115200 and it works fineAlthough I use the DMA to do the Transmission.Also I dont see the Structure declares. I assume you have them defined somewhere else otherwise it should not compileGPIO_InitTypeDef
GPIO_InitStructUart4;
UART_HandleTypeDefhuart4
;2015-04-02 05:20 AM
Hello,
Yes the structs are declared, I forgot to paste them. I have tried with speed FAST as well, but it doesnt work either. At the end I would like to use DMA as well, but I cant even send anything using blocking mode :(.2015-04-02 06:02 AM
I have just noticed that my configuration works, but I havent seen it, because the signal amplitude is 1.5V, instead of 3.3V as I expected... I checked the STM32F4 discovery schematic and noticed that PA0 is biased (It shouldnt have anything to do with it though). But to be sure i swapped to uart5, but there amplitude is 1.5V as well. Is there something I forgot or dont know about? Are IO's in stm32f4 powered with 1.5V?
2015-04-03 05:25 AM
Is the Uart connected to anything at all Ie a RS232 Driver Level Chip? Otherwise maybe Loading it down
Check all your VDD Supplys are are OK2015-04-03 09:47 AM
2015-04-05 09:32 AM
2015-04-07 12:06 AM
Hello and thank you for answers. I have checked the schematic and the button connected has no effect on the line.
Even though, I have changed the config to uart2. The amplitude remains about 2 V... Does anyone understand this? Btw, I havent seen more complicated and unclear posting system than this on st.com for a while :|