diff --git a/app/app_eeprom.c b/app/app_eeprom.c index 210449b..3113101 100644 --- a/app/app_eeprom.c +++ b/app/app_eeprom.c @@ -954,7 +954,7 @@ void bms_pwr_off_save(void) { uint32_t i, cnt = 0, tmp_32u; EepromPoData data[30]; - //Tan 20230821 关闭继电器增加延时 + drv_gpio_set_pin_status(kGpioType_IsoEnSw, kGpioStatus_Low); drv_gpio_set_pin_status(kGpioType_IsoPosSw, kGpioStatus_Low); drv_gpio_set_pin_status(kGpioType_IsoNegSw, kGpioStatus_Low); @@ -1010,7 +1010,7 @@ void bms_soft_reset_save(SoftReset type, uint8_t *buf, uint16_t len) data[cnt++].value = (kEE_IsSoftReset << 16) | type | (bms_get_circuit_status(kCircuitType_Main) == kCircuitStatus_On) << 8; bsp_eeprom_power_off_save_data(data, cnt); - //Tan 20231010 修复存储数据 + bms_write_event(300, type, false); bms_uninit_log(); } diff --git a/bsp/bsp_eeprom.c b/bsp/bsp_eeprom.c index 7fbe1b7..6c0fea8 100644 --- a/bsp/bsp_eeprom.c +++ b/bsp/bsp_eeprom.c @@ -140,7 +140,7 @@ static bool eeprom_transfer(EEpromItem * item, AreaItem * area) } return true; } -//Tan 20230909 优化eeprom 初始化标志位 + #define EEPROM_INIT_FLAG_NUM 40 static bool eeprom_load_data(EEpromItem * item, AreaItem * area) { @@ -259,7 +259,6 @@ static bool eeprom_load_area(EEpromItem * item, AreaItem * area) } else { - //Tan 20230920 静态区预留40字节 tmp = 4 * 10; } //可能在需要换页擦除时掉电,上电需要检测是否需要换页 diff --git a/drv/drv_stm32f4xx/drv_misc.c b/drv/drv_stm32f4xx/drv_misc.c index 0f28908..5b8dea4 100644 --- a/drv/drv_stm32f4xx/drv_misc.c +++ b/drv/drv_stm32f4xx/drv_misc.c @@ -80,7 +80,7 @@ void PVD_IRQHandler(void) } } -//Tan 20230909 增加抢占优先级控制 + #define AIRCR_VECTKEY_MASK ((uint32_t)0x05FA0000) void drv_mist_set_priority_group(uint16_t pri_group) { diff --git a/drv/drv_stm32f4xx/drv_rtc.c b/drv/drv_stm32f4xx/drv_rtc.c index b46d8b4..3915799 100644 --- a/drv/drv_stm32f4xx/drv_rtc.c +++ b/drv/drv_stm32f4xx/drv_rtc.c @@ -119,7 +119,7 @@ bool drv_rtc_set_date(uint16_t year, uint8_t month, uint8_t day) return res; } -//Tan 20230911 减少retry次数,防止阻塞 + bool drv_rtc_wait_sync(void) { bool res = true; @@ -272,7 +272,7 @@ bool drv_rtc_set_ms(uint16_t ms) #include "stdio.h" char rtc_time_str[20]; -//Tan 2023/07/28 增加简易时间 + char *drv_rtc_get_time_string(void) { struct tm tmp; diff --git a/drv/drv_stm32f4xx/drv_spi.c b/drv/drv_stm32f4xx/drv_spi.c index 77f07a9..55cb5aa 100644 --- a/drv/drv_stm32f4xx/drv_spi.c +++ b/drv/drv_stm32f4xx/drv_spi.c @@ -253,7 +253,7 @@ KitResult drv_spi_set_dma(SpiDev dev, bool is_rx_en, bool is_tx_en) **********************************************************************/ //发送一个字节 -//Tan 2023/07/27 超时由--改为++ + KitResult drv_spi_sync_send_receive(SpiDev dev, uint8_t *data) { KitResult res = kKitResult_Ok;