The Event Generator Unit peripheral is new in nrf52. There is a basic description in the current manual of nrf52, but not much can be inferred as to how to use it. Could an example be provided for a typical use case. Thanks!
The Event Generator Unit peripheral is new in nrf52. There is a basic description in the current manual of nrf52, but not much can be inferred as to how to use it. Could an example be provided for a typical use case. Thanks!
Don't really see the problem here - the manual is clear - it's short because the thing is so incredibly simple. It works like any and every other TASK/EVENT on any other peripheral on the chip, trigger the task to generate the event, read/poll the event, enable or disable the interrupt for each one of the 16 events in each instance of the EGU, write an interrupt handler for that EGU and handle the set interrupts.
There are no EGUs >5. The EGU instances are EGU0, EGU1, EGU2, EGU3, EGU4 and EGU5, that's in Table 107 on page 467 of the manual. Since there are 6 instances, there are 6 interrupts, each instance has one interrupt and one interrupt handler. Each EGU has 16 TASKs and 16 EVENTs and each one of those can be triggered (TASKs) or read (EVENTS) or enabled for interrupt. Thus giving you 16*6 = 96 possible TASKS/EVENTs. You trigger the task, that triggers the corresponding event and if enabled for interrupt, raises the interrupt for that instance of the EGU. Each interrupt handles 16 raised events.
You can't make the EGU call the RTC Compare Interrupt, they're entirely different peripherals. You can use a PPI to make an EGU EVENT trigger an RTC Task, but each peripheral has its own interrupts and each EGU instance is one peripheral. Only the RTC can trigger its own events.
There are no EGUs >5. The EGU instances are EGU0, EGU1, EGU2, EGU3, EGU4 and EGU5, that's in Table 107 on page 467 of the manual. Since there are 6 instances, there are 6 interrupts, each instance has one interrupt and one interrupt handler. Each EGU has 16 TASKs and 16 EVENTs and each one of those can be triggered (TASKs) or read (EVENTS) or enabled for interrupt. Thus giving you 16*6 = 96 possible TASKS/EVENTs. You trigger the task, that triggers the corresponding event and if enabled for interrupt, raises the interrupt for that instance of the EGU. Each interrupt handles 16 raised events.
You can't make the EGU call the RTC Compare Interrupt, they're entirely different peripherals. You can use a PPI to make an EGU EVENT trigger an RTC Task, but each peripheral has its own interrupts and each EGU instance is one peripheral. Only the RTC can trigger its own events.