Hello,
I experienced some strange behaviour of the SFD interrupt. I am using Contiki on a CC2538.
At the beginning of the transmit() function of the cc2538-rf.c ( github.com/.../cc2538-rf.c ) we set two GPIOs to high. Then the frame transmits. The SFD and the TXDONE interrupt is enabled and in the ISR cc2538_rf_rx_tx_isr ( github.com/.../cc2538-rf.c ) we set the GPIOs to low.
void cc2538_rf_rx_tx_isr(void) { INTERRUPTS_DISABLE(); if(REG(RFCORE_SFR_RFIRQF1) & RFCORE_SFR_RFIRQF1_TXDONE) { GPIO_C_2_OFF(); } if(REG(RFCORE_SFR_RFIRQF0) & RFCORE_SFR_RFIRQF0_SFD) { GPIO_C_3_OFF(); } REG(RFCORE_SFR_RFIRQF0) = 0; REG(RFCORE_SFR_RFIRQF1) = 0; INTERRUPTS_ENABLE(); }
What we see on the logic analyser is that both pins (the one set to low at SFD interrupt and the one set to low at TXDONE interrupt) go to low at the same time. How is that possible? The SFD interrupt should arise as soon as the SFD byte was sent.