Hi have a sample code for initializing the Sampling frequency for a DAC in which the values are as given below:-
P=1, R=1, J=8, D=1920, NDAC=2, MDAC=8, DOSR=128. This value is selected so as to have a MCLK of 12MHz.
The Sampling frequency is 48KHz ( DAC_FS).
But as per the values given in datasheet, the values for a MCLK of 12MHz should be as follows:-
P=1, R=1, J=7, D=1680, NDAC=2, MDAC=7, DOSR=128.
The formula given as per the datasheet is
DAC_FS = ( CODEC_CLKIN) / ( NDAC * MDAC * DOSR )
CODEC_CLKIN = (PLL _CLKIN * R * J.D) / ( P )
PLL_CLKIN = MCLK = 12MHz.
The final obtained value of the DAC_FS is same with both the set the values. But my question is do we really have to deviate from the datasheet values or is there a specific reason for the value change ?
It depends on what is the PRB_P or PRB_R resource class (RC) requirement is. The setting in the datasheet is ok. The sample code settings make it easier to change from one sample rate to another by just changing DOSR values (for DAC side) and MADC values (for ADC side).
Thank you very much for the solution J Arbona. Sorry from my side for the late response. Your response was really helpful.
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.