You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains hidden or 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
libraries/WiFi/examples/PortentaWiFiFirmwareUpdater RAM for global variables
%
libraries/PDM/examples/PDMSerialPlotter flash
%
libraries/PDM/examples/PDMSerialPlotter RAM for global variables
%
arduino:mbed:envie_m4
64
0.01
24
0.01
64
0.01
32
0.01
64
0.01
24
0.01
64
0.01
24
0.01
64
0.01
32
0.01
arduino:mbed:envie_m7
128
0.02
32
0.01
128
0.02
32
0.01
64
0.01
32
0.01
64
0.01
32
0.01
64
0.01
32
0.01
128
0.02
32
0.01
128
0.02
32
0.01
64
0.01
32
0.01
64
0.01
32
0.01
128
0.02
32
0.01
128
0.02
32
0.01
arduino:mbed:nano33ble
64
0.01
32
0.01
128
0.01
32
0.01
128
0.01
32
0.01
Click for full report CSV
Board,libraries/Scheduler/examples/MultipleBlinks<br>flash,%,libraries/Scheduler/examples/MultipleBlinks<br>RAM for global variables,%,libraries/doom/examples/Doom<br>flash,%,libraries/doom/examples/Doom<br>RAM for global variables,%,libraries/KernelDebug/examples/KernelDebug<br>flash,%,libraries/KernelDebug/examples/KernelDebug<br>RAM for global variables,%,libraries/Portenta_SDCARD/examples/TestSDCARD<br>flash,%,libraries/Portenta_SDCARD/examples/TestSDCARD<br>RAM for global variables,%,libraries/Portenta_Video/examples/Envie_video_coreboot<br>flash,%,libraries/Portenta_Video/examples/Envie_video_coreboot<br>RAM for global variables,%,libraries/Portenta_System/examples/PortentaH7_getBootloaderInfo<br>flash,%,libraries/Portenta_System/examples/PortentaH7_getBootloaderInfo<br>RAM for global variables,%,libraries/Portenta_System/examples/PortentaH7_updateBootloader<br>flash,%,libraries/Portenta_System/examples/PortentaH7_updateBootloader<br>RAM for global variables,%,libraries/ThreadDebug/examples/ThreadDebug<br>flash,%,libraries/ThreadDebug/examples/ThreadDebug<br>RAM for global variables,%,libraries/USBHOST/examples/KeyboardController<br>flash,%,libraries/USBHOST/examples/KeyboardController<br>RAM for global variables,%,libraries/USBHOST/examples/Shell<br>flash,%,libraries/USBHOST/examples/Shell<br>RAM for global variables,%,libraries/WiFi/examples/PortentaWiFiFirmwareUpdater<br>flash,%,libraries/WiFi/examples/PortentaWiFiFirmwareUpdater<br>RAM for global variables,%,libraries/PDM/examples/PDMSerialPlotter<br>flash,%,libraries/PDM/examples/PDMSerialPlotter<br>RAM for global variables,%
arduino:mbed:envie_m4,64,0.01,24,0.01,64,0.01,32,0.01,64,0.01,24,0.01,64,0.01,24,0.01,64,0.01,32,0.01
arduino:mbed:envie_m7,128,0.02,32,0.01,128,0.02,32,0.01,64,0.01,32,0.01,64,0.01,32,0.01,64,0.01,32,0.01,128,0.02,32,0.01,128,0.02,32,0.01,64,0.01,32,0.01,64,0.01,32,0.01,128,0.02,32,0.01,128,0.02,32,0.01
arduino:mbed:nano33ble,64,0.01,32,0.01,,,,,,,,,,,,,,,,,,,,,,,,,128,0.01,32,0.01,,,,,,,,,,,,,128,0.01,32,0.01
What do you think about going high res for micros() and low power for millis() instead? It would turn into a much simpler patch with virtually no drawback ( micros() would stop counting during sleep but we can safely add an API to forcefully avoid sleeping when you need precise timing, wrapping sleep_manager_lock_deep_sleep() in something a bit more arduinish 🙂 )
@facchinm Legit 😄 . I changed it. Is there a signification penalty in using two timers concurrently?
Am I right in the assumption that some devices may set DEVICE_LPTICKER=0 as they don't support a LP ticker? I added a fallback for that case.
I'd probably wait with adding a function to avoid sleeping until we have a use case. I currently can't think of one where you need micro seconds resolution during sleep.
sebromero
changed the title
Make low power timer opt-in
Allow for higher resolution with micros()
Mar 9, 2021
libraries/WiFi/examples/PortentaWiFiFirmwareUpdater RAM for global variables
%
libraries/PDM/examples/PDMSerialPlotter flash
%
libraries/PDM/examples/PDMSerialPlotter RAM for global variables
%
arduino:mbed:envie_m4
64
0.01
24
0.01
64
0.01
24
0.01
128
0.01
24
0.01
64
0.01
24
0.01
64
0.01
24
0.01
arduino:mbed:envie_m7
64
0.01
24
0.0
64
0.01
24
0.0
64
0.01
24
0.0
64
0.01
24
0.0
64
0.01
24
0.0
128
0.02
24
0.0
128
0.02
24
0.0
64
0.01
24
0.0
64
0.01
24
0.0
128
0.02
24
0.0
128
0.02
24
0.0
arduino:mbed:nano33ble
64
0.01
24
0.01
128
0.01
24
0.01
128
0.01
24
0.01
Click for full report CSV
Board,libraries/Scheduler/examples/MultipleBlinks<br>flash,%,libraries/Scheduler/examples/MultipleBlinks<br>RAM for global variables,%,libraries/doom/examples/Doom<br>flash,%,libraries/doom/examples/Doom<br>RAM for global variables,%,libraries/KernelDebug/examples/KernelDebug<br>flash,%,libraries/KernelDebug/examples/KernelDebug<br>RAM for global variables,%,libraries/Portenta_SDCARD/examples/TestSDCARD<br>flash,%,libraries/Portenta_SDCARD/examples/TestSDCARD<br>RAM for global variables,%,libraries/Portenta_Video/examples/Envie_video_coreboot<br>flash,%,libraries/Portenta_Video/examples/Envie_video_coreboot<br>RAM for global variables,%,libraries/Portenta_System/examples/PortentaH7_getBootloaderInfo<br>flash,%,libraries/Portenta_System/examples/PortentaH7_getBootloaderInfo<br>RAM for global variables,%,libraries/Portenta_System/examples/PortentaH7_updateBootloader<br>flash,%,libraries/Portenta_System/examples/PortentaH7_updateBootloader<br>RAM for global variables,%,libraries/ThreadDebug/examples/ThreadDebug<br>flash,%,libraries/ThreadDebug/examples/ThreadDebug<br>RAM for global variables,%,libraries/USBHOST/examples/KeyboardController<br>flash,%,libraries/USBHOST/examples/KeyboardController<br>RAM for global variables,%,libraries/USBHOST/examples/Shell<br>flash,%,libraries/USBHOST/examples/Shell<br>RAM for global variables,%,libraries/WiFi/examples/PortentaWiFiFirmwareUpdater<br>flash,%,libraries/WiFi/examples/PortentaWiFiFirmwareUpdater<br>RAM for global variables,%,libraries/PDM/examples/PDMSerialPlotter<br>flash,%,libraries/PDM/examples/PDMSerialPlotter<br>RAM for global variables,%
arduino:mbed:envie_m4,64,0.01,24,0.01,64,0.01,24,0.01,128,0.01,24,0.01,64,0.01,24,0.01,64,0.01,24,0.01
arduino:mbed:envie_m7,64,0.01,24,0.0,64,0.01,24,0.0,64,0.01,24,0.0,64,0.01,24,0.0,64,0.01,24,0.0,128,0.02,24,0.0,128,0.02,24,0.0,64,0.01,24,0.0,64,0.01,24,0.0,128,0.02,24,0.0,128,0.02,24,0.0
arduino:mbed:nano33ble,64,0.01,24,0.01,,,,,,,,,,,,,,,,,,,,,,,,,128,0.01,24,0.01,,,,,,,,,,,,,128,0.01,24,0.01
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Makes micros() use a higher resolution timer while keep using a low power timer for millis().
Test sketch: