Bit Variables ISR Safe?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2015-04-24 11:43 AM
Posted on April 24, 2015 at 20:43
I am using the Cosmic compiler and I want to read and write bit variables in an ISR. I am wondering if there is a guarantee that ALL bit variable manipulations are atomic (ie using bitwise instructions).
If not - since multiple bit variables are stored within a single byte I would have to bracket every access of every bit variable with interrupt masking.
This discussion is locked. Please start a new topic to ask your question.
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2015-04-27 7:46 AM
Posted on April 27, 2015 at 16:46
Hello,
what you ask is guaranteed for bit global variables. Regards, Luca (Cosmic)Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2015-04-27 2:30 PM
Posted on April 27, 2015 at 23:30
Thank you. Bit variables will save me a lot of memory.
