2017-08-08 07:55 AM
Solved! Go to Solution.
2017-08-14 05:30 AM
Okay, I found the mistake, I was expecting my DMA to be 16bits as I programmed i2s so, and did not see that data bit was actually in word. I have been confused as this parameter is not in the main and forgot about it.
2017-08-08 08:58 AM
I2S naturally contains both channels so there's something wrong in your setup.
Observe WS versus CK directly on the codec's pins.
JW
2017-08-09 02:22 AM
Hi Jan,
Yes you are right, the fact that make me think that it is a software issue is that I checked the I2S bus with a logic analyser. WS is correctly balancing left right, CK is much faster as expected and the data is corresponding to the analog value -> right a nice sinus, left wierd semi periodical signal.
But what I don't understand, if we take the problem reversly, if I had to send two different signal on the two channels, how would I proceed?
In
HAL_I2S_Transmit_DMA(&hi2s2, (uint16_t*) sine_table, 512); I don't see any reference about the second channel, is it suposed to be in the sine_table? I tried to put [sin0, 0, sin1, 0, sin2, 0] as if the data where [L0, R0, L1, R1, ...] but then the right channel was not clean anymore.
I think I have not totally understood the concept...
2017-08-09 04:12 AM
I tried to put [sin0, 0, sin1, 0, sin2, 0] as if the data where [L0, R0, L1, R1, ...]
Yes that's exactly how are they supposed to be.
but then the right channel was not clean anymore.
This is why I say something is wrong in your setup. Is the CODEC set properly for I2S/Philips? FMT pin?
CK is much faster
Is it exactly 16 x WS?
JW
2017-08-09 04:45 AM
I would say yes to all your comments but I will dig into those directions next week (few days off).
Thanks for the clarification!
2017-08-14 05:30 AM
Okay, I found the mistake, I was expecting my DMA to be 16bits as I programmed i2s so, and did not see that data bit was actually in word. I have been confused as this parameter is not in the main and forgot about it.