Go to the documentation of this file.
1 /*
2  * Copyright (C) 2014 Loci Controls Inc.
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
20 #ifndef CC2538_GPTIMER_H
21 #define CC2538_GPTIMER_H
23 #include <stdint.h>
25 #include "cc2538.h"
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
31 #define GPTIMER_NUMOF 4
34 enum {
38 };
40 enum {
44 };
49 typedef struct {
55  union {
57  struct {
70  } TAMRbits;
71  } cc2538_gptimer_tamr;
76  union {
78  struct {
91  } TBMRbits;
92  } cc2538_gptimer_tbmr;
97  union {
99  struct {
114  } CTLbits;
115  } cc2538_gptimer_ctl;
118  cc2538_reg_t RESERVED2;
123  union {
125  struct {
129  cc2538_reg_t RESERVED1 : 1;
131  cc2538_reg_t RESERVED2 : 3;
136  cc2538_reg_t RESERVED3 : 20;
137  } IMRbits;
138  } cc2538_gptimer_imr;
155  cc2538_reg_t RESERVED3;
160  cc2538_reg_t RESERVED[981];
162  cc2538_reg_t RESERVED4[15];
168 #define GPTIMER_BASE (0x40030000)
170 #define GPTIMER0 ( (cc2538_gptimer_t*)0x40030000 )
171 #define GPTIMER1 ( (cc2538_gptimer_t*)0x40031000 )
172 #define GPTIMER2 ( (cc2538_gptimer_t*)0x40032000 )
173 #define GPTIMER3 ( (cc2538_gptimer_t*)0x40033000 )
175 void isr_timer0_chan0(void);
176 void isr_timer0_chan1(void);
177 void isr_timer1_chan0(void);
178 void isr_timer1_chan1(void);
179 void isr_timer2_chan0(void);
180 void isr_timer2_chan1(void);
181 void isr_timer3_chan0(void);
182 void isr_timer3_chan1(void);
184 #ifdef __cplusplus
185 } /* end extern "C" */
186 #endif
188 #endif /* CC2538_GPTIMER_H */
190 /* @} */
cc2538_reg_t TAPLO
Legacy PWM operation.
GPTIMER component registers.
cc2538_reg_t CBMIM
GPTM Timer B capture match interrupt mask.
cc2538_reg_t TASNAPS
GPTM Timer A snap shot mode.
cc2538_reg_t TAPS
GPTIMER Timer A Prescale Snapshot.
cc2538_reg_t TAWOT
GPTM Timer A wait-on-trigger.
cc2538_reg_t TBPV
GPTIMER Timer B Prescale Value.
cc2538_reg_t TBTOIM
GPTM Timer B time-out interrupt mask.
cc2538_reg_t TAEVENT
GPTM Timer A event mode.
GPTIMER capture mode.
cc2538_reg_t TBPWMIE
GPTM Timer B PWM interrupt enable.
cc2538_reg_t TBPLO
Legacy PWM operation.
cc2538_reg_t TAPWML
GPTM Timer A PWM output level.
cc2538_reg_t TBEN
GPTM Timer B enable.
cc2538_reg_t TBSTALL
GPTM Timer B stall enable.
cc2538_reg_t RESERVED1
Reserved bits.
cc2538_reg_t TBOTE
GPTM Timer B PWM output trigger enable.
cc2538_reg_t TBMIM
GPTM Timer B match interrupt mask.
cc2538_reg_t TASTALL
GPTM Timer A stall enable.
cc2538_reg_t RESERVED3
Reserved bits.
cc2538_reg_t TAMRSU
Timer A match register update mode.
cc2538_reg_t TBILD
GPTM Timer B interval load write.
cc2538_reg_t TAV
GPTIMER Timer A Value.
cc2538_reg_t TACMR
GPTM Timer A capture mode.
cc2538_reg_t TBMR2
GPTM Timer B mode.
cc2538_reg_t TAMIE
GPTM Timer A match interrupt enable.
cc2538_reg_t TBSNAPS
GPTM Timer B snap shot mode.
cc2538_reg_t RESERVED6
Reserved bits.
cc2538_reg_t CBEIM
GPTM Timer B capture event interrupt mask.
cc2538_reg_t TBMIE
GPTM Timer B match interrupt enable.
cc2538_reg_t TAILR
GPTIMER Timer A Interval Load.
cc2538_reg_t TBCMR
GPTM Timer B capture mode.
cc2538_reg_t TBR
cc2538_reg_t TACDIR
GPTM Timer A count direction.
CC2538 MCU interrupt and register definitions.
cc2538_reg_t TBMRSU
Timer B match register update mode.
cc2538_reg_t IMR
GPTIMER Interrupt Mask.
cc2538_reg_t PP
GPTIMER Peripheral Properties.
32-bit real-time clock
cc2538_reg_t TAAMS
GPTM Timer A alternate mode.
cc2538_reg_t TAPV
GPTIMER Timer A Prescale Value.
cc2538_reg_t TAMR
GPTIMER Timer A mode.
cc2538_reg_t TBCDIR
GPTM Timer B count direction.
cc2538_reg_t RESERVED4
Reserved bits.
cc2538_reg_t TBV
GPTIMER Timer B Value.
cc2538_reg_t TAEN
GPTM Timer A enable.
cc2538_reg_t TAMATCHR
GPTIMER Timer A Match.
cc2538_reg_t CFG
GPTIMER Configuration.
cc2538_reg_t CAMIM
GPTM Timer A capture match interrupt mask.
cc2538_reg_t TBMATCHR
GPTIMER Timer B Match.
cc2538_reg_t TBEVENT
GPTM Timer B event mode.
cc2538_reg_t ICR
GPTIMER Interrupt Clear.
cc2538_reg_t TAOTE
GPTM Timer A PWM output trigger enable.
cc2538_reg_t TAILD
GPTM Timer A interval load write.
16-bit timer configuration
32-bit timer configuration
cc2538_reg_t TBPMR
GPTIMER Timer B Prescale Match Register.
cc2538_reg_t MIS
GPTIMER Masked Interrupt Status.
cc2538_reg_t TBWOT
GPTM Timer B wait-on-trigger.
cc2538_reg_t TAPR
GPTIMER Timer A Prescale Register.
cc2538_reg_t TAPWMIE
GPTM Timer A PWM interrupt enable.
cc2538_reg_t RESERVED2
Reserved bits.
cc2538_reg_t RESERVED5
Reserved bits.
cc2538_reg_t TAR
cc2538_reg_t TBAMS
GPTM Timer B alternate mode.
cc2538_reg_t TAMIM
GPTM Timer A match interrupt mask.
cc2538_reg_t RIS
GPTIMER Raw Interrupt Status.
cc2538_reg_t TATOIM
GPTM Timer A time-out interrupt mask.
cc2538_reg_t CTL
GPTIMER Control.
GPTIMER one-shot mode.
cc2538_reg_t TBPR
GPTIMER Timer B Prescale Register.
cc2538_reg_t TAMR2
GPTM Timer A mode.
volatile uint32_t cc2538_reg_t
Least-significant 32 bits of the IEEE address.
Definition: cc2538.h:124
cc2538_reg_t TAPMR
GPTIMER Timer A Prescale Match Register.
GPTIMER periodic mode.
cc2538_reg_t TBMR
GPTIMER Timer B mode.
cc2538_reg_t SYNC
GPTIMER Synchronize.
cc2538_reg_t TBILR
GPTIMER Timer B Interval Load.
cc2538_reg_t TBPWML
GPTM Timer B PWM output level.
cc2538_reg_t TBPS
GPTIMER Timer B Prescale Snapshot.
cc2538_reg_t CAEIM
GPTM Timer A capture event interrupt mask.