qemu_cortex_m0: Fix timer pre-scaler
It's long forgotten what is the issue the comment in this FIXME is
referring to, but the clock is currently running at twice the frequency
on the qemu_cortex_m0.
This is easily provable comparing the k_msleep() delay to the wall
clock. For example:
while (1) {
k_msleep(1000);
printk("hello\n");
}
is printing "hello" at 2Hz instead of 1Hz when running with:
qemu-system-arm -cpu cortex-m0 -machine microbit -nographic -kernel
build/zephyr/zephyr.elf
Fix this by setting the correct pre-scaler value.
Signed-off-by:
Carlo Caione <ccaione@baylibre.com>
Suggested-by:
Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Loading
Please sign in to comment