STM32L152 recieves garbage via USART3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-06-25 4: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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-06-25 4: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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-06-25 5: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?
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-06-26 6:23 AM
thank you very much fro your suggestions.
I fixed it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-06-26 6:24 AM
thank you very much for your suggestions.
I fixed it.
