This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

radio event end point addresses nrf52832

Hi,

Does anyone know the event end point addresses for the following on the nrf52832: RADIO_EVENTS->ADDRESS RADIO_EVENTS->READY RADIO_EVENTS->END

The addresses for these do not appear to be listed in the documentation as they are used in the pre-programmed channels. I would like to use these events to trigger GPIOTE tasks for debugging purposes.

  • Hi, you can use the PPI fork registers to trigger a new GPIOTE task. For this you only need to know the PPI chanel number assigned to the events you mentioned above. That is, PPI.FORK[24].TEP, PPI.FORK[25].TEP, and PPI.FORK[27].TEP respectively.

    The register addresses are listed in the RADIO peripheral chapter here.

    EDIT 2/19 added code example

    The PPI module supports forking of the event point into two separate task endpoints, even for the pre-programmed channels. Forking doesn't affect the existing channel configuration.

    Below code snippet toggles LED_4 upon the RADIO->EVENTS_ADDRESS event.

    static void gpiote_task_init(void)
    {
    
    NRF_GPIOTE->CONFIG[0] =((GPIOTE_CONFIG_MODE_Task       << GPIOTE_CONFIG_MODE_Pos)
                           |(LED_4                         << GPIOTE_CONFIG_PSEL_Pos)
                           |(GPIOTE_CONFIG_POLARITY_Toggle << GPIOTE_CONFIG_POLARITY_Pos)
                           |(GPIOTE_CONFIG_OUTINIT_Low     << GPIOTE_CONFIG_OUTINIT_Pos));
    
    
    NRF_PPI->CHENSET      = PPI_CHEN_CH26_Msk;
    //Fork the GPIOTE TASK with TIMER0->TASKS_CAPTURE[1] (see table 2 - Pre-programmed channels)
    NRF_PPI->FORK[26].TEP = (uint32_t)&NRF_GPIOTE->TASKS_OUT[0];
    }
    
  • Thanks for the answer, however these registers are pre-programmed task end points. We are using these channels for radio functions and I don't think they can be changed anyway. I need to know the event end point that triggers these tasks so that I can map them to a PPI channel with a GPIOTE task end point. At least in IAR the fork registers are shown pre-populated and cannot be changed.

    For example in the register view: FORK[27].TEP = 0x40008048

    This will remain the same regardless of whether an attempt to remap it is made or not: NRF_PPI->FORK[27].TEP = ppi_task_addr;

  • Turns out that it was an errata on engineering rev A silicon preventing the fork registers being configured

Related