Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
11/11/09 19:47
Read: times


 
#170706 - at the project in front of you I see ...
Responding to: ???'s previous message
... a lot of unnecessary interrupt dis/enables.

For instance, a UART enqueues data in an ISR. When the mainline code accesses the same buffer the UART interrupt is turned off.
I fail to see ANY need to go beyond 8 bits in any of this. The ring buffer should not be over 256 bytes (8-bit offset) the contents of the buffer is 8-bit data ... thus, why control the interrupt?

YES, you occasionally need to dis/enable an interrupt to read something like int x= int y, but to enclose that brief operation (you are not stupid enough to make such anything but DATA) with interrupt control could be done either way due to its brevity.

Your post sounds as if the original coder made a total mess if to "manipulate the individual interrupt enable bits in some of these peripherals" means that at any time more than one source is disabled. I totally fail to see any case where more than one interrupt source need be controlled at any time.

Erik

List of 6 messages in thread
TopicAuthorDate
Interrupt fun            01/01/70 00:00      
   at the project in front of you I see ...            01/01/70 00:00      
   It's Atomic            01/01/70 00:00      
   Ring buffer            01/01/70 00:00      
   Diligent fun?            01/01/70 00:00      
      individual disa/ena and latencies            01/01/70 00:00      

Back to Subject List