Tool/software:
Hi Expert
Customer want to disable multiple IQRs at a time with one API, but seems our drivelib only has NVIC_DisableIRQ() to disable one IRQ at a time, does drivelib has other function to meet this need?

Thanks
Joe
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software:
Hi Expert
Customer want to disable multiple IQRs at a time with one API, but seems our drivelib only has NVIC_DisableIRQ() to disable one IRQ at a time, does drivelib has other function to meet this need?

Thanks
Joe
Hi Joe,
I believe they can use __disable_irq(); to set PRIMASK to 1, which disables all interrupts except for NMI and Hard Fault, and __enable_irq(); to clear PRIMASK to 0 and enables all interrupts. These aren't part of TI's DriverLib, but rather instructions that exist for the ARM Cortex-M cores.
Best,
Owen
Hi Joe,
Depending on which compiler they are using, these functions are defined in the cmsis_x.h file, where the x is the compiler. For example, in cmsis_gcc.h, the definition is as follows:

For TI Clang (cmsis_ccs.h) it looks like this:

The ARM documentation may also be useful for you to look over: https://developer.arm.com/documentation/dui0662/b/Cortex-M0--Peripherals/Nested-Vectored-Interrupt-Controller/NVIC-usage-hints-and-tips
Best,
Owen