F29H85x-SDK  1.03.00.00
 
CPUTimer

Introduction

Functions

static bool CPUTimer_isBaseValid (uint32_t base)
 
static void CPUTimer_clearOverflowFlag (uint32_t base)
 
static void CPUTimer_disableInterrupt (uint32_t base)
 
static void CPUTimer_enableInterrupt (uint32_t base)
 
static void CPUTimer_reloadTimerCounter (uint32_t base)
 
static void CPUTimer_stopTimer (uint32_t base)
 
static void CPUTimer_resumeTimer (uint32_t base)
 
static void CPUTimer_startTimer (uint32_t base)
 
static void CPUTimer_setPeriod (uint32_t base, uint32_t periodCount)
 
static uint32_t CPUTimer_getTimerCount (uint32_t base)
 
static void CPUTimer_setPreScaler (uint32_t base, uint16_t prescaler)
 
static bool CPUTimer_getTimerOverflowStatus (uint32_t base)
 
void CPUTimer_setEmulationMode (uint32_t base, CPUTimer_EmulationMode mode)
 

Enumerations

enum  CPUTimer_EmulationMode { CPUTIMER_EMULATIONMODE_STOPAFTERNEXTDECREMENT = 0x0000 , CPUTIMER_EMULATIONMODE_STOPATZERO = 0x0400 , CPUTIMER_EMULATIONMODE_RUNFREE = 0x0800 }
 
enum  CPUTimer_Prescaler {
  CPUTIMER_CLOCK_PRESCALER_1 = 0 , CPUTIMER_CLOCK_PRESCALER_2 = 1 , CPUTIMER_CLOCK_PRESCALER_4 = 2 , CPUTIMER_CLOCK_PRESCALER_8 = 3 ,
  CPUTIMER_CLOCK_PRESCALER_16 = 4
}
 

Enumeration Type Documentation

◆ CPUTimer_EmulationMode

Values that can be passed to CPUTimer_setEmulationMode() as the mode parameter.

Enumerator
CPUTIMER_EMULATIONMODE_STOPAFTERNEXTDECREMENT 

Denotes that the timer will stop after the next decrement.

CPUTIMER_EMULATIONMODE_STOPATZERO 

Denotes that the timer will stop when it reaches zero.

CPUTIMER_EMULATIONMODE_RUNFREE 

Denotes that the timer will run free.

◆ CPUTimer_Prescaler

The following are values that can be passed to CPUTimer_selectClockSource() as the prescaler parameter.

Enumerator
CPUTIMER_CLOCK_PRESCALER_1 

Prescaler value of / 1.

CPUTIMER_CLOCK_PRESCALER_2 

Prescaler value of / 2.

CPUTIMER_CLOCK_PRESCALER_4 

Prescaler value of / 4.

CPUTIMER_CLOCK_PRESCALER_8 

Prescaler value of / 8.

CPUTIMER_CLOCK_PRESCALER_16 

Prescaler value of / 16.

Function Documentation

◆ CPUTimer_isBaseValid()

static bool CPUTimer_isBaseValid ( uint32_t base)
inlinestatic

◆ CPUTimer_clearOverflowFlag()

static void CPUTimer_clearOverflowFlag ( uint32_t base)
inlinestatic

Clears CPU timer overflow flag.

Parameters
baseis the base address of the timer module.

This function clears the CPU timer overflow flag.

Returns
None.

◆ CPUTimer_disableInterrupt()

static void CPUTimer_disableInterrupt ( uint32_t base)
inlinestatic

Disables CPU timer interrupt.

Parameters
baseis the base address of the timer module.

This function disables the CPU timer interrupt.

Returns
None.

◆ CPUTimer_enableInterrupt()

static void CPUTimer_enableInterrupt ( uint32_t base)
inlinestatic

Enables CPU timer interrupt.

Parameters
baseis the base address of the timer module.

This function enables the CPU timer interrupt.

Returns
None.

◆ CPUTimer_reloadTimerCounter()

static void CPUTimer_reloadTimerCounter ( uint32_t base)
inlinestatic

Reloads CPU timer counter.

Parameters
baseis the base address of the timer module.

This function reloads the CPU timer counter with the values contained in the CPU timer period register.

Returns
None.

◆ CPUTimer_stopTimer()

static void CPUTimer_stopTimer ( uint32_t base)
inlinestatic

Stops CPU timer.

Parameters
baseis the base address of the timer module.

This function stops the CPU timer.

Returns
None.

◆ CPUTimer_resumeTimer()

static void CPUTimer_resumeTimer ( uint32_t base)
inlinestatic

Starts(restarts) CPU timer.

Parameters
baseis the base address of the timer module.

This function starts (restarts) the CPU timer.

Note: This function doesn't reset the timer counter.

Returns
None.

◆ CPUTimer_startTimer()

static void CPUTimer_startTimer ( uint32_t base)
inlinestatic

Starts(restarts) CPU timer.

Parameters
baseis the base address of the timer module.

This function starts (restarts) the CPU timer.

Note: This function reloads the timer counter.

Returns
None.

◆ CPUTimer_setPeriod()

static void CPUTimer_setPeriod ( uint32_t base,
uint32_t periodCount )
inlinestatic

Sets CPU timer period.

Parameters
baseis the base address of the timer module.
periodCountis the CPU timer period count.

This function sets the CPU timer period count.

Returns
None.

◆ CPUTimer_getTimerCount()

static uint32_t CPUTimer_getTimerCount ( uint32_t base)
inlinestatic

Returns the current CPU timer counter value.

Parameters
baseis the base address of the timer module.

This function returns the current CPU timer counter value.

Returns
Returns the current CPU timer count value.

◆ CPUTimer_setPreScaler()

static void CPUTimer_setPreScaler ( uint32_t base,
uint16_t prescaler )
inlinestatic

Set CPU timer pre-scaler value.

Parameters
baseis the base address of the timer module.
prescaleris the CPU timer pre-scaler value.

This function sets the pre-scaler value for the CPU timer. For every value of (prescaler + 1), the CPU timer counter decrements by 1.

Returns
None.

◆ CPUTimer_getTimerOverflowStatus()

static bool CPUTimer_getTimerOverflowStatus ( uint32_t base)
inlinestatic

Return the CPU timer overflow status.

Parameters
baseis the base address of the timer module.

This function returns the CPU timer overflow status.

Returns
Returns true if the CPU timer has overflowed, false if not.

◆ CPUTimer_setEmulationMode()

void CPUTimer_setEmulationMode ( uint32_t base,
CPUTimer_EmulationMode mode )
extern

Sets Emulation mode for CPU timer.

Parameters
baseis the base address of the timer module.
modeis the emulation mode of the timer.

This function sets the behaviour of CPU timer during emulation. Valid values mode are: CPUTIMER_EMULATIONMODE_STOPAFTERNEXTDECREMENT, CPUTIMER_EMULATIONMODE_STOPATZERO and CPUTIMER_EMULATIONMODE_RUNFREE.

Returns
None.