2018-06-25 04:33 AM
Hi,
I am new to STM32 and using the STM32L152 to transmit and receive characters via USART. I can transmit data with no problem but when i want to recieve data using the Hterminal, the mcu always gets an extra character in the buffer. and the extra character comes from the string that was transmitted. My baudrate is 9600.
I guess i have to kind of disable the transmit pin just before i recieve data but am not sure if thats the problem and if it is, how do o go about it?
Thank You
2018-06-25 04:51 AM
I guess i have to kind of disable the transmit pin just before i recieve data ...
No, you don't. Receive and transmit could work concurrently.
Have you checked output at the PC for proper baudrate and polarity ?
Do you have proper levels ? The 3.3V levels of the STM32 TX don't work.
2018-06-25 05:53 AM
Sorry have no visibility into your code, or what you're actually doing to cause this.
Perhaps use strlen() rather than sizeof() or arbitrary lengths?
2018-06-26 06:23 AM
thank you very much fro your suggestions.
I fixed it.
2018-06-26 06:24 AM
thank you very much for your suggestions.
I fixed it.