Skip to content
Commit 93fa8f84 authored by Carlo Caione's avatar Carlo Caione Committed by Anas Nashif
Browse files

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: default avatarCarlo Caione <ccaione@baylibre.com>
Suggested-by: default avatarAndrzej Głąbek <andrzej.glabek@nordicsemi.no>
parent 2d4874dd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment