2018-10-19 12:11 PM
Hello,
I am trying to configure USART1 on Nucleo-32 board using HAL. Code is suppose to first it receive the message and then it transmits the same message.
My problem is RDR is showing reading garbage value. Can someone point out was is wrong?
(Please ignore my indentation of code- this is just my test run)
Solved! Go to Solution.
2018-10-19 01:56 PM
2018-10-19 02:05 PM
this code is blocking code,
I hope you clear that flag in the loop now...
It wont work without it.
Can you stop the processor and look in the tables ?
2018-10-19 02:05 PM
this code is blocking code,
I hope you clear that flag in the loop now...
It wont work without it.
Can you stop the processor and look in the tables ?
2018-10-19 02:08 PM
if you mean by clearing rx_cplt flag, printscreen is after I have cleared flag in main loop. As I have mentioned it earlier, that even if I debug my code my RDR show 0c0,0xf8 etc.
2018-10-19 03:13 PM
the RDR only has 16bits, and only 8 bits of that is used for Char transfers. ( 1 byte only)
don't look at the RDR you must look in the receiving buffer.
otherwise, try to use the DMA functionality, it works very well.
2018-10-24 10:27 AM
Sorry for late updates. I have solved this issue. There was couple of problems
1) connection between Trans receiver and Computer were wrong
2) the was more then 3% error in my baud rate
4) as pointed by BobS, timing issue
Special thanks to Bob S and T J for prompt reply.