nRF54LM20 EGU00 Peripheral not present in Zephyr

Board: nRF54LM20A DK

NCS: v3.3.1

I was trying to work with the EGU00 peripheral on the nRF54LM20A, and I realized that it is not present in the device tree definition files from the nRF54LM20_A_B.

Does the EGU00 peripheral actually exist?  It is present in the micro's datasheet and documentation:

https://docs.nordicsemi.com/r/bundle/ps_nrf54lm20a/page/egu.html-topic 

Parents
  • It is possible to use the EGU directly through nrfx.

      #include <zephyr/kernel.h>
      #include <zephyr/irq.h>
      #include <nrfx_egu.h>
    
      static nrfx_egu_t egu00 = NRFX_EGU_INSTANCE(NRF_EGU00);
    
      static void egu00_event_handler(uint8_t event_idx, void *context)
      {
      	ARG_UNUSED(context);
    
      	/* event_idx is 0..5 on EGU00 */
      }
    
      void egu00_init(void)
      {
      	int err;
    
      	IRQ_CONNECT(EGU00_IRQn,
      		   NRF_DEFAULT_IRQ_PRIORITY,
      		   nrfx_egu_irq_handler,
      		   &egu00,
      		   0);
    
      	err = nrfx_egu_init(&egu00,
      			   NRF_DEFAULT_IRQ_PRIORITY,
      			   egu00_event_handler,
      			   NULL);
      	__ASSERT_NO_MSG(err == 0);
    
      	nrfx_egu_int_enable(&egu00, NRF_EGU_INT_TRIGGERED0);
      }
    
      void egu00_trigger(void)
      {
      	nrfx_egu_trigger(&egu00, 0);
      }

    Something like this should work. Set CONFIG_NRFX_EGU10=y in your prj.conf. While this seems to select EGU10, it will still permit you to use EGU00.

    Thanks,

    Helmut Lord

Reply
  • It is possible to use the EGU directly through nrfx.

      #include <zephyr/kernel.h>
      #include <zephyr/irq.h>
      #include <nrfx_egu.h>
    
      static nrfx_egu_t egu00 = NRFX_EGU_INSTANCE(NRF_EGU00);
    
      static void egu00_event_handler(uint8_t event_idx, void *context)
      {
      	ARG_UNUSED(context);
    
      	/* event_idx is 0..5 on EGU00 */
      }
    
      void egu00_init(void)
      {
      	int err;
    
      	IRQ_CONNECT(EGU00_IRQn,
      		   NRF_DEFAULT_IRQ_PRIORITY,
      		   nrfx_egu_irq_handler,
      		   &egu00,
      		   0);
    
      	err = nrfx_egu_init(&egu00,
      			   NRF_DEFAULT_IRQ_PRIORITY,
      			   egu00_event_handler,
      			   NULL);
      	__ASSERT_NO_MSG(err == 0);
    
      	nrfx_egu_int_enable(&egu00, NRF_EGU_INT_TRIGGERED0);
      }
    
      void egu00_trigger(void)
      {
      	nrfx_egu_trigger(&egu00, 0);
      }

    Something like this should work. Set CONFIG_NRFX_EGU10=y in your prj.conf. While this seems to select EGU10, it will still permit you to use EGU00.

    Thanks,

    Helmut Lord

Children
No Data
Related