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

  • I seem to have the same issue, for the same board and NCS version.

    I've tried opening the solution and building that, but I can't get past the step of adding a build configuration for the NRF54L15. Adding the lines to prj.conf that you and the OP mentioned don't seem to fix things either. No matter which I tried, I got the following error when I try to configure the build:

    error: NRFX_DPPI (defined at C:/ncs/v2.9.0/zephyr/modules/hal_nordic\nrfx/Kconfig:28,
    modules\hal_nordic\nrfx/Kconfig:28) is assigned in a configuration file, but is not directly user-
    configurable (has no prompt). It gets its value indirectly from other symbols. See
    Parsing C:/ncs/v2.9.0/zephyr/Kconfig

  • Hey!

    Did you put CONFIG_NRFX_DPPI=y or CONFIG_NRFX_DPPI00=y?

Reply Children
No Data
Related