Tool/software: TI-RTOS
Hi,
I am working on custom board using AM5728 with Linux on A15 and TI RTOS on DSP1. I am trying to setup MCASP5 for TX on AXR0 in 32-bit I2S mode for 2 slots. I have initialized EDMA, configured XBAR. I have configured ACLKX = 1.026MHz, FSX = 15.9KHz. The external reference clock is 24.576MHz. I verified ACLKX and FSX being output using scope.
FYI, the Mcasp_HwSetupData used is -
{ /* MCASP5_TX */
0xFFFFFFFF, // MCASP_TXMASK
0x000180F0, // MCASP_TXFMT
0x00000113, // MCASP_TXFMCTL
0x00000003, // MCASP_TXTDM
0x0000000F, // MCASP_EVTCTLX
0x000001FF, // MCASP_TXSTAT
0x00000000, // MCASP_XEVTCTL
{
0x00000022, // MCASP_ACLKXCTL
0x00008098, // MCASP_AHCLKXCTL
0x00000000 // MCASP_TXCLKCHK
}
}
And Mcasp_ChanParams are –
{ /* MCASP5_TX */
1,
{ Mcasp_SerializerNum_0 },
&mcasp_setup[MCASP5_TX], // as above
TRUE,
Mcasp_OpMode_TDM,
Mcasp_WordLength_32,
NULL,
0,
NULL,
(Mcasp_GblCallback)M5_GblErrXmt,
2,
Mcasp_BufferFormat_1SER_MULTISLOT_INTERLEAVED,
TRUE,
4, // 2
TRUE
}
In my code, I am getting callbacks for each MCASP transactions submitted using mcaspSubmitChan(). I have 2 transmit buffers (PING, PONG) with 5ms length. (Buffers are allocated memory using Memory_calloc() and aligned by 128). In the callback, I am checking for under run by means of counting semaphore posts. In the task loop, I am waiting on semaphore, loading data into the transmit buffer and calling CacheP_wbInv() before submitting the loaded transmit buffer using mcaspSubmitChan().
On the scope, I don’t see the data I load into TX buffer being sent out from the AXR0 – it’s all 0s except the 0x0080_0000 being sent out every 10ms (i.e. 2x audio frame size). What am I missing? I have tried re-building pdk with Mcasp_LOOPJOB_ENABLED feature disabled and that didn't help.
(I am using RTOS and Linux SDK v4.01 with CCSv7.2)