Interrupts Short & Simple - Part 2 - Variables, Buffers & Latencies - Embedded
Interrupts Short & Simple - Part 2 - Variables, Buffers & Latencies - Embedded
Sign In Sign Up
Editor's note: In this second part in an on-going series on the appropriate use of
interrupts in embedded systems design, Priyadeep Kaur discusses ISRs, global/local Download Datasheets
variables, data buffers, shared memory and the interrupt timing latencies.
PART NUMBER
In the first part of this series on interrupts, we discussed the importance of careful interrupt
Search
handling and some general interrupt handling practices related to the robust structuring of
ISRs. Now we will discuss the implications of the liberal use of global/local variables in an
ISR.
1 of 7 9/12/2017, 9:58 AM
Interrupts short & simple: Part 2 - Variables, buffers & latencies | Embedded http://www.embedded.com/design/programming-languages-and-tools/43...
else if(Command == 2)
2 of 7 9/12/2017, 9:58 AM
Interrupts short & simple: Part 2 - Variables, buffers & latencies | Embedded http://www.embedded.com/design/programming-languages-and-tools/43...
void ADC_ISR(void)
{
Data = ADC_MSB;
(Data<<8)|ADC_LSB;
3 of 7 9/12/2017, 9:58 AM
Interrupts short & simple: Part 2 - Variables, buffers & latencies | Embedded http://www.embedded.com/design/programming-languages-and-tools/43...
4 of 7 9/12/2017, 9:58 AM
Interrupts short & simple: Part 2 - Variables, buffers & latencies | Embedded http://www.embedded.com/design/programming-languages-and-tools/43...
5 of 7 9/12/2017, 9:58 AM
Interrupts short & simple: Part 2 - Variables, buffers & latencies | Embedded http://www.embedded.com/design/programming-languages-and-tools/43...
6 of 7 9/12/2017, 9:58 AM
Interrupts short & simple: Part 2 - Variables, buffers & latencies | Embedded http://www.embedded.com/design/programming-languages-and-tools/43...
ASPENCORE NETWORK
EBN (http://www.ebnonline.com/) EDN (http://www.edn.com/) EE Times (http://www.eetimes.com/) EEWeb (https://www.eeweb.com/) Electronic Products
(http://www.datasheets.com/) Embedded Control Europe (http://www.embedded-control-europe.com/) Embedded Know How (http://www.embedded-know-how.com/ ) Embedded News
(http://embedded-news.tv/) IOT Design Zone (http://iot-design-zone.com/) Motor Control Design (http://motor-control-design.com/) Electronics Know How (http://electronics-know-how.com/)
GLOBAL NETWORK
EE Times Asia (http://www.eetasia.com/) EE Times China (http://www.eet-china.com/) EE Times India (http://www.eetindia.co.in/) EE Times Japan (http://eetimes.jp/) EE Times Taiwan
(http://www.eettaiwan.com/) EDN Asia (http://www.ednasia.com/) EDN China (http://www.ednchina.com/) EDN Taiwan (http://www.edntaiwan.com/) EDN Japan (http://ednjapan.com/)
Working With Us: About (http://www.aspencore.com/) | Contact Us (http://mac.aspencore.com/AspenCore_Contact-Us.html) | Media Kits (http://mac.aspencore.com/AspenCore_Media-Guide.html)
Terms of Service (http://www.aspencore.com/terms-of-use) | Privacy Statement (http://www.aspencore.com/privacy-policy) | Copyright ©2017 AspenCore All Rights Reserved
7 of 7 9/12/2017, 9:58 AM