mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-05 11:37:46 +00:00
ed9b2dbc03
The CLINT is implemented both on the fe310-g002 chip and in the sifive_e QEMU machine type. Therefore, use that peripheral for consistency. The only difference is the clock speed, which runs at 10MHz in QEMU for some reason instead of 32.768kHz as on the physical HiFive1 boards.
17 lines
191 B
Go
17 lines
191 B
Go
// +build fe310,!qemu
|
|
|
|
package runtime
|
|
|
|
import (
|
|
"device/riscv"
|
|
)
|
|
|
|
const tickMicros = 32768 // RTC clock runs at 32.768kHz
|
|
|
|
func abort() {
|
|
// lock up forever
|
|
for {
|
|
riscv.Asm("wfi")
|
|
}
|
|
}
|