String interrupt receivie application [USART of STM32]
This application uses receive interrupts in USART with the STM32 MCU. Compared to the polling method, it is more efficient because it can process only when receiving. This is an example of a ready-to-use application.
This program receives strings from the PC via interrupt.
Until now, this has been a polling process, periodically checking to see if a reception has occurred.
MCU does not know when a string reception from the PC will occur. It is not efficient to perform polling processing for this irregular reception. Therefore, a receive interrupt is used to process only when a reception occurs.
The basic aspects of the program, such as string processing, are the same as those of the polling method.
The NVIC settings for using interrupts are made, specifying the priority and the interrupt channel to be used; for interrupts by USART3, specify USART3_IRQn.
The process of discriminating between receive codes and registration codes, which is described in the main function in the polling method, is described in the interrupt vector, so it is processed only when there is an interrupt.