Skip to main content
vlal
Associate II
October 18, 2019
Solved

Stm32 mat target UART example USART_3_Receive_Send, difficulty

  • October 18, 2019
  • 17 replies
  • 3999 views

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

This topic has been closed for replies.
Best answer by vlal

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

17 replies

Tesla DeLorean
Guru
October 18, 2019

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 (See Profile) Up vote any posts that you find helpful, it shows what's working..
vlal
vlalAuthor
Associate II
October 19, 2019

Custom STM32 board, I am using

USART1 connected to PA9 PA10

Will test the USART functionality outside buffering and update here

vlal
vlalAuthor
Associate II
October 19, 2019

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?

Tesla DeLorean
Guru
October 19, 2019

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 (See Profile) Up vote any posts that you find helpful, it shows what's working..
vlal
vlalAuthor
Associate II
October 20, 2019

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
vlalAuthor
Associate II
October 20, 2019

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"

Tesla DeLorean
Guru
October 20, 2019

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

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
vlal
vlalAuthor
Associate II
October 21, 2019

I tried with mikroC, its working in the same hardware setup

TDK
October 20, 2019

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
vlalAuthor
Associate II
October 21, 2019

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

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

vlal
vlalAuthor
Associate II
October 21, 2019

By the way, this is my clock configuration

0690X00000AqeM6QAJ.png0690X00000AqeM1QAJ.png

vlal
vlalAuthor
Associate II
March 13, 2020

I have been behind this to get working for last 5 months or more but didn't able to get it working

I am attaching pictures of the screenshot, kindly some one help me

0693W000000Tr3QQAS.jpg0693W000000Tr3LQAS.jpg

0693W000000Tr3VQAS.jpg

0693W000000Tr3uQAC.jpg

0693W000000Tr49QAC.jpg

0693W000000Tr3cQAC.jpg0693W000000Tr4EQAS.jpg

vlal
vlalAuthor
Associate II
April 3, 2020

I have attached the generated .c files

vlal
vlalAuthor
Associate II
April 4, 2020

I made the UART working by making some modifications, that i have mentioned in that post in this thread

but the loopback example, I didnt able to make it working