Hello everyone,
I am working on DM37x EVM and I want to enable sidetone in McBSP. MIC input and speaker output both are working fine (I have verified by writting the contents of DRR to DXR) but McBSP sidetone is not. In MCBSP_ST_SSELCR, I have mapped Input channel 1 to output channel 1 and input channel 0 to output channel 0 but no output.
My settings are as follows:
/* Required configuration. */
MEM_WRITE32(0x49024048, 0x000); //PCR
MEM_WRITE32(0x49024024, 0x40); //XCR1
MEM_WRITE32(0x49024020, 0x8040); //XCR2
MEM_WRITE32(0x490240AC, 1<<11); //Enable transmit full cycle mode.
MEM_WRITE32(0x4902401C, 0x40); //RCR1
MEM_WRITE32(0x49024018, 0x8040); //RCR2
/* Threshold control register. */
MEM_WRITE32(0x49024090, 0x70);
/* Set MCR register for multichannel mode. */
MEM_WRITE32(0x49024034, 0x01); //MCR1
MEM_WRITE32(0x49024030, 0x01); //MCR2
MEM_WRITE32(0x49024038, 0x03); //RECRA
MEM_WRITE32(0x49024040, 0x03); //XCERA
/* Enable sidetone in McBSP */
MEM_WRITE32(0x490240BC, 0x484); //SSELCR
/* Enable Sidetone in external sidetone core. */
MEM_WRITE32(0x4902A010, 0x00);
/* Write FIR ceoefficients. */
uint32_t i, read;
MEM_WRITE32(0x4902A02C, 0x02); //Enable writing of FIR coefficients. Dummy coefficients written just to see if sidetone works.
for(i=0; i<128; i++)
{
MEM_WRITE32(0x4902A028, 0xffff);
}
i = 0;
read = MEM_READ32(0x4902A02C);
while(!(read&4) && (++i < 1000))
{
read = MEM_READ32(0x4902A02C);
}
MEM_WRITE32(0x4902A02C, 0x00); //Writing FIR coefficients complete.
MEM_WRITE32(0x4902A024, 0xffffffff); //Sidetone gain register. Set to full just to see if there is some output.
MEM_WRITE32(0x4902A02C, 0x01);
- Am I missing some setting or done something wrong?
- Can Sidetone work without programming FIR coefficients in-case if I do not have already designed FIR filter?
Kindly help me in this as it is blocking my progress.
Umair