cancel
Showing results for 
Search instead for 
Did you mean: 

I2S Full Duplex Slave mode, potential problem

CLeo.1
Senior II

Hi guys, not sure how ill word this but I am having issues when using the STM32H7 I2S slave full duplex mode.

The way its setup now is that I have an ESP32 setup as an A2DP sink as a MASTER transmitter. This sends data to the STM32 through the I2S bus to do some DSP, once the DSP is done the STMH7 should send data to a DAC.

Whats happening is that anytime I involved the DAC into the signal line it freezes up the STM32 and nothing gets transmitted, then as soon I take out the DAC the STM32H7 starts working again.

The pin in question is the MISO pin PB14 when the STM32H7 is sending out data to the DAC

Any ideas? I know its receiving correctly but its not ever transmitting and I am not sure why.

5 REPLIES 5

> its not ever transmitting

Then your transmitter setup is broken.

Read out and check registers of whatever device are you using as transmitter. Try it in isolation first with a simple test program

JW

CLeo.1
Senior II

Can you help me out? I am so lost right now not sure what to check. What I did so far is that I checked GPIO registers are correctly setup up, which they are. Anything else you suggest, no idea why its so complicated, I would imagine setting up full duplex slave would just work. Here's the code. to long to post here. https://pastebin.com/Tz8UUG91

I don't see anything suspicious there, but I don't use the 'H7.

Try to investigate, what "freeze" exactly means - break in debugger and observe, what code is executed; instrument code and interrupts and trace their execution; cut down portions of code to find out which might be the culprit, etc. - all the usual debugging techniques in mcus.

JW

CLeo.1
Senior II

The freeze essentially is the live expression on the arrays stop processing, when running you can see the RxBuff and TxBuff update when the pin is in, everything stops. What if it isnt a software issue but a hardware, I eel like its getting to some impedance issue maybe? like the pin configuration is set to an input or something and not an output? If the code looks good what else can affect it? I have tried debugging it I have no idea what to do

CLeo.1
Senior II

Okay I found the solution, it was using SPI3 instead of SPI2 not entirely sure why SPI2 does not work. I tried using every pin associated with SPI2 and nothing worked.