Skip to content

Commit 07999dc

Browse files
hywingRbb666
authored andcommitted
[bsp][nxp][mcxa153] add interrupt process in IRQ Handler functions
1 parent 46b2850 commit 07999dc

File tree

2 files changed

+6
-21
lines changed

2 files changed

+6
-21
lines changed

bsp/nxp/mcx/mcxa/Libraries/drivers/drv_hwtimer.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
#define LOG_TAG "drv.hwtimer"
1616
#include <drv_log.h>
1717
#include <rtdevice.h>
18-
#include "drv_hwtimer.h"
1918
#include "fsl_ctimer.h"
2019

2120
enum
@@ -244,39 +243,42 @@ INIT_DEVICE_EXPORT(rt_hw_hwtimer_init);
244243
#ifdef BSP_USING_CTIMER0
245244
void CTIMER0_IRQHandler(void)
246245
{
246+
rt_interrupt_enter();
247247
uint32_t int_stat;
248248
/* Get Interrupt status flags */
249249
int_stat = CTIMER_GetStatusFlags(CTIMER0);
250250
/* Clear the status flags that were set */
251251
CTIMER_ClearStatusFlags(CTIMER0, int_stat);
252252
rt_device_hwtimer_isr(&mcxa_hwtimer_obj[TIM0_INDEX].time_device);
253-
253+
rt_interrupt_leave();
254254
}
255255
#endif /* BSP_USING_HWTIMER0 */
256256

257257
#ifdef BSP_USING_CTIMER1
258258
void CTIMER1_IRQHandler(void)
259259
{
260+
rt_interrupt_enter();
260261
uint32_t int_stat;
261262
/* Get Interrupt status flags */
262263
int_stat = CTIMER_GetStatusFlags(CTIMER1);
263264
/* Clear the status flags that were set */
264265
CTIMER_ClearStatusFlags(CTIMER1, int_stat);
265266
rt_device_hwtimer_isr(&mcxa_hwtimer_obj[TIM1_INDEX].time_device);
266-
267+
rt_interrupt_leave();
267268
}
268269
#endif /* BSP_USING_HWTIMER1 */
269270

270271
#ifdef BSP_USING_CTIMER2
271272
void CTIMER2_IRQHandler(void)
272273
{
274+
rt_interrupt_enter();
273275
uint32_t int_stat;
274276
/* Get Interrupt status flags */
275277
int_stat = CTIMER_GetStatusFlags(CTIMER2);
276278
/* Clear the status flags that were set */
277279
CTIMER_ClearStatusFlags(CTIMER2, int_stat);
278280
rt_device_hwtimer_isr(&mcxa_hwtimer_obj[TIM2_INDEX].time_device);
279-
281+
rt_interrupt_leave();
280282
}
281283
#endif /* BSP_USING_HWTIMER2 */
282284

bsp/nxp/mcx/mcxa/Libraries/drivers/drv_hwtimer.h

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)