iir_filter

You should declare float v[6] as static so it persists between calls to your filter function. You can't initialize v[6] to all zeros with each call as you are doing. It would help if you included a diagram of your filter with your post so that readers could get an idea of what you are trying to do.