Home
last modified time | relevance | path

Searched refs:clock_freq (Results 1 – 25 of 44) sorted by relevance

12

/Zephyr-Core-3.6.0/drivers/watchdog/
Dwdt_mcux_wwdt.c71 #define MSEC_TO_WWDT_TICKS(clock_freq, msec) \ argument
72 ((uint32_t)((clock_freq / MSEC_PER_SEC) * msec) / 4)
78 uint32_t clock_freq; in mcux_wwdt_install_timeout() local
86 clock_freq = CLOCK_GetWdtClkFreq(0); in mcux_wwdt_install_timeout()
91 clock_freq = CLOCK_GetWdtClkFreq(); in mcux_wwdt_install_timeout()
96 data->wwdt_config.clockFreq_Hz = clock_freq; in mcux_wwdt_install_timeout()
99 MSEC_TO_WWDT_TICKS(clock_freq, cfg->window.max); in mcux_wwdt_install_timeout()
103 MSEC_TO_WWDT_TICKS(clock_freq, cfg->window.min); in mcux_wwdt_install_timeout()
Dwdt_mcux_wdog32.c78 #define MSEC_TO_WDOG32_TICKS(clock_freq, divider, msec) \ argument
79 ((uint32_t)(clock_freq * msec / 1000U / divider))
86 uint32_t clock_freq; in mcux_wdog32_install_timeout() local
95 clock_freq = config->clock_frequency; in mcux_wdog32_install_timeout()
103 &clock_freq)) { in mcux_wdog32_install_timeout()
113 MSEC_TO_WDOG32_TICKS(clock_freq, div, cfg->window.max); in mcux_wdog32_install_timeout()
118 MSEC_TO_WDOG32_TICKS(clock_freq, div, cfg->window.min); in mcux_wdog32_install_timeout()
Dwdt_mcux_wdog.c75 uint32_t clock_freq; in mcux_wdog_install_timeout() local
88 &clock_freq)) { in mcux_wdog_install_timeout()
94 data->wdog_config.timeoutValue = clock_freq * cfg->window.max / 1000U; in mcux_wdog_install_timeout()
99 clock_freq * cfg->window.min / 1000U; in mcux_wdog_install_timeout()
Dwdt_wwdg_stm32.c136 uint32_t clock_freq = wwdg_stm32_get_pclk(dev); in wwdg_stm32_convert_timeout() local
147 wwdg_freq = ((float)clock_freq) / WWDG_INTERNAL_DIVIDER in wwdg_stm32_convert_timeout()
/Zephyr-Core-3.6.0/drivers/pwm/
Dpwm_intel_blinky.c28 uint32_t clock_freq; member
54 out_freq = cfg->clock_freq / (float) period_cycles; in bk_intel_set_cycles()
55 period = (out_freq * PWM_FREQ_MAX) / cfg->clock_freq; in bk_intel_set_cycles()
92 *cycles = cfg->clock_freq; in bk_intel_get_cycles_per_sec()
120 .clock_freq = DT_INST_PROP(n, clock_frequency), \
Dpwm_mcux_sctimer.c48 uint32_t clock_freq; in mcux_sctimer_new_channel() local
54 &clock_freq)) { in mcux_sctimer_new_channel()
58 pwm_freq = (clock_freq / config->prescale) / period_cycles; in mcux_sctimer_new_channel()
71 clock_freq, &data->event_number[channel]) == kStatus_Fail) { in mcux_sctimer_new_channel()
198 uint32_t clock_freq; in mcux_sctimer_pwm_get_cycles_per_sec() local
201 &clock_freq)) { in mcux_sctimer_pwm_get_cycles_per_sec()
205 *cycles = clock_freq / config->prescale; in mcux_sctimer_pwm_get_cycles_per_sec()
Dpwm_mcux_tpm.c39 uint32_t clock_freq; member
88 pwm_freq = (data->clock_freq >> config->prescale) / in mcux_tpm_set_cycles()
92 data->clock_freq); in mcux_tpm_set_cycles()
103 pwm_freq, data->clock_freq); in mcux_tpm_set_cycles()
126 *cycles = data->clock_freq >> config->prescale; in mcux_tpm_get_cycles_per_sec()
156 &data->clock_freq)) { in mcux_tpm_init()
Dpwm_rv32m1_tpm.c38 uint32_t clock_freq; member
87 pwm_freq = (data->clock_freq >> config->prescale) / in rv32m1_tpm_set_cycles()
91 data->clock_freq); in rv32m1_tpm_set_cycles()
102 pwm_freq, data->clock_freq); in rv32m1_tpm_set_cycles()
125 *cycles = data->clock_freq >> config->prescale; in rv32m1_tpm_get_cycles_per_sec()
155 &data->clock_freq)) { in rv32m1_tpm_init()
Dpwm_mcux.c74 uint32_t clock_freq; in mcux_pwm_set_cycles() local
80 &clock_freq)) { in mcux_pwm_set_cycles()
100 config->mode, 1U, clock_freq); in mcux_pwm_set_cycles()
165 uint32_t clock_freq; in mcux_pwm_get_cycles_per_sec() local
168 &clock_freq)) { in mcux_pwm_get_cycles_per_sec()
171 *cycles = clock_freq >> config->prescale; in mcux_pwm_get_cycles_per_sec()
Dpwm_numaker.c57 uint32_t clock_freq; member
130 data->cycles_per_sec = data->clock_freq / (cfg->prescale + 1U); in pwm_numaker_get_cycles_per_sec()
465 uint32_t clock_freq; in pwm_numaker_init() local
498 err = pwm_numaker_clk_get_rate(epwm, &clock_freq); in pwm_numaker_init()
504 data->clock_freq = clock_freq; in pwm_numaker_init()
505 data->cycles_per_sec = data->clock_freq / (cfg->prescale + 1U); in pwm_numaker_init()
Dpwm_mcux_pwt.c36 uint32_t clock_freq; member
275 *cycles = data->clock_freq >> config->prescale; in mcux_pwt_get_cycles_per_sec()
293 &data->clock_freq)) { in mcux_pwt_init()
/Zephyr-Core-3.6.0/drivers/mdio/
Dmdio_nxp_s32_gmac.c35 uint32_t clock_freq; member
48 Gmac_Ip_EnableMDIO(cfg->instance, cfg->suppress_preamble, data->clock_freq); in mdio_nxp_s32_read_c45()
68 Gmac_Ip_EnableMDIO(cfg->instance, cfg->suppress_preamble, data->clock_freq); in mdio_nxp_s32_write_c45()
88 Gmac_Ip_EnableMDIO(cfg->instance, cfg->suppress_preamble, data->clock_freq); in mdio_nxp_s32_read_c22()
108 Gmac_Ip_EnableMDIO(cfg->instance, cfg->suppress_preamble, data->clock_freq); in mdio_nxp_s32_write_c22()
129 if (clock_control_get_rate(cfg->clock_dev, cfg->clock_subsys, &data->clock_freq)) { in mdio_nxp_s32_init()
/Zephyr-Core-3.6.0/drivers/spi/
Dspi_rpi_pico_pio.c62 static float spi_pico_pio_clock_divisor(const uint32_t clock_freq, uint32_t spi_frequency) in spi_pico_pio_clock_divisor() argument
64 return (float)clock_freq / (float)(PIO_CYCLES * spi_frequency); in spi_pico_pio_clock_divisor()
67 static uint32_t spi_pico_pio_maximum_clock_frequency(const uint32_t clock_freq) in spi_pico_pio_maximum_clock_frequency() argument
69 return clock_freq / PIO_CYCLES; in spi_pico_pio_maximum_clock_frequency()
72 static uint32_t spi_pico_pio_minimum_clock_frequency(const uint32_t clock_freq) in spi_pico_pio_minimum_clock_frequency() argument
74 return clock_freq / (PIO_CYCLES * 65536); in spi_pico_pio_minimum_clock_frequency()
113 uint32_t clock_freq; in spi_pico_pio_configure() local
124 rc = clock_control_get_rate(dev_cfg->clk_dev, dev_cfg->clk_id, &clock_freq); in spi_pico_pio_configure()
160 if ((spi_cfg->frequency < spi_pico_pio_minimum_clock_frequency(clock_freq)) || in spi_pico_pio_configure()
161 (spi_cfg->frequency > spi_pico_pio_maximum_clock_frequency(clock_freq))) { in spi_pico_pio_configure()
[all …]
Dspi_ambiq.c28 uint32_t clock_freq; member
108 if (cfg->clock_freq > AM_HAL_IOM_MAX_FREQ) { in spi_config()
113 data->iom_cfg.ui32ClockFreq = cfg->clock_freq; in spi_config()
258 .clock_freq = DT_INST_PROP(n, clock_frequency), \
Dspi_mchp_mss.c103 int clock_freq; member
258 if (spi_cfg->frequency > cfg->clock_freq) { in mss_spi_clk_gen_set()
259 speed = cfg->clock_freq / 2; in mss_spi_clk_gen_set()
263 clkrate = cfg->clock_freq / (2 * idx); in mss_spi_clk_gen_set()
468 .clock_freq = DT_INST_PROP(n, clock_frequency), \
Dspi_mchp_mss_qspi.c102 uint32_t clock_freq; member
351 if (spi_cfg->frequency > s->clock_freq) { in mss_qspi_clk_gen_set()
352 speed = s->clock_freq / 2; in mss_qspi_clk_gen_set()
356 clkrate = s->clock_freq / (2 * idx); in mss_qspi_clk_gen_set()
585 .clock_freq = DT_INST_PROP(n, clock_frequency), \
Dspi_rv32m1_lpspi.c140 uint32_t clock_freq; in spi_mcux_configure() local
194 &clock_freq)) { in spi_mcux_configure()
198 LPSPI_MasterInit(base, &master_config, clock_freq); in spi_mcux_configure()
/Zephyr-Core-3.6.0/drivers/i2c/
Di2c_mcux_flexcomm.c56 uint32_t clock_freq; in mcux_flexcomm_configure() local
83 &clock_freq)) { in mcux_flexcomm_configure()
88 I2C_MasterSetBaudRate(base, baudrate, clock_freq); in mcux_flexcomm_configure()
260 uint32_t clock_freq; in mcux_flexcomm_target_register() local
267 &clock_freq)) { in mcux_flexcomm_target_register()
287 I2C_SlaveInit(base, &i2c_cfg, clock_freq); in mcux_flexcomm_target_register()
338 uint32_t clock_freq, bitrate_cfg; in mcux_flexcomm_init() local
357 &clock_freq)) { in mcux_flexcomm_init()
362 I2C_MasterInit(base, &master_config, clock_freq); in mcux_flexcomm_init()
Di2c_mcux_lpi2c.c76 uint32_t clock_freq; in mcux_lpi2c_configure() local
103 &clock_freq)) { in mcux_lpi2c_configure()
112 LPI2C_MasterSetBaudRate(base, clock_freq, baudrate); in mcux_lpi2c_configure()
411 uint32_t clock_freq; in mcux_lpi2c_target_register() local
417 &clock_freq)) { in mcux_lpi2c_target_register()
440 LPI2C_SlaveInit(base, &slave_config, clock_freq); in mcux_lpi2c_target_register()
491 uint32_t clock_freq, bitrate_cfg; in mcux_lpi2c_init() local
513 &clock_freq)) { in mcux_lpi2c_init()
519 LPI2C_MasterInit(base, &master_config, clock_freq); in mcux_lpi2c_init()
Di2c_mcux.c57 uint32_t clock_freq; in i2c_mcux_configure() local
82 clock_freq = CLOCK_GetFreq(config->clock_source); in i2c_mcux_configure()
84 I2C_MasterSetBaudRate(base, baudrate, clock_freq); in i2c_mcux_configure()
315 uint32_t clock_freq, bitrate_cfg; in i2c_mcux_init() local
322 clock_freq = CLOCK_GetFreq(config->clock_source); in i2c_mcux_init()
324 I2C_MasterInit(base, &master_config, clock_freq); in i2c_mcux_init()
/Zephyr-Core-3.6.0/drivers/clock_control/
Dclock_control_ambiq.c20 uint32_t clock_freq; member
95 *rate = cfg->clock_freq; in ambiq_clock_get_rate()
132 .clock_freq = DT_INST_PROP(n, clock_frequency), \
/Zephyr-Core-3.6.0/drivers/counter/
Dcounter_mcux_gpt.c171 uint32_t clock_freq; in mcux_gpt_init() local
179 &clock_freq)) { in mcux_gpt_init()
184 if (clock_freq % config->info.freq) { in mcux_gpt_init()
186 LOG_ERR("clock src is %u\n", clock_freq); in mcux_gpt_init()
193 gptConfig.divider = clock_freq / config->info.freq; in mcux_gpt_init()
/Zephyr-Core-3.6.0/drivers/serial/
Duart_mcux_lpsci.c242 uint32_t clock_freq; in mcux_lpsci_init() local
250 &clock_freq)) { in mcux_lpsci_init()
259 LPSCI_Init(config->base, &uart_config, clock_freq); in mcux_lpsci_init()
Duart_rv32m1_lpuart.c245 uint32_t clock_freq; in rv32m1_lpuart_init() local
257 &clock_freq)) { in rv32m1_lpuart_init()
270 LPUART_Init(config->base, &uart_config, clock_freq); in rv32m1_lpuart_init()
Duart_mcux_iuart.c229 uint32_t clock_freq; in mcux_iuart_init() local
237 &clock_freq)) { in mcux_iuart_init()
261 UART_Init(config->base, &uart_config, clock_freq); in mcux_iuart_init()

12