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
  • Hi,

    Which NCS version are you using when testing this exercise? It was tested on nRF54L15 with NCS 2.8.0 and should work there with the solution found in the GitHub repository.

    nrfx_gppi is series of helper functions that provides a common API for both PPI and DPPI.

    I noticed that the Kconfig CONFIG_NRFX_DPPI is not directly assignable in NCS v2.9.0. Can you try to add CONFIG_NRFX_GPPI=y to your prj.conf file if you are using v2.9.0, and see if this resolve the problem you are seeing?

    Best regards,
    Jørgen

  • Hey Jørgen,

    I was indeed working with the 2.9.0 version of NCS, adding the CONFIG_NRFX_GPPI=y did do the trick. 
    For the DPPI config I added the "
    CONFIG_NRFX_DPPI00=y" option.

    Thank you for the quick response, I suggest adding this solution to the exercise itself!

    Kind regards,

    Vital

Reply Children
No Data
Related