PAN1080 Peripheral API
Functions
pan_clktrim.h File Reference

Panchip series clktrim driver header file. More...

Go to the source code of this file.

Functions

__STATIC_INLINE void TRIM_SetIdealCnt (TRIM_T *trim, uint32_t cnt)
 This function used to set a ideal count value,IDEA_CNT = CAL_CNT * (REF_CLK / CAL_CLK) -1. More...
 
__STATIC_INLINE uint32_t TRIM_GetIdealCnt (TRIM_T *trim)
 This function used to read a ideal count value,IDEA_CNT = CAL_CNT * (REF_CLK / CAL_CLK) -1. More...
 
__STATIC_INLINE uint32_t TRIM_GetRealCnt (TRIM_T *trim)
 This function used to get a real count value. More...
 
__STATIC_INLINE bool TRIM_IsIntStatusOccured (TRIM_T *trim, uint32_t msk)
 Adjust which clktrim interrupt occured. More...
 
__STATIC_INLINE void TRIM_ClearIntStatusMsk (TRIM_T *trim, uint32_t msk)
 Clear the specified interrupt. More...
 
__STATIC_INLINE void TRIM_EnableInt (TRIM_T *trim, FunctionalState NewState)
 This function used to enable interrupt. More...
 
__STATIC_INLINE void TRIM_SetRelationIncrease (TRIM_T *trim, FunctionalState NewState)
 This function used to set the relation ship between tuning code and frequency. More...
 
__STATIC_INLINE void TRIM_SetEarlyTerminatinEn (TRIM_T *trim, FunctionalState NewState)
 This function used to enable early termination. More...
 
__STATIC_INLINE void TRIM_SetCoarseCode (TRIM_T *trim, uint32_t code)
 This function used to set coarse code value. More...
 
__STATIC_INLINE uint32_t TRIM_GetCoarseCode (TRIM_T *trim)
 This function used to get coarse code value. More...
 
__STATIC_INLINE void TRIM_SetFineCode (TRIM_T *trim, uint32_t code)
 This function used to set fine code value. More...
 
__STATIC_INLINE uint32_t TRIM_GetFineCode (TRIM_T *trim)
 This function used to get fine code value. More...
 
__STATIC_INLINE void TRIM_SetPrecisionCode (TRIM_T *trim, uint32_t code)
 This function used to set precision code value. More...
 
__STATIC_INLINE uint32_t TRIM_GetPrecisionCode (TRIM_T *trim)
 This function used to get precision code value. More...
 
__STATIC_INLINE void TRIM_SetBitWidth (TRIM_T *trim, uint32_t width)
 This function used to set bit width,bit_width = width + 1. More...
 
__STATIC_INLINE uint32_t TRIM_GetBitWidth (TRIM_T *trim)
 This function used to get bit width. More...
 
__STATIC_INLINE void TRIM_StartTuning (TRIM_T *trim, uint32_t function)
 This function used to enable clk trim function. More...
 
void TRIM_SetCalWaitCnt (TRIM_T *trim, uint32_t cnt)
 This function used to set calibration cnt number to make sure rc32k stable. More...
 
void TRIM_SetCalCnt (TRIM_T *trim, uint32_t cnt)
 This function decide the number of calibration clock cycles you want count. More...
 
uint32_t TRIM_GetCalCnt (TRIM_T *trim)
 This function get the number of calibration clock cycles. More...
 
void TRIM_SetErrRange (TRIM_T *trim, uint32_t deviation)
 This function used to set range value. More...
 

Detailed Description

Panchip series clktrim driver header file.

Version
V1.00
Revision
3
Date
21/11/19 18:33