Weirdest thing happening with STM32H7 I2S hardware
Hi guys! I am having the biggest issue with the I2S right now
What is happening: For whatever reason the I2S does not want to transmit any samples VIA DMA. Doesnt matter what I do what I try.
The weird thing happening: The I2S WS, SCLK wont work. Only if the DMA associated with the Tx part is enable (DMA1_Stream1) which I find so weird. All it does it set the WS pin to HIGH
What I have tried:
- Verified the registers are correctly setup
- Ensure with measuring tools the right signals are shooting out (WS, MCLK, SCLK) when the DMA1_Stream1 is enable
- Swapped out the ADC/DAC for another one
- Ensured the ADC is sending out its digital signal
- Ensured the STM32 is receiving samples and transmitting to the Tx Buffer associated with the DMA
How the code works.
The code waits around till an UART signal is received VIA the DMA, once received in goes into a super loop where it process UART signals
Depending on what UART signal was received it will enable not only the I2S peripheral but setup the clock, Interrupt, anything to make the I2S running with DMA etc...
Then the stm32 should now be ready to take in I2S signals and spit them out
Code: (Using PasteBin as code is too long here)
Main.c
I2S_Factory.c (Setups GPIO, and DMA)
Audio_Selector.c (Setups the I2S Clock, interrupt, and DMA)
DSP_FACTORY.c (Where in takes in the Rx Samples and transfer it to the Tx Buffer for transitmission)
Any help would be amazing, I am stumped right now its not even funny.