I am currently using a STM32L4 micro as a host to the AD2428 master transceiver with one AD2428 slave node. I made use of Sigma studio to generate the bus configuration C file (attached) and make use of the SAI on the STM micro to acquire data in master receiver mode. It is in TDM4 mode with a slot size of 16.
Including other files from the example project, discovery works and I manage to get data coming through via SAI DMA after I relay to my PC host via UART. However, there seems to be distortion of the signal (original signal is a 1 khz Sine wave). I want to check if my SAI settings on the MCU end is correct:
Protocol: I2S MSB justified.
Data size: 16 bits.
Number of slots: 4
Master clock: enabled.
Audio frequency: 48 kHz
Fifo threshold: empty
Output drive: Disabled.
I left the other settings as default - I am using a STM32 Cube IDE. The funny thing is that some good data comes through but they are positioned in odd locations in the DMA buffer i.e. data which I expect in slot 0 and 1 are found in slots 1 and 2 in the DMA buffer (in a repeating pattern).
Please help me to check if my SAI settings are correct and any other register settings I need to make in order to make it work. Any ideas about where the problem might be will be appreciated.
Thanks very much,