UART data loss
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-06-20 12:41 AM - edited ‎2023-08-08 1:39 AM
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-06-20 5:45 AM
Whether it is good or wrong depends on the details of "processing". There is nothing wrong with doing everything only in ISRs and not having the "main loop" at all (putting the processor to sleep instead). There is no general rule for this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-06-20 2:03 AM
How could anyone help without seeing a single line of code? You can do the processing in an interrupt routine or in main. In both cases you may do it right or wrong.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-06-20 5:15 AM
I said that it was working fine in the interrupt, my question was about the idea of processing data in the interrupt handler, not the structure of processing. My discussion with the engineer made me think that its wrong to process the incoming data in the interrupt
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-06-20 5:44 AM
Generally, ISRs should be kept as short as possible so that they interfere (delay execution) with other code (including other ISRs) as little as possible.
Individual exceptions may exist, but you should be able to argue about your design choices.
JW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-06-20 5:45 AM
Whether it is good or wrong depends on the details of "processing". There is nothing wrong with doing everything only in ISRs and not having the "main loop" at all (putting the processor to sleep instead). There is no general rule for this.
