Sorry for the late reply @VK2SID
If this is still relevant, here is something to get you started:
Create project for Nucleo H753 board in the STM32CubeIDE
Change these settings
at least one of these is necessary, not sure which:
USART3 Disable
USB_OTG_FS Disable
System Core RCC HSE, LSE Disable
Clock Configuration PLL Source Mux CSI
Tim5 Clock Source Internal:
For Overflow every second, set Parameter Settings Prescaler to 64000-1 and Counter Period 1000-1
Parameter Settings Trigger Event Selection TRGO Update Event
Tim8 Clock Source Internal:
Trigger Source ITR3 (which Tims a Tim can trigger is listed in the interconnect matrix/table in the reference manual)
Channel1 Input capture TRC
Counter period 65535
NVIC Enable Tim8 capture compare interrupt
Add this code:
/* USER CODE BEGIN PV */
uint32_t uwICValue = 0;
uint32_t uwICValuePrev = 0;
int32_t uwICValueDiff = 0;
/* USER CODE END PV */
/* USER CODE BEGIN 2 */
HAL_TIM_Base_Start_IT(&htim5);
HAL_TIM_Base_Start_IT(&htim8);
HAL_TIM_IC_Start_IT(&htim8, TIM_CHANNEL_1);
/* USER CODE END 2 */
/* USER CODE BEGIN 4 */
void HAL_TIM_IC_CaptureCallback(TIM_HandleTypeDef *htim){
if(htim->Instance == TIM8){
HAL_GPIO_TogglePin(LD2_GPIO_Port, LD2_Pin);
uwICValuePrev = uwICValue;
uwICValue = HAL_TIM_ReadCapturedValue(htim, TIM_CHANNEL_1);
uwICValueDiff = uwICValue - uwICValuePrev;
if(uwICValueDiff < 0){
uwICValueDiff += 65535 + 1; //has to match overflow value of Tim8
}
}
}
/* USER CODE END 4 */
This now reads the internal generated frequency. For external frequency, set Tim8 to ETR2, prescaler 1. With this PA0 becomes the input pin. Maybe in the system core GPIO settings configure a pull up/down resistor.