Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
src/cyw43: Improve power-save constants so their names match behaviour.
Doing some testing with various power saving modes gives the following: - CYW43_NO_POWERSAVE_MODE costs about 36mA in idle STA mode while connected to an AP (the cyw43xx stays on during idle). - CYW43_PM1_POWERSAVE_MODE and CYW43_PM2_POWERSAVE_MODE cost about 2mA in idle STA mode while connected to an AP. For all three of the pre-defined constants `CYW43_DEFAULT_PM`, `CYW43_AGGRESSIVE_PM` and `CYW43_PERFORMANCE_PM`, doing a fast `ping -i 0.1 <ip>` to the cyw43, there's pretty much no difference (they all have low latency). That's because they all use `CYW43_PM2_POWERSAVE_MODE` and the fast ping is supplying constant traffic over the air and keeping the cyw43 awake. Doing a standard 1-second interval ping its possible to see the difference between these three pre-defined constants: `CYW43_AGGRESSIVE_PM` still has low latency, but the other two have very varied ping latency, up to about 200ms (because the cyw43 has gone to sleep and takes time to wake up). So the names of these three pre-defined constants don't match their behaviour very well, and they aren't very different in their behaviour. This is fixed in this commit by adjusting the power-save settings so the names of the constants match their behaviour. Also a new `CYW43_NONE_PM` has been added. Note that `CYW43_DEFAULT_PM` still has exactly the same behaviour as it did prior to this commit. Fixes issue #122. Signed-off-by: Damien George <dpgeorge@georgerobotics.com.au>
- Loading branch information