Dataflow Runtime API  3.0.3.0
Enumerations | Functions
SystemPeripherals_DMTimer1ms.h File Reference
#include <Imt.Base.Core.Platform/Platform.h>

Enumerations

enum  DMTimer1msClockSource {
  DMTimer1msClockSource_SystemClock = 0 , DMTimer1msClockSource_PeripheralPLL32KHz = 1 , DMTimer1msClockSource_ExternalInput = 2 , DMTimer1msClockSource_OnChip32KHz = 3 ,
  DMTimer1msClockSource_External32KHz = 4
}
 DMTimer 1ms peripheral module. More...
 

Functions

bool DMTimer1ms_Configure (const DMTimer1msClockSource clockSource)
 Configure the 1ms timer in auto reload mode (generates an interrupt each millisecond). More...
 
void DMTimer1ms_Reload (void)
 Reload the timer value (just required once) More...
 
void DMTimer1ms_AcknowledgeInterrupt (void)
 Acknowledge and clear the interrupt flag. More...
 
uint32_t DMTimer1ms_GetTimerOverflowCount (void)
 Get the content of the TOCR register. More...
 
void DMTimer1ms_ClearTimerOverflowCount (void)
 Clear the content of the TOC register (=0) More...
 

Enumeration Type Documentation

◆ DMTimer1msClockSource

DMTimer 1ms peripheral module.

DMTIMER1 is specialized for accurate 1mS OS Ticks. The DMTimer1 1ms timer functional clock can be selected from one of five sources:

  • The system clock (CLK_M_OSC)
  • The PER PLL generated 32.768 KHz clock (CLK_32KHZ)
  • The TCLKIN external timer input clock
  • The on-chip ~32.768 KHz oscillator (CLK_RC32K)
  • The external 32.768 KHz oscillator/clock (CLK_32K_RTC)
Enumerator
DMTimer1msClockSource_SystemClock 
DMTimer1msClockSource_PeripheralPLL32KHz 
DMTimer1msClockSource_ExternalInput 
DMTimer1msClockSource_OnChip32KHz 
DMTimer1msClockSource_External32KHz 

Function Documentation

◆ DMTimer1ms_AcknowledgeInterrupt()

void DMTimer1ms_AcknowledgeInterrupt ( void  )

Acknowledge and clear the interrupt flag.

◆ DMTimer1ms_ClearTimerOverflowCount()

void DMTimer1ms_ClearTimerOverflowCount ( void  )

Clear the content of the TOC register (=0)

◆ DMTimer1ms_Configure()

bool DMTimer1ms_Configure ( const DMTimer1msClockSource  clockSource)

Configure the 1ms timer in auto reload mode (generates an interrupt each millisecond).

Note
Timer has to be started once with DMTimer1ms_Reload after the interrupts are enabled
Parameters
clockSourceconfigure DMTimer for given clock source
Returns
true if configure is successfully, otherwise false

◆ DMTimer1ms_GetTimerOverflowCount()

uint32_t DMTimer1ms_GetTimerOverflowCount ( void  )

Get the content of the TOCR register.

Returns
the timer overflow counter

◆ DMTimer1ms_Reload()

void DMTimer1ms_Reload ( void  )

Reload the timer value (just required once)