0
\$\begingroup\$

I am using CS43L22 with STM32F4 discovery board. I generate sounds by sending I2S messages to CS43L22 using circular DMA buffer (32 size array). However, chip creates a constant beep whether it's playing a sound or not. What I also noticed is that if I decrease the buffer to 16, beep gets doubled in frequency, if I send 8, it gets doubled again like that and It is a pulse wave. Thus I have concluded that it is DMA related with I2S operation and It changes the the signal after the buffer is finished sending, or it accidentally sends 1 bit of information at the end of every DMA operation. What might be causing this?

\$\endgroup\$
  • \$\begingroup\$ Have you looked at what gets sent? I would pin it on the usual suspects here, any code that is not library code. I would double-triple check my buffer usage to make sure it is not going out of bounds anywhere. \$\endgroup\$ – r_ahlskog Apr 17 at 11:56
  • \$\begingroup\$ I was suspecting that too but I think it's not the problem here. \$\endgroup\$ – Can Uysal Apr 17 at 13:21
0
\$\begingroup\$

Assuming you are talking about audible noise from the board, not noise in the recreated audio stream, the noise could be caused by modulating the load on the power supply at the frequency of the DMA loop.

Below are some snippets from a good article about diagnosing audio noise from power supplies that explains the effect.

The most common source of audible noise in a flyback supply is a noisy component. Typically, ceramic capacitors or ferrite transformer cores generate this noise.

Noise in a ceramic capacitor is usually a product of the reverse piezoelectric effect. When a voltage is applied across a dielectric structure, it can induce a mechanical stress or strain that causes the material to deform. As the material deforms, it displaces the air around it and generates noise.

Noise generated by transformer cores, on the other hand, typically is caused by magnetostriction, a process similar to the reverse-piezoelectric effect. That is, many ferromagnetic materials change shape when they’re subjected to a magnetic field. As the magnetic field changes the transformer core, it can cause the core to physically vibrate.

\$\endgroup\$
  • \$\begingroup\$ Is there a way to eliminate this noise? \$\endgroup\$ – Can Uysal Apr 20 at 13:59
  • \$\begingroup\$ I'm using USB power to supply my board by the way. \$\endgroup\$ – Can Uysal Apr 20 at 14:01
  • \$\begingroup\$ You might be able isolate which component is making the noise by pressing on various components a pencil eraser to see if the sound changes. Once you have isolated a component, if it does not need air cooling, you could try coating it with electronic grade silicone to dampen the noise. If it feels physically warm, then coating it with silicone is probably not an option. \$\endgroup\$ – crj11 Apr 21 at 3:42
  • \$\begingroup\$ Hey again, I'm wondering would it help if I switch to an external power supply? Currently using usb power, I think that makes noise as well. \$\endgroup\$ – Can Uysal Apr 25 at 13:41
  • \$\begingroup\$ If the USB power supply is making audible noise then changing to a separate 5V supply that does not make noise could help to localize which component(s) on the board are making the noise. \$\endgroup\$ – crj11 Apr 26 at 2:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.