cancel
Showing results for 
Search instead for 
Did you mean: 

Stm32 mat target UART example USART_3_Receive_Send, difficulty

vlal
Associate III

I have generated MDK-ARM project from the USART_3_Receive_Send example from stm32 mat target example, I have successfully compiled all and burned to stm32f103 board, when connected to terminal it finds, it is sending unknown chartacters to terminal

I have attached the project files with this message, kindly someone check

1 ACCEPTED SOLUTION

Accepted Solutions
vlal
Associate III

I made this working by making the constant 10 and type unit8

View solution in original post

17 REPLIES 17

What STM32 board?

USART1 PA9 / PA10

Perhaps test the USART functionality outside all the buffering, then debug the rest of it.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
vlal
Associate III

Custom STM32 board, I am using

USART1 connected to PA9 PA10

Will test the USART functionality outside buffering and update here

vlal
Associate III

I have tried with USART_3_Receive example, still the result is same

I have used Rx and Tx pins, any other pin needs to be used?

Async serial on USART1 would just need the PA9(TX) and PA10(RX)

If the hardware hasn't otherwise been validated, you might want to sit in a loop transmitting 'U' characters, and scope the signals. PA9 would have the signal, it will be at CMOS levels, and not directly compatible with RS232 levels.

Not familiar with your design.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
vlal
Associate III

I have connected PA9(TX) STM32 to FT232 (RX) and PA10(RX) STM32 to FT232 (TX) (No level shifting is done) (Baud-rate 115200)

This setup worked with some programs compiled with mikroC..

I have attached my terminal output..

I will check with the 'U' loop as you advised..

vlal
Associate III

I have tried another character loop in UART

Model that I used to send the character is attached, is it correct?

I intended to send 'U"

Try just coding a simple app, in C, without involving STM32-MAT

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
TDK
Guru

Sure seems like a protocol issue. Same baud rate, parity, and stop but settings in your code and in the terminal? If you have a parity bit, you need to set 9 data bits in the code instead of 8.

If you feel a post has answered your question, please click "Accept as Solution".
vlal
Associate III

Yes, it same baud rate 115200, no parity, 1 stop bit

I have changed the data bit 8 and 9 checked, no improvement