Skip to main content
wildfireheart
Associate II
April 12, 2018
Question

CubeMX I2S without WS pin

  • April 12, 2018
  • 1 reply
  • 2421 views
Posted on April 12, 2018 at 21:08

I want to use I2S for single MP45DT02 MEMS microphone, for which I2S WS pin is not needed. CubeMX forces WS pin when enabling I2S peripherial, but I need to use this pin as GPIO for something else. Is this a bug in CubeMX and can I reassign this pin as GPIO in project, or is it not possible and it has to be WS pin even when it is not used?

#cubemx-v4.25.0 #stm32-f7
This topic has been closed for replies.

1 reply

waclawek.jan
Super User
April 12, 2018
Posted on April 13, 2018 at 00:28

I don't Cube/CubeMX so don't know if this can be circumvented somehow, but wouldn't be surprised if not.

As with any such automation tool and 'library', it inevitably can't support all possible usage variants, so unless you strictly stick to the 'usual stuff' you quickly run into limitation like this.

Speaking of the 'usual stuff', why don't you use an STM32 model which has DFSDM?

JW

wildfireheart
Associate II
April 13, 2018
Posted on April 13, 2018 at 06:35

I don't Cube/CubeMX so don't know if this can be circumvented somehow, but wouldn't be surprised if not.

I wanted to ask, if this is CubeMX bug or MCU 'feature', I don't care about CubeMX too much, I can always set it afterwards. I wanted to know if MCU supports this or not. It seems like it, as examples don't use WS pin, but I'll have to try. I asked in case anybody did this before.

Speaking of the 'usual stuff', why don't you use an STM32 model which has DFSDM?

Stock levels and price of STM32F4x3V, STM32F407V which we use doesn't have it for some reason. I basically need a way to get 32kHz / 44.1kHz sampling rate from this mic (after decimation) without affecting HCLK of whole MCU, so I think I2S will help me with this, as it has separate clock. If you know of a better way, please let me know.

wildfireheart
Associate II
April 13, 2018
Posted on April 13, 2018 at 06:55

Nevermind, I will probably use SPI in slave mode, a Timer for generating clock and PDM filtering by software. One extra pin, but it should be doable.