Hi,there.
I am using UART of my CM3 board,and there is something strange.
I use minicom(a friendly serial communication program for linux) to Rx data came from CM3,and every thing goes well except that the last char is always lost. I have followed my program step by step through j-link and it works very very very well,but once let CM3 runs at normal state(no halt,no step by step),the problem comes again.Can someone help me?Thanks.
Best regards.
I have fixed this problem already by myself.It's because I wrote another Tx code block outside the Tx loop,and this Tx block doesn't make a check on the TXE bit.
I guess that the last char in loop was overwrote by next char in the Tx block.
But however,I see a paragraph in Document RM0008,it says:
"When a transmission is taking place, a write instruction to the USART_DR register stores the data in the TDR register and which is copied in the shift register at the end of the current transmission."
That quite weird.
Hello,
There isn't a single UART on Cortex-M3 based MCUs.
There is at least one different UART per silicon vendor.
I am afraid it means it is not possible for us to give you a generic reply.
Would you have the microcontroller reference?
This is a silicon vendor expertise (not really ARM related) and we can then try and find information for the product you are using.
Can you also describe what you wrote for the UART to send chars? It could be an issue with a loop boundary, or an interrupt flag not cleared.
Thanks!!
Thanks Galileo for sharing the solution,
Our messages crossed each other!
Thank you for reply,yes,it's my mistake don't give a clear question.It is a STM32 based board,it has USART,but I just used it for UART,that's why I call it UART
I have solved this now,you can see it above,but,yes,it's still something strange there and I don't know why.
galileo1991 it does not matter. The good new is to find where the problem is come and to resolve it
yes,you are right