AnsweredAssumed Answered

ADAU144x rounding problem

Question asked by Svilen on Jan 26, 2014
Latest reply on Feb 1, 2014 by KJBob

It seems that the DSP is operating in "round to lower" mode when store result from multiplication for future processing. In my setup I have a 2nd order IIR hi-pass filter, setup as f = 130 Hz, q = 1. With a mute before it. Its often happen when mute is active, on filter output exist a DC level. It output stuck on 0xFFFFFC6 (-0.00000691) or 0xFFFF29F (-0.00040829). Second value is quite high, giving me a -68dB level at output.


Quick investigation show that problem is in rounding algorithm of multiplication. A simple setup that multiply 2 numbers: 0xFFFF29F (-0.00040829) and 0x07FF66F (+0.99970806) produce the input value 0xFFFF29F (-0.00040829).



FFFF29F * 7FF66F = 7FF603FFFFCF1


7FF66F * 10000000 = 7FF66F0000000 (sign correction)



in binary                                                                                      v   this is lost after rounding

FFFFFFF94FFFFCF1 = 11111111111111111111111111111001010011111 11111111111110011110001

FFFF29F                   =                    1111111111111111001010011111


Result number is very close to FFFF2A0, but because the rounding to lower, it stay the same as input.


Is it possible co change the rounding mode to "round to 0" or "round to near"?