To emulate a quadrature encoder, TIM3 is configured in toggle mode to generate
2 quadrature signals on (PC6 and PC7) at 10KHz. Each 1s, signals change phase
(+90<39>/-90<39>) to emulate a Forward/Backward rotation.
LED1 is configured to toggle accordingly every 1s.
SystemCoreClock is set to 180 MHz for STM32F4xx Devices.
TIM1 is configured in encoder mode interface, counting on TI1 and TI2.
The counting direction corresponds to the rotation direction of the connected
sensor (emulated by TIM3 signals).
Rotation direction can be monitored by putting "uwDirection" variable in the
Live Watch window.
When uwDirection = 0, and according to the "Counting direction versus encoder
signals" table, rotation direction is Forward.
When uwDirection = 1, and according to the "Counting direction versus encoder
signals" table, rotation direction is Backward.
@note Care must be taken when using HAL_Delay(), this function provides accurate delay (in milliseconds)
based on variable incremented in SysTick ISR. This implies that if HAL_Delay() is called from
a peripheral ISR process, then the SysTick interrupt must have higher priority (numerically lower)
than the peripheral interrupt. Otherwise the caller ISR process will be blocked.
To change the SysTick interrupt priority you have to use HAL_NVIC_SetPriority() function.
@note The application needs to ensure that the SysTick time base is always set to 1 millisecond
to have correct HAL operation.
@note The connection of the LCD reset pin to a dedicated GPIO PK7 instead of the STM32F469 NRST pin may cause residual display on LCD with applications/examples that do not require display.
The LCD clear can be ensured by hardware through the board's power off/power on or by software calling the BSP_LCD_Reset() function.