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

Can you use NRF PPI and FreeRTOS together

Hi,

I'm reading through the documentation on using the SAADC with the NRF52 kits. The examples are using PPI to manage the SAADC and allow it to sample locationally in a non blocking way. I am planning on using FreeRTOS however to manage the boards other processes. Are FreeRTOS and PPI compatible with each other. If so what is the difference between them and why should i add the complexity of having the PPI scheduling system happening parallel to the FreeRTOS as surely it would be cleaner for everything to be managed by FreeRTOS.

  • Hi,

    It's completely optional to use PPI, and whether it makes sense to use it or not depends a bit on use case. For low frequency sampling it may be easier to trigger the sampling periodically from a freertos task or a timer event.

    PPI triggers peripheral tasks without involving the CPU, so it doesn't really make any difference if you run a bare metal application or an RTOS.

    Driver documentation for reference: SAADC driver

    Best regards,

    Vidar

Related