cancel
Showing results for 
Search instead for 
Did you mean: 

stream 24 bit resolution, 48KHz , stereo channel audio data from X-Nucleo-cca02m2

KK Y.1
Associate II

Hi I am planning to use X-Nucleo-cca02m2 board with nucleo-f401re for audio streaming. I found the en.x-cube-memsmic1_v5.5.0 example code where the bit resolution is found to be 16 bit for USB audio streaming. But my requirment is 24 bit resolution. Will changing the bit resolution in the given source code work?

1 ACCEPTED SOLUTION

Accepted Solutions
Eleon BORLINI
ST Employee

Hi @KK Y.1​ ,

sorry again for the extreme delay in our feedback.

I believe you should be able to manage the through this case, that is defined in the cca02m2_audio.c file:

        case AUDIO_RESOLUTION_24b:
          (void)PDM_Filter(&((uint8_t*)(PDMBuf))[index], &((uint8_t*)(PCMBuf))[3U*index], &PDM_FilterHandler[index]);          
          break;

Configuring the PDM_Filter_Handler_t structure variable in the PDM_Filter function, you should be able to set the 24bit resolution and the related decimation settings.

-Eleon

View solution in original post

3 REPLIES 3
Eleon BORLINI
ST Employee

Hi @KK Y.1​ ,

sorry again for the extreme delay in our feedback.

I believe you should be able to manage the through this case, that is defined in the cca02m2_audio.c file:

        case AUDIO_RESOLUTION_24b:
          (void)PDM_Filter(&((uint8_t*)(PDMBuf))[index], &((uint8_t*)(PCMBuf))[3U*index], &PDM_FilterHandler[index]);          
          break;

Configuring the PDM_Filter_Handler_t structure variable in the PDM_Filter function, you should be able to set the 24bit resolution and the related decimation settings.

-Eleon

Hi Eleon BORLINI,

Thanks for your reply. I have tried the same thing before and its working.

KK Y.1
Associate II

Hi Eleon BORLINI,

I am streaming USB audio and at the same time one of my task is reading sensor data via I2C at the rate of 400 HZ. when audio streaming is started the task is becoming slow and I am losing few sensor data. Is it possible to increase time between I2S DMA interrupts so that the CPU is alloted more time to task and the sensor data cannot be missed?. When I tried without starting audio streaming I am able to read all sensor data without miss.