circuitpython/ports
Damien George 8031b7a25c stm32/powerctrl: Deselect PLLSAI as 48MHz src before turning off PLLSAI.
On the STM32F722 (at least, but STM32F767 is not affected) the CK48MSEL bit
must be deselected before PLLSAION is turned off, or else the 48MHz
peripherals (RNG, SDMMC, USB) may get stuck without a clock source.

In such "lock up" cases it seems that these peripherals are still being
clocked from the PLLSAI even though the CK48MSEL bit is turned off.  A hard
reset does not get them out of this stuck state.  Enabling the PLLSAI and
then disabling it does get them out.  A test case to see this is:

    import machine, pyb
    for i in range(100):
        machine.freq(122_000000)
        machine.freq(120_000000)
        print(i, [pyb.rng() for _ in range(4)])

On occasion the RNG will just return 0's, but will get fixed again on the
next loop (when PLLSAI is enabled by the change to a SYSCLK of 122MHz).

Fixes issue #4696.
2019-04-29 16:31:32 +10:00
..
bare-arm py/objdict: Make .fromkeys() method configurable. 2018-12-13 01:20:55 +11:00
cc3200 ports: Convert to use pyexec_file_if_exists() to execute boot/main.py. 2019-04-26 15:22:14 +10:00
esp32 ports: Convert to use pyexec_file_if_exists() to execute boot/main.py. 2019-04-26 15:22:14 +10:00
esp8266 ports: Convert to use pyexec_file_if_exists() to execute boot/main.py. 2019-04-26 15:22:14 +10:00
javascript javascript/library: Print data as raw bytes to stdout so unicode works. 2019-04-28 22:39:41 +10:00
minimal minimal/frozentest: Recompile now that mpy format and version changed. 2019-03-08 15:53:05 +11:00
nrf ports: Convert to use pyexec_file_if_exists() to execute boot/main.py. 2019-04-26 15:22:14 +10:00
pic16bit all: Change PYB message prefix to MPY. 2019-02-12 15:18:33 +11:00
qemu-arm qemu-arm: Use gchelper code to get registers for GC scanning. 2019-02-12 14:48:29 +11:00
stm32 stm32/powerctrl: Deselect PLLSAI as 48MHz src before turning off PLLSAI. 2019-04-29 16:31:32 +10:00
teensy ports: Convert to use pyexec_file_if_exists() to execute boot/main.py. 2019-04-26 15:22:14 +10:00
unix unix/mpthreadport: Use named semaphores on Mac OS X. 2019-03-27 10:50:01 +11:00
windows py: Allow registration of modules at their definition. 2019-03-08 22:46:43 +11:00
zephyr zephyr/CMakeLists.txt: Set AR to point to the Zephyr toolchain exe. 2019-04-11 12:24:05 +10:00