Interrupt/Callback for UART 1 ?
-
Hi Guys,
Is there a way to use interrupt/callback for UART 1 so that it triggers whenever data arrives ?
If it is not available....then I would love to have that feature.....Thanks & regards,
MK HB -
A UART callback on data arrival would be very nice but would have to be implemented well to be truly useful.
A call back on every byte/symbol received would be too processing intensive in Python code, at higher baud rates.
Symbol buffering should be done at the C driver level (as it is now) and the callback initialiser would be passed 2 parameters;Example:
buffCount = callback triggered if the rx buffer holds this many bytes/symbols
(Useful when the rx message length is known/fixed)
idleCount = callback triggered if the rx buffer contains 1 or more symbols, but the rx line has now been idle for this many symbols
(Useful for communication gap driven flow control with variable length messages)
(Also catches broken/incomplete messages)idleCount, should accept fractions of a symbol, EG 1.5 symbol idle time, or it could simply be a timeout period and the caller must convert the symbol delay required into a time delay.
-
@mkharibalaji that callback is not yet available, but it's planned to have it implemented.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login