brazos-trapezoidal
Macros
TimerInterrupt_prm.h File Reference

Header file for TimerInterrupt_prm.h.c. More...

#include "includes.h"
Include dependency graph for TimerInterrupt_prm.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define SYSTICK_PER_CNT   10000
 
#define INTERRUPT_METHOD   SysTickCallBack
 
  • Defines the method that will be called upon a timer interrupt,
More...
 
#define TIM2_CLOCK_DIV   TIM_CFG_CLK_DIV_DIV8
 
  • Defines the SYSTEM clock origin and division,
More...
 
#define TIM2_PER   625
 
  • Timer Interrupt period,
More...
 

Detailed Description

Header file for TimerInterrupt_prm.h.c.

Definition in file TimerInterrupt_prm.h.

Macro Definition Documentation

◆ INTERRUPT_METHOD

#define INTERRUPT_METHOD   SysTickCallBack

  • Defines the method that will be called upon a timer interrupt,

  • Parameters
    -INTERRUPT_METHOD
    Note
    -

Definition at line 31 of file TimerInterrupt_prm.h.

◆ SYSTICK_PER_CNT

#define SYSTICK_PER_CNT   10000

-----------------------------— Theta Power Systems - CONFIDENTIAL --------------------------------------—

Definition at line 20 of file TimerInterrupt_prm.h.

◆ TIM2_CLOCK_DIV

#define TIM2_CLOCK_DIV   TIM_CFG_CLK_DIV_DIV8

  • Defines the SYSTEM clock origin and division,

  • Parameters
    -TIM2_CLOCK_DIV:
    • TIM_CFG_CLK_DIV_MUL2 !!If HSOSC 40MHz selected, this does not work
    • TIM_CFG_CLK_DIV_MUL1
    • TIM_CFG_CLK_DIV_DIV2
    • TIM_CFG_CLK_DIV_DIV4
    • TIM_CFG_CLK_DIV_DIV8
    • TIM_CFG_CLK_DIV_DIV16
    • TIM_CFG_CLK_DIV_DIV32
    • TIM_CFG_CLK_DIV_DIV64
    Note
    -

Definition at line 50 of file TimerInterrupt_prm.h.

◆ TIM2_PER

#define TIM2_PER   625

  • Timer Interrupt period,

  • Overflow interrupt threshold, used to set the interrupt period. Since the timer is configured as TIM_CFG_MOD_DIV_TRI, there will be 2 counts (up and down) before an interrupt.
    Parameters
    -TIM2_PER
    Note
    - Ex. Sysclock Clock = 40Mz, TIM2_CLOCK_DIV = 8, TIM2_PER = 625 (1/(40MHz/8))*625*2 = 250us

Definition at line 63 of file TimerInterrupt_prm.h.