Hi All,
On the OMAP_L138 EVM, I want to use McASP0 in receive mode (using 2-slot TDM I2S mode) . Master Clock (AHCLKR) is generated externally while Bit Clock (ACLKR) and frame sync (AFSR) are generated internally. I did the following McASP set up in order to achieve this
Mcasp_HwSetupData mcaspRcvSetup =
{
/* .rmask = */ 0xFFFFFFFF, /* all Data bits are used */
/* .rfmt = */ 0x00018070, /* Receive Bit Stream Format Register
* (31-18 Bits) Reserved
* (17-16) RDATDLY - 1 bit delay (for I2S format),
* (15) RRCRS - MSB first,
* (14-13) RPAD - No pad value for extra bits in slot
* (12-8) RPBIT - ignored (only used when RPAD not 0)
* (7-4) RSSZ - 16 bits slot size
* (3) RBUSEL - Reads from XRBUF on DMA port.
* (2-0) RROT - No rotation */
/* .afsrctl = */ 0x00000113, /* Receive Frame Sync Control Register
* (31-16) Reserved
* (15-7) RMOD - I2S mode (2-slot TDM)
* (6-5) Reserved
* (4) FRWID - Single word (width of receive Frame Sync
* (3-2) Reserved
* (1) FSRM - Internally-generated receive frame sync
* (0) FSRP - A failling edge (for I2S) indicates beginning of frame */
/* .rtdm = */ 0x00000003, /* Receive TDM Time Slot Register
* only 2 slots active (for I2S) */
/* .rintctl = */ 0x00000003, /* Receiver Interrupt Control Register
* underrun and sync error active (For now, might need change in future) */
/* .rstat = */ 0x000001FF, /* Receiver Status Register
* reset any existing status bits */
/* .revtctl = */ 0x00000000, /* Receiver DMA Event Control Register
* DMA mode */
{
/* .aclkrctl = */ 0x0000003F, /* Receive Clock Control Register,
* (31-8) Reserved
* (7) CLKRP - Falling edge. (don't know what it means)
* (6) Reserved
* (5) CLKRM - internal
* (4-0) CLKRDIV - divide by 32 */
/* .ahclkrctl = */ 0x0000000F, /* Receive High-Frequency Clock Control Register
* external, divide-by-16 */
/* .rclkchk = */ 0x00000000 /* Receive Clock Check Control Register */
}
};
1) When I measure the Master Clock using Scope, it shows the frenquency is about 24.5. However, the Bit clock is about the same with Master Clock, which should be 32 times slower. Did I do something wrong here?
2) For receive data, I created SIO stream
sioAttrs = SIO_ATTRS;
sioAttrs.nbufs = numOfBufs;
sioAttrs.align = BUFALIGN;
sioAttrs.model = SIO_ISSUERECLAIM;
sioAttrs.timeout = 10000;
/* open the I/O streams for input only */
inStream = SIO_create("/dioMcaspIN", SIO_INPUT, BUFLEN, &sioAttrs);// BUFSIZE, &sioAttrs);
I was told by an Electronics Engineer that if the McASP is set up correctly(as mentioned above), I should see output data even the data might not be meanful. But SIO_reclaim() always return nmadus with value -9. This makes the actual Error Code 9, but I couldn't find anywhere what it means.
The tools that I am using: CCS V4.2.1.00004 BIOS 5_41_10_36 EDMA edma3_lld_01_10_00_01 (Also
tried edma3_lld_01_11_02_05) pspdrivers_01_30_01
Any suggestion will be appreciated.
Regards,
Sarah