This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Radio Notifications become inverted

If I have a high-priority interrupt (or a series of them) that runs long enough to completely mask a radio notification, then all further radio notifications appear inverted. Program architecture aside, is there any way I can definitely tell whether a notification is an ACTIVE or a nACTIVE? It's very troublesome when I get it wrong.

As an aside, is there any reason I can't have the radio notification run at priority 0? By definition it will never run at the same time as the lower stack, so it seems like I should be able to make it high priority. And by the same token, is there a reason I can't use priority 2? I can use priority 1, meaning I'm allowed to interrupt the upper stack—any reason I can't just use priority 2 as well?

Alternatively, is there any way I can make SWI1 take priority over ADC if both interrupts want to run?

Thanks!

Parents
  • Hi,

    Are you using the SDK implementation of radio notification? If you use SoftDevice calls as described in the newly updated tutorial on radio notification you have the option to have events occur before, after the radio event or both. If you have them configured to trigger on both, set a flag to keep tabs on which it is, since the ACTIVE event will always come before the nACTIVE event.

    Since the SoftDevice needs to be able to interrupt the application it has reserved priorities 0 and 2.

    You can always configure radio notifications at priority 1 and ADC at priority 3. Are you asking about how to give one preference over the other at the same priority level?

    Best regards,

    Øyvind

  • Øyvind,

    Thanks for your reply! I have both notifications enabled. The problem is that I have other high-priority interrupts, and sometimes the radio notification interrupt doesn't get serviced until a second interrupt has happened. When this occurs, the application effectively never gets the ACTIVE event before the nACTIVE event, and so every future radio notification is "incorrect" in that the application thinks the opposite thing is happening. Does that make sense?

    So what I'd like is a definitive way to know, not guess, not toggle a state variable that I have, but to actually know whether this is an ACTIVE or an nACTIVE interrupt. Is this possible?

    I'll split the interrupt priority stuff into a separate question to avoid confusion.

    Thanks! -Nikolaus

Reply
  • Øyvind,

    Thanks for your reply! I have both notifications enabled. The problem is that I have other high-priority interrupts, and sometimes the radio notification interrupt doesn't get serviced until a second interrupt has happened. When this occurs, the application effectively never gets the ACTIVE event before the nACTIVE event, and so every future radio notification is "incorrect" in that the application thinks the opposite thing is happening. Does that make sense?

    So what I'd like is a definitive way to know, not guess, not toggle a state variable that I have, but to actually know whether this is an ACTIVE or an nACTIVE interrupt. Is this possible?

    I'll split the interrupt priority stuff into a separate question to avoid confusion.

    Thanks! -Nikolaus

Children
No Data
Related