mirror of
https://github.com/oliverschmidt/contiki.git
synced 2025-01-03 11:30:53 +00:00
Merge pull request #1322 from g-oikonomou/bugfix/cc26xx/interrupt-flag-management
Clear CC26xx/CC13xx interrupt flags selectively
This commit is contained in:
commit
3a831cbebf
@ -500,8 +500,8 @@ cc26xx_rf_cpe1_isr(void)
|
||||
}
|
||||
}
|
||||
|
||||
/* Clear interrupt flags */
|
||||
HWREG(RFC_DBELL_NONBUF_BASE + RFC_DBELL_O_RFCPEIFG) = 0x0;
|
||||
/* Clear INTERNAL_ERROR interrupt flag */
|
||||
HWREG(RFC_DBELL_NONBUF_BASE + RFC_DBELL_O_RFCPEIFG) = 0x7FFFFFFF;
|
||||
|
||||
ENERGEST_OFF(ENERGEST_TYPE_IRQ);
|
||||
}
|
||||
@ -522,17 +522,25 @@ cc26xx_rf_cpe0_isr(void)
|
||||
ti_lib_int_master_disable();
|
||||
|
||||
if(HWREG(RFC_DBELL_NONBUF_BASE + RFC_DBELL_O_RFCPEIFG) & RX_FRAME_IRQ) {
|
||||
/* Clear the RX_ENTRY_DONE interrupt flag */
|
||||
HWREG(RFC_DBELL_NONBUF_BASE + RFC_DBELL_O_RFCPEIFG) = 0xFF7FFFFF;
|
||||
process_poll(&rf_core_process);
|
||||
}
|
||||
|
||||
if(RF_CORE_DEBUG_CRC) {
|
||||
if(HWREG(RFC_DBELL_NONBUF_BASE + RFC_DBELL_O_RFCPEIFG) & RX_NOK_IRQ) {
|
||||
/* Clear the RX_NOK interrupt flag */
|
||||
HWREG(RFC_DBELL_NONBUF_BASE + RFC_DBELL_O_RFCPEIFG) = 0xFFFDFFFF;
|
||||
rx_nok_isr();
|
||||
}
|
||||
}
|
||||
|
||||
/* Clear interrupt flags */
|
||||
HWREG(RFC_DBELL_NONBUF_BASE + RFC_DBELL_O_RFCPEIFG) = 0x0;
|
||||
if(HWREG(RFC_DBELL_NONBUF_BASE + RFC_DBELL_O_RFCPEIFG) &
|
||||
(IRQ_LAST_FG_COMMAND_DONE | IRQ_LAST_COMMAND_DONE)) {
|
||||
/* Clear the two TX-related interrupt flags */
|
||||
HWREG(RFC_DBELL_NONBUF_BASE + RFC_DBELL_O_RFCPEIFG) = 0xFFFFFFF5;
|
||||
}
|
||||
|
||||
ti_lib_int_master_enable();
|
||||
|
||||
ENERGEST_OFF(ENERGEST_TYPE_IRQ);
|
||||
|
Loading…
Reference in New Issue
Block a user