I need to implement a very basic timer function, the idea is:
I receive a character in the USART interrupt. Each time that I receive the character I enable a TIMER. When the serial communication stops the TIMER generates an interrupt and then I know that the communication as stopped. If the communication continues the TIMER is reset in the USART interrupt function.
Timer21 it suppose to trigger an interrupt each 1 ms.
In order to do I prepared some "demo" code like:
In the TIMER interrupt:
/* USER CODE BEGIN TIM21_IRQn 0 */
/* USER CODE END TIM21_IRQn 0 */
/* USER CODE BEGIN TIM21_IRQn 1 */
/* USER CODE END TIM21_IRQn 1 */
With this code I was expecting see the LED3 blinking but this is only happening one time.
Actually I don't know if this the proper way todo that.