TMPM4KxA Group Peripheral Driver User Manual  V1.0.4.0
Functions
T32A Exported Functions

Functions

TXZ_Result t32a_mode_init (t32a_t *p_obj)
 Mode Initialize the T32A object. More...
 
TXZ_Result t32a_timer_init (t32a_t *p_obj, uint32_t type)
 Initialize the T32A object. More...
 
TXZ_Result t32a_deinit (t32a_t *p_obj, uint32_t type)
 Release the T32A object. More...
 
TXZ_Result t32a_timer_stopIT (t32a_t *p_obj, uint32_t type)
 Timer Stop in interrupt mode. More...
 
TXZ_Result t32a_timer_startIT (t32a_t *p_obj, uint32_t type)
 Timer Start in interrupt mode. More...
 
TXZ_Result t32a_SWcounter_start (t32a_t *p_obj, uint32_t type)
 Timer Start in interrupt mode. More...
 
TXZ_Result t32a_SWcounter_stop (t32a_t *p_obj, uint32_t type)
 Timer Stop in interrupt mode. More...
 
TXZ_Result t32a_reg_set (t32a_t *p_obj, uint32_t type, uint32_t num, uint32_t value)
 Timer Register Value Setting. More...
 
TXZ_Result t32a_tmr_read (t32a_t *p_obj, uint32_t type, uint32_t *p_val)
 Timer Register Value Read. More...
 
TXZ_Result t32a_get_status (t32a_t *p_obj, uint32_t *p_status, uint32_t type)
 Get status. More...
 
void t32a_timer_IRQHandler (t32a_t *p_obj)
 IRQ Handler for Timer interrupt. More...
 
void t32a_timer_cap0_IRQHandler (t32a_t *p_obj)
 IRQ Timer Capture0 Handler for Timer Capture0 interrupt. More...
 
void t32a_timer_cap1_IRQHandler (t32a_t *p_obj)
 IRQ Timer Capture1 Handler for Timer Capture1 interrupt. More...
 
TXZ_Result t32a_Calculator (uint32_t *p_value, uint32_t time, uint32_t prescaler, uint32_t prscl)
 Calculate timer value to set timer register. More...
 

Detailed Description

Function Documentation

◆ t32a_Calculator()

TXZ_Result t32a_Calculator ( uint32_t *  p_value,
uint32_t  time,
uint32_t  prescaler,
uint32_t  prscl 
)

Calculate timer value to set timer register.

Parameters
p_valuetime value store pointer.
timeThe require period which the uint is us.
prescalerSystem Clock Freq
prsclSelect the division for source clock T32A PRESCALER Control.
Return values
thevalue set to Tmrb timer register.

◆ t32a_deinit()

TXZ_Result t32a_deinit ( t32a_t p_obj,
uint32_t  type 
)

Release the T32A object.

Parameters
p_obj:T32A object.
type:T32A Timer Type. : Use t32_type_t
Return values
TXZ_SUCCESS:Success.
TXZ_ERROR:Failure.
Note
When p_obj is NULL, "Failure" is returned.
Attention
This function is not available in interrupt.

◆ t32a_get_status()

TXZ_Result t32a_get_status ( t32a_t p_obj,
uint32_t *  p_status,
uint32_t  type 
)

Get status.

Status bits.

Bit Bit Symbol Function
31-4 - -
3 INTUFA Under Flow Intterrupt. Use T32A_INTOFx_FLG_MASK.
2 INTOFA Over Flow Intterrupt. Use T32A_INTOFx_FLG_MASK.
1 INTx1 Match up TimerRegister x1 Intterrupt. Use T32A_INTx1_FLG_MASK.
0 INTx0 Match up TimerRegister x0 Intterrupt. Use T32A_INTx0_FLG_MASK.
Parameters
p_obj:T32A object.
p_status:Save area for status.
type:T32A Timer Type. : Use t32_type_t
Return values
TXZ_SUCCESS:Success.
TXZ_ERROR:Failure.
Note
-

◆ t32a_mode_init()

TXZ_Result t32a_mode_init ( t32a_t p_obj)

Mode Initialize the T32A object.

Parameters
p_obj:T32A object.
Return values
TXZ_SUCCESS:Success.
TXZ_ERROR:Failure.
Note
When p_obj is NULL, "Failure" is returned.
An initial value of default is set at the reset status value. If needed, please rewrite and use an initial value.
Attention
This function is not available in interrupt.

◆ t32a_reg_set()

TXZ_Result t32a_reg_set ( t32a_t p_obj,
uint32_t  type,
uint32_t  num,
uint32_t  value 
)

Timer Register Value Setting.

Parameters
p_obj:T32A object.
type:T32A Timer Type. : Use t32_type_t
num:T32A Register Number. : Use t32_regnum_t
value:Setting Value.
Return values
TXZ_SUCCESS:Success.
TXZ_ERROR:Failure.
Note
When p_obj is NULL, "Failure" is returned.
An initial value of default is set at the reset status value. If needed, please rewrite and use an initial value.
Attention
This function is not available in interrupt.

