Jump to content
Sign in to follow this  


Recommended Posts

question about this

inline void enableMaskableInterrupts() { _BIS_SR(GIE); }

from what i have read, in PDF SLAU144 "msp430 user guide"

2.2.2 Maskable Interrupts

Maskable interrupts are caused by peripherals with interrupt capability

including the watchdog timer overflow in interval-timer mode. Each maskable

interrupt source can be disabled individually by an interrupt enable bit, or all

maskable interrupts can be disabled by the general interrupt enable (GIE) bit

in the status register (SR).


so by setting the GIE you turn off the maskable intterrupts, this is how I am reading it

I think the workaround is using _EINT(); or eint();, but I am unsure what the exact syntax is for IARS or CCS to enable interrupts.


is this correct? or am i just reading it wrong lol

Share this post

Link to post
Share on other sites

It is strange that it says that. But I believe that TI was trying to say that all the maskable interrupts could be disabled by clearing the GIE value. _BIS_SR() sets the values given in it's parameter, and _BIC_SR() clears the values. So, a call to _BIS_SR(GIE) enables them, while a call to _BIC_SR(GIE) would disable them.


I will look into eint()/dint(), but those seem to be IAR-specific intrinsics, and I eventually want to make this as cross-platform as possible.


Thanks for pointing it out! I think it's just a case of weird wording.


Please let me know about any other questions you have :) And thanks for checking out the framework!

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this