diff --git a/project/src/at32f403a_407_int.c b/project/src/at32f403a_407_int.c index 9770b09..ca6e2f7 100644 --- a/project/src/at32f403a_407_int.c +++ b/project/src/at32f403a_407_int.c @@ -249,7 +249,10 @@ void USART2_IRQHandler(void) { /* add user code begin USART2_IRQ 0 */ if (SET == usart_flag_get(USART2, USART_RDBF_FLAG)) { - usart_data_receive(USART2); + uint8_t data = usart_data_receive(USART2); + if(data == 0x06){ + nvic_system_reset(); + } usart_flag_clear(USART2, USART_RDBF_FLAG); } /* add user code end USART2_IRQ 0 */