Hi everyone,
I am trying to interface an ADC to K60 MCU (TWR-K60F512) using I2S interface.
ADC is always a MASTER
Reading ADC:
Please see the below timing diagram of ADC, which shows how it transmits the conversion results.
Following are the ADC signals related to ADC Read :
a) Serial Clock Output (SCO),
b) Frame Synchronization Output (FSO)
c) Serial Data Output (SDO)
Writing ADC:
Please see the below timing diagram of ADC which shows how a write operation is performed.
Following are the ADC signals related to ADC write:
a) Serial Clock Output (SCO) same as above
b) Frame Synchronization Input (FSI)
c) Serial Data Input (SDI)
For this requirement, I planned to interface ADC to I2S module as follows:
SCO -> I2S0_RX_BCLK, I2S_TX_BCLK
FSO -> I2S0_RX_FS
SDO -> I2S0_RX_D0
FSI <- I2S0_TX_FS
SDI <- I2S0_TX_D0
Please review the configuration and suggest the required configuration settings like Mode (Synchronous, Asynchronous, Synchronous with Other SAI..) and other configuration register settings.
Thanks in advance
Gourah
Can anyone there, please respond, awaiting your replies.
Thanks
Hello Gourah,
Sorry for late response but i needed to confirm some details.
I reviewed your configuration and this could not be achieved using K60's SAI module.
For reception (ADC's reading cycles), SAI module will work with no problem.
Problem here is Transmission (writing cycle), it is not possible to synchronize Frame Sync signal to bit clock. SAI module supports 2 cases: Configured as Master in which all clocks are generated by SAI or Configured as Slave in which SAI module receives clocks from Master. In your case, Bit clock will be generated in ADC chip and Frame Sync In needs to be generated by SAI, so this configuration is not supported.
You can use a newer K6x part that contains FlexIO module, in which, you can emulate this SAI functionality without problems on synchronizing Frame Sync and Bit clock signals.
I hope this can help you.
Best Regards,
Isaac