This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

NRF_RADIO with 802.15.4 250 kBps mode: interrupts ADDRESS, PAYLOAD not stopping

Hello,

I use the nRF52840DK with direct programmed registers for NRF_RADIO peripheral to send and receive 802.15.4 frames. I have also a separate laptop with nRF52840 USB Dongle and Wireshark and the 80201504 sniffer plugin to monitor what's on air.

I can receive frames from another sender, but when entering the RADIO_IRQHandler, something strange happens.: I get a flood of ADDRESS and PAYLOAD interrupts and I can not clear them by writing the value to 0 again. At first I was not sure why I was constantly in RADIO_IRQHandler again so I counted the different interrupt types of events.

Only these 3 IRQs should be active, the 3 lines before waiting for packets are:

NRF_RADIO->INTENSET = RADIO_INTENSET_READY_Msk | RADIO_INTENSET_PAYLOAD_Msk | RADIO_INTENSET_END_Msk;

NRF_RADIO->TASKS_RXEN = 1;

NVIC_EnableIRQ(RADIO_IRQn);

I see the frame data in my g_recvPacket array that my PACKETPTR points to and which is sent that is sent by the other station, it shows in Wireshark too, all good here. But I can't get rid of the ADDRESS and PAYLOAD IRQs, how can they be cleared ? as can be seen in second picture, the IRQ counts for these shoot up, all other remain low.

What is required to clear these interrupts correctly ?

  • Hi,

    Can you try to follow the note under Interrupt clearing section, to see if this resolves your issue?

    "Note: To avoid an interrupt reoccurring before a new event has come, the program should perform a read from one of the peripheral registers. For example, the event register that has been cleared, or the INTENCLR register that has been used to disable the interrupt. This will cause a one to three-cycle delay and ensure the interrupt is cleared before exiting the interrupt handler."

    Best regards,
    Jørgen

  • Hello Jorgen,

    thanks a lot, just 10 minutes before getting the info that an engineer was assigned I figured it out by looking at another example where this was mentioned. I changed e.g. the ADDRESS event handling to

    if ( NRF_RADIO->EVENTS_ADDRESS == 1U )
    {
    g_irqevAddr++;
    NRF_RADIO->EVENTS_ADDRESS == 0;
    val=NRF_RADIO->EVENTS_ADDRESS;
    while (val > 0)
    {
    NRF_RADIO->EVENTS_ADDRESS == 0;
    val=NRF_RADIO->EVENTS_ADDRESS;
    }
    }

    and the IRQs disappear. I have not yet looked at that section, so that clarified it. Thanks for the quick response, problem solved :)

Related