Przeglądaj źródła

when recv reboot key, reboot right now

Signed-off-by: huhui <huhui@sharkgulf.com>
huhui 5 lat temu
rodzic
commit
ef6ccd8b88
1 zmienionych plików z 2 dodań i 1 usunięć
  1. 2 1
      Application/app/iap.c

+ 2 - 1
Application/app/iap.c

@@ -46,7 +46,8 @@ void process_iap_message(can_frame_t *frame, int len){
 			break;
 		case CAN_KEY_IAP_BOOT:
 			if (_write_success) {
-				shark_timer_post(&_reboot_timer, 100);
+				NVIC_SystemReset();
+				while(1);
 			} else {
 				protocol_send_ack(frame->head.can_addr, frame->key, 0);
 			}