AnsweredAssumed Answered

iMxRT SAI in synchronous mode

Question asked by Francois Lion on Mar 7, 2019
Latest reply on Mar 18, 2019 by Udo Eberhardt

Hello,

 

I am evaluating the SAI capabilities of the iMxRT1050, and I have a problem running SAI1 and SAI2 in synchronous Master mode: I want to use the SAI1 Tx Clocks (TX_BCLK and TX_WCLK) as reference clocks for all other data lines SAI1 and SAI2.

 

To achieve that I configured the 2 SAIs the same way as master except for the SYNC fields of TCR2/RCR2.

Based on the documentation and SDK I configured the SYNC fields as follow:

SAI1.TCR2.SYNC = 0 - Asynchronous mode.

SAI1.RCR2.SYNC = 1 - Sync with Tx

SAI2.TCR2.SYNC = 2 -  Synchronous with another SAI transmitter.

SAI2.RCR2.SYNC = 3  - Synchronous with another SAI transmitter.

 

In this configuration, the SAI1 is running just fine, but not the SAI2 that does nothing without error report, SAI2 is just not running.

 

I also tested with SAI2.RCR2.SYNC = 2 because there is something unclear here: The documentation says "3  - Synchronous with another SAI transmitter." for SAI2.RCR2.SYNC, while the SDK use 2:

In fsl_sai.c line 494

        case kSAI_ModeSyncWithOtherTx:
            val = base->RCR2;
            val &= ~I2S_RCR2_SYNC_MASK;
            base->RCR2 = (val | I2S_RCR2_SYNC(2U));
            break;

 

So how sync between SAIs works? Does someone succeeded using this feature ?

 

Thanks,

François

Outcomes