i.MX RT 1060 using SAI2 as TDM slave

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

i.MX RT 1060 using SAI2 as TDM slave

Jump to solution
1,557 Views
Inotani
Junior Contributor I

To all concerned,

I am planning to use the i.MX RT1060 SAI2 as a slave.

I tried to configure SAI2 and eDMA as shown in the attached C source file
(SaiDmaInit()).
SAI2 is configured as a TDM slave, so MCLK, BCLK, LRCLK, and RX data are
provided from the FPGA pins, while the i.MX RT1060 only outputs TX data.

However, I have encountered a problem: RX data cannot be received correctly.

I would like to know whether there are any mistakes in my configuration settings.

Regards,

Labels (1)
0 Kudos
Reply
1 Solution
1,520 Views
mayliu1
NXP Employee
NXP Employee

Hi @Inotani ,

Thank you so much for your interest in our products and for using our community.

Could you double check the SAI configuration in the following Fig.

mayliu1_0-1755504111920.png

mayliu1_1-1755504199808.png

Wish it helps you.
If you still have question about it, please kindly let me know.

Wish you a nice day!

Best Regards
MayLiu

View solution in original post

0 Kudos
Reply
3 Replies
1,521 Views
mayliu1
NXP Employee
NXP Employee

Hi @Inotani ,

Thank you so much for your interest in our products and for using our community.

Could you double check the SAI configuration in the following Fig.

mayliu1_0-1755504111920.png

mayliu1_1-1755504199808.png

Wish it helps you.
If you still have question about it, please kindly let me know.

Wish you a nice day!

Best Regards
MayLiu

0 Kudos
Reply
1,133 Views
Denibel
Contributor I

Hello. Me too, i have problems with SAI. I do not understand §38.3.2.1 of the reference manual. Here is my analysis of the first case i.e. using transmitter bit clock :

"Configure the transmitter for asynchronous operation and the receiver for
synchronous operation." I understand "write 0 in SYNC field of TCR2 register, and 1 in SYNC field of RCR2 register" while TE field in TCSR register and RE field in TCSR register are still in 0 state.

"Enable the receiver in synchronous mode only after both the transmitter and receiver
are enabled." I understand : "write 1 in SYNC field in RCR2 only after TE field in TCSR and RE field in RCSR are both set to 1.

So what is the correct order in this trouble interpretation ? 

Others questions are: "is it necessary to configure anything in the receiver if the tranmitter only is used ?" and the symetrical question...

I am using SAI2 on TEENSY 4.0 board, and teensyduino IDE, and I try to understand how it works. Their libraries are so complex that I strip them down to extract only what concerns the hardware, checking every registers setting with reference manual. The simplest thing I did is configuring the transmitter to send permanently the same 32 bits word in a monophonic chanel. Just checking "FIFO Request Flag" in TCSR in main loop, no interrupt, no DMA. When this flag is set, I write 0xAAAAAAAA in TDR0 register. I got correct square signals on TX_BCLK and TX_SYNC outputs (3.072 MHz and 48 kHz), correct signal on TX_DATA output (16 pulses in when TX_SYNC is high). But if in the same time I toggle a GPIO port this one does not produce the awaited 24 kHz square signal: it is completly asynchronous with TX_SYNC, with a higher frequency. 

0 Kudos
Reply
558 Views
Denibel
Contributor I

... Last problem solved, just a beginer's error in C++ code ... There remains the un-understandable problem of the obscure §38.3.2.1.

0 Kudos
Reply