◆ t32a_SWcounter_start()

TXZ_Result t32a_SWcounter_start ( t32a_t p_obj,
uint32_t  type 
)

Timer Start in interrupt mode.

Parameters
p_obj:T32A object.
type:T32A Timer Type. : Use t32_type_t
Return values
TXZ_SUCCESS:Success.
TXZ_ERROR:Failure.
Note
When p_obj is NULL, "Failure" is returned.
An initial value of default is set at the reset status value. If needed, please rewrite and use an initial value.
Attention
This function is not available in interrupt.

◆ t32a_SWcounter_stop()

TXZ_Result t32a_SWcounter_stop ( t32a_t p_obj,
uint32_t  type 
)

Timer Stop in interrupt mode.

Parameters
p_obj:T32A object.
type:T32A Timer Type. : Use t32_type_t
Return values
TXZ_SUCCESS:Success.
TXZ_ERROR:Failure.
Note
When p_obj is NULL, "Failure" is returned.
An initial value of default is set at the reset status value. If needed, please rewrite and use an initial value.
Attention
This function is not available in interrupt.

◆ t32a_timer_cap0_IRQHandler()

void t32a_timer_cap0_IRQHandler ( t32a_t p_obj)

IRQ Timer Capture0 Handler for Timer Capture0 interrupt.

Parameters
p_obj:T32A object.
Return values
TXZ_SUCCESS:Success.
TXZ_ERROR:Failure.
Note
When p_obj is NULL, "Failure" is returned.
An initial value of default is set at the reset status value. If needed, please rewrite and use an initial value.
Attention
This function is not available in interrupt.

◆ t32a_timer_cap1_IRQHandler()

void t32a_timer_cap1_IRQHandler ( t32a_t p_obj)

IRQ Timer Capture1 Handler for Timer Capture1 interrupt.

Parameters
p_obj:T32A object.
Return values
TXZ_SUCCESS:Success.
TXZ_ERROR:Failure.
Note
When p_obj is NULL, "Failure" is returned.
An initial value of default is set at the reset status value. If needed, please rewrite and use an initial value.
Attention
This function is not available in interrupt.

◆ t32a_timer_init()

TXZ_Result t32a_timer_init ( t32a_t p_obj,
uint32_t  type 
)

Initialize the T32A object.

Parameters
p_obj:T32A object.
type:T32A Timer Type. : Use t32_type_t
Return values
TXZ_SUCCESS:Success.
TXZ_ERROR:Failure.
Note
When p_obj is NULL, "Failure" is returned.
An initial value of default is set at the reset status value. If needed, please rewrite and use an initial value.
Attention
This function is not available in interrupt.

◆ t32a_timer_IRQHandler()

void t32a_timer_IRQHandler ( t32a_t p_obj)

IRQ Handler for Timer interrupt.

Parameters
p_obj:T32A object.
Return values
TXZ_SUCCESS:Success.
TXZ_ERROR:Failure.
Note
When p_obj is NULL, "Failure" is returned.
An initial value of default is set at the reset status value. If needed, please rewrite and use an initial value.
Attention
This function is not available in interrupt.

◆ t32a_timer_startIT()

TXZ_Result t32a_timer_startIT ( t32a_t p_obj,
uint32_t  type 
)

Timer Start in interrupt mode.

Parameters
p_obj:T32A object.
type:T32A Timer Type. : Use t32_type_t
Return values
TXZ_SUCCESS:Success.
TXZ_ERROR:Failure.
Note
When p_obj is NULL, "Failure" is returned.
An initial value of default is set at the reset status value. If needed, please rewrite and use an initial value.
Attention
This function is not available in interrupt.

◆ t32a_timer_stopIT()

TXZ_Result t32a_timer_stopIT ( t32a_t p_obj,
uint32_t  type 
)

Timer Stop in interrupt mode.

Parameters
p_obj:T32A object.
type:T32A Timer Type. : Use t32_type_t
Return values
TXZ_SUCCESS:Success.
TXZ_ERROR:Failure.
Note
When p_obj is NULL, "Failure" is returned.
An initial value of default is set at the reset status value. If needed, please rewrite and use an initial value.
Attention
This function is not available in interrupt.

◆ t32a_tmr_read()

TXZ_Result t32a_tmr_read ( t32a_t p_obj,
uint32_t  type,
uint32_t *  p_val 
)

Timer Register Value Read.

Parameters
p_obj:T32A object.
type:T32A Timer Type. : Use t32_type_t
p_val:Save area for register value.
Return values
TXZ_SUCCESS:Success.
TXZ_ERROR:Failure.
Note
When p_obj is NULL, "Failure" is returned.
An initial value of default is set at the reset status value. If needed, please rewrite and use an initial value.
Attention
This function is not available in interrupt.