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

ble_radio_notification_evt_handler_t timeslot API and softdevice

I am using the timeslot API and softdevice to advertise two separate types of message. This works well. But I have also used ble_radio_notification_evt_handler_t in an attempt to change the payload of the softdevice advertisement.

Unfortunately through experimentation I have found that ble_radio_notification_evt_handler_t is called on any radio activity. There doesn't appear to be a context.

Any ideas how to run code before or after (just) the softdevice advertises?

I'm using S130 V11 nrf51

Many thanks in advance

John

Parents
  • FormerMember
    0 FormerMember

    The easiest way to change the advertising data between two advertising events, is to use app_timer/the RTC to run with the same timeout interval as the advertising interval. Since we know that the advertiser will advertise at a given interval, having app_timer/the RTC to update the advertising data with the same interval will make the advertising data change for each advertising event.

  • Johnnofleek

    Yikes...

    I presumed the same as you, that the radio event related to when the radio was going to transmit, not all of the internals of what other stuff it was doing

    I wonder if there is a way to read some other register or part of the SD to determine what the event was caused by.

    But, If you get loads of interrupts, I guess, checking for what the type of radio notification, is going to wake the CPU up far too much, and not be a usable solution for low power application.

    I think Nordic need to clarify this, and how you are supposed to update data in between transmissions.

    BTW. I see that the event handler is passed a flag to say when the radio is inactive, so wonder how many interrupts per advertising period you get when that flag is false

Reply
  • Johnnofleek

    Yikes...

    I presumed the same as you, that the radio event related to when the radio was going to transmit, not all of the internals of what other stuff it was doing

    I wonder if there is a way to read some other register or part of the SD to determine what the event was caused by.

    But, If you get loads of interrupts, I guess, checking for what the type of radio notification, is going to wake the CPU up far too much, and not be a usable solution for low power application.

    I think Nordic need to clarify this, and how you are supposed to update data in between transmissions.

    BTW. I see that the event handler is passed a flag to say when the radio is inactive, so wonder how many interrupts per advertising period you get when that flag is false

Children
No Data
Related