소스 검색

when recv reboot key, reboot right now

Signed-off-by: huhui <huhui@sharkgulf.com>
huhui 5 년 전
부모
커밋
ef6ccd8b88
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  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);
 			}