Skip to main content
Visitor II
July 23, 2021
Solved

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

  • July 23, 2021
  • 2 replies
  • 1360 views

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?

    This topic has been closed for replies.
    Best answer by Eleon BORLINI

    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

    2 replies

    ST Employee
    October 12, 2021

    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

    KK Y.1Author
    Visitor II
    October 13, 2021

    Hi Eleon BORLINI,

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

    KK Y.1Author
    Visitor II
    December 28, 2021

    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.