cancel
Showing results for 
Search instead for 
Did you mean: 

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.

kNass.1
Associate II
1 ACCEPTED SOLUTION

Accepted Solutions

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.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

View solution in original post

3 REPLIES 3

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.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Thank you @Community member​  for this advice, Let me give my best shot ot it.

kNass.1
Associate II

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.