higher frequency
This commit is contained in:
@ -95,7 +95,8 @@ void HAL_TIM_IC_CaptureCallback(TIM_HandleTypeDef *htim) {
|
||||
} else if (state == 1) {
|
||||
show(DEBUG_2, OFF);
|
||||
uint32_t captured = (savedV < v) ? (v - savedV) : ((htim->Init.Period - savedV) + v);
|
||||
logMsg("CCR: %ld", captured);
|
||||
double f = 1.0 / ((double)captured) * 1.0e6 * 2;
|
||||
logMsg("CCR: %ld, %f", captured, f);
|
||||
state = 0;
|
||||
} else {
|
||||
state = 0;
|
||||
|
Reference in New Issue
Block a user