From b73ebbf978d60ebd8bca4a65165a733d80ea8336 Mon Sep 17 00:00:00 2001 From: DAVE Date: Wed, 26 May 2021 01:45:38 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=201.=20=E4=BF=AE=E5=A4=8D=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E5=BB=B6=E8=BF=9F=E8=B7=B3=E8=BD=AC=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98=EF=BC=8C=E4=BD=BF=E7=94=A8=E7=9C=8B=E9=97=A8=E7=8B=97?= =?UTF-8?q?=E5=A4=8D=E4=BD=8D=E7=9A=84=E6=96=B9=E5=BC=8F=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: DAVE --- UDS_PortingFiles/includes.h | 2 -- UDS_ProtocolStack/bootloader_main.c | 9 +++++---- UDS_ProtocolStack/uds_app_cfg.c | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/UDS_PortingFiles/includes.h b/UDS_PortingFiles/includes.h index 121af15..f12439e 100644 --- a/UDS_PortingFiles/includes.h +++ b/UDS_PortingFiles/includes.h @@ -34,9 +34,7 @@ #define __PROJECT_COMPILE_DATE_TIME__ __DATE__" - "__TIME__ /* ASSERT and DEBUG IO/TIMER */ -#if defined (EN_ASSERT) || defined (EN_DEBUG_TIMER) || defined (EN_DEBUG_PRINT) || defined (EN_DEBUG_IO) #include "bootloader_debug.h" -#endif #ifdef EN_ASSERT #define ASSERT(xValue)\ diff --git a/UDS_ProtocolStack/bootloader_main.c b/UDS_ProtocolStack/bootloader_main.c index c77d2a5..7ab8c67 100644 --- a/UDS_ProtocolStack/bootloader_main.c +++ b/UDS_ProtocolStack/bootloader_main.c @@ -29,11 +29,12 @@ void UDS_MAIN_Init(void (*pfBSP_Init)(void), void (*pfAbortTxMsg)(void)) Boot_PowerONClearAllFlag(); } -#ifndef EN_DELAY_TIME - - Boot_JumpToAppOrNot(); - +#ifdef EN_DELAY_TIME + if (TRUE == POWER_SYS_GetResetSrcStatusCmd(RCM, RCM_WATCH_DOG)) #endif + { + Boot_JumpToAppOrNot(); + } #endif diff --git a/UDS_ProtocolStack/uds_app_cfg.c b/UDS_ProtocolStack/uds_app_cfg.c index ad1c963..1b3c9de 100644 --- a/UDS_ProtocolStack/uds_app_cfg.c +++ b/UDS_ProtocolStack/uds_app_cfg.c @@ -1357,7 +1357,7 @@ void UDS_SystemTickCtl(void) } else { - Boot_JumpToAppOrNot(); + DoResetMCU(TX_MSG_SUCCESSFUL); } }