Hi
Please check here to download the latest KSDK software package for KL15 product.
There provide CMSIS driver and example demo located at..\SDK_2.1_MKL15Z128xxx4\boards\frdmkl25z\cmsis_driver_examples folder.
The CMSIS example driver calls the void EnableIRQ(IRQn_Type interrupt) function to enable IRQ and call void DisableIRQ(IRQn_Type interrupt) function to disable the IRQ.
The related software function could be found at <fsl_common.h> file.
In fact, both functions are calling below functions at <core_cm0plus.h> file:
/**
\brief Enable External Interrupt
\details Enables a device-specific interrupt in the NVIC interrupt controller.
\param [in] IRQn External interrupt number. Value cannot be negative.
*/
__STATIC_INLINE void NVIC_EnableIRQ(IRQn_Type IRQn)
{
NVIC->ISER[0U] = (uint32_t)(1UL << (((uint32_t)(int32_t)IRQn) & 0x1FUL));
}
/**
\brief Disable External Interrupt
\details Disables a device-specific interrupt in the NVIC interrupt controller.
\param [in] IRQn External interrupt number. Value cannot be negative.
*/
__STATIC_INLINE void NVIC_DisableIRQ(IRQn_Type IRQn)
{
NVIC->ICER[0U] = (uint32_t)(1UL << (((uint32_t)(int32_t)IRQn) & 0x1FUL));
}
Wish it helps.
Have a great day,
Ma Hui
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------