A -1 was missing from the timer value calculation. In addition, DIV_ROUND_CLOSEST was replaced with a custom macro fixing #84782. Signed-off-by: Sergei Ovchinnikov <sergei.ovchinnikov@nordicsemi.no>