Home
last modified time | relevance | path

Searched full:mclk (Results 1 – 15 of 15) sorted by relevance

/hal_espressif-latest/components/driver/deprecated/
Di2s_legacy.c74 i2s_mclk_multiple_t mclk_multiple; /*!< The multiple of mclk to the sample rate */
120 i2s_mclk_multiple_t mclk_multiple; /*!< The multiple of I2S master clock(MCLK) to sample rate */
631 static uint32_t i2s_config_source_clock(i2s_port_t i2s_num, bool use_apll, uint32_t mclk) in i2s_config_source_clock() argument
636 int div = (int)((SOC_APLL_MIN_HZ / mclk) + 1); in i2s_config_source_clock()
637 /* apll_freq = mclk * div in i2s_config_source_clock()
639 * when div = 0, the final mclk will be unpredictable in i2s_config_source_clock()
642 uint32_t expt_freq = mclk * div; in i2s_config_source_clock()
654 /* In APLL mode, there is no sclk but only mclk, so return 0 here to indicate APLL mode */ in i2s_config_source_clock()
669 /* For ADC/DAC mode, the built-in ADC/DAC is driven by 'mclk' instead of 'bclk' in i2s_calculate_adc_dac_clock()
679 … If fixed_mclk and use_apll are set, use fixed_mclk as mclk frequency, otherwise calculate by mclk in i2s_calculate_adc_dac_clock()
[all …]
/hal_espressif-latest/components/hal/
Di2s_hal.c28 * @brief Calculate the precise mclk division by sclk and mclk
31 * @param mclk module clock
36 void i2s_hal_calc_mclk_precise_division(uint32_t sclk, uint32_t mclk, i2s_ll_mclk_div_t *mclk_div) in i2s_hal_calc_mclk_precise_division() argument
43 uint32_t div_inter = sclk / mclk; in i2s_hal_calc_mclk_precise_division()
44 uint32_t freq_diff = sclk % mclk; in i2s_hal_calc_mclk_precise_division()
47 float decimal = freq_diff / (float)mclk; in i2s_hal_calc_mclk_precise_division()
51 int b = (int)(a * (freq_diff / (double)mclk) + 0.5); in i2s_hal_calc_mclk_precise_division()
53 mb = mclk * b; in i2s_hal_calc_mclk_precise_division()
88 i2s_hal_calc_mclk_precise_division(clk_info->sclk, clk_info->mclk, &mclk_div); in i2s_hal_set_tx_clock()
101 i2s_hal_calc_mclk_precise_division(clk_info->sclk, clk_info->mclk, &mclk_div); in i2s_hal_set_rx_clock()
Dadc_hal.c182 uint32_t mclk = bclk * bclk_div; in adc_hal_digi_sample_freq_config()
184 i2s_hal_calc_mclk_precise_division(I2S_BASE_CLK, mclk, &mclk_div); in adc_hal_digi_sample_freq_config()
/hal_espressif-latest/components/hal/include/hal/
Di2s_hal.h102 uint32_t mclk; /*!< I2S master clock */ member
124 * @brief Helper function for calculating the precise mclk division by sclk and mclk
127 * @param mclk module clock
128 * @param mclk_div mclk division coefficients, including integer part and decimal part
130 void i2s_hal_calc_mclk_precise_division(uint32_t sclk, uint32_t mclk, i2s_ll_mclk_div_t *mclk_div);
/hal_espressif-latest/components/hal/esp32s2/include/hal/
Di2s_ll.h284 * @note mclk on ESP32S2 is shared by both TX and RX channel
285 * mclk = sclk / (mclk_div + b/a)
288 * @param mclk_div integer part of the division from sclk to mclk
301 * @note mclk on ESP32 is shared by both TX and RX channel
304 * @param mclk_div The mclk division coefficients
324 * @note mclk on ESP32 is shared by both TX and RX channel
327 * @param mclk_div The mclk division coefficients
331 // TX and RX channel on ESP32 shares a same mclk in i2s_ll_rx_set_mclk()
/hal_espressif-latest/components/hal/esp32/include/hal/
Di2s_ll.h293 * @note mclk on ESP32 is shared by both TX and RX channel
294 * mclk = sclk / (mclk_div + b/a)
297 * @param mclk_div integer part of the division from sclk to mclk
310 * @note mclk on ESP32 is shared by both TX and RX channel
313 * @param mclk_div The mclk division coefficients
333 * @note mclk on ESP32 is shared by both TX and RX channel
336 * @param mclk_div The mclk division coefficients
340 // TX and RX channel on ESP32 shares a same mclk in i2s_ll_rx_set_mclk()
/hal_espressif-latest/components/hal/esp32s3/include/hal/
Di2s_ll.h111 * @brief I2S mclk use tx module clock
121 * @brief I2S mclk use rx module clock
271 /* Set the target mclk division coefficients */ in i2s_ll_tx_set_raw_clk_div()
300 /* Set the target mclk division coefficients */ in i2s_ll_rx_set_raw_clk_div()
312 * @param mclk_div The mclk division coefficients
343 * @note mclk on ESP32 is shared by both TX and RX channel
346 * @param mclk_div The mclk division coefficients
/hal_espressif-latest/components/hal/esp32c6/include/hal/
Di2s_ll.h117 * @brief I2S mclk use tx module clock
128 * @brief I2S mclk use rx module clock
283 /* Set the target mclk division coefficients */ in i2s_ll_tx_set_raw_clk_div()
313 /* Set the target mclk division coefficients */ in i2s_ll_rx_set_raw_clk_div()
325 * @param mclk_div The mclk division coefficients
356 * @note mclk on ESP32 is shared by both TX and RX channel
359 * @param mclk_div The mclk division coefficients
/hal_espressif-latest/components/hal/esp32c3/include/hal/
Di2s_ll.h110 * @brief I2S mclk use tx module clock
120 * @brief I2S mclk use rx module clock
271 /* Set the target mclk division coefficients */ in i2s_ll_tx_set_raw_clk_div()
300 /* Set the target mclk division coefficients */ in i2s_ll_rx_set_raw_clk_div()
312 * @param mclk_div The mclk division coefficients
343 * @note mclk on ESP32 is shared by both TX and RX channel
346 * @param mclk_div The mclk division coefficients
/hal_espressif-latest/components/hal/esp32h2/include/hal/
Di2s_ll.h118 * @brief I2S mclk use tx module clock
129 * @brief I2S mclk use rx module clock
290 /* Set the target mclk division coefficients */ in i2s_ll_tx_set_raw_clk_div()
320 /* Set the target mclk division coefficients */ in i2s_ll_rx_set_raw_clk_div()
332 * @param mclk_div The mclk division coefficients
363 * @note mclk on ESP32 is shared by both TX and RX channel
366 * @param mclk_div The mclk division coefficients
/hal_espressif-latest/zephyr/port/pincfgs/
Desp32c3.yml84 mclk:
Desp32s3.yml82 mclk:
109 mclk:
Desp32s2.yml118 mclk:
/hal_espressif-latest/components/driver/deprecated/driver/
Di2s_types_legacy.h233 …int fixed_mclk; /*!< I2S using fixed MCLK output. If use_apll …
234 …i2s_mclk_multiple_t mclk_multiple; /*!< The multiple of I2S master clock(MCLK) to…
Di2s.h294 * 2. calculate mclk, bck, bck_factor