AN12094 indicates that peripherals besides GPIO/RTC/USB may be used as wakeup sources for low power modes. I am using as a basis for my application the code sample which uses FreeRTOS and supports wake from GPIO and GPT, to allow wake from Ethernet and and SDIO on Interrupt when in System Idle. Is this feasible, or is wakeup from Ethernet restricted to more standardised methods such as Magic Packet etc?
Hi @TomGibson,
To answer your question, the ENET's module built-in method of causing a wakeup event is only via a reception of a magic packet, as described on the WAKEUP bit field of the Interrupt Event Register (ENET_EIR).
That said, I believe I may not be completely understanding the context you talk about. If you are somehow syncing the GPIO or GPT with ENET events, then technically you could use the interruption events from those other modules to indirectly cause an ENET wakeup. But I may be misinterpreting your application.
BR,
Edwin.
Hi @EdwinHz
Thanks for getting back to me. What I would like to do is have the ENET peripheral IRQ cause the processor to exit System Idle, in the same fashion as the GPIO IRQ in the code sample. Maybe I'm reading too much into the document, but AN12085 Table 4 indicates that in System Idle "all the peripheral[s] can remain active" which I had interpreted as including Ethernet, and also interpreted as meaning that the relevant peripherals could still generate IRQ signals.
Ideally for my use case the same events that are processed by ENET_ReceiveIRQHandler in fsl_enet.c would cause the processor to resume from WFI(), if this is possible. I can see that this wouldn't work for lower power suspend modes because Table 4 indicates that all PLLs would be shut off for Low Power Idle/Suspend. However, my interpretation of the application note was that in System Idle any peripheral can be kept active and therefore available for IRQ, but I am not currently able to translate the example which uses GPIO IRQ to the ENET peripheral. Is my interpretation wrong?
Thanks!
Hi @TomGibson,
The ENET's IRQ does not have the capability of doing a wakeup on it's own. The ENET peripheral would have to be configured using the ENET_EIR register's WAKEUP bit to be able to exit the MCU from System Idle.
I believe what the Table 4 of the aforementioned AppNote is referring to is that usage of the rest of the peripherals is not restricted, as they can remain active rather than forcefully being shut down to save power. This, however, cannot be extrapolated to mean that any peripheral's IRQ will wakeup the MCU.
BR,
Edwin.
Hi @EdwinHz,
Thanks for confirming this is the case. I am able to work around this with GPIO for now. Is the capability of a particular peripheral to wake the MCU documented elsewhere, since the AppNote isn't explicit on this?
Thank you.
Tom