| /bsp/w60x/drivers/ |
| A D | drv_pwm.c | 30 rt_uint32_t psc; in wm_pwm_set() local 49 psc = period / MAX_PERIOD + 1; in wm_pwm_set() 50 if (psc > MAX_CLKDIV) in wm_pwm_set() 52 psc = MAX_CLKDIV; in wm_pwm_set() 54 pwm_param.clkdiv = psc; in wm_pwm_set() 56 period = period / psc; in wm_pwm_set() 68 pulse = (unsigned long long)configuration->pulse * sysclk.apbclk / psc / 1000ULL; in wm_pwm_set()
|
| /bsp/gd32/arm/libraries/gd32_drivers/ |
| A D | drv_pwm.c | 461 rt_uint16_t psc; in drv_pwm_get() local 466 psc = timer_prescaler_read(index_to_timer(pstTimerMap->TimerIndex)); in drv_pwm_get() 467 if (psc == TIMER_CKDIV_DIV2) in drv_pwm_get() 471 else if (psc == TIMER_CKDIV_DIV4) in drv_pwm_get() 479 …configuration->period = (TIMER_CAR(index_to_timer(pstTimerMap->TimerIndex)) + 1) * (psc + 1) * 10… in drv_pwm_get() 480 configuration->pulse = (chxcv + 1) * (psc + 1) * 1000UL / tim_clock; in drv_pwm_get() 488 rt_uint64_t tim_clock, psc; in drv_pwm_set() local 495 psc = period / MAX_PERIOD + 1; in drv_pwm_set() 496 period = period / psc; in drv_pwm_set() 498 timer_prescaler_config(index_to_timer(pstTimerMap->TimerIndex), psc - 1, TIMER_PSC_RELOAD_NOW); in drv_pwm_set() [all …]
|
| /bsp/at32/libraries/rt_drivers/ |
| A D | drv_pwm.c | 354 rt_uint32_t period, pulse, channel, psc, tmr_clock; in drv_pwm_set() local 389 psc = period / MAX_PERIOD + 1; in drv_pwm_set() 390 period = period / psc; in drv_pwm_set() 391 tmr_div_value_set(tmr_x, psc - 1); in drv_pwm_set() 401 pulse = (unsigned long long)configuration->pulse * tmr_clock / psc / 1000ULL; in drv_pwm_set() 443 rt_uint32_t period, psc, tmr_clock; in drv_pwm_set_period() local 478 psc = period / MAX_PERIOD + 1; in drv_pwm_set_period() 479 period = period / psc; in drv_pwm_set_period() 480 tmr_div_value_set(tmr_x, psc - 1); in drv_pwm_set_period() 496 rt_uint32_t period, pulse, channel, psc, tmr_clock; in drv_pwm_set_pulse() local [all …]
|
| /bsp/n32g452xx/Libraries/rt_drivers/ |
| A D | drv_pwm.c | 44 uint32_t psc; member 212 rt_uint64_t psc; in drv_pwm_set() local 234 psc = period / MAX_PERIOD + 1; in drv_pwm_set() 235 period = period / psc; in drv_pwm_set() 240 if ((pwm_dev->period != period) || (pwm_dev->psc != psc)) in drv_pwm_set() 246 TIM_TIMeBaseStructure.Prescaler = psc - 1; in drv_pwm_set() 252 pulse = (unsigned long long)configuration->pulse * input_clock / psc / 1000ULL; in drv_pwm_set()
|
| /bsp/gd32/risc-v/libraries/GD32VF103_Firmware_Library/GD32VF103_standard_peripheral/Source/ |
| A D | gd32vf103_rtc.c | 89 void rtc_prescaler_set(uint32_t psc) in rtc_prescaler_set() argument 93 RTC_PSCH = ((psc & RTC_HIGH_BITS_MASK) >> RTC_HIGH_BITS_OFFSET); in rtc_prescaler_set() 95 RTC_PSCL = (psc & RTC_LOW_BITS_MASK); in rtc_prescaler_set()
|
| A D | gd32vf103_usart.c | 525 void usart_prescaler_config(uint32_t usart_periph, uint8_t psc) in usart_prescaler_config() argument 528 USART_GP(usart_periph) |= psc; in usart_prescaler_config()
|
| /bsp/stm32/libraries/HAL_Drivers/drivers/ |
| A D | drv_pwm.c | 250 rt_uint64_t tim_clock, psc; in drv_pwm_set() local 258 psc = period / MAX_PERIOD + 1; in drv_pwm_set() 259 period = period / psc; in drv_pwm_set() 260 __HAL_TIM_SET_PRESCALER(htim, psc - 1); in drv_pwm_set() 268 pulse = (rt_uint64_t)configuration->pulse * tim_clock / psc / 1000ULL; in drv_pwm_set() 292 rt_uint64_t tim_clock, psc; in drv_pwm_set_period() local 298 psc = period / MAX_PERIOD + 1; in drv_pwm_set_period() 299 period = period / psc; in drv_pwm_set_period() 300 __HAL_TIM_SET_PRESCALER(htim, psc - 1); in drv_pwm_set_period()
|
| /bsp/dm365/drivers/ |
| A D | i2c-davinci.c | 176 rt_uint16_t psc; in i2c_davinci_calc_clk_dividers() local 200 psc = (input_clock / 7000000) - 1; in i2c_davinci_calc_clk_dividers() 201 if ((input_clock / (psc + 1)) > 12000000) in i2c_davinci_calc_clk_dividers() 202 psc++; /* better to run under spec than over */ in i2c_davinci_calc_clk_dividers() 203 d = (psc >= 2) ? 5 : 7 - psc; in i2c_davinci_calc_clk_dividers() 205 clk = ((input_clock / (psc + 1)) / (dev->bus_freq * 1000)) - (d << 1); in i2c_davinci_calc_clk_dividers() 209 davinci_i2c_write_reg(dev, DAVINCI_I2C_PSC_REG, psc); in i2c_davinci_calc_clk_dividers()
|
| /bsp/mm32f327x/Libraries/MM32F327x/HAL_Lib/Src/ |
| A D | hal_tim.c | 515 MODIFY_REG(tim->SMCR, TIM_SMCR_ETPS, psc); in TIM_ETRConfig() 538 TIM_ETRConfig(tim, psc, polarity, filter); in TIM_ETRClockMode1Config() 561 TIM_ETRConfig(tim, psc, polarity, filter); in TIM_ETRClockMode2Config() 1227 void TIM_SetIC1Prescaler(TIM_TypeDef* tim, TIMICPSC_Typedef psc) in TIM_SetIC1Prescaler() argument 1229 MODIFY_REG(tim->CCMR1, TIM_CCMR1_IC1PSC, psc); in TIM_SetIC1Prescaler() 1243 void TIM_SetIC2Prescaler(TIM_TypeDef* tim, TIMICPSC_Typedef psc) in TIM_SetIC2Prescaler() argument 1245 MODIFY_REG(tim->CCMR1, TIM_CCMR1_IC2PSC, psc << 8); in TIM_SetIC2Prescaler() 1259 void TIM_SetIC3Prescaler(TIM_TypeDef* tim, TIMICPSC_Typedef psc) in TIM_SetIC3Prescaler() argument 1261 MODIFY_REG(tim->CCMR2, TIM_CCMR2_IC3PSC, psc); in TIM_SetIC3Prescaler() 1275 void TIM_SetIC4Prescaler(TIM_TypeDef* tim, TIMICPSC_Typedef psc) in TIM_SetIC4Prescaler() argument [all …]
|
| /bsp/bluetrum/libraries/hal_drivers/ |
| A D | drv_pwm.c | 146 rt_uint64_t tim_clock, psc; in drv_pwm_control() local 169 psc = period / MAX_PERIOD + 1; in drv_pwm_control() 170 period = period / psc; in drv_pwm_control() 177 pulse = pwm_obj->pulse * tim_clock / psc / 1000000ul; in drv_pwm_control()
|
| /bsp/mm32f327x/Libraries/MM32F327x/HAL_Lib/Inc/ |
| A D | hal_tim.h | 668 void TIM_SetIC1Prescaler(TIM_TypeDef* tim, TIMICPSC_Typedef psc); 669 void TIM_SetIC2Prescaler(TIM_TypeDef* tim, TIMICPSC_Typedef psc); 670 void TIM_SetIC3Prescaler(TIM_TypeDef* tim, TIMICPSC_Typedef psc); 671 void TIM_SetIC4Prescaler(TIM_TypeDef* tim, TIMICPSC_Typedef psc); 693 void TIM_ETRClockMode1Config(TIM_TypeDef* tim, TIMEXTTRGPSC_Typedef psc, TIMETP_Typedef polarity, u… 694 void TIM_ETRClockMode2Config(TIM_TypeDef* tim, TIMEXTTRGPSC_Typedef psc, TIMETP_Typedef polarity, u… 701 void TIM_ETRConfig(TIM_TypeDef* tim, TIMEXTTRGPSC_Typedef psc, TIMETP_Typedef polarity, u16 filter);
|
| /bsp/apm32/libraries/Drivers/ |
| A D | drv_pwm.c | 543 rt_uint64_t timer_clock, psc; in drv_pwm_set() local 552 psc = period / MAX_PERIOD + 1; in drv_pwm_set() 553 period = period / psc; in drv_pwm_set() 554 tmr->PSC = (uint16_t)(psc - 1); in drv_pwm_set() 562 pulse = (unsigned long long)configuration->pulse * timer_clock / psc / 1000ULL; in drv_pwm_set()
|
| /bsp/tkm32F499/Libraries/CMSIS_and_startup/ |
| A D | sys.h | 27 void TIM3_Config(u16 arr,u16 psc);
|
| /bsp/nxp/imx/imxrt/libraries/drivers/ |
| A D | drv_pwm.c | 151 static rt_err_t imxrt_drv_pwm_init(PWM_Type *base, pwm_submodule_t pwm_submodule, uint16_t psc, uin… in imxrt_drv_pwm_init() argument 155 pwm_clock_prescale_t pwm_prescale = (pwm_clock_prescale_t)psc; in imxrt_drv_pwm_init() 429 static rt_err_t imxrt_drv_qtmr_init(TMR_Type *base, qtmr_channel_selection_t channel, uint16_t psc,… in imxrt_drv_qtmr_init() argument 435 qtmr_config.primarySource = (qtmr_primary_count_source_t)(psc + 8); in imxrt_drv_qtmr_init() 436 qtmr_clock_freq = PWM_SRC_CLK_FREQ / (1 << psc); in imxrt_drv_qtmr_init()
|
| /bsp/dm365/platform/ |
| A D | SConscript | 11 psc.c
|
| /bsp/fm33lc026/libraries/FM33LC0xx_FL_Driver/Inc/ |
| A D | fm33lc0xx_fl_bstim32.h | 414 __STATIC_INLINE void FL_BSTIM32_WritePrescaler(BSTIM32_Type *BSTIM32x, uint32_t psc) in FL_BSTIM32_WritePrescaler() argument 416 MODIFY_REG(BSTIM32x->PSC, (0xffffffffU << 0U), (psc << 0U)); in FL_BSTIM32_WritePrescaler()
|
| A D | fm33lc0xx_fl_gptim.h | 1019 __STATIC_INLINE void FL_GPTIM_SetETRPrescaler(GPTIM_Type *TIMx, uint32_t psc) in FL_GPTIM_SetETRPrescaler() argument 1021 MODIFY_REG(TIMx->SMCR, GPTIM_SMCR_ETPS_Msk, psc); in FL_GPTIM_SetETRPrescaler() 1739 __STATIC_INLINE void FL_GPTIM_WritePrescaler(GPTIM_Type *TIMx, uint32_t psc) in FL_GPTIM_WritePrescaler() argument 1741 MODIFY_REG(TIMx->PSC, (0xffffU << 0U), (psc << 0U)); in FL_GPTIM_WritePrescaler() 2498 __STATIC_INLINE void FL_GPTIM_IC_SetPrescaler(GPTIM_Type *TIMx, uint32_t psc, uint32_t channel) in FL_GPTIM_IC_SetPrescaler() argument 2503 MODIFY_REG(TIMx->CCMR1, (0x3U << 2U), (psc)); in FL_GPTIM_IC_SetPrescaler() 2506 MODIFY_REG(TIMx->CCMR1, (0x3U << 10U), (psc << 8U)); in FL_GPTIM_IC_SetPrescaler() 2509 MODIFY_REG(TIMx->CCMR2, (0x3U << 2U), (psc)); in FL_GPTIM_IC_SetPrescaler() 2512 MODIFY_REG(TIMx->CCMR2, (0x3U << 10U), (psc << 8U)); in FL_GPTIM_IC_SetPrescaler()
|
| A D | fm33lc0xx_fl_atim.h | 1324 __STATIC_INLINE void FL_ATIM_SetETRPrescaler(ATIM_Type *TIMx, uint32_t psc) in FL_ATIM_SetETRPrescaler() argument 1326 MODIFY_REG(TIMx->SMCR, ATIM_SMCR_ETPS_Msk, psc); in FL_ATIM_SetETRPrescaler() 2226 __STATIC_INLINE void FL_ATIM_WritePrescaler(ATIM_Type *TIMx, uint32_t psc) in FL_ATIM_WritePrescaler() argument 2228 MODIFY_REG(TIMx->PSC, (0xffffU << 0U), (psc << 0U)); in FL_ATIM_WritePrescaler() 2863 __STATIC_INLINE void FL_ATIM_IC_SetPrescaler(ATIM_Type *TIMx, uint32_t psc, uint32_t channel) in FL_ATIM_IC_SetPrescaler() argument 2867 MODIFY_REG(TIMx->CCMR1, (ATIM_CCMR_ICPSC_Msk << (channel * 8)), (psc << (channel * 8))); in FL_ATIM_IC_SetPrescaler() 2871 …MODIFY_REG(TIMx->CCMR2, (ATIM_CCMR_ICPSC_Msk << ((channel - 2) * 8)), (psc << ((channel - 2) * 8))… in FL_ATIM_IC_SetPrescaler()
|
| /bsp/essemi/es32vf2264/libraries/ALD/ES32VF2264/Source/ |
| A D | ald_timer.c | 1619 assert_param(IS_TIMER_IC_PSC(config->psc)); in ald_timer_hall_sensor_init() 2334 assert_param(IS_TIMER_IC_PSC(config->psc)); in ald_timer_ic_config_channel() 2466 assert_param(IS_TIMER_ETR_PSC(config->psc)); in ald_timer_config_oc_ref_clear() 2474 timer_etr_set_config(hperh->perh, config->psc, in ald_timer_config_oc_ref_clear() 2523 assert_param(IS_TIMER_ETR_PSC(config->psc)); in ald_timer_config_clock_source() 2536 timer_etr_set_config(hperh->perh, config->psc, config->polarity, config->filter); in ald_timer_config_clock_source() 2542 timer_etr_set_config(hperh->perh, config->psc, config->polarity, config->filter); in ald_timer_config_clock_source() 2627 assert_param(IS_TIMER_ETR_PSC(config->psc)); in ald_timer_slave_config_sync() 2657 assert_param(IS_TIMER_ETR_PSC(config->psc)); in ald_timer_slave_config_sync_by_it() 3572 MODIFY_REG(TIMERx->SMCON, TIMER_SMCON_ETPSEL_MSK, psc << TIMER_SMCON_ETPSEL_POSS); in timer_etr_set_config() [all …]
|
| /bsp/essemi/es32f0654/libraries/ES32F065x_ALD_StdPeriph_Driver/Source/ |
| A D | ald_timer.c | 1632 assert_param(IS_TIMER_IC_PSC(config->psc)); in ald_timer_hall_sensor_init() 2350 assert_param(IS_TIMER_IC_PSC(config->psc)); in ald_timer_ic_config_channel() 2482 assert_param(IS_TIMER_ETR_PSC(config->psc)); in ald_timer_config_oc_ref_clear() 2489 timer_etr_set_config(hperh->perh, config->psc, in ald_timer_config_oc_ref_clear() 2531 assert_param(IS_TIMER_ETR_PSC(config->psc)); in ald_timer_config_clock_source() 2544 timer_etr_set_config(hperh->perh, config->psc, config->polarity, config->filter); in ald_timer_config_clock_source() 2550 timer_etr_set_config(hperh->perh, config->psc, config->polarity, config->filter); in ald_timer_config_clock_source() 2635 assert_param(IS_TIMER_ETR_PSC(config->psc)); in ald_timer_slave_config_sync() 2665 assert_param(IS_TIMER_ETR_PSC(config->psc)); in ald_timer_slave_config_sync_by_it() 3600 MODIFY_REG(TIMERx->SMCON, TIMER_SMCON_ETPSEL_MSK, psc << TIMER_SMCON_ETPSEL_POSS); in timer_etr_set_config() [all …]
|
| /bsp/essemi/es32f369x/libraries/ES32F36xx_ALD_StdPeriph_Driver/Source/ |
| A D | ald_timer.c | 1631 assert_param(IS_TIMER_IC_PSC(config->psc)); in ald_timer_hall_sensor_init() 2349 assert_param(IS_TIMER_IC_PSC(config->psc)); in ald_timer_ic_config_channel() 2481 assert_param(IS_TIMER_ETR_PSC(config->psc)); in ald_timer_config_oc_ref_clear() 2489 timer_etr_set_config(hperh->perh, config->psc, in ald_timer_config_oc_ref_clear() 2538 assert_param(IS_TIMER_ETR_PSC(config->psc)); in ald_timer_config_clock_source() 2551 timer_etr_set_config(hperh->perh, config->psc, config->polarity, config->filter); in ald_timer_config_clock_source() 2557 timer_etr_set_config(hperh->perh, config->psc, config->polarity, config->filter); in ald_timer_config_clock_source() 2642 assert_param(IS_TIMER_ETR_PSC(config->psc)); in ald_timer_slave_config_sync() 2672 assert_param(IS_TIMER_ETR_PSC(config->psc)); in ald_timer_slave_config_sync_by_it() 3605 MODIFY_REG(TIMERx->SMCON, TIMER_SMCON_ETPSEL_MSK, psc << TIMER_SMCON_ETPSEL_POSS); in timer_etr_set_config() [all …]
|
| /bsp/gd32/risc-v/libraries/GD32VF103_Firmware_Library/GD32VF103_standard_peripheral/Include/ |
| A D | gd32vf103_rtc.h | 121 void rtc_prescaler_set(uint32_t psc);
|
| /bsp/essemi/es32vf2264/libraries/ALD/ES32VF2264/Include/ |
| A D | ald_timer.h | 277 ald_timer_ic_prescaler_t psc; /**< Specifies the Input Capture Prescaler */ member 332 ald_timer_etr_psc_t psc; /**< TIMER Clear Input prescaler */ member 368 ald_timer_etr_psc_t psc; /**< TIMER clock prescaler */ member 407 ald_timer_etr_psc_t psc; /**< Input trigger prescaler */ member 416 ald_timer_ic_prescaler_t psc; /**< Specifies the Input Capture Prescaler */ member
|
| /bsp/essemi/es32f0654/libraries/ES32F065x_ALD_StdPeriph_Driver/Include/ |
| A D | ald_timer.h | 276 timer_ic_prescaler_t psc; /**< Specifies the Input Capture Prescaler */ member 325 timer_etr_psc_t psc; /**< TIMER Clear Input prescaler */ member 360 timer_etr_psc_t psc; /**< TIMER clock prescaler */ member 399 timer_etr_psc_t psc; /**< Input trigger prescaler */ member 408 timer_ic_prescaler_t psc; /**< Specifies the Input Capture Prescaler */ member
|
| /bsp/essemi/es32f369x/libraries/ES32F36xx_ALD_StdPeriph_Driver/Include/ |
| A D | ald_timer.h | 276 timer_ic_prescaler_t psc; /**< Specifies the Input Capture Prescaler */ member 330 timer_etr_psc_t psc; /**< TIMER Clear Input prescaler */ member 366 timer_etr_psc_t psc; /**< TIMER clock prescaler */ member 405 timer_etr_psc_t psc; /**< Input trigger prescaler */ member 414 timer_ic_prescaler_t psc; /**< Specifies the Input Capture Prescaler */ member
|