I am coding for quadrature encoder interface with STM32F301. I have two questions. 1. Do you have a complete code with STM32CubeMX to initialize TIM2 to interface with the encoder for reference? 2. I used STM32CubeMX to generate a initialization code, int16_t count = TIM2->CNT. but this cannot be read.