1.主频64MHz
CPU主频1MHz时,一个systick=1/1MHz=1us
CPU主频64MHz时,一个systick=1/64MHz=0.015625us=15.625ns
2.主要文档
2.1 modules\nrfx\hal\nrf_systick.h
2.2modules\nrfx\drivers\src\nrfx_systick.c
2.3integration\nrfx\legacy\nrf_drv_systick.h
3.示例
#include <stdbool.h>
#include <stdint.h>
#include "nrf_drv_systick.h"
#include "boards.h"
/**
* @brief Function for application main entry.
*/
int main(void)
{
/* Configure LED-pins as outputs. */
bsp_board_init(BSP_INIT_LEDS);
/* Init systick driver */
nrf_drv_systick_init();
/* Toggle LEDs. */
while (true)
{
for (int i = 0; i < LEDS_NUMBER; i++)
{
bsp_board_led_invert(i);
nrf_drv_systick_delay_ms(1000);
}
}
}