channel group function nrfx_gppi_group_alloc() not available on nRF54L15

I had been doing this:

    nrfx_dppi_t dppi20 = NRFX_DPPI_INSTANCE(20);
    rc = nrfx_dppi_channel_alloc(&dppi20,&dppi_ch_2);
	rc = nrfx_dppi_group_alloc(&dppi20,&chg_2);
    NRF_DPPIC20->CHG[chg_2] = BIT(dppi_ch_2);

    NRF_GPIOTE20->PUBLISH_IN[channel_in_2] = dppi_ch_2 | 0x80000000;
    NRF_EGU20->SUBSCRIBE_TRIGGER[2] = dppi_ch_2 | 0x80000000;
    NRF_TIMER20->SUBSCRIBE_CAPTURE[2] = dppi_ch_2 | 0x80000000;
    NRF_DPPIC20->SUBSCRIBE_CHG[chg_2].DIS = dppi_ch_2 | 0x80000000;

    NRF_DPPIC20->TASKS_CHG[chg_2].EN = 1; // enable

What it does:

  • create a CHG (channel group)
  • DPPI is triggered by a GPIOTE in-event
  • DPPI then triggers and EGU, a TIMER capture, and...
  • DPPI also triggers its own CHG.DIS task (i.e. disables further captures)

But I now need to do this with gppi, in order connect a DPPI across domains... I want to have a GPIOTE30->EVENTS.IN[] trigger a TIMER20->TASKS.CAPTURE[]

So I take a deep breath, then #include <helpers/nrfx_gppi.h> and read the documentation, such as it is:

Oh, so it seems easy... there is a "nrfx_gppi_group_alloc()" function just like you'd expect.  Let's code it up and compile it:

    rc = nrfx_gppi_channel_alloc(&gppi_ch_2);
    nrfx_gppi_channels_enable(BIT(gppi_ch_2));
    static nrfx_gppi_channel_group_t g_chg_2;
	rc = nrfx_gppi_group_alloc(&g_chg_2);
    // NRF_DPPIC20->CHG[chg_2] = BIT(dppi_ch_2);
    nrfx_gppi_channels_include_in_group(BIT(gppi_ch_2),g_chg_2);

But no, it isn't easy!

While nrfx_gppi_group_alloc() and nrfx_gppi_channels_include_in_group() are nicely defined in helpers/nrfx_gppi.h.... they are not IMPLEMENTED in the file nrfx/helpers/nrfx_gppi_dppi_ppib_lumos.c (where nrfx_gppi_channel_alloc() etc are implemented).

/(....c.obj): in function `l15timings_init':
/(......).c:940: undefined reference to `nrfx_gppi_group_alloc'
/(...).c:948: undefined reference to `nrfx_gppi_channels_include_in_group'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

So my question is.... how am I supposed to use channel groups, using the GPPI system?

Parents
  • Hi,

    Currently, I think the only driver option is using the nrfx_dppi_* API. You can see an example of that in the ESB implementation, here.

  • Thanks Einar.  In which case, I think that in order to use channel groups when using the gppi library, one of these would be needed:

    • to add implementations of nrfx_gppi_group_alloc() and nrfx_gppi_channels_include_in_group() to nrfx_gppi_dppi_ppib_lumos.c
      • I would guess that this "simple feature request" might actually be a pretty big job (and perhaps explains why it isn't already done)
      • FYI I am pretty impressed with the implementation of nrfx_gppi_dppi_ppib_lumos.c and how it automagically handles the allocation of PPIBxy resources and their interconnection; if you have the chance, please pass on my compliments to the designers
    • or, to add a "get_DPPIs" functions to the GPPI library, to expose the internal GPPI-allocated DPPI channel numbers
      • this would allow GPPI to be used for what it is good at (cleanly bridging DPPI across different domains)
      • by returning an array of DPPICxy and the DPPI channel number allocated by GPPI for each of them, my program could then implement channel groups at the DPPIC level
Reply
  • Thanks Einar.  In which case, I think that in order to use channel groups when using the gppi library, one of these would be needed:

    • to add implementations of nrfx_gppi_group_alloc() and nrfx_gppi_channels_include_in_group() to nrfx_gppi_dppi_ppib_lumos.c
      • I would guess that this "simple feature request" might actually be a pretty big job (and perhaps explains why it isn't already done)
      • FYI I am pretty impressed with the implementation of nrfx_gppi_dppi_ppib_lumos.c and how it automagically handles the allocation of PPIBxy resources and their interconnection; if you have the chance, please pass on my compliments to the designers
    • or, to add a "get_DPPIs" functions to the GPPI library, to expose the internal GPPI-allocated DPPI channel numbers
      • this would allow GPPI to be used for what it is good at (cleanly bridging DPPI across different domains)
      • by returning an array of DPPICxy and the DPPI channel number allocated by GPPI for each of them, my program could then implement channel groups at the DPPIC level
Children
No Data
Related