Skip to content

Commit 73ed1ba

Browse files
pabigotnashif
authored andcommitted
boards: hifive1*: fix ticks per second
The HiFive1 boards power up using a 32 KiHz low frequency kernel, so have a cycle rate of 32768 Hz. The board definitions have not been revisited since the Zephyr default for ticks-per-second increased from 100 to 10000. The timer system on the board does not operate correctly at 4 cycles per tick, but does at 328 cycles per tick. To support functional timers while keeping system milliseconds in sync with clock time set ticks-per-second to 128. Signed-off-by: Peter A. Bigot <[email protected]>
1 parent ceb2303 commit 73ed1ba

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

boards/riscv/hifive1/Kconfig.defconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ if BOARD_HIFIVE1
55
config BOARD
66
default "hifive1"
77

8+
config SYS_CLOCK_TICKS_PER_SEC
9+
default 128
10+
811
if PWM
912

1013
config PWM_SIFIVE

boards/riscv/hifive1_revb/Kconfig.defconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ config FLASH_BASE_ADDRESS
1515
config FLASH_LOAD_OFFSET
1616
default 0x0
1717

18+
config SYS_CLOCK_TICKS_PER_SEC
19+
default 128
20+
1821
if PWM
1922
config PWM_SIFIVE
2023
default y

0 commit comments

Comments
 (0)