systick

package
v0.0.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 28, 2024 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Overview

Package systick allows to use ARMv7-M SysTick timer as ticking system timer.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Setup

func Setup(periodns int64)

Setup setups the SysTick timer as a system timer. It is used in ticking mode running the thread scheduler every periodns nanoseconds. Considr using a tickless timer (eg. RTC based) if available.

The sheduler uses WFE instruction to suspend code execution until an event occurs. In case of i.MX RT the default response for WFE/WFI instruction is to enter the Wait mode. In this mode the whole Cortex-M7 core including NVIC is frozen. The system can be awakened by the GPC Interrupt Controller but the SYSTICK interrupt is an internal signal of the CM7 core so it isn't routed to the GPC.

All this means that SysTick timer is almost useless as a system timer but can be used for testing or educational purposes. In order for it to be usable, Setup prevents entering Wait mode after WFE/WFI by setting CLPCR.LPM=LPM_RUN.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL