Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

PPI access in a radio timeslot?

Hi,

We are using nRF52840 with nRF5 SDK ver 16.0.0 with Softdevice S113 ver 7.0.1.

We use the radio timeslot to implement low level radio comm with very tight timing requirements. I wonder if we can use PPI in the timeslot?

The Softdevice spec (https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsds_s113%2FSDS%2Fs1xx%2Fconcurrent_multiprotocol_tsl_api%2Fconcurrent_multiprotocol_tsl_api.html&cp=4_6_1_0_8_1) says:

"When a Timeslot request is granted, the application has exclusive and real-time access to the normally blocked RADIO, TIMER0, CCM, and AAR peripherals and can use these freely for the duration (length) of the timeslot."

The Nordic guide (https://devzone.nordicsemi.com/nordic/short-range-guides/b/software-development-kit/posts/setting-up-the-timeslot-api) says:

"When a timeslot has been granted the application will gain access to the RADIO, TIMER0, CCM, AAR, and PPI(ch 14-15) modules for the duration of the timeslot."

So the spec does not mention PPI while the guide does.

Please clarify!

BR / Björn

Parents
  • Hi,
    I will answer based on my experience.

    PPI module is just a peripheral module, part of the channels of which (0 - 19) can be used by the user for everything that is enough for imagination. and part of the channels, has a hard hardware configuration.

    Custom channels can be used anywhere and anytime, nothing limit it.

    "When a timeslot has been granted the application will gain access to the RADIO, TIMER0, CCM, AAR, and PPI(ch 14-15) modules for the duration of the timeslot."

    The peripherals used by the soft device are listed here. But at the time of gaining access to the time slot, it is free and you can use it to fit your needs.

    I hope I understood your question correctly and my answer will be useful.


    Best regards,

    Max

  • I agree with ,

    The PPI can be used as you like in a Timeslot, but don't use the PPIs that the softdevice use. You can see what PPI channels the softdevice uses by checking NRF_SOC_SD_PPI_CHANNELS_SD_ENABLED_MSK in nrf_soc.h, which is part of the softdevice header files. Search for it in your project.

    So the rest you can use, as long as you don't use them anywhere else in your project.

    Best regards,

    Edvin

  • 2) So I can use PPI channels 0-16. Always or just in the timeslot?

    always.

    1) So I must not use PPI channels 17-31, not even in the timeslot?

    with a successful open time slot, you get access to the radio and timer0. Is there access to pre-programmed channels (20 - 31) at this moment? I don’t know, but when using time slots, I did not have the need to access channels 20-31.

    maybe there is no need for them in your task?

  • Hi CheMax,

    Thanks for your response. I am currentlly not sure about my need. I am trying to learn the plaform, for this and future projects. That's why I requested a clarification from Nordic.

    BR / Björn

  • This is a very correct approach) good luck in projects

  • Hello, I have not seen the actual source code for the softdevice, but this is some key features of the timeslot and softdevice:

    - The softdevice takes care of all the timings and the radio for any BLE related events.

    - If you want to use the radio for something other than BLE, you can do this using the timeslot API. This will give you full access to the radio within a given timeslot.

    - In order to make the softdevice an effective binary that doesn't take up a lot of CPU power to maintain a BLE connection, a lot of HW tricks are used, instead of SW. Among these are the use of PPI and timers (TIMER0 and RTC0). 

    I highly suspect that the softdevice use RTC0 and PPI to trigger the next radio events, whether or not you use the Timeslot API or not. Remember that the Timeslot API grants you access to the radio, and some other peripherals that are restricted, but the softdevice is still running. So I wouldn't touch the PPI channels used by the softdevice, even in a timeslot. If you do, then you risk that the softdevice doesn't know when to communicate with the connected device the next time, or perhaps you disable the PPI that is supposed to start the HFCLOCK that the radio needs, or to trigger the radio itself. Just don't use them Slight smile

    You still have 17 PPI channels that you can use, which in most cases are more than enough.

    BR,

    Edvin

Reply Children
No Data
Related