I have checked the formula, it is correct. The point is that the SYS_FS value in the formula should be specified in the units of Hz, not kHz. So, for example, for the sampling rate of 48kHz (48000Hz) and attack rate of 32dB/s the calculation is:
(1-(10^(-(32/(20*48000)))))*524288 = approx. 40.239 = approx. 40 = 0x28
that corresponds to the example value, given in the Data Sheet document.
Have a great day,
Artur
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------