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.

Moderator: RoccoMarco

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

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

Post by chiVelle »

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 4360 times
Abhishek
Posts: 266
Joined: Wed May 23, 2012 3:15 pm

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

Post by Abhishek »

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: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

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

Post by Giovanni »

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

Post by chiVelle »

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: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

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

Post by Giovanni »

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

Giovanni
Post Reply