This is actually caused by data inconsistency and calculation.
As long as we force the data to be the same, the error
will be solved. Add (uint16_t) or other data types to the data.
Example
num=(uint16_t)240000/(uint16_t)TIM_KHZ/(uint16_t)10;
This is actually caused by data inconsistency and calculation.
As long as we force the data to be the same, the error
will be solved. Add (uint16_t) or other data types to the data.
Example
num=(uint16_t)240000/(uint16_t)TIM_KHZ/(uint16_t)10;