Interrupt cli sli not supported


are the commands
cli();//disable interrupts
sei();//enable interrupts

not supported?

Greestings E_T

Can you please give us some more details about this two functions? We may have a try.


cli() is same as noInterrupts() & sei() is same as interrupts()

The command cli() turns off the interrupts or in other words, the Global Interrupt Enable bit in the status register is deleted.

The command sei() turns on the interrupts. Actually, nothing else is done but the Global Interrupt Enable bit is set in the status register.

Greetings E_T

Well, aren’t that instructions on 8051-mcu’s ?

Or am I wrong ?

Perhaps some “own” definitions may help …
(Just kidding)

Hello felted67,

thats possible. But i think every CPU has interrupt-controlling-register.

So i need some CPU-Information.
I will look.

Greetings E_T

Hi Ernst,

which cpu is it about ?
Perhaps I could give you a hint… 8=)



Hi felted67,

its a CubeCell-Board with ASR6501 / ASR6502 (ARM Cortex M0) and SX1262.

Greetings E_T

Hi Ernst,

as you are using a Cortex M0 all “basic” ARM functions should be possible to be applied.

So I suppose the following may be possible:

__disable_irq(); // Set PRIMASK
__enable_irq(); // Clear PRIMASK

If you use the CMSIS-library from ARM the next one’s may be possible:

NVIC_EnableIRQ(IRQn_Type IRQn);
NVIC_DisableIRQ(IRQn_Type IRQn);

Here is some more informations about these functions:

The main advantage in using ARM Cortex is the fact that most of them are compatible with
each others, only the chip-vendor may place several “own” IP’s in the uC’s.
These IP’s are custom made functions or hardware extentions placed by
ARM (on demand) or the vendor themself in the produced chip. Remember that
ARM and some other chip-vendors are fabless companies. They design
the circuits and let them produce by others (the “real” chip-factories).



Hi, Detlef,

thank you!

I will try it.