Search found 6 matches

by Lemming
Wed Apr 16, 2014 3:44 pm
Forum: STM32 Support
Topic: Using new I2S Driver
Replies: 12
Views: 8092

Re: Using new I2S Driver

Now I'm seeing a good sample, followed by a zero. This looks correct for stereo sound, but since I have mono input, this is probably a configuration issue on my end. Funny that the only issue was forgetting to set the word size on the peripheral end.

Thanks, Giovanni!
by Lemming
Wed Apr 09, 2014 8:22 pm
Forum: STM32 Support
Topic: Using new I2S Driver
Replies: 12
Views: 8092

Re: Using new I2S Driver

Yes, I'm pointing i2sPtr at the head of the i2s_rx_buf array for the half event and halfway into the array for the full event. If you'd rather, you can just change the memory compares to "memcmp(i2s_rx_buf, pattern, I2S_HALF_BUF*sizeof(int16_t))" for the half and "memcmp(&i2s_rx_buf[I2S_HALF_BUF ...
by Lemming
Wed Apr 09, 2014 7:44 pm
Forum: STM32 Support
Topic: Using new I2S Driver
Replies: 12
Views: 8092

Re: Using new I2S Driver

Alright, I've updated the callback so it doesn't copy anything and the thread addresses the buffer directly. Having seeded the buffer with a recognizable pattern, you can see that the buffer isn't being completely filled. There is some weirdness though, in that depending how I address the buffer, I ...
by Lemming
Mon Apr 07, 2014 10:31 pm
Forum: STM32 Support
Topic: Using new I2S Driver
Replies: 12
Views: 8092

Re: Using new I2S Driver

Here's my I2SConfig and the receiver code. I've set the PLLI2SN and PLLI2SR values to 192 and 2, as recommended by the reference manual for 8kHz, 16-bit audio.


#define I2S_BUF_SIZE 4096
#define I2S_HALF_BUF I2S_BUF_SIZE/2

int16_t i2s_rx_buf[I2S_BUF_SIZE] __attribute__((aligned(sizeof ...
by Lemming
Mon Apr 07, 2014 9:24 pm
Forum: STM32 Support
Topic: Using new I2S Driver
Replies: 12
Views: 8092

Re: Using new I2S Driver

Since the driver is firing both half transfer and transfer complete interrupts, I assume it thinks it has filled the buffer. It just seems like the offset into the buffer is incorrect, or perhaps it's not circling properly.

Could you elaborate more on what you mean by the driver not being fast ...
by Lemming
Mon Apr 07, 2014 3:19 pm
Forum: STM32 Support
Topic: Using new I2S Driver
Replies: 12
Views: 8092

Re: Using new I2S Driver

I've been using the new driver as well, and while copying each half of a single circular buffer into two intermediary buffers for writing to the file, these are the results I've been seeing. I attempted to use memory pools, but they produced the same results. The one thing I did notice was that ...