I2S/SPI DMA RX from audio chip not firing interrupts

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderators: barthess, RoccoMarco

chiVelle
Posts: 21
Joined: Sun Aug 25, 2013 4:16 pm

Re: I2S/SPI DMA RX from audio chip not firing interrupts

Postby chiVelle » Mon Feb 17, 2014 3:40 pm

Interrupts are being fired but everything in the DMA Memory0 location is garbage data. I checked the SPI2 DR register and it is always 0 when DMA is enabled. I hooked a scope up to the I2S pins and verified PCM data is being transferred. The I2SCFGR register looks accurate when reading it during DMA enabled. Any ideas on this one?
Attachments
Capture.PNG
Capture.PNG (212.88 KiB) Viewed 1344 times

Abhishek
Posts: 266
Joined: Wed May 23, 2012 3:15 pm
Location: India

Re: I2S/SPI DMA RX from audio chip not firing interrupts

Postby Abhishek » Mon Feb 17, 2014 3:56 pm

The PC3 pin is being used by the on-board PDM mic. Is there a logic contention?
Or, try changing CPOL bit in I2SCFGR and see if it has any effect.

Best Regards
Abhishek

User avatar
Giovanni
Site Admin
Posts: 12949
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 733 times
Been thanked: 609 times
Contact:

Re: I2S/SPI DMA RX from audio chip not firing interrupts

Postby Giovanni » Tue Mar 04, 2014 12:38 pm

Hi,

I committed an I2S driver in the 3.0 branch, apparently it is able to read the PDM stream from the F4-Discovery microphone. I had to change the driver model a bit in order to save DMA channels (TX-only and RX-only require only one channel, it is useless always allocate two).

Now I am a bit stuck with further testing, suggestions? I'll stop on this one for the time being.

Giovanni

chiVelle
Posts: 21
Joined: Sun Aug 25, 2013 4:16 pm

Re: I2S/SPI DMA RX from audio chip not firing interrupts

Postby chiVelle » Wed Mar 05, 2014 3:37 am

I will try to integrate this into my project soon for testing and will report issues/findings. Looking through the driver I don't see anything that stands out as non-compatible with the 2.6 kernel, is this correct? I'd like to integrate this into my 2.6.3 project. Thanks for the post notifying me of the commit.

User avatar
Giovanni
Site Admin
Posts: 12949
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 733 times
Been thanked: 609 times
Contact:

Re: I2S/SPI DMA RX from audio chip not firing interrupts

Postby Giovanni » Wed Mar 05, 2014 9:17 am

You have just to replace those osal and OSAL_ functions/macros with their ch/CH_ equivalents in 2.6.

Giovanni


Return to “STM32 Support”

Who is online

Users browsing this forum: No registered users and 3 guests