2021-06-03 04:57 PM
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:
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.
2021-06-05 01:22 PM
Oh sorry that was the old code, I can ensure you that RXDMAEN and TXDAMEN are set.
I tried to get it running without the DMA and still cant get it working.
2021-06-05 01:24 PM
@TDK Here you go king.
https://pastebin.com/EFaLMLgR thats the code, currently using
2021-06-05 01:34 PM
2021-06-05 01:43 PM
Its not your fault thats mine. I do apologize for that. If you have it in you, the latest code below this is the right one and is the one I am confident in. If you can spot anything in that that would be amazing.
2021-06-06 09:50 AM
If you cannot get something working, back off to a minimum. Make a simple polling pattern transmitter without DMA or even interrupts.
2021-06-06 01:39 PM
Fair enough, Would be able to look at my code and see if theres anything wrong https://pastebin.com/EFaLMLgR?