From ec8d487264ac58ebaa00cf99675528e85c6113d0 Mon Sep 17 00:00:00 2001 From: WXK <287788329@qq.com> Date: 星期三, 13 八月 2025 09:56:46 +0800 Subject: [PATCH] boot开发完成 --- dualboots_Gai_youhua/keil/customboot/include/drivers/ymodem.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/dualboots_Gai_youhua/keil/customboot/include/drivers/ymodem.c b/dualboots_Gai_youhua/keil/customboot/include/drivers/ymodem.c index ed3fa8c..7f2647d 100644 --- a/dualboots_Gai_youhua/keil/customboot/include/drivers/ymodem.c +++ b/dualboots_Gai_youhua/keil/customboot/include/drivers/ymodem.c @@ -35,6 +35,7 @@ #include "AppConfig.h" #include "mk_uart.h" #include "mk_trace.h" +#include "mk_wdt.h" /** @addtogroup STM32F0xx_IAP * @{ */ @@ -330,6 +331,7 @@ * @param buf: Address of the first byte * @retval The size of the file */ +extern volatile unsigned long shengji_time_100ms; extern volatile unsigned long time32_reset; uint8_t packet_data[PACKET_1K_SIZE + PACKET_OVERHEAD], file_size[FILE_SIZE_LENGTH], *file_ptr, *buf_ptr; //1024 + 5 uint8_t bufferOut[16]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; @@ -348,7 +350,7 @@ { for (packets_received = 0, file_done = 0, buf_ptr = buf; ;) { - + wdt_ping(WDT_ID0);//喂狗 switch (Receive_Packet(packet_data, &packet_length, NAK_TIMEOUT)) { case 0://成功接收到1K @@ -457,6 +459,7 @@ Send_Byte(ACK); flash_seqno++; time32_reset = 0; + shengji_time_100ms=0; } else { -- Gitblit v1.9.3