-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: Standby-I in sleep mode, other changes
Finalization of enhanced sleep mode: * 1. The radio is configured to use Dynamic Payloads and ACK payloads with Auto-Ack enabled * 2. The radio enters PTX mode and attaches an interrupt handler to the radio interrupt input pin (pin 2) * 3. The radio uses the Watchdog Timer to awake at set 1 second intervals in the example file * 4. Every interval, it sends out a 'sleep' payload and goes back to sleep. Incoming payloads will then be treated as ACK payloads, while the radio remains in STANDBY-I mode. * 5. If an interrupt is triggered, the radio wakes up * 6. When a message is sent to the sleeping node, the interrupt triggers a wake up, the MCU * grabs the payload, and switches back to receive mode in case more data is on its way. Compared to receive mode: * The radio will draw about 13.5 mA in normal receiver mode. * In STANDBY-I mode, the radio draws .000022mA, and is able to awake when payloads are received. Changed Radio initialization: - Uses new radio.maskIRQ function to disable TX and MAX_RT interrupts for sleep mode - Added code to discard sleep payloads - Added function for custom initialization of watchdog timer intervals
- Loading branch information
Showing
5 changed files
with
159 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.