Home
last modified time | relevance | path

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

12

/Zephyr-Core-3.7.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
87 clock_freq = CLOCK_GetWdtClkFreq(0); in mcux_wwdt_install_timeout()
89 clock_freq = CLOCK_GetWdtClkFreq(); in mcux_wwdt_install_timeout()
94 clock_freq = CLOCK_GetWdtClkFreq(); in mcux_wwdt_install_timeout()
99 data->wwdt_config.clockFreq_Hz = clock_freq; in mcux_wwdt_install_timeout()
102 MSEC_TO_WWDT_TICKS(clock_freq, cfg->window.max); in mcux_wwdt_install_timeout()
106 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()
/Zephyr-Core-3.7.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.c58 uint32_t clock_freq; in mcux_pwm_set_cycles_internal() local
64 &clock_freq)) { in mcux_pwm_set_cycles_internal()
84 config->mode, 1U, clock_freq); in mcux_pwm_set_cycles_internal()
179 uint32_t clock_freq; in mcux_pwm_get_cycles_per_sec() local
182 &clock_freq)) { in mcux_pwm_get_cycles_per_sec()
185 *cycles = clock_freq >> config->prescale; in mcux_pwm_get_cycles_per_sec()
Dpwm_mcux_qtmr.c117 uint32_t clock_freq; in mcux_qtmr_pwm_get_cycles_per_sec() local
119 if (clock_control_get_rate(config->clock_dev, config->clock_subsys, &clock_freq)) { in mcux_qtmr_pwm_get_cycles_per_sec()
123 *cycles = clock_freq / config->prescaler; in mcux_qtmr_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.7.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.7.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.7.0/drivers/counter/
Dcounter_mcux_gpt.c184 uint32_t clock_freq; in mcux_gpt_init() local
195 &clock_freq)) { in mcux_gpt_init()
200 if (clock_freq % config->info.freq) { in mcux_gpt_init()
202 LOG_ERR("clock src is %u\n", clock_freq); in mcux_gpt_init()
209 gptConfig.divider = clock_freq / config->info.freq; in mcux_gpt_init()
/Zephyr-Core-3.7.0/drivers/i2c/
Di2c_mcux_flexcomm.c68 uint32_t clock_freq; in mcux_flexcomm_configure() local
95 &clock_freq)) { in mcux_flexcomm_configure()
100 I2C_MasterSetBaudRate(base, baudrate, clock_freq); in mcux_flexcomm_configure()
356 uint32_t clock_freq; in mcux_flexcomm_setup_slave_config() local
360 &clock_freq)) { in mcux_flexcomm_setup_slave_config()
364 I2C_SlaveInit(base, &data->i2c_cfg, clock_freq); in mcux_flexcomm_setup_slave_config()
471 uint32_t clock_freq, bitrate_cfg; in mcux_flexcomm_init() local
500 &clock_freq)) { in mcux_flexcomm_init()
505 I2C_MasterInit(base, &master_config, clock_freq); in mcux_flexcomm_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()
Di2c_mcux_lpi2c.c82 uint32_t clock_freq; in mcux_lpi2c_configure() local
109 &clock_freq)) { in mcux_lpi2c_configure()
118 LPI2C_MasterSetBaudRate(base, clock_freq, baudrate); in mcux_lpi2c_configure()
417 uint32_t clock_freq; in mcux_lpi2c_target_register() local
423 &clock_freq)) { in mcux_lpi2c_target_register()
446 LPI2C_SlaveInit(base, &slave_config, clock_freq); in mcux_lpi2c_target_register()
500 uint32_t clock_freq, bitrate_cfg; in mcux_lpi2c_init() local
522 &clock_freq)) { in mcux_lpi2c_init()
528 LPI2C_MasterInit(base, &master_config, clock_freq); in mcux_lpi2c_init()
Di2c_mcux_lpi2c_rtio.c84 uint32_t clock_freq; in mcux_lpi2c_do_configure() local
110 &clock_freq)) { in mcux_lpi2c_do_configure()
114 LPI2C_MasterSetBaudRate(base, clock_freq, baudrate); in mcux_lpi2c_do_configure()
289 uint32_t clock_freq, bitrate_cfg; in mcux_lpi2c_init() local
308 &clock_freq)) { in mcux_lpi2c_init()
314 LPI2C_MasterInit(base, &master_config, clock_freq); in mcux_lpi2c_init()
/Zephyr-Core-3.7.0/drivers/spi/
Dspi_rpi_pico_pio.c169 static float spi_pico_pio_clock_divisor(const uint32_t clock_freq, int cycles, in spi_pico_pio_clock_divisor() argument
172 return (float)clock_freq / (float)(cycles * spi_frequency); in spi_pico_pio_clock_divisor()
175 static uint32_t spi_pico_pio_maximum_clock_frequency(const uint32_t clock_freq, int cycles) in spi_pico_pio_maximum_clock_frequency() argument
177 return clock_freq / cycles; in spi_pico_pio_maximum_clock_frequency()
180 static uint32_t spi_pico_pio_minimum_clock_frequency(const uint32_t clock_freq, int cycles) in spi_pico_pio_minimum_clock_frequency() argument
182 return clock_freq / (cycles * 65536); in spi_pico_pio_minimum_clock_frequency()
252 uint32_t clock_freq; in spi_pico_pio_configure() local
260 rc = clock_control_get_rate(dev_cfg->clk_dev, dev_cfg->clk_id, &clock_freq); in spi_pico_pio_configure()
322 clock_freq, SPI_SIO_MODE_0_0_TX_CYCLES)) || in spi_pico_pio_configure()
324 clock_freq, SPI_SIO_MODE_0_0_TX_CYCLES))) { in spi_pico_pio_configure()
[all …]
Dspi_ambiq.c28 uint32_t clock_freq; member
151 if (cfg->clock_freq > AM_HAL_IOM_MAX_FREQ) { in spi_config()
158 (config->frequency ? MIN(config->frequency, cfg->clock_freq) : cfg->clock_freq); in spi_config()
447 .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), \
/Zephyr-Core-3.7.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_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()
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()

12