As the Technical Reference Manual suggests to use External I2S_MCLK to CX3 for high-quality audio. I have two questions to ask:
1) What do you mean by High-Quality Audio, could you please be more elaborate? I'm asking this because I'm hearing unwanted noise when given for standard audio quality testing whereas i haven't heard any noise during normal audio playback at 44.1kHz, 16 bit, Mono, Continuous Padding mode, auto DMA configuration.
2) How do i configure CX3 to take the External clock as input? I have tried using GCTL_I2S_CORE_CLK register using pointer as there is no provision for API to configure this register. But as per the note i cannot reset the CX3 as I'm having other threads and peripherals which are running, thus tried resetting only the I2S Module using I2S_POWER register. Also, a point to note was that, the I2S_Init() as well as I2S_SetConfig is modifying the register while calling I2S_SetClock(), thus i had to modify the GCTL_I2S_CORE_CLK only after the above two functions are called. It lead to modification of the MCLK but no output from BCLK or WCLK while playback from host.
Can you please suggest some instructions to use External I2S_Mclk or some good validated setup with hardware and firmware to test for good quality audio?
Earliest reply would be really grateful.
Thanks and Regards
You need to modify the MCLK_IN bit alone in that register, without affecting the contents of the other bit. The I2SSetClock API modifies only the parts related to the divider. So you can set the MCLK_IN bit before the I2sInit API.
*(uint32_t *)(0x........) |= 0x40000000; (MCLK_In is the 30th bit here, so 0x40000000 is the value to be ORed with)
Thanks for the reply. I have tried the configurations which you had mentioned, yet the results weren't any affirmative. Can you please provide the code snippet of the I2S related API so that we can modify as per requirement. We are really getting tight on our schedules trying all possible combinations from the FX3 TRM and programmers manual. Also, inability to compile the threadx library. Hope to get a better solution as early as possible.