cancel
Showing results for 
Search instead for 
Did you mean: 

DMA Interrupts

andprice
Associate II
Posted on August 09, 2013 at 00:46

Here's the situation - I'm transferring some data from I2S to a buffer in memory via DMA.  The DMA is set up to be double buffered - I'll skip all the initialization code but here are what the DMA registers look like just before I enable the stream:

LISR: 0x00000000

HISR: 0x00000000

LIFCR: 0x00000000

HIFCR: 0x00000000

CR: 0x00062D5E

NDTR: 0x00000200

PAR: 0x4000380C

M0AR: 0x20001A84

M1AR: 0x20001E84

FCR: 0x000000A0

The I2S is setup for 48kHz and I have 2 int16_t buffers of 512 samples each.  So, I would expect that I get an interrupt every 256/Fs = 5ms telling me a buffer has finished playing. Two questions:

1) Which interrupts should I be looking for (HT or TC or both)?

2) Regardless of the type I seem to only get interrupts every 10ms - any ideas why?  The weird part is that I also seem to get the HT and TC flags set on the same interrupt (instead of offset 5ms as I'd expect).

1 REPLY 1
andprice
Associate II
Posted on August 12, 2013 at 19:13

This is solved - I was losing interrupts due to some higher priority interrupts firing.