Nick's blog

STM32F401 toggle speed experiment

void setup() {
       pinMode(PC13, OUTPUT);
}

void loop() {
       digitalWrite(PC13, !digitalRead(PC13));
}
Output rate = 421.86kHz

void setup() {
       pinMode(PC13, OUTPUT);
}

void loop() {
       HAL_GPIO_TogglePin(GPIOC, GPIO_PIN_13);
}
Output rate = 1.049MHz

84MHz STM32F401CCU6 WeAct Black Pill V1.2
(GPIO speed register controlling the slew rate at default)

CPU Power load testing

Copy and Paste In a terminal window:

while true; do continue; done

Use with a watt meter to see how energy efficient your CPU is at 100% load.
Ctrl c to quit.

Syndicate content