On Sun, Feb 12, 2017 at 11:52:23AM +0000, Mintz, Yuval wrote: > Just to clarify [since it's bit a meaningless otherwise] - > this +8 is a HW-bug workaround.
Can you please explain exactly what the problem is? Your code does period1 = div_s64(val * 1000000000, ppb); period1 -= 8; period1 >>= 4; But correct rounding would be period1 = div_s64(val * 1000000000, ppb); period1 += 8; period1 >>= 4; Thanks, Richard