Home
last modified time | relevance | path

Searched refs:u32Prescale (Results 1 – 9 of 9) sorted by relevance

/trusted-firmware-m-3.5.0/platform/ext/target/nuvoton/m2354/bsp/Library/StdDriver/src/
Dbpwm.c39 uint32_t u32Prescale = 1U, u32CNR = 0xFFFFU; in BPWM_ConfigCaptureChannel() local
56 for(u32Prescale = 1U; u32Prescale <= 0x1000UL; u32Prescale++) in BPWM_ConfigCaptureChannel()
58 u32NearestUnitTimeNsec = (1000000UL * u32Prescale) / u32PWMClockSrc; in BPWM_ConfigCaptureChannel()
61 if(u32Prescale == 0x1000U) in BPWM_ConfigCaptureChannel()
66 if(!((1000000UL * (u32Prescale + 1UL) > (u32NearestUnitTimeNsec * u32PWMClockSrc)))) in BPWM_ConfigCaptureChannel()
82 u32Prescale = u32Prescale - 1U; in BPWM_ConfigCaptureChannel()
84 BPWM_SET_PRESCALER(bpwm, u32ChannelNum, u32Prescale); in BPWM_ConfigCaptureChannel()
112 uint32_t u32Prescale = 1U, u32CNR = 0xFFFFU; in BPWM_ConfigOutputChannel() local
124 for(u32Prescale = 1U; u32Prescale < 0xFFFU; u32Prescale++)/* prescale could be 0~0xFFF */ in BPWM_ConfigOutputChannel()
126 i = (u32PWMClockSrc / u32Frequency) / u32Prescale; in BPWM_ConfigOutputChannel()
[all …]
Dtimer.c45 uint32_t u32Cmpr = 0UL, u32Prescale = 0UL; in TIMER_Open() local
55 u32Prescale = (u32Cmpr >> 24); /* for 24 bits CMPDAT */ in TIMER_Open()
56 if(u32Prescale > 0UL) in TIMER_Open()
57 u32Cmpr = u32Cmpr / (u32Prescale + 1UL); in TIMER_Open()
60 timer->CTL = u32Mode | u32Prescale; in TIMER_Open()
63 return (u32ClkFreq / (u32Cmpr * (u32Prescale + 1UL))); in TIMER_Open()
96 uint32_t u32Prescale = 0UL, u32Delay = (SystemCoreClock / u32ClkFreq) + 1UL; in TIMER_Delay() local
128 u32Prescale = 0UL; in TIMER_Delay()
135 u32Prescale = (u32Cmpr >> 24); /* for 24 bits CMPDAT */ in TIMER_Delay()
136 if(u32Prescale > 0UL) in TIMER_Delay()
[all …]
Depwm.c39 uint32_t u32Prescale = 1U, u32CNR = 0xFFFFU; in EPWM_ConfigCaptureChannel() local
55 for(u32Prescale = 1U; u32Prescale <= 0x1000U; u32Prescale++) in EPWM_ConfigCaptureChannel()
57 u32NearestUnitTimeNsec = (1000000UL * u32Prescale) / u32PWMClockSrc; in EPWM_ConfigCaptureChannel()
60 if(u32Prescale == 0x1000U) /* limit to the maximum unit time(nano second) */ in EPWM_ConfigCaptureChannel()
64 if(!((1000000UL * (u32Prescale + 1UL) > (u32NearestUnitTimeNsec * u32PWMClockSrc)))) in EPWM_ConfigCaptureChannel()
80 u32Prescale = u32Prescale - 1U; in EPWM_ConfigCaptureChannel()
82 EPWM_SET_PRESCALER(epwm, u32ChannelNum, u32Prescale); in EPWM_ConfigCaptureChannel()
111 uint32_t u32Prescale = 1U, u32CNR = 0xFFFFU; in EPWM_ConfigOutputChannel() local
123 for(u32Prescale = 1U; u32Prescale < 0xFFFU; u32Prescale++)/* prescale could be 0~0xFFF */ in EPWM_ConfigOutputChannel()
125 i = (u32PWMClockSrc / u32Frequency) / u32Prescale; in EPWM_ConfigOutputChannel()
[all …]
/trusted-firmware-m-3.5.0/platform/ext/target/nuvoton/m2351/bsp/Library/StdDriver/src/
Dbpwm.c39 uint32_t u32Prescale = 1U, u32CNR = 0xFFFFU; in BPWM_ConfigCaptureChannel() local
55 for(u32Prescale = 1U; u32Prescale <= 0x1000UL; u32Prescale++) in BPWM_ConfigCaptureChannel()
57 u32NearestUnitTimeNsec = (1000000UL * u32Prescale) / u32PWMClockSrc; in BPWM_ConfigCaptureChannel()
60 if(u32Prescale == 0x1000U) in BPWM_ConfigCaptureChannel()
65 if(!((1000000UL * (u32Prescale + 1UL) > (u32NearestUnitTimeNsec * u32PWMClockSrc)))) in BPWM_ConfigCaptureChannel()
81 u32Prescale = u32Prescale - 1U; in BPWM_ConfigCaptureChannel()
83 BPWM_SET_PRESCALER(bpwm, u32ChannelNum, u32Prescale); in BPWM_ConfigCaptureChannel()
111 uint32_t u32Prescale = 1U, u32CNR = 0xFFFFU; in BPWM_ConfigOutputChannel() local
123 for(u32Prescale = 1U; u32Prescale < 0xFFFU; u32Prescale++)/* prescale could be 0~0xFFF */ in BPWM_ConfigOutputChannel()
125 i = (u32PWMClockSrc / u32Frequency) / u32Prescale; in BPWM_ConfigOutputChannel()
[all …]
Dtimer.c45 uint32_t u32Cmpr = 0UL, u32Prescale = 0UL; in TIMER_Open() local
55 u32Prescale = (u32Cmpr >> 24); /* for 24 bits CMPDAT */ in TIMER_Open()
56 if (u32Prescale > 0UL) in TIMER_Open()
57 u32Cmpr = u32Cmpr / (u32Prescale + 1UL); in TIMER_Open()
60 timer->CTL = u32Mode | u32Prescale; in TIMER_Open()
63 return(u32Clk / (u32Cmpr * (u32Prescale + 1UL))); in TIMER_Open()
96 uint32_t u32Prescale = 0UL, u32Delay = (SystemCoreClock / u32Clk) + 1UL; in TIMER_Delay() local
128 u32Prescale = 0UL; in TIMER_Delay()
135 u32Prescale = (u32Cmpr >> 24); /* for 24 bits CMPDAT */ in TIMER_Delay()
136 if (u32Prescale > 0UL) in TIMER_Delay()
[all …]
Depwm.c39 uint32_t u32Prescale = 1U, u32CNR = 0xFFFFU; in EPWM_ConfigCaptureChannel() local
54 for(u32Prescale = 1U; u32Prescale <= 0x1000U; u32Prescale++) in EPWM_ConfigCaptureChannel()
56 u32NearestUnitTimeNsec = (1000000UL * u32Prescale) / u32PWMClockSrc; in EPWM_ConfigCaptureChannel()
59 if(u32Prescale == 0x1000U) /* limit to the maximum unit time(nano second) */ in EPWM_ConfigCaptureChannel()
63 if(!((1000000UL * (u32Prescale + 1UL) > (u32NearestUnitTimeNsec * u32PWMClockSrc)))) in EPWM_ConfigCaptureChannel()
79 u32Prescale = u32Prescale - 1U; in EPWM_ConfigCaptureChannel()
81 EPWM_SET_PRESCALER(epwm, u32ChannelNum, u32Prescale); in EPWM_ConfigCaptureChannel()
110 uint32_t u32Prescale = 1U, u32CNR = 0xFFFFU; in EPWM_ConfigOutputChannel() local
122 for(u32Prescale = 1U; u32Prescale < 0xFFFU; u32Prescale++)/* prescale could be 0~0xFFF */ in EPWM_ConfigOutputChannel()
124 i = (u32PWMClockSrc / u32Frequency) / u32Prescale; in EPWM_ConfigOutputChannel()
[all …]
/trusted-firmware-m-3.5.0/platform/ext/target/nuvoton/m2351/bsp/Library/StdDriver/inc/
Dscu.h305 __STATIC_INLINE void SCU_NSMConfig(uint32_t u32Ticks, uint32_t u32Prescale);
306 __STATIC_INLINE void SCU_TimerConfig(uint32_t u32Ticks, uint32_t u32Prescale);
325 __STATIC_INLINE void SCU_NSMConfig(uint32_t u32Ticks, uint32_t u32Prescale) in SCU_NSMConfig() argument
330 SCU->NSMCTL = SCU_NSMCTL_AUTORLD_Msk | SCU_NSMCTL_NSMIEN_Msk | (u32Prescale & 0xfful); in SCU_NSMConfig()
347 __STATIC_INLINE void SCU_TimerConfig(uint32_t u32Ticks, uint32_t u32Prescale) in SCU_TimerConfig() argument
352 … = SCU_NSMCTL_AUTORLD_Msk | SCU_NSMCTL_NSMIEN_Msk | SCU_NSMCTL_TMRMOD_Msk | (u32Prescale & 0xfful); in SCU_TimerConfig()
/trusted-firmware-m-3.5.0/platform/ext/target/nuvoton/m2354/bsp/Library/StdDriver/inc/
Dscu.h294 __STATIC_INLINE void SCU_NSMConfig(uint32_t u32Ticks, uint32_t u32Prescale);
295 __STATIC_INLINE void SCU_TimerConfig(uint32_t u32Ticks, uint32_t u32Prescale);
314 __STATIC_INLINE void SCU_NSMConfig(uint32_t u32Ticks, uint32_t u32Prescale) in SCU_NSMConfig() argument
319 SCU->NSMCTL = SCU_NSMCTL_AUTORLD_Msk | SCU_NSMCTL_NSMIEN_Msk | (u32Prescale & 0xfful); in SCU_NSMConfig()
336 __STATIC_INLINE void SCU_TimerConfig(uint32_t u32Ticks, uint32_t u32Prescale) in SCU_TimerConfig() argument
341 … = SCU_NSMCTL_AUTORLD_Msk | SCU_NSMCTL_NSMIEN_Msk | SCU_NSMCTL_TMRMOD_Msk | (u32Prescale & 0xfful); in SCU_TimerConfig()
Depwm.h558 int32_t EPWM_EnableADCTriggerPrescale(EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32Prescale, u…