I'm developing on OMAP-L137
Below are the McASP transmit setting.
/* TX */
mcasp->regs->XMASK = 0xffffffff; // No padding used
mcasp->regs->XFMT = 0x00008078; // MSB 16bit, 1-delay, no pad, CFGBus
mcasp->regs->AFSXCTL = 0x00000112; // 2TDM, 1bit Rising edge INTERNAL FS, word
mcasp->regs->ACLKXCTL = 0x000000AF; // ASYNC, Rising INTERNAL CLK, div-by-16
mcasp->regs->AHCLKXCTL = 0x00000000; // EXT CLK
According to SPRU041J C6000 McASP reference guide,
ACLKXCTL = 0x000000AF; => Bit 4-0 = 01111 = 15 => Divide by 16
The McASP transmit and receive clock run at 48KHz. So, I could execute "while ( ! ( MCASP1_SRCTL0 & 0x20 ) );"
48000 times per second.
When I set ACLKXCTL = 0x000000BF; , Bit 4-0 = 11111 = 31 => Divide by 32
The McASP transmit and receive clock run at 24KHz.
"while ( ! ( MCASP1_SRCTL0 & 0x20 ) );" could be executed 24000 times per second.
How could I set McASP transmit and receive clock as 16KHz?
The max value of ACLKXCTL CLKXDIV is 32. I can't set CLKXDIV as 48.