This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

McASP initialization for sampling rate 8 KHz

Other Parts Discussed in Thread: OMAP-L138

hi,

I am using the Logic PD Experimenter with OMAP-L138 SOM, i built my code on the example of the training workshop Sol3_THREADS. i modified the initialization of the MCASP to make clock source AUXCLK (24 MHz) by setting CLKXM=1 and HCLKXM=1. but it appears that is impossible if we used 16 or 32 slot size because 24000000/(8000*32)= 93.75 or 24000000/(8000*64)= 46.875 . i tried to change the slot size on the reg RFMT and XFMT to 20 because  24000000/(8000*40)=75 but i failed to get any output.

is there any solution to set the McASP to 8 KHz without replacing the external AHCLKX to smaller value such as 3.072?

here is my initialization of the McASP:

// configure transmit registers for I2S - all same as above
   MCASP->XMASK      = 0xFFFFF000;
   MCASP->XFMT       = 0x00018098;        
   MCASP->AFSXCTL    = 0x00000112;
   MCASP->ACLKXCTL   = 0x000000A0;
   MCASP->AHCLKXCTL  = 0x0000804a;
   MCASP->XTDM       = 0x00000003;
   MCASP->XINTCTL    = 0x00000000;
   MCASP->XCLKCHK    = 0x00FF0008;

   // config serializers (11 = xmit, 12 = rcv)
   MCASP->SRCTL11    = 0x000D;                    // XMT
   MCASP->SRCTL12    = 0x000E;                    // RCV

   // config pin function and direction.
   MCASP->PFUNC      = 0;
   MCASP->PDIR       = 0x14000800;

   MCASP->DITCTL     = 0x00000000;
   MCASP->DLBCTL     = 0x00000000;
   MCASP->AMUTE      = 0x00000000;