Skip to content

Avoiding Callback Noise

What is Callback Noise?

Callback noise is a spurious tone that occurs at the block rate (sample rate divided by block size). Callback noise often consists of a 1kHz tone due to the common use of a 48 sample block size.

You can verify that the noise you're experiencing is related to the callback if the noise in question is a steady tone which is the same frequency as your sample rate divided by your block size.

Why Does Callback Noise Happen?

Callback noise occurs when your application spends a long time in the audio callback. This can lead to a current transient when your code exits the callback which can affect GND on your PCB.

How Can I Get Rid of Callback Noise?

There are many techniques that can be used to mitigate or eliminate callback noise in both software and hardware. We will list them in order of easiest effort to maximum effort.

1. Adjust Block Size

Try changing your block size to 2 samples. This will push the callback noise to 24kHz which is well beyond the range of human hearing.

Note that using a block size that is this small will affect the performance of your firmware. If you need more CPU cycles, increase your block size higher and see if the callback noise is acceptable.

2. Add More Functions Outside of Audio Callback

A more complex, and less predictable solution is to add additional CPU usage outside of your audio callback.

If this doesn't occur naturally from the logic code in your application, you can calculate trig functions (Sin()), or anything the compiler won't optimize away.

Review the typical application circuits in the Daisy datasheet and make sure that you are using the recommended circuit for your application including bypass caps, power filtering, op-amp configurations and part choices.

4. Review PCB Layout

Make sure that you are using best practices in your PCB layout for avoiding noise.

This can include the following:

  • Use short and direct traces between Daisy output pins and your audio conditioning circuitry
  • Use short traces in opamp feedback paths
  • Keep bypass caps close to their respective devices
  • Avoid ground loops