@@ -226,96 +226,65 @@ void nrf_802154_platform_sl_lptimer_hw_task_local_domain_connections_clear(void)
226226
227227#elif defined(NRF54L_SERIES )
228228
229- #include <nrfx_ppib .h>
230- #include <nrfx_dppi .h>
229+ #include <helpers/nrfx_gppi .h>
230+ #include <helpers/nrfx_gppi_lumos .h>
231231
232- /* To trigger GRTC.TASKS_CAPTURE[#cc] with RADIO.EVENT_ {?}, the following connection chain must be
232+ /* To trigger RADIO.TASKS_x with GRTC.EVENT_CAPTURE {?}, the following connection chain must be
233233 * created:
234- * - starting from RADIO domain (_R_ ):
235- * {a} RADIO.EVENT_{?} <-- DPPIC_10
236- * {b} DPPIC_10 <-- PPIB_11
234+ * - starting with the PERI domain (_P_ ):
235+ * {a} DPPIC_20 <-- GRTC.CC
236+ * {b} PPIB_21 <-- DPPIC_20
237237 * - crossing domain boundaries
238238 * {c} PPIB_11 <-- PPIB_21
239- * - ending in the PERI domain (_P_ ):
240- * {d} PPIB_21 <-- DPPIC_20
241- * {e} DPPIC_20 <-- GRTC.CC
239+ * - ending with RADIO domain (_R_ ):
240+ * {d} DPPIC_10 <-- PPIB_11
241+ * {e} RADIO.TASK_{?} <-- DPPIC_10
242242 */
243243
244244#define INVALID_CHANNEL UINT8_MAX
245245
246- static nrfx_dppi_t dppi20 = NRFX_DPPI_INSTANCE (20 );
247- static nrfx_ppib_interconnect_t ppib11_21 = NRFX_PPIB_INTERCONNECT_INSTANCE (11 , 21 );
248- static uint8_t peri_dppi_ch = INVALID_CHANNEL ;
249- static uint8_t peri_ppib_ch = INVALID_CHANNEL ;
246+ static nrfx_gppi_handle_t peri_rad_handle ;
250247
251248void nrf_802154_platform_sl_lptimer_hw_task_cross_domain_connections_setup (uint32_t cc_channel )
252249{
253- nrfx_err_t err ;
254-
255- err = nrfx_dppi_channel_alloc (& dppi20 , & peri_dppi_ch );
256- __ASSERT_NO_MSG (err == NRFX_SUCCESS );
257-
258- err = nrfx_ppib_channel_alloc (& ppib11_21 , & peri_ppib_ch );
259- __ASSERT_NO_MSG (err == NRFX_SUCCESS );
260-
261- /* {c} PPIB_11 <-- PPIB_21
262- * One of HW-fixed connections, so nothing to do.
263- */
264-
265- /* {d} PPIB_21 <-- DPPIC_20 */
266- NRF_DPPI_ENDPOINT_SETUP (
267- nrfx_ppib_send_task_address_get (& ppib11_21 .right , peri_ppib_ch ), peri_dppi_ch );
268-
269- /* {e} DPPIC_20 <-- GRTC.CC */
270- NRF_DPPI_ENDPOINT_SETUP (
271- z_nrf_grtc_timer_compare_evt_address_get (cc_channel ), peri_dppi_ch );
250+ ARG_UNUSED (cc_channel );
272251}
273252
274253void nrf_802154_platform_sl_lptimer_hw_task_cross_domain_connections_clear (void )
275254{
276- nrfx_err_t err ;
277-
278- err = nrfx_ppib_channel_free (& ppib11_21 , peri_ppib_ch );
279- __ASSERT_NO_MSG (err == NRFX_SUCCESS );
280-
281- err = nrfx_dppi_channel_free (& dppi20 , peri_dppi_ch );
282- __ASSERT_NO_MSG (err == NRFX_SUCCESS );
283-
284- peri_dppi_ch = INVALID_CHANNEL ;
285- peri_ppib_ch = INVALID_CHANNEL ;
255+ nrfx_gppi_domain_conn_free (peri_rad_handle );
286256}
287257
288258void nrf_802154_platform_sl_lptimer_hw_task_local_domain_connections_setup (uint32_t dppi_ch ,
289259 uint32_t cc_channel )
290260{
291- nrfx_err_t err ;
261+ nrfx_gppi_resource_t resource = {
262+ .domain_id = NRFX_GPPI_DOMAIN_RAD ,
263+ .channel = dppi_ch
264+ };
265+ uint32_t eep = z_nrf_grtc_timer_compare_evt_address_get (cc_channel );
266+ int err ;
292267
293268 if (dppi_ch == NRF_802154_SL_HW_TASK_PPI_INVALID ) {
294269 return ;
295270 }
296271
297- /* {a} RADIO.TASKS_{?} <-- DPPIC_10[dppi_ch]
298- * It is the responsibility of the user of this platform to make the {a} connection
299- * and pass the DPPI channel number as a parameter here.
272+ /* Setup a connection between Peri and Rad domain. For Rad domain use provided channel.
273+ * Remaining resources (bridge and dppi channel in PERI) allocate dynamically.
300274 */
275+ err = nrfx_gppi_ext_conn_alloc (NRFX_GPPI_DOMAIN_PERI , NRFX_GPPI_DOMAIN_RAD ,
276+ & peri_rad_handle , & resource );
277+ __ASSERT_NO_MSG (err == 0 );
301278
302- /* {b} DPPIC_10 <-- PPIB_11 */
303- NRF_DPPI_ENDPOINT_SETUP (
304- nrfx_ppib_receive_event_address_get (& ppib11_21 .left , peri_ppib_ch ), dppi_ch );
279+ err = nrfx_gppi_ep_attach (eep , peri_rad_handle );
280+ __ASSERT_NO_MSG (err == 0 );
305281
306- err = nrfx_dppi_channel_enable (& dppi20 , peri_dppi_ch );
307- __ASSERT_NO_MSG (err == NRFX_SUCCESS );
282+ nrfx_gppi_conn_enable (peri_rad_handle );
308283}
309284
310285void nrf_802154_platform_sl_lptimer_hw_task_local_domain_connections_clear (void )
311286{
312- nrfx_err_t err ;
313-
314- NRF_DPPI_ENDPOINT_CLEAR (
315- nrfx_ppib_receive_event_address_get (& ppib11_21 .left , peri_ppib_ch ));
316-
317- err = nrfx_dppi_channel_disable (& dppi20 , peri_dppi_ch );
318- __ASSERT_NO_MSG (err == NRFX_SUCCESS );
287+ nrfx_gppi_conn_disable (peri_rad_handle );
319288}
320289
321290#endif
0 commit comments