From 868d23f1d1d404b1cf081e5ef4e8a5d96a7d99a9 Mon Sep 17 00:00:00 2001 From: IFX-Anusha Date: Wed, 23 Oct 2024 17:46:56 +0530 Subject: [PATCH] docs/psoc6: Clock API Documentation. Signed-off-by: IFX-Anusha --- docs/psoc6/quickref.rst | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/psoc6/quickref.rst b/docs/psoc6/quickref.rst index 55bcefcb7ac54..894f88efebb68 100644 --- a/docs/psoc6/quickref.rst +++ b/docs/psoc6/quickref.rst @@ -42,7 +42,13 @@ The :mod:`machine` module:: import machine - machine.freq() # get the current frequency of the CPU + machine.freq() # get the current frequency of the Core M4 + machine.freq(CM4, freq) # set the frequency of the Core M4 sourced by PLL to freq. Value of freq can be upto 150 MHz + machine.freq(CM4_FLL, freq) # set the frequency of the Core M4 sourced by FLL to freq. Value of freq can be upto 48 MHz + machine.freq(AUDIO_I2S_98_MHZ) # set the frequency of the I2S clock to 98 MHz + machine.freq(AUDIO_I2S_90_MHZ) # set the frequency of the I2S clock to 90 MHz + machine.freq(AUDIO_PDM_24_576_000_HZ) # set the frequency of the I2S clock to 24576000 HZ + machine.freq(AUDIO_PDM_22_579_200_HZ) # set the frequency of the I2S clock to 22579200 HZ Delay and timing ---------------- @@ -548,6 +554,11 @@ See :ref:`machine.I2S `. The following specialization applies to this port: +Before using the I2S bus, the I2S clock frequency needs to be set. The I2S clock frequency can be set to 98 MHz or 90 MHz. The I2S clock frequency can be set using the following function: + +machine.freq(AUDIO_I2S_98_MHZ) # set the frequency of the I2S clock to 98 MHz. For sample rates: 8KHz / 16 KHz / 32 KHz / 48 KHz +machine.freq(AUDIO_I2S_90_MHZ) # set the frequency of the I2S clock to 90 MHz. For sample rates: 22.05 KHz / 44.1 KHz + Constructor ^^^^^^^^^^^^