Explorar el Código

when recv reboot key, reboot right now

Signed-off-by: huhui <huhui@sharkgulf.com>
huhui hace 5 años
padre
commit
ef6ccd8b88
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  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);
 			}