[NUCLEO_H743ZI] changing CPU frequency does not work as expected
With the latest release 1.9.4 tested but also in 1.9.3 (just to be sure) I use machine.freq() to set the CPU frequency to a low frequency. Setting it to something other than 400MHz (machine.freq(200000000)) the REPL interface via the ST-LINK (real UART, no USB) will not work (garbled, not responsive).
Using REPL via USB will still work. However something like setting the frequency to 10_000_000 (10MHz) of the CPU will give no reply on the UART (expected), but the USB is dead also. After a while RED/BLUE led turn on (Fault) and the USB REPL was just able to say some last words "
can'can'can't change freq". After this only the RED led is on.
This could be considered a feature as the clock for USB is derived from another PLL and the clock for the used UART probably uses the same as for the CPU (need to check) and changes accordingly.
It makes it a bit hard to throttle the CPU speed as other peripherals will also suffer from the change.
Nucleo-H743ZI2 Micropython Hang up
I wanted to flash micropython onto a Nucleo-H743ZI2 development board and micropython seems to reset the controller after startup.
Problem description:
I flashed the STM32H743 controller with the release built (v1.21.0 (2023-10-05) [.hex])
The firmware download itself seems to work, because I get the typical led sequencing when selecting safe boot modes of micropython (https://docs.micropython.org/en/latest/pyboard/tutorial/reset.html). This startup part is working so far. Also when I select factory reset to restore the file system that seems to work, indicated by the led behaviour.
After that the problems begin. The yellow LED glows up lightly. And I get no REPL interface. Neither on the STLink USB port (that is routed to the UART of the main controller) nor get I even a virtual com port on the User USB port, that is connected directly to the main controller. I also get no flash drive on my pc.
Another indication, that micropython resets the main controller after startup is, that when I press the USR button, it immediately enters those boot sequence led state. Without requiring me pressing Reset (See video).
I checked the yellow LED with an oscilloscope and it turns on for a short duration and is off most of the time. The frequency is about 300Hz. As far as I know, the LED should stay off when micropython is running and no python code activates it.
Things I already tried, that all had the same results:
- Using two different Nucleo-H743ZI2 boards to exclude a hardware failure
- Trying different versions of release firmwares (https://micropython.org/download/NUCLEO_H743ZI2/)
- Trying release firmware of the older NUCLEO_H743ZI board
- Cloning the actual micropython repository and compile my own firmware binaries
- Flash controller with dfu-programming with dfu-util (on User USB port)
- Flash controller with hex-file programming with STM32Cube Programmer (on STLink USB port)
- Using a benchtop power supply to exclude a problem with power supply
- Using a different PC all together
My ideas what could be wrong:
- Watchdog resets the controller
https://github.com/micropython/micropython/assets/35213758/452a96e5-a0f8-4972-9f36-bc58de680550