File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change 131
131
//}}
132
132
133
133
//Interrupt remap control registers define{{
134
+ #define NMI_INT_ENABLE_REG (PERIPHS_DPORT_BASEADDR)
134
135
#define EDGE_INT_ENABLE_REG (PERIPHS_DPORT_BASEADDR + 0x04)
135
136
#define WDT_EDGE_INT_ENABLE () SET_PERI_REG_MASK(EDGE_INT_ENABLE_REG, BIT0)
136
137
#define TM1_EDGE_INT_ENABLE () SET_PERI_REG_MASK(EDGE_INT_ENABLE_REG, BIT1)
Original file line number Diff line number Diff line change @@ -285,24 +285,36 @@ void esp_dport_close_nmi(void)
285
285
void IRAM_ATTR vPortETSIntrLock (void )
286
286
{
287
287
if (NMIIrqIsOn == 0 ) {
288
+ uint32_t regval = REG_READ (NMI_INT_ENABLE_REG );
289
+
290
+ REG_WRITE (NMI_INT_ENABLE_REG , 0 );
291
+
288
292
vPortEnterCritical ();
289
293
if (!ESP_NMI_IS_CLOSED ()) {
290
294
do {
291
295
REG_WRITE (INT_ENA_WDEV , WDEV_TSF0_REACH_INT );
292
296
} while (REG_READ (INT_ENA_WDEV ) != WDEV_TSF0_REACH_INT );
293
297
}
298
+
299
+ REG_WRITE (NMI_INT_ENABLE_REG , regval );
294
300
}
295
301
}
296
302
297
303
void IRAM_ATTR vPortETSIntrUnlock (void )
298
304
{
299
305
if (NMIIrqIsOn == 0 ) {
306
+ uint32_t regval = REG_READ (NMI_INT_ENABLE_REG );
307
+
308
+ REG_WRITE (NMI_INT_ENABLE_REG , 0 );
309
+
300
310
if (!ESP_NMI_IS_CLOSED ()) {
301
311
extern uint32_t WDEV_INTEREST_EVENT ;
302
312
303
313
REG_WRITE (INT_ENA_WDEV , WDEV_INTEREST_EVENT );
304
314
}
305
315
vPortExitCritical ();
316
+
317
+ REG_WRITE (NMI_INT_ENABLE_REG , regval );
306
318
}
307
319
}
308
320
You can’t perform that action at this time.
0 commit comments