From fd27d5f9d80f1b7fb0fb14e437aad1cfa934353b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=8D=E5=90=83=E6=B2=B9=E7=82=B8=E9=B8=A1?= <1425962791@qq.com> Date: Mon, 20 Oct 2025 20:17:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=E5=85=A5=E6=9B=B4=E6=96=B0=E6=93=8D?= =?UTF-8?q?=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Power_Pico/User/Tasks/Src/user_HardwareInitTask.c | 2 +- Power_Pico/User/Tasks/Src/user_MessageTask.c | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Power_Pico/User/Tasks/Src/user_HardwareInitTask.c b/Power_Pico/User/Tasks/Src/user_HardwareInitTask.c index 89da44d..e869b9a 100644 --- a/Power_Pico/User/Tasks/Src/user_HardwareInitTask.c +++ b/Power_Pico/User/Tasks/Src/user_HardwareInitTask.c @@ -84,7 +84,7 @@ void HardwareInitTask(void *argument) // system settings from eeprom if(!EEPROM_Init_Check()) { - Sys_Setting_Get(); + EEPROM_SysSetting_Get(); } // FUSB CC pin dis connect diff --git a/Power_Pico/User/Tasks/Src/user_MessageTask.c b/Power_Pico/User/Tasks/Src/user_MessageTask.c index ce4f391..ecb5b23 100644 --- a/Power_Pico/User/Tasks/Src/user_MessageTask.c +++ b/Power_Pico/User/Tasks/Src/user_MessageTask.c @@ -3,6 +3,7 @@ #include "user_TasksInit.h" #include "user_MessageTask.h" #include "usart.h" +#include "BL24C02.h" /* Private typedef -----------------------------------------------------------*/ @@ -30,11 +31,13 @@ void MessageTask(void *argument) if(strcmp((const char *)uart_receive_buf, "update\r\n") == 0) { // send response printf("start update\r\n"); - // jump to bootloader + EEPROM_UpdateCommand_Write(true); + HAL_Delay(100); + // reset + NVIC_SystemReset(); } else { // do nothing } - } osDelay(500); }