Merge pull request #638 from atiselsts/bugfix/cc26xx-rf-interrupt

CC26xx RF: in polling mode, disable the CPE0 radio interrupt completely
This commit is contained in:
George Oikonomou 2018-10-18 20:20:36 +01:00 committed by GitHub
commit 89f3240bf6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -512,9 +512,13 @@ rf_core_setup_interrupts(void)
void
rf_core_cmd_done_en(bool fg)
{
uint32_t irq = fg ? IRQ_LAST_FG_COMMAND_DONE : IRQ_LAST_COMMAND_DONE;
uint32_t irq = 0;
const uint32_t enabled_irqs = rf_core_poll_mode ? ENABLED_IRQS_POLL_MODE : ENABLED_IRQS;
if(!rf_core_poll_mode) {
irq = fg ? IRQ_LAST_FG_COMMAND_DONE : IRQ_LAST_COMMAND_DONE;
}
HWREG(RFC_DBELL_NONBUF_BASE + RFC_DBELL_O_RFCPEIFG) = enabled_irqs;
HWREG(RFC_DBELL_NONBUF_BASE + RFC_DBELL_O_RFCPEIEN) = enabled_irqs | irq;
}