Closed sslupsky closed 3 years ago
I previously submitted PR https://github.com/arduino/ArduinoCore-samd/pull/427 to ArduinoCore-samd to address this wake from sleep sources issue. This solution avoids making platform dependent changes to Wire, SPI, Uart and SERCOM as suggested by @sandeepmistry . The previous PR has been closed.
@sslupsky very less power consumption is saved
:)
This PR adds three functions to allow for wake up sources during sleep for Wire, SPI and UART.
It is necessary to make the ArduinoLowPowerClass a friend of TwoWire, SERCOM and Uart and SPIClass classes in the ArduinoCore-samd. I will submit a separate PR for this.
The USB standby/restore that is part of the sleep() function has been removed because it causes significant power consumption during sleep and a 10ms additional delay going to sleep.