STM32L0 LoRaWAN -> Facing problem in UART2 interrupt when receive data.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2024-02-06 8:55 AM
Facing problem with run UART interrupt when receiving data.
In that case I'm getting data but most of lost and receiving after some delay.
If anyone solved this kind of problem than help me for this.
- Labels:
-
STM32CubeMX
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2024-02-06 2:06 PM - edited 2024-02-06 2:57 PM
Perhaps start by identifying why / how you're losing data.
Check what errors precipitate this, if you're spending too much time in the interrupt handler or callback.
Perhaps move to using DMA to provide you some buffer or elasticity against delays in processing beyond the single byte time that interrupts afford you.
Check relative priorities, and preemption. You really want the quick in-and-out stuff to be able to preempt and stash the data away.
Up vote any posts that you find helpful, it shows what's working..
