chargeController/APP/application/Src/start.c

77 lines
3.8 KiB
C
Raw Normal View History

2024-12-06 09:38:25 +00:00
#include "start.h"
#include "TimeSliceOffset.h"
#include "Init.h"
#include "task.h"
#include "pDebug.h"
2024-12-16 09:28:12 +00:00
#include "parameter.h"
2024-12-27 10:14:28 +00:00
#include "FM_TIM.h"
2025-01-10 03:43:43 +00:00
#include "inFlash.h"
2024-12-16 09:28:12 +00:00
2024-12-16 09:28:12 +00:00
void startInfo(void)
{
log_info("uniqueDeviceID : 0x%x%x%x%x%x%x%x \n", g_cfgParameter.uniqueDeviceID[0]
, g_cfgParameter.uniqueDeviceID[1]
, g_cfgParameter.uniqueDeviceID[2]
, g_cfgParameter.uniqueDeviceID[3]
, g_cfgParameter.uniqueDeviceID[4]
, g_cfgParameter.uniqueDeviceID[5]
, g_cfgParameter.uniqueDeviceID[6]);
log_info("gw485_Baud : %d \n", g_cfgParameter.gw485_Baud);
log_info("bat485_Baud : %d \n", g_cfgParameter.bat485_Baud);
log_info("powerBoxType : 0x%x \n", g_cfgParameter.powerBoxType);
2024-12-16 09:28:12 +00:00
log_info("constantVoltageV : %f \n", g_cfgParameter.constantVoltageV);
log_info("floatI : %f \n", g_cfgParameter.floatI);
log_info("startSolarOpenCircuitV : %f \n", g_cfgParameter.startSolarOpenCircuitV);
log_info("stopSolarOutputCircuitV : %f \n", g_cfgParameter.stopSolarOutputCircuitV);
log_info("checkCanStartTime : %d \n", g_cfgParameter.checkCanStartTime);
log_info("shortCircuitJudgmentDelay : %d \n", g_cfgParameter.shortCircuitJudgmentDelay);
log_info("inputPowerLowJudgmentDelay : %d \n", g_cfgParameter.inputPowerLowJudgmentDelay);
log_info("inputPowerLowAgainOutputDelay : %d \n", g_cfgParameter.inputPowerLowAgainOutputDelay);
log_info("firstStageProtectionDelay : %d \n", g_cfgParameter.firstStageProtectionDelay);
log_info("firstStageProtectionValue : %d \n", g_cfgParameter.firstStageProtectionValue);
log_info("firstStageProtectionCurr : %f \n", g_cfgParameter.firstStageProtectionCurr);
log_info("secondStageProtectionDelay : %d \n", g_cfgParameter.secondStageProtectionDelay);
log_info("secondStageProtectionCurr : %f \n", g_cfgParameter.secondStageProtectionCurr);
log_info("thirdStageProtectionDelay : %d \n", g_cfgParameter.thirdStageProtectionDelay);
log_info("thirdStageProtectionCurr : %f \n", g_cfgParameter.thirdStageProtectionCurr);
log_info("inputPowerLowDetectionDelay : %d \n", g_cfgParameter.inputPowerLowDetectionDelay);
log_info("inputPowerLowDetectionVolt : %f \n", g_cfgParameter.inputPowerLowDetectionVolt);
log_info("maxOpenSolarOutputCircuitV : %f \n", g_cfgParameter.maxOpenSolarOutputCircuitV);
log_info("maxChargCurr : %f \n", g_cfgParameter.maxChargCurr);
log_info("minCheckLoopImpedanceChargCurr : %f \n", g_cfgParameter.minCheckLoopImpedanceChargCurr);
log_info("fullPowerOutputTemperature : %f \n", g_cfgParameter.fullPowerOutputTemperature);
log_info("reducePowerOutputTemperature : %f \n", g_cfgParameter.reducePowerOutputTemperature);
log_info("stopPowerOutputTemperature : %f \n", g_cfgParameter.stopPowerOutputTemperature);
2024-12-16 09:28:12 +00:00
log_info("constantVoltageChargeV : %f \n", g_cfgParameter.constantVoltageChargeV);
log_info("FloatChargeV : %f \n", g_cfgParameter.FloatChargeV);
2024-12-16 09:28:12 +00:00
log_info("collectOpenCircuitVoltageTime : %d \n", g_cfgParameter.collectOpenCircuitVoltageTime);
log_info("Access_Node_Type : %x \n", g_cfgParameter.Access_Node_Type);
log_info("Communication_Methods : %x \n", g_cfgParameter.Communication_Methods);
2024-12-16 09:28:12 +00:00
log_info("startFlagSL : 0x%x%x \n", g_cfgParameter.startFlagSL[0], g_cfgParameter.startFlagSL[1]);
log_info("endFlagSL : 0x%x \n", g_cfgParameter.endFlagSL);
log_info("loopImpedance : %f \n", getLoopImpedance());
2024-12-16 09:28:12 +00:00
}
2024-12-06 09:38:25 +00:00
void start(void)
{
Init();
2024-12-11 09:51:48 +00:00
task_Init();
2024-12-06 09:38:25 +00:00
2024-12-16 09:28:12 +00:00
startInfo();
2024-12-26 03:48:54 +00:00
// HAL_Delay(5000);
2025-01-10 03:43:43 +00:00
// while (1) {
// cfgTest();
// HAL_Delay(1000);
// }
2024-12-24 06:43:20 +00:00
2025-01-10 03:43:43 +00:00
2024-12-06 13:23:28 +00:00
TimeSliceOffset_Start();
2024-12-06 09:38:25 +00:00
}