Dear All,
So, i have just implemented Uart receive as an interrupt on the stm32f401re board using the HAL library in STM32cube ide. I have failed to process characters when they are more than one. Any advise for me, i will be glad.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-02-12 07:29 PM
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-02-13 01:23 AM
Should we try to guess what you did in the failing case? Or the type of messages and test cases?
​
As you fill a buffer with each byte as it arrives under interrupt make a determination ​if you have completed the message or reached the end of line case. If using as strings NUL terminate the buffer before processing.
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
‎2021-02-13 01:23 AM
Should we try to guess what you did in the failing case? Or the type of messages and test cases?
​
As you fill a buffer with each byte as it arrives under interrupt make a determination ​if you have completed the message or reached the end of line case. If using as strings NUL terminate the buffer before processing.
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
‎2021-02-13 01:55 AM
Thank you @Community member​ for this advice, Let me give my best shot ot it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-02-14 07:19 PM
hello @Community member​ , this an appreciation note to you. After your previous response to my post, i searched further on this community , where am still new and came across your piece code your previously shared where you reading 1 byte at a time handling the Nmea sentence. I have borrowed it and implemented it on my end and its working for me well. Thank you.