2020-12-06 04:26 PM
Hi guys,
Finally started injected known data into the I2S bus and I am seeing indifferences on the line and was wondering if you guys can explain this to me if this is normal or not.
Using the STM32H753ZI
Figure 1:
Sending: 0xFF FF (16 bits)
DATLEN = 16 bits
CHLEN = 16 bits
Figure 2:
Sending: 0xFF FF FF (24 bits)
DATLEN = 24 bits
CHLEN = 32 bits
Figure 3:
Sending: 0xFF FF FF FF (32 Bits)
DATLNE = 32 bits
CHLEN =32 BITS
Why when it comes to sending 24 bits I am missing a byte?
Another thing I noticed when sending 24 bits for example if sent 0x010203, the bus will receive 0x000102 its like performing a >> shift by a byte
I2S and DMA configuration:
2020-12-06 05:10 PM
Duplicate: Related:
Hard to say much without seeing code. Clearly the middle example is not sending 0xFFFFFF. Gotta be a bug somewhere.
You should be sampling on the rising edge, not the falling edge.
2020-12-06 05:15 PM
@TDK Oh sorry, totally forgot about the code, ill fix it up. I wouldnt say its a duplicate as that one was more so how to get data (your own known data) onto the I2S bus, this one is after the fact.
Yeah exactly thats why I am posting here, something is not making sense.
2020-12-06 08:46 PM
Okay, so there's initialization code posted not, but not the code used to actually send data.
> SPI3 -> I2SCFGR |= SPI_I2SCFGR_DATFMT_LAlign;
Maybe you're just not aligning your data correctly. Are you sending 0xFFFFFF or 0xFFFFFF00? Regardless, try the other one. Or instead leave data right-aligned (default).
2020-12-06 11:29 PM
With a lot of alone time with the logic analyzer and a lot of more reading of the reference manual, I finally figured it out.
I am Sending 0x00 FF FF FF (32 Bits). Whats happening since its Left Align and DATLEN = 24 bits, it will read the first 3 bytes as its suggested in the RM0433 Pg.2227 Figure 638. When I switched the Left Align to Right Align the I2S Bus then produced 0xFF FF FF 00 where the zero is ignored.
So its been working correctly, just didn't understand it.