cancel
Showing results for 
Search instead for 
Did you mean: 

Can the STM32F,H Mix 2 I2S channels?

Russ1
Associate

I have a project that requires 2 I2S inputs (4 audio channels) to be level controlled, then mixed into the left channel of an I2S output. 32 bit word length 24 bit samples. I was contemplating using an STM32F or STM32H on a nucleo board to start. Can some kind engineer confirm that this is possible?

Thanks

-russ

1 REPLY 1

If the sampling rates are identical, yes.

You can estimate it yourself - say you run at 48ksps, with each sample you need to load, multiply, add, that's 3 cycles each i.e. 12 cycles total, then result has to be stored, one additional cycle. Let's add another dozen of cycles for loop management, address calculation etc., that's 25, so around 1.2M instruction cycles per second, if you do things right. That's ample for any 32-bitter, leaving margin for error, other processes, and then some more.

Get a model with enough SAI - the SPI/I2S are quite some pain due to being 16-bit and I2S endianness is big.

There are DISCO board with on-board CODEC, e.g. 'F411 and 'F412.

JW