Trident IoT SDK
 
Loading...
Searching...
No Matches
T32CM11_timers.h File Reference

This is the chip specific include file for T32CM11 Timers Driver note that there is a common include file for this HAL module that contains the APIs (such as the init function) that should be used by the application. More...

#include "tr_hal_platform.h"
+ Include dependency graph for T32CM11_timers.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  TIMER_REGISTERS_T
 
struct  tr_hal_timer_settings_t
 

Macros

#define TR_HAL_NUM_TIMERS   5
 
#define CHIP_MEMORY_MAP_TIMER0_BASE   (0xA0700000UL)
 chip register addresses section 3.1 of the data sheet explains the Memory map. this gives the base address for how to write the chip registers the chip registers are how the software interacts configures GPIOs, reads GPIOs, and gets/sets information on the chip We create a struct below that addresses the individual registers. This makes it so we can use this base address and a struct field to read or write a chip register
 
#define CHIP_MEMORY_MAP_TIMER1_BASE   (0xA0800000UL)
 
#define CHIP_MEMORY_MAP_TIMER2_BASE   (0xA0F00000UL)
 
#define CHIP_MEMORY_MAP_TIMER3_BASE   (0xA0F40000UL)
 
#define CHIP_MEMORY_MAP_TIMER4_BASE   (0xA0F80000UL)
 
#define CR_PRESCALER_MASK   0x1C
 
#define CR_INT_ENABLE_BIT   0x20
 
#define CR_MODE_BIT   0x40
 
#define CR_TIMER_RUNNING_BIT   0x80
 
#define CR_INT_STATUS_BIT   0x100
 
#define TIMER0_REGISTERS   ((TIMER_REGISTERS_T *) CHIP_MEMORY_MAP_TIMER0_BASE)
 
#define TIMER1_REGISTERS   ((TIMER_REGISTERS_T *) CHIP_MEMORY_MAP_TIMER1_BASE)
 
#define TIMER2_REGISTERS   ((TIMER_REGISTERS_T *) CHIP_MEMORY_MAP_TIMER2_BASE)
 
#define TIMER3_REGISTERS   ((TIMER_REGISTERS_T *) CHIP_MEMORY_MAP_TIMER3_BASE)
 
#define TIMER4_REGISTERS   ((TIMER_REGISTERS_T *) CHIP_MEMORY_MAP_TIMER4_BASE)
 
#define DEFAULT_32MHZ_TIMER_CONFIG
 
#define DEFAULT_32KHZ_TIMER_CONFIG
 

Typedefs

typedef void(* tr_hal_timer_callback_t) (tr_hal_timer_id_t expired_timer_id)
 

Enumerations

enum  tr_hal_timer_id_t {
  TIMER_0_ID = 0 ,
  TIMER_1_ID = 1 ,
  TIMER_2_ID = 2 ,
  TIMER_3_ID = 3 ,
  TIMER_4_ID = 4
}
 
enum  tr_hal_timer_prescalar_t {
  TR_HAL_TIMER_PRESCALER_1 = (0 << 2) ,
  TR_HAL_TIMER_PRESCALER_16 = (1 << 2) ,
  TR_HAL_TIMER_PRESCALER_256 = (2 << 2) ,
  TR_HAL_TIMER_PRESCALER_2 = (3 << 2) ,
  TR_HAL_TIMER_PRESCALER_8 = (4 << 2) ,
  TR_HAL_TIMER_PRESCALER_32 = (5 << 2) ,
  TR_HAL_TIMER_PRESCALER_128 = (6 << 2) ,
  TR_HAL_TIMER_PRESCALER_1024 = (7 << 2) ,
  TR_HAL_TIMER_PRESCALER_MAX = (7 << 2)
}
 

Functions

TIMER_REGISTERS_Ttr_hal_timer_get_register_address (tr_hal_timer_id_t timer_id)
 

Detailed Description

This is the chip specific include file for T32CM11 Timers Driver note that there is a common include file for this HAL module that contains the APIs (such as the init function) that should be used by the application.


This chip supports 5 timers timers 0,1,2 run at 32 MHz timers 3,4 run at 32 KHz

SPDX-License-Identifier: LicenseRef-TridentMSLA SPDX-FileCopyrightText: 2025 Trident IoT, LLC https://www.tridentiot.com