Hello,
I use the SSI1 with AUDMUX1 and AUDMUX4 in a simple way.
// bith PINs to ALT3
m_muxAud4TXD.SetAddr( 0x020E0050);
m_muxAud4TXD.SetValue( 3);
m_muxAud4RXD.SetAddr( 0x020E0054);
m_muxAud4RXD.SetValue(3);
// AUDMUX1 gets all clocks and syncs from SSI1
m_audm1_ptcr.SetValue( 0);
m_audm1_pdcr.SetValue( (3<<13) );
// AUDMUX4 gets all needed from AUDMUX1
m_audm4_ptcr.SetValue( (1<<31) + (1<<26) + (1<<21) + (1<<16) );
m_audm4_pdcr.SetValue( 0);
// enable recv, transmit and SSI1
m_ssi1cr.SetValue( (1<<2) + (1<<1) + (1<<0) );
// fifo 0 enable, frame and clock dir internal
m_ssi1stcr.SetValue( (1<<7) + (1<<6) + (1<<5) );
// divide by 2, prescaler, 24bits, modulus
m_ssi1stccr.SetValue( (1<<18) + (1<<17) + (11<<13) + 0x02);
m_ssi1srcr.SetValue( (1<<7) + (1<<6) + (1<<5) );
m_ssi1srccr.SetValue( (1<<18) + (1<<17) + (11<<13) + 0x02);
// Masks to send
g_aSending[0]= 0xCCCCCC00;
g_aSending[1]= 0xCCCCCC00;
g_aSending[2]= 0xCCCCFF00;
g_aSending[3]= 0xFFFFFFFF;
g_aSending[4]= 0xFFFFFFFF;
I send whenever ssi1sfcsr&0x00000F00 == 0 and read
if ss1sfcsr&0x0000F000 != 0, amount of both events are the same.
Masks are visible on the oscilloscope.
The return is on PIN RXD.
But I always read the pattern send over TXD. From Recv Fifo 0.
Where is my mistake?
Many thanks for your help.
09.06.2016
Changed
m_audm4_ptcr.SetValue( (1<<31) + (1<<26) + (1<<21) + (8<<17) + (1<<16) + (8<<12) );
Recv masks have high bit set, manual page 716, no success.
已解决! 转到解答。
Tried all I understood. Solved it by using the SPI5. This one uses same Pads. No luck with SSI.
Tried one more point
m_audm1_ptcr.SetValue( 0x9CC00800);
m_audm1_pdcr.SetValue( 0x00006000);
m_audm4_ptcr.SetValue( 0x000000800);
m_audm4_pdcr.SetValue( 0x0);
After boot AUDMUX1 is connected to AUDMUX6. Changed the init to 4, with the reset values from the manual.
SSI1 to sync.
Output of the bitmaks on TXD, RXD still always 0. Got tx events in Fifo0 and Rx events in Fifo0.
But I always read 0s.
No way out?
Hi Dirk
one can try attached standalone audio test from i.MX6 sdk baremetal tests,
please check pdf document Chapter 5 Configuring the AUDMUX Driver,
Chapter 32 Configuring the SSI Driver.
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------