nRFX DPPI single in multiple out for nRF54L15

Hi,

I would like an nRFX example on how to set up DPPI using single in (1 Event) and multiple out (2 Tasks). I have previously done this using the fork functionality in PPI (

nrfx_gppi_fork_endpoint_setup) when working with nRF52832. However, it looks like DPPI in nRF54L15 no longer supports forking since the concept of subscriber/publisher is used. However, I was not able to get this set up using nrfx_gppi_task_endpoint_setup(). Upon closer inspection at the SDK file, it looks like the definition for that function is not even defined. Therefore, It would be nice to get an example on how to set this up properly using nRFX.
Parents
  • Hi,

     

    I have previously done this using the fork functionality in PPI (

    nrfx_gppi_fork_endpoint_setup) when working with nRF52832.

    This shall be available for the nRF54L-series devices as well:

    https://github.com/zephyrproject-rtos/hal_nordic/blob/master/nrfx/helpers/nrfx_gppi_dppi_ppib_lumos.c#L582-L596

     

    However, it looks like DPPI in nRF54L15 no longer supports forking since the concept of subscriber/publisher is used. However, I was not able to get this set up using nrfx_gppi_task_endpoint_setup(). Upon closer inspection at the SDK file, it looks like the definition for that function is not even defined. Therefore, It would be nice to get an example on how to set this up properly using nRFX.

    Forking is not a requirement in the same way as it was with PPI. DPPI has a inbuilt event system, where anyone listening in on the specific event is able to perform a task when it occurs. Forking is effectively not strictly required with DPPI, as it is "forkable" by design.

    Could you share a bit more info on what you're trying to do? It sounds like a issue when porting and if you have previously used nrfx_gppi, it should be both PPI and DPPI compliant.

     

    Kind regards,

    Håkon

  • I am trying to use timer10's event compare 0 to trigger both the SPIM start task as well as an out task for the GPIOTE. I was only able to get the SPIM start task to trigger but GPIOTE signal remains unchanged when observed under the logic analyzer. I don't think this is an issue with my GPIOTE setup because I am able to manually toggle the pin via the nrfx_gpiote_out_task_trigger method. This is my pseudo code for enabling the setup. I was previously using the PPI method in nRF52 so I had to switch to using GPPI.

    I understand nRF54's implementation of DPPI is an extension of the forking design, but my other issue lies with the usability of the NRFX driver, because it doesn't look like there is a way to do the multiple publisher and multiple subscriber model using nRFX if I just want to get rid of the fork model.

        uint8_t channel;
        nrfx_err_t err = nrfx_gppi_channel_alloc(&channel);
        if (err != NRFX_SUCCESS) {
            return false;
        }
        
        event = nrfx_timer_event_address_get(&timer, NRF_TIMER_EVENT_COMPARE0)
        task = nrfx_spim_start_task_address_get(&spim)
        task2 = nrfx_gpiote_out_task_address_get(&gpiote, k_shift_reg_strobe_pin)
        
        nrfx_gppi_channel_endpoints_setup(channel, event, task);
        if (use_fork) {
            nrfx_gppi_fork_endpoint_setup(channel, task2);
        }
        nrfx_gppi_channels_enable(1 << *channel);
    
        return true;

  • As you are using the nrf54l15 which uses dppi, i'd use dppi directly. However, You have to make sure, all peripherals are in the same power domain, otherwise you'll need ppi bridges.

    uint8_t dppi20_channel_1;
    nrfx_dppi_channel_alloc(&dppi_20, &dppi20_channel_1);
    
    nrf_timer_publish_set(timer.p_reg, NRF_TIMER_EVENT_COMPARE0, dppi20_channel_1);
    
    nrf_gpiote_event_t event = nrf_gpiote_out_task_get(gpio_channel);
    nrf_gpiote_subscribe_set(gpiote.p_reg, event, dppi20_channel_1);
    
    nrf_spim_subscribe_set(spim.p_reg, NRF_SPIM_TASK_START, dppi20_channel_2);

Reply
  • As you are using the nrf54l15 which uses dppi, i'd use dppi directly. However, You have to make sure, all peripherals are in the same power domain, otherwise you'll need ppi bridges.

    uint8_t dppi20_channel_1;
    nrfx_dppi_channel_alloc(&dppi_20, &dppi20_channel_1);
    
    nrf_timer_publish_set(timer.p_reg, NRF_TIMER_EVENT_COMPARE0, dppi20_channel_1);
    
    nrf_gpiote_event_t event = nrf_gpiote_out_task_get(gpio_channel);
    nrf_gpiote_subscribe_set(gpiote.p_reg, event, dppi20_channel_1);
    
    nrf_spim_subscribe_set(spim.p_reg, NRF_SPIM_TASK_START, dppi20_channel_2);

Children
No Data
Related