I2S communication between 2 stm32 boards facing issues in receiving?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-10-25 10:04 PM
Hello,
I am trying to send some dummy data through I2S in PCM format from one stm32 board to another board by configuring one board as master transmit and the other one slave receive.
I can send and receive the data but the received data is doubled the transmitted data and i am not getting how it is coming. Need the help in this one its very urgent?
Ex: if i transmit 1 i am receiving 2
Master Transmit Configurations :-
hi2s2.Instance = SPI2;
hi2s2.Init.Mode = I2S_MODE_MASTER_TX;
hi2s2.Init.Standard = I2S_STANDARD_PCM_SHORT;
hi2s2.Init.DataFormat = I2S_DATAFORMAT_16B;
hi2s2.Init.MCLKOutput = I2S_MCLKOUTPUT_DISABLE;
hi2s2.Init.AudioFreq = I2S_AUDIOFREQ_16K;
hi2s2.Init.CPOL = I2S_CPOL_LOW;
hi2s2.Init.ClockSource = I2S_CLOCK_PLL;
Slave Receive Configurations :-
hi2s2.Instance = SPI2;
hi2s2.Init.Mode = I2S_MODE_SLAVE_RX;
hi2s2.Init.Standard = I2S_STANDARD_PCM_SHORT;
hi2s2.Init.DataFormat = I2S_DATAFORMAT_16B;
hi2s2.Init.MCLKOutput = I2S_MCLKOUTPUT_DISABLE;
hi2s2.Init.AudioFreq = I2S_AUDIOFREQ_16K;
hi2s2.Init.CPOL = I2S_CPOL_LOW;
hi2s2.Init.ClockSource = I2S_CLOCK_PLL;
Its very urgent please do help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-10-26 12:08 AM
Observe signals using LA.
​
​JW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-10-26 1:55 AM
This is what I am receiving on the logic analyzer and could not relate it to waveform of the stm32f746 reference manual and I am not understanding how WS is behaving
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-10-26 2:34 AM
Hello there was error in the setting of the logic analyzer attaching the new screenshot where I am getting exactly what I am sending
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-10-26 3:48 AM
So, you don't see any data doubling in the signal? Then the problem can be localized to the receiver.
Which STM32 is the receiver?
How exactly does the problem manifest itself?
Do you use DMA? Read out and check/post content of SPI/I2S and DMA registers content.
JW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-10-26 10:24 PM
stm32f746 discovery board as my receiver.
No I am not using DMA its just polling method.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-10-27 12:08 AM
I think you may check status registers of I2S for issue analysis, like OVR, UDR...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-10-27 9:13 AM
OK so what does "but the received data is doubled" mean exactly and how do you detect that?
JW
