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

radio notification sdk 12.3

I'm working with LEDs in a ble example I'm calling ble_notification_init() and activate the LED in the callback handler. I get sd_nvic_ClearPendingIRQ, sd_nvic_SetPriority and sd_nvic_EnableIRQ undefined. I did:

#include "nrf_nvic.h"
#include "ble_radio_notification.h"

Anything else I need to do? Thx.

Parents
  • Not sure about which aspect of radio notification you are having trouble with, but here is everything you need.

           #include "ble_radio_notification.h"
    
           #define RADIO_NOTIFICATION_IRQ_PRIORITY 2
           #define RADIO_NOTIFICATION_DISTANCE NRF_RADIO_NOTIFICATION_DISTANCE_5500US //There are many options on distance.  Just look in spec
    //This is the interrupt handler
        void radio_notification_evt_handler(bool radio_evt)
    {
    
        if (radio_evt)
        {
    //This is where radio is about to start. ie, notification distance before
    			
    } else
    {
    //This indicates radio has just finished.  No delay here occurs right after radio stops.
    }		
    }
    
    //This bit goes in main AFTER you have started the SD.
    		err_code=ble_radio_notification_init(RADIO_NOTIFICATION_IRQ_PRIORITY,RADIO_NOTIFICATION_DISTANCE,radio_notification_evt_handler);
        APP_ERROR_CHECK(err_code);
    
  • Many thx. That was the issue. I had too much faith that ble_radio_notification.c was correct. All compiles fine now without moving up to a later SDK :-)

Reply Children
No Data
Related