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.