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

"Event endpoints are only able to recognize addresses from the EVENT group" Can you please explain it properly?

I am not understanding that what should be event pointer and task pointer address. Can you please explain it with some example in detail.

Parents
  • Since you've quoted from the PPI chapter in the reference manual, you're asking about how the PPI event endpoints (NRF_PPI->CH[x].EEP) and task endpoints (NRF_PPI->CH[x].TEP) works. The Programmable Peripheral Interconnect (short: PPI) is a peripheral that takes in a event and then starts a task, without involving the MCU (other than the initial configuration)

    A PPI event endpoint register must hold the address of an valid event given by the nRF51x22. This can be any event generated by any of the peripherals. For instance:

    NRF_PPI->CH[0].EEP = (uint32_t)&NRF_TIMER0->EVENTS_COMPARE[0];
    

    In order for the above event (in this case, timer0's compare[0]) to actually have an effect through the PPI, you must also configure the Task End Point (TEP). The address that you give into the TEP must be a valid TASKS_* address, for instance:

    NRF_PPI->CH[0].TEP = (uint32_t)&NRF_ADC->TASKS_START;
    

    Now, given that the two peripherals that you've connected through the PPI are configured correctly, and the specific PPI channel is enabled (NRF_PPI->CHENSET = PPI_CHENSET_CH0_Enabled << PPI_CHENSET_CH0_Pos;), the ADC will do a conversion each time the NRF_TIMER->EVENTS_COMPARE[0] occurs.

    I would recommend that you look at the PPI-example in the SDK, as well as the gpiote_example, as it also uses the PPI. If you look at this example on github, which will create a 8 MHz pulse on a GPIO, it also uses the PPI to make this happen: github.com/.../main.c

Reply
  • Since you've quoted from the PPI chapter in the reference manual, you're asking about how the PPI event endpoints (NRF_PPI->CH[x].EEP) and task endpoints (NRF_PPI->CH[x].TEP) works. The Programmable Peripheral Interconnect (short: PPI) is a peripheral that takes in a event and then starts a task, without involving the MCU (other than the initial configuration)

    A PPI event endpoint register must hold the address of an valid event given by the nRF51x22. This can be any event generated by any of the peripherals. For instance:

    NRF_PPI->CH[0].EEP = (uint32_t)&NRF_TIMER0->EVENTS_COMPARE[0];
    

    In order for the above event (in this case, timer0's compare[0]) to actually have an effect through the PPI, you must also configure the Task End Point (TEP). The address that you give into the TEP must be a valid TASKS_* address, for instance:

    NRF_PPI->CH[0].TEP = (uint32_t)&NRF_ADC->TASKS_START;
    

    Now, given that the two peripherals that you've connected through the PPI are configured correctly, and the specific PPI channel is enabled (NRF_PPI->CHENSET = PPI_CHENSET_CH0_Enabled << PPI_CHENSET_CH0_Pos;), the ADC will do a conversion each time the NRF_TIMER->EVENTS_COMPARE[0] occurs.

    I would recommend that you look at the PPI-example in the SDK, as well as the gpiote_example, as it also uses the PPI. If you look at this example on github, which will create a 8 MHz pulse on a GPIO, it also uses the PPI to make this happen: github.com/.../main.c

Children
No Data
Related