-
What would be the best way to use I2S (MEMS mic ICS-41350 for example) on STM32F401? I did nt found anything in the core relate to I2S. |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 12 replies
-
for example, how adaptable would the I2S and PDM APIs of the WB be? https://github.com/GrumpyOldPizza/ArduinoCore-stm32wb/tree/master/libraries/I2S https://github.com/GrumpyOldPizza/ArduinoCore-stm32wb/blob/master/libraries/PDM/src/PDM.cpp Or the L4 I2S https://github.com/GrumpyOldPizza/arduino-STM32L4/blob/master/libraries/I2S/src/I2S.cpp |
Beta Was this translation helpful? Give feedback.
-
ohh, there is both I2S and PDM here, that looks good |
Beta Was this translation helpful? Give feedback.
-
i wonder why pdm2pcm(uint8_t *data_in, int16_t *data_out, int16_t size) takes an uint8_t as input buffer, while PDMClass::Record(uint16_t *pBuf) saves the PDM datas to an unint16_t buffer, are we supposed to cast the uint16_t buffer to uint8_t when passing to pdm2pcm? |
Beta Was this translation helpful? Give feedback.
-
Hello @0x0fe , |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
Hello @0x0fe ,
I meant the implementation of the pdm2pcm API. If you give a look at the LuT_Filter function, it takes as input an array of uint8_t. That's the reason why the first parameter is an array of uint8_t. Indeed, you can give a look at this example based on that library. In this example the input buffer is defined as an array of uint16_t and then it is casted to uint8_t pointer as you mentioned. You can take it as reference.
Best Regards,
Carlo