Issue nRF Connect SDK Intermediate - Exercise 3 - Interfacing with ADC using nrfx drivers and TIMER/PPI

Hello all,

Going through the nRF Connect SDK Intermediate course with my nRF54L15 DK, I stumbled upon a problem at step 6 of exercise 3 - Interfacing with ADC using nrfx drivers and TIMER/PPI.

Because I am using the nRF54L15, I #include the nrfx_dppi.h file instead of the nrfc_ppi.h file.
Such is configured here:

#if defined(DPPI_PRESENT)
#include <nrfx_dppi.h>
#else
#include <nrfx_ppi.h>
#endif

When I arrive at step 6: Setup the (D)PPI channels. I am not able to build the application since the function in that step utilizes function calls which are defined in nrfx_ppi.h.

This is the function described in step 6:

static void configure_ppi(void)
{
    nrfx_err_t err;
    /* Declare variables used to hold the (D)PPI channel number */
    uint8_t m_saadc_sample_ppi_channel;
    uint8_t m_saadc_start_ppi_channel;

    /* Trigger task sample from timer */
    err = nrfx_gppi_channel_alloc(&m_saadc_sample_ppi_channel);
    if (err != NRFX_SUCCESS) {
        LOG_ERR("nrfx_gppi_channel_alloc error: %08x", err);
        return;
    }

    err = nrfx_gppi_channel_alloc(&m_saadc_start_ppi_channel);
    if (err != NRFX_SUCCESS) {
        LOG_ERR("nrfx_gppi_channel_alloc error: %08x", err);
        return;
    }

    /* Trigger task sample from timer */
    nrfx_gppi_channel_endpoints_setup(m_saadc_sample_ppi_channel, 
                                      nrfx_timer_compare_event_address_get(&timer_instance, NRF_TIMER_CC_CHANNEL0),
                                      nrf_saadc_task_address_get(NRF_SAADC, NRF_SAADC_TASK_SAMPLE));

    /* Trigger task start from end event */
    nrfx_gppi_channel_endpoints_setup(m_saadc_start_ppi_channel, 
                                      nrf_saadc_event_address_get(NRF_SAADC, NRF_SAADC_EVENT_END),
                                      nrf_saadc_task_address_get(NRF_SAADC, NRF_SAADC_TASK_START));

    /* Enable both (D)PPI channels */ 
    nrfx_gppi_channels_enable(BIT(m_saadc_sample_ppi_channel));
    nrfx_gppi_channels_enable(BIT(m_saadc_start_ppi_channel));
}

The functions referenced are:
- nrfx_gppi_channel_alloc
- nrfx_gppi_channel_endpoints_setup
- nrfx_gppi_channels_enable

Is there a DPPI version available for this exercise?

Thank you.

Parents Reply Children
No Data
Related