APM:Libraries
Macros | Functions | Variables
systick.c File Reference
#include <systick.h>
#include <hal.h>
#include <timer.h>
#include "usart.h"
#include <string.h>
Include dependency graph for systick.c:

Go to the source code of this file.

Macros

#define MAX_SYSTICK_HANDLERS   4
 
#define NVIC_CCR   (*(volatile uint32_t *)0xE000ED14)
 

Functions

void systick_attach_callback (Handler callback)
 Attach a callback to be called from the SysTick exception handler. More...
 
void systick_detach_callback (Handler callback)
 
void systick_init (uint32_t reload_val)
 Initialize and enable SysTick. More...
 
void SysTick_Handler (void)
 
void __attribute__ ((noreturn))
 
void __go_next_task ()
 
void hal_try_kill_task_or_reboot (uint8_t num)
 
void hal_stop_multitask ()
 
void hal_go_next_task ()
 

Variables

volatile uint64_t systick_uptime_millis IN_CCM
 
static uint8_t num_handlers =0
 

Macro Definition Documentation

◆ MAX_SYSTICK_HANDLERS

#define MAX_SYSTICK_HANDLERS   4

Definition at line 19 of file systick.c.

Referenced by systick_attach_callback().

◆ NVIC_CCR

#define NVIC_CCR   (*(volatile uint32_t *)0xE000ED14)

Definition at line 135 of file systick.c.

Function Documentation

◆ __attribute__()

void __attribute__ ( (noreturn)  )

Definition at line 78 of file systick.c.

Here is the call graph for this function:

◆ __go_next_task()

void __go_next_task ( )

Referenced by __attribute__().

Here is the caller graph for this function:

◆ hal_go_next_task()

void hal_go_next_task ( )

Definition at line 1448 of file Scheduler.cpp.

Referenced by __attribute__().

Here is the caller graph for this function:

◆ hal_stop_multitask()

void hal_stop_multitask ( )

Definition at line 1449 of file Scheduler.cpp.

Referenced by __attribute__().

Here is the caller graph for this function:

◆ hal_try_kill_task_or_reboot()

void hal_try_kill_task_or_reboot ( uint8_t  num)

Definition at line 1447 of file Scheduler.cpp.

Referenced by __attribute__().

Here is the caller graph for this function:

◆ systick_attach_callback()

void systick_attach_callback ( Handler  callback)

Attach a callback to be called from the SysTick exception handler.

To detach a callback, call this function again with a null argument.

Definition at line 28 of file systick.c.

Referenced by systick_check_underflow().

Here is the caller graph for this function:

◆ systick_detach_callback()

void systick_detach_callback ( Handler  callback)

Definition at line 34 of file systick.c.

Referenced by systick_check_underflow().

Here is the caller graph for this function:

◆ SysTick_Handler()

void SysTick_Handler ( void  )

Definition at line 63 of file systick.c.

Referenced by systick_check_underflow().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ systick_init()

void systick_init ( uint32_t  reload_val)

Initialize and enable SysTick.

Clocks the system timer with the core clock, turns it on, and enables interrupts.

Parameters
reload_valAppropriate reload counter to tick every 1 ms.

Definition at line 50 of file systick.c.

Referenced by init().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ IN_CCM

Handler systick_handlers [MAX_SYSTICK_HANDLERS] IN_CCM

Definition at line 16 of file systick.c.

◆ num_handlers

uint8_t num_handlers =0
static

Definition at line 21 of file systick.c.

Referenced by systick_attach_callback(), systick_detach_callback(), and SysTick_Handler().