Skip to main content
Visitor II
October 2, 2022
Question

Random glitch on I2S recordings

  • October 2, 2022
  • 11 replies
  • 4195 views

Hello,

I'm using an STM32 M4 for recording short audio signals through the I2S interface and I write the PCM to an SD card. To check that everything is fine I have recorded pure tones (1kHz or 2kHz). By doing that I noticed in some recordings (not all of them) some glitches in the audio signal. Can someone help understand why those glitches appear?

The reference manual reports that I2SxCLK frequency should be higher than the APB bus. In my case the APB is 16MHz and the I2SxCLK is 48MHz. Here is attached one of the 2s audio tracks recorded. Sometimes the glitch appears at the beginning of the track, some others later.

What else can generate this issue?

    This topic has been closed for replies.

    11 replies

    Super User
    October 8, 2022

    about buffer size : simple calcutate : 100ms delay can happen, 16ks/32bit is to store, so 1,6 x4 = 6,4kB need to be buffered, to avoid any problem, when SD needs 100ms extra time buffer;

    + 512 B. for regular buffer itself.

    if you dont have this buffer, change your system or your expectation (= accept dropouts).