I'm sorry if I'm wrong, but for me this code looks incorrect.
If we count more pulses due to more ticksElapsed since previous counter reset, the measured value (Voltage,Current, Power) should be less, not greater. Division and multiplication are swapped here.
https://github.com/openshwprojects/OpenBK7231T_App/blob/59fcf19bbdee45dee56f23e74ac3b8e1cacca5da/src/driver/drv_bl0937.c#L354-L361
I'm sorry if I'm wrong, but for me this code looks incorrect. If we count more pulses due to more
ticksElapsed
since previous counter reset, the measured value (Voltage,Current, Power) should be less, not greater. Division and multiplication are swapped here.