raspberrypi / pico-sdk

BSD 3-Clause "New" or "Revised" License
3.25k stars 838 forks source link

Bug 1668 - method to prevent SYS_CLK being re-init'ed, for example after it was left running in 'lightsleep' #1671

Closed mungewell closed 3 months ago

mungewell commented 3 months ago

During 'lightsleep' user may want to keep some clocks running (for example PIOs), but at present microPython calls 'clock-init()' causing the SYS_CLK to be reinitialised.

This patch allows microPython to provide the previously used 'sleep_en0 & sleep_en1' signifying which clocks stayed on. As most are dependant of SYS_CLK it can be inferred that this does NOT need to (/should NOT) be re-initilised.

mungewell commented 3 months ago

No..... not into master. :-O