Compare commits

...

6 Commits

Author SHA1 Message Date
起床就犯困 1b9253b0dc 修改电流采集,添加总能量计算 2024-10-14 15:22:50 +08:00
起床就犯困 c6668e7f9a 修改mppt不工作的条件 2024-10-09 09:57:52 +08:00
起床就犯困 ff0ffbae91 基本功能都已经实现,但是mppt开始工作后电流采集不准 2024-09-28 16:07:51 +08:00
起床就犯困 ca4948aa4e 启动部分延迟负载mos管的开通,防止电容放电引起负载反复启动 2024-09-24 17:44:41 +08:00
起床就犯困 480aed0364 修改回路阻抗的测量时刻 2024-09-21 11:00:09 +08:00
起床就犯困 16e9dbf3a0 修改浮充为固定一个电压输出(未测试) 2024-09-20 15:04:41 +08:00
52 changed files with 16878 additions and 14226 deletions

View File

@ -17,7 +17,7 @@
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release" cleanCommand="${cross_rm} -rf" description="" id="ilg.gnumcueclipse.managedbuild.cross.riscv.config.elf.release.1008047074" name="obj" parent="ilg.gnumcueclipse.managedbuild.cross.riscv.config.elf.release">
<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release" cleanCommand="${cross_rm} -rf" description="" id="ilg.gnumcueclipse.managedbuild.cross.riscv.config.elf.release.1008047074" name="obj" parent="ilg.gnumcueclipse.managedbuild.cross.riscv.config.elf.release" postbuildStep="riscv-none-embed-objcopy -O binary &quot;${ProjName}.elf&quot; &quot;${ProjName}.bin&quot;">
<folderInfo id="ilg.gnumcueclipse.managedbuild.cross.riscv.config.elf.release.1008047074." name="/" resourcePath="">
<toolChain id="ilg.gnumcueclipse.managedbuild.cross.riscv.toolchain.elf.release.231146001" name="RISC-V Cross GCC" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.toolchain.elf.release">
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.addtools.createflash.1311852988" name="Create flash image" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.addtools.createflash" useByScannerDiscovery="false" value="true" valueType="boolean"/>
@ -51,7 +51,7 @@
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.nocommon.2003631682" name="No common unitialized (-fno-common)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.nocommon" useByScannerDiscovery="true" value="true" valueType="boolean"/>
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.isa.xw.1819910041" name="Extra Compressed extension (RVXW)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.isa.xw" useByScannerDiscovery="false" value="true" valueType="boolean"/>
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.saverestore.1179366128" name="Small prologue/epilogue (-msave-restore)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.saverestore" useByScannerDiscovery="false" value="true" valueType="boolean"/>
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.rvGcc.536610708" name="RISC-V Compiler" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.rvGcc" value="ilg.gnumcueclipse.managedbuild.cross.riscv.option.base.target.rvGcc.8" valueType="enumerated"/>
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.rvGcc.536610708" name="RISC-V Compiler" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.rvGcc" useByScannerDiscovery="false" value="ilg.gnumcueclipse.managedbuild.cross.riscv.option.base.target.rvGcc.8" valueType="enumerated"/>
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="ilg.gnumcueclipse.managedbuild.cross.riscv.targetPlatform.1944008784" isAbstract="false" osList="all" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.targetPlatform"/>
<builder buildPath="${workspace_loc:/mppt_Nos_V0.4}/obj" id="ilg.gnumcueclipse.managedbuild.cross.riscv.builder.1421508906" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="GNU Make 构建器" parallelBuildOn="true" parallelizationNumber="optimal" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.builder"/>
<tool id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.assembler.1244756189" name="GNU RISC-V Cross Assembler" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.assembler">
@ -71,6 +71,7 @@
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/mppt_Nos_V0.4/Hardware/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/mppt_Nos_V0.4/Drivers/RingQueue}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/mppt_Nos_V0.4/Drivers/TimeSliceOffset}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/mppt_Nos_V0.4/Drivers/RingQueue2}&quot;"/>
</option>
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.compiler.std.2020844713" name="Language standard" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.compiler.std" useByScannerDiscovery="true" value="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.compiler.std.gnu99" valueType="enumerated"/>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="true" id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.compiler.defs.177116515" name="Defined symbols (-D)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.compiler.defs" useByScannerDiscovery="true" valueType="definedSymbols"/>
@ -88,7 +89,7 @@
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.linker.usenewlibnosys.351964161" name="Do not use syscalls (--specs=nosys.specs)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.linker.usenewlibnosys" useByScannerDiscovery="false" value="true" valueType="boolean"/>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="true" id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.linker.otherobjs.16994550" name="Other objects" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.linker.otherobjs" useByScannerDiscovery="false" valueType="userObjs"/>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="true" id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.linker.flags.1125808200" name="Linker flags (-Xlinker [option])" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.linker.flags" useByScannerDiscovery="false" valueType="stringList"/>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.linker.libs.1448587709" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.linker.libs" useByScannerDiscovery="false" valueType="libs">
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.linker.libs.1448587709" name="Libraries (-l)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.linker.libs" useByScannerDiscovery="false" valueType="libs">
<listOptionValue builtIn="false" value="m"/>
</option>
<inputType id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.c.linker.input.1859223768" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.c.linker.input">
@ -150,5 +151,5 @@
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
<storageModule moduleId="refreshScope"/>
</cproject>

View File

@ -5,7 +5,7 @@
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="-156117377827207421" id="ilg.gnumcueclipse.managedbuild.cross.riscv.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT RISC-V Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} ${cross_toolchain_flags} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="1028566790370062624" id="ilg.gnumcueclipse.managedbuild.cross.riscv.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT RISC-V Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} ${cross_toolchain_flags} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>

View File

@ -10,6 +10,16 @@
#include "debug.h"
#include "adc.h"
#include "ring_queue2.h"
#define adcBuffSize 100
typedef struct _ADC_DATA{
RingQueue2 RQCHG_CURR;
RingQueue2 RQDSG_CURR;
int32_t total_CHG_CURR; /* 充电电流adc之和 */
int32_t total_DSG_CURR; /* 放电电流adc之和 */
}ADC_DATA;
extern ADC_DATA g_adcData;
float get_CHG_CURR(void);
float get_PV_VOLT_OUT(void);
@ -18,5 +28,6 @@ float get_PV1_VOLT_IN(void);
float get_PV_VOLT_IN1(void);
float get_MOSFET_Temper(void);
float get_PV2_VOLT_IN(void);
void currBuffInit(void);
#endif /* APP_INC_COLLECT_CONVERSION_H_ */

View File

@ -52,14 +52,19 @@ typedef struct _config_info{
uint16_t stopSolarOpenCircuitV; /* 太阳能板开路电压高于该(电压 / 100)停止充电 */
uint16_t constantVoltageChargeV; /* 恒压充电时的输出电压 */
uint16_t trickleChargeC; /* 涓流充电电流 */
uint16_t FloatTime; /* 浮充时间(秒) */
// uint16_t FloatTime; /* 浮充时间(秒) */
uint16_t FloatV; /* 浮充电压 */
uint16_t checkSolarOpenCircuitVTime; /* 启动任务中太阳能板开路电压检测时间 */
uint16_t registerRefreshTime; /* 寄存器数据刷新时间 */
uint16_t resRefreshTime; /* 线阻计算间隔时长 */
uint16_t loopImpedance; /* 回路阻抗大小 */
// uint16_t resRefreshTime; /* 回路阻抗计算间隔时长 */
uint16_t sensorEnableBroadcastTime; /* 传感器运行再次注册的间隔 */
uint16_t HighSideMosTemperature_stop; /* 当上桥温度达到该值时,停止输出 */
uint16_t HighSideMosTemperature_end; /* 当上桥温度上升到该值时,降低功率运行 */
uint16_t HighSideMosTemperature_start; /* 当上桥温度降低到该值时,按照正常情况输出 */
uint16_t outputAgainFlagTime; /* 出现短路保护后延长该段时间再次检测是否短路,仍然短路则关闭输出 */
uint16_t excessiveLoadFlagTime; /* 出现过载后,在该段时间中再次出现过载,则关闭输出 */
uint16_t eLAgainTime; /* 出现过载过载保护后,该段时间后,再次尝试输出 */
uint8_t end_Flag; /* 结束标志 */
}config_info;
#define CONFIG_INFO_SIZE (sizeof(config_info))
@ -70,8 +75,8 @@ extern config_info g_slConfigInfo;
#define FLASH_SAVE_ADDR_BEGIN (0x00)
#define FLASH_SAVE_ADDR_END (0x00 + CONFIG_INFO_SIZE)
void save_config_info(config_info save_config_info);
void save_config_info(config_info *save_config_info);
uint8_t read_config_info(void);
uint8_t read_config_info1(config_info *in_config_info);
#endif /* APP_INC_INFLASH_H_ */

View File

@ -228,11 +228,13 @@ typedef struct _SL_Mppt_para{
float_t Battery_Voltage; /* 电池电压 */
float_t Charg_Current; /* 充电电流(流向电池+负载) */
float_t Discharg_Current; /* 放电电流(流向负载) */
float_t Input_Voltage; /* 太阳能开路电压 */
float_t Solar_Open_Circuit_Voltage; /* 太阳能开路电压 */
float_t Input_Voltage; /* 太阳能板输出电压 */
float_t Solar_Open_Circuit_Voltage; /* 太阳能开路电压 */
float_t HighSideMos_Temperature; /* 高端mos的温度 */
uint16_t DischargMos_State; /* 放电mos的状态 */
uint16_t MPPT_Mode; /* 工作模式 */
float_t inPower; /* 总充电电量 */
float_t outPower; /* 总消耗电量 */
}SL_Mppt_para;
extern SL_Mppt_para g_Mppt_Para;

View File

@ -13,6 +13,9 @@
#include "uart_dev.h"
#include "math.h"
//extern uint8_t g_interruptNum;
void stop_mpptWork(void);
void start_mpptWork(void);
@ -44,7 +47,7 @@ extern STR_TimeSliceOffset m_wdi;
extern void Task_wdi(void);
#define refreshRegister_reloadVal 1000 /* 任务执行间隔 */
#define refreshRegister_offset 0 /* 任务执行偏移量 */
#define refreshRegister_offset 100 /* 任务执行偏移量 */
extern STR_TimeSliceOffset m_refreshRegister;
extern uint8_t overTemperature;
extern void Task_refreshRegister(void);
@ -57,19 +60,26 @@ extern uint8_t g_recvBroadcastRegisterNumber; /*
extern STR_TimeSliceOffset m_recvbroadcast;
extern void Task_recvbroadcast(void);
#define impedanceCalculation_reloadVal 1000 /* 任务执行间隔 */
#define impedanceCalculation_reloadVal 200 /* 任务执行间隔 */
#define impedanceCalculation_offset 0 /* 任务执行偏移量 */
extern float_t g_impedance;
extern float_t voltOut;
extern uint8_t g_batteryState;
extern uint8_t g_impedanceStart;
extern STR_TimeSliceOffset m_impedanceCalculation;
extern void Task_impedanceCalculation(void);
#define outputAgain_reloadVal 2 /* 任务执行间隔 */
#define outputAgain_reloadVal 1000 /* 任务执行间隔 */
#define outputAgain_offset 0 /* 任务执行偏移量 */
extern uint8_t outputAgainFlag;
extern STR_TimeSliceOffset m_outputAgain;
extern void Task_outputAgain(void);
#define excessiveLoad_reloadVal 1000 /* 任务执行间隔 */
#define excessiveLoad_offset 0 /* 任务执行偏移量 */
extern uint8_t excessiveLoadFlag;
extern STR_TimeSliceOffset m_excessiveLoad;
extern void Task_excessiveLoad(void);
#define sensorEnableBroadcast_reloadVal 1000 /* 任务执行间隔 */
#define sensorEnableBroadcast_offset 0 /* 任务执行偏移量 */
extern STR_TimeSliceOffset m_sensorEnableBroadcast;

View File

@ -32,12 +32,13 @@
const float P_CHG_CURR = (1.0 / (50 * 0.005 / 2));
/* 光伏充电输出电压比例,分压系数(放电时采集不准) */
//const float P_PV_VOLT_OUT = (47.0 + 10.0) / 10.0;
const float P_PV_VOLT_OUT = (47.0 + 4.7) / 4.7;
//const float P_PV_VOLT_OUT = (47.0 + 4.7) / 4.7;
const float P_PV_VOLT_OUT = (56.0 + 10.0) / 10.0;
/* 放电电流采集电流倍数 */
const float P_DSG_CURR = (1.0 / (50 * 0.005 / 2));
///* 光伏1开路输出电压比例 */
//const float P_PV1_VOLT_IN = (100 + 4.7) / 4.7;
const float P_PV1_VOLT_IN = (100.0 + 4.7) / 4.7;
const float P_PV1_VOLT_IN = (100 + 4.7) / 4.7;
//const float P_PV1_VOLT_IN = (47.0 + 4.7) / 4.7;
/* 光伏1开路输出电压比例 */
//const float P_PV1_VOLT_IN = (47 + 4.7) / 4.7;
/* 系统电源电压比例 */
@ -128,6 +129,10 @@ const uint16_t mosTemperADC[mosTemperADCLen] = {
336 /* 100 ℃ */
};
ADC_DATA g_adcData;
static uint16_t CHG_buff[adcBuffSize];
static uint16_t DSG_buff[adcBuffSize];
static uint16_t get_adc(uint8_t ADC_Channel);
static uint16_t get_aftercalculationAdc(uint8_t ADC_Channel);
@ -143,7 +148,7 @@ uint16_t get_aftercalculationAdc(uint8_t ADC_Channel)
return middleAverageFilter(ADC_Channel);
}
#define N 6
#define N 4
/**
* @brief
* @param ADC_Channel ADC通道
@ -171,11 +176,11 @@ uint16_t middleAverageFilter(uint8_t ADC_Channel)
}
}
}
for(i = 2; i < N-2; ++i)
for(i = 1; i < N-1; ++i)
{
sum += value_buf[i];
}
return sum/(N-4);
return sum/(N-2);
}
/**
@ -220,7 +225,16 @@ float get_CHG_CURR(void)
uint16_t I_ADC;
// I_ADC = Get_ConversionVal(get_adc(CHG_CURR));
OutRingQueue2(&g_adcData.RQCHG_CURR, &I_ADC);
g_adcData.total_CHG_CURR -= I_ADC;
I_ADC = get_aftercalculationAdc(CHG_CURR);
InRingQueue2(&g_adcData.RQCHG_CURR, I_ADC);
g_adcData.total_CHG_CURR += I_ADC;
I_ADC = g_adcData.total_CHG_CURR / (adcBuffSize - 1);
// I_ADC = get_adc(CHG_CURR);
// I = (float)(I_ADC) / 4095 * 3.3 * P_CHG_CURR * 2;
@ -275,9 +289,21 @@ float get_DSG_CURR(void)
uint16_t I_ADC;
// I_ADC = Get_ConversionVal(get_adc(DSG_CURR));
I_ADC = get_aftercalculationAdc(DSG_CURR);
// I_ADC = get_aftercalculationAdc(DSG_CURR);
// I_ADC = get_adc(DSG_CURR);
OutRingQueue2(&g_adcData.RQDSG_CURR, &I_ADC);
g_adcData.total_DSG_CURR -= I_ADC;
I_ADC = get_aftercalculationAdc(DSG_CURR);
InRingQueue2(&g_adcData.RQDSG_CURR, I_ADC);
g_adcData.total_DSG_CURR += I_ADC;
I_ADC = g_adcData.total_DSG_CURR / (adcBuffSize - 1);
// I = (float)(I_ADC) / 4095 * 3.3 * P_DSG_CURR * 2;
I = (float)(I_ADC) / 4095 * 2.5 * P_DSG_CURR;
@ -414,6 +440,19 @@ float get_PV2_VOLT_IN(void)
return V;
}
void currBuffInit(void)
{
InitRingQueue2(&g_adcData.RQCHG_CURR, CHG_buff, adcBuffSize);
InitRingQueue2(&g_adcData.RQDSG_CURR, DSG_buff, adcBuffSize);
while (InRingQueue2(&g_adcData.RQCHG_CURR, 0) != -2);
while (InRingQueue2(&g_adcData.RQDSG_CURR, 0) != -2);
g_adcData.total_CHG_CURR = 0;
g_adcData.total_DSG_CURR = 0;
printf("%d \n", RingQueueLength2(&g_adcData.RQCHG_CURR));
printf("%d \n", RingQueueLength2(&g_adcData.RQDSG_CURR));
}

View File

@ -11,20 +11,25 @@
config_info g_slConfigInfo = {
.constantCurrentV = 1000,
.constantVoltageV = 1400,
.floatI = 5,
.constantVoltageV = 1420,
.floatI = 20,
.startSolarOpenCircuitV = 1700,
.stopSolarOpenCircuitV = 1500,
.constantVoltageChargeV = 1440,
.trickleChargeC = 100,
.FloatTime = 3,
// .FloatTime = 10,
.FloatV = 1420,
.checkSolarOpenCircuitVTime = 10,
.registerRefreshTime = 1,
.resRefreshTime = 1,
.loopImpedance = 20,
// .resRefreshTime = 1,
.sensorEnableBroadcastTime = 20,
.HighSideMosTemperature_stop = 70,
.HighSideMosTemperature_end = 50,
.HighSideMosTemperature_start = 40,
.outputAgainFlagTime = 10,
.excessiveLoadFlagTime = 60,
.eLAgainTime = 3600,
};
@ -33,9 +38,9 @@ config_info g_slConfigInfo = {
* @param save_config_info ÐèÒª±£´æµÄÅäÖÃÐÅÏ¢
* @retval
*/
void save_config_info(config_info save_config_info)
void save_config_info(config_info *save_config_info)
{
SPI_Flash_Write((uint8_t *)&save_config_info, FLASH_SAVE_ADDR_BEGIN, CONFIG_INFO_SIZE);
SPI_Flash_Write((uint8_t *)save_config_info, FLASH_SAVE_ADDR_BEGIN, CONFIG_INFO_SIZE);
}
@ -68,12 +73,39 @@ uint8_t read_config_info(void)
g_slConfigInfo.end_Flag = defaultValue.end_Flag;
}
return 0;
}
/**
* @brief
* @param read_config_info1 in_config_info中
* @retval 0 flash中读取配置失败使
* 1 flash中读取配置成功
*/
uint8_t read_config_info1(config_info *in_config_info)
{
config_info temp_config_info;
SPI_Flash_Read((uint8_t *)&temp_config_info, FLASH_SAVE_ADDR_BEGIN, CONFIG_INFO_SIZE);
if (temp_config_info.start_Flag[0] == 'S'
&& temp_config_info.start_Flag[1] == 'L'
&& temp_config_info.end_Flag == 0x16) {
*in_config_info = temp_config_info;
return 1;
} else {
in_config_info->start_Flag[0] = defaultValue.start_Flag[0];
in_config_info->start_Flag[1] = defaultValue.start_Flag[1];
in_config_info->address[0] = defaultValue.address[0];
in_config_info->address[1] = defaultValue.address[1];
in_config_info->address[2] = defaultValue.address[2];
in_config_info->address[3] = defaultValue.address[3];
in_config_info->address[4] = defaultValue.address[4];
in_config_info->address[5] = defaultValue.address[5];
in_config_info->address[6] = defaultValue.address[6];
in_config_info->end_Flag = defaultValue.end_Flag;
}
return 0;
}

View File

@ -23,7 +23,7 @@ static void FloatingCharge(void);
/* 占空比 */
float g_duty_ratio = 0.8;
float g_duty_ratio = 0.75;
/* 用于确定工作模式 */
//static uint8_t modeFlag = 2;
@ -248,7 +248,65 @@ void mppt_constantVoltage(float InVoltage)
}
/**
* @brief ºã¨Êä³öµçѹ
* @brief ()
* @param
* @retval
*
*/
void mppt_constantVoltageB(float OutVoltage)
{
// static uint8_t ConstantVoltageFlag = 1;
// float PV1_V = get_PV_VOLT_OUT();
//
// if (ConstantVoltageFlag) {
// if (PV1_V > OutVoltage) {
// g_duty_ratio -= step1_pwm;
// Set_duty_ratio(&g_duty_ratio);
// } else {
// g_duty_ratio += step1_pwm;
// Set_duty_ratio(&g_duty_ratio);
// }
//
// if (PV1_V - OutVoltage < 0.1) {
// ConstantVoltageFlag = 0;
// }
// } else {
// if (PV1_V > OutVoltage) {
// g_duty_ratio -= step2_pwm;
// Set_duty_ratio(&g_duty_ratio);
// } else {
// g_duty_ratio += step2_pwm;
// Set_duty_ratio(&g_duty_ratio);
// }
//
// if (PV1_V - OutVoltage > 0.1) {
// ConstantVoltageFlag = 1;
// }
// }
// static float_t kp = 0.0005;
// static float_t ki = 0.000001;
static float_t kp = 0.005;
static float_t ki = 0.00001;
// static float_t kp = 0.1;
// static float_t ki = 0.001;
// float_t outVolt = get_PV_VOLT_OUT();
float_t outVolt = g_Mppt_Para.Battery_Voltage;
// float_t outVolt = voltOut;
// float_t error = outVolt - OutVoltage;
float_t error = OutVoltage - outVolt;
float_t stepPwm = kp * error + ki * outVolt;
g_duty_ratio += stepPwm;
// printf("setPwm : %d/10000 \n", (int)(stepPwm * 10000));
Set_duty_ratio(&g_duty_ratio);
}
/**
* @brief
* @param
* @retval
*
@ -284,13 +342,15 @@ void mppt_constantVoltageO(float OutVoltage)
// }
// }
static float_t kp = 0.0005;
static float_t ki = 0.000001;
// static float_t kp = 0.0005;
// static float_t ki = 0.000001;
static float_t kp = 0.005;
static float_t ki = 0.00001;
// static float_t kp = 0.1;
// static float_t ki = 0.001;
// float_t outVolt = get_PV_VOLT_OUT();
float_t outVolt = g_Mppt_Para.Battery_Voltage;
float_t outVolt = g_Mppt_Para.Output_Voltage;
// float_t outVolt = voltOut;
// float_t error = outVolt - OutVoltage;
float_t error = OutVoltage - outVolt;
@ -406,7 +466,7 @@ void TrickleCharge(void)
TrickleChargeC = (float_t)g_slConfigInfo.trickleChargeC / 100;
onlyOnce = 0;
}
printf("Trickle\n");
// printf("Trickle\n");
mppt_constantCurrentO(TrickleChargeC + g_Mppt_Para.Discharg_Current);
}
@ -450,22 +510,33 @@ void ConstantVoltageCharge(void)
*/
void FloatingCharge(void)
{
static uint32_t num = 0;
static uint32_t numLenFlag;
// static uint32_t num = 0;
// static uint32_t numLenFlag;
// static uint8_t onlyOnce = 1;
// if (onlyOnce) {
// numLenFlag = g_slConfigInfo.FloatTime * 1000;
// onlyOnce = 0;
// }
// printf("float\n");
// TIM_SetCompare4(TIM4, 0);
// if (numLenFlag == ++num) {
// num = 0;
// for (int var = 0; var < 10; ++var) {
// ConstantVoltageCharge();
// }
// g_Mppt_Para.MPPT_Mode = CONSTANTVOLTAGE;
// printf("float\n");
// }
static float_t FloatChargeV;
static uint8_t onlyOnce = 1;
if (onlyOnce) {
numLenFlag = g_slConfigInfo.FloatTime * 1000;
FloatChargeV = (float_t)g_slConfigInfo.FloatV / 100;
onlyOnce = 0;
}
printf("float\n");
TIM_SetCompare4(TIM4, 0);
if (numLenFlag == ++num) {
num = 0;
ConstantVoltageCharge();
g_Mppt_Para.MPPT_Mode = CONSTANTVOLTAGE;
}
mppt_constantVoltageO(FloatChargeV);
}
@ -553,6 +624,7 @@ void MpptMode(void)
ConstantCurrentV = (float)g_slConfigInfo.constantCurrentV / 100;
ConstantVoltageV = (float)g_slConfigInfo.constantVoltageV / 100;
FloatI = (float)g_slConfigInfo.floatI / 100;
printf("FloatI: %d / 100 \n", (int)(FloatI * 100));
StopSolarOpenCircuitV = (float)g_slConfigInfo.stopSolarOpenCircuitV / 100;
only_once = 0;
}
@ -633,16 +705,20 @@ void MpptMode(void)
if (g_Mppt_Para.Solar_Open_Circuit_Voltage < StopSolarOpenCircuitV
&& (g_Mppt_Para.Discharg_Current >= g_Mppt_Para.Charg_Current
|| g_Mppt_Para.Charg_Current - g_Mppt_Para.Discharg_Current < 0.05)) {
// if (g_Mppt_Para.Input_Voltage < StopSolarOpenCircuitV
// && (g_Mppt_Para.Discharg_Current >= g_Mppt_Para.Charg_Current
// || g_Mppt_Para.Charg_Current - g_Mppt_Para.Discharg_Current < 0.05)) {
if ((g_Mppt_Para.Input_Voltage < StopSolarOpenCircuitV && g_Mppt_Para.Charg_Current < 0.05)
&& g_Mppt_Para.MPPT_Mode != NoWork) {
g_Mppt_Para.MPPT_Mode = NoWork;
// printf("nowork \n");
stop_mpptWork();
TimeSliceOffset_Register(&m_startMpptControl, Task_startMpptControl
, startMpptControl_reloadVal, startMpptControl_offset);
return;
}
// if (((g_Mppt_Para.Charg_Current - g_Mppt_Para.Discharg_Current < 0.03
// && g_Mppt_Para.Discharg_Current - g_Mppt_Para.Charg_Current < 0.03)
// && (g_Mppt_Para.Battery_Voltage < ConstantVoltageV - 1
@ -662,7 +738,15 @@ void MpptMode(void)
|| g_Mppt_Para.Battery_Voltage > 16 || g_Mppt_Para.Battery_Voltage < 8) {
// || g_Mppt_Para.MPPT_Mode == NoBattery) {
// g_Mppt_Para.MPPT_Mode = NoBattery;
g_Mppt_Para.MPPT_Mode = CONSTANTVOLTAGE;
// g_Mppt_Para.MPPT_Mode = CONSTANTVOLTAGE;
g_Mppt_Para.MPPT_Mode = FLOAT;
// printf("Charg_Current : %d/100 \n", (int)(g_Mppt_Para.Charg_Current * 100));
// printf("Discharg_Current : %d/100 \n", (int)(g_Mppt_Para.Discharg_Current * 100));
// printf("Battery_Voltage : %d/100 \n", (int)(g_Mppt_Para.Battery_Voltage * 100));
g_batteryState = 0;
return;
}
@ -677,20 +761,29 @@ void MpptMode(void)
// return;
// }
if (((ConstantVoltageV < g_Mppt_Para.Battery_Voltage) &&
(FloatI > g_Mppt_Para.Charg_Current))) {
g_Mppt_Para.MPPT_Mode = FLOAT;
// if (((ConstantVoltageV < g_Mppt_Para.Battery_Voltage)
// &&(FloatI + 0.1 <= g_Mppt_Para.Charg_Current))
// || (FloatI + 0.1 <= g_Mppt_Para.Discharg_Current)) {
//// || (g_Mppt_Para.Charg_Current - g_Mppt_Para.Discharg_Current < 0.03
//// && g_Mppt_Para.Discharg_Current - g_Mppt_Para.Charg_Current < 0.03)) {
//
//// printf("mppt mode \n");
//// printf(" vout : %d/100 \n", (int)(g_Mppt_Para.Battery_Voltage * 100));
// g_Mppt_Para.MPPT_Mode = CONSTANTVOLTAGE;
// return;
// }
if (((ConstantVoltageV < g_Mppt_Para.Battery_Voltage)
&&(FloatI + 0.1 <= g_Mppt_Para.Charg_Current - g_Mppt_Para.Discharg_Current))) {
g_Mppt_Para.MPPT_Mode = CONSTANTVOLTAGE;
return;
}
if (((ConstantVoltageV < g_Mppt_Para.Battery_Voltage)
&&(FloatI + 0.1 <= g_Mppt_Para.Charg_Current))) {
// || (g_Mppt_Para.Charg_Current - g_Mppt_Para.Discharg_Current < 0.03
// && g_Mppt_Para.Discharg_Current - g_Mppt_Para.Charg_Current < 0.03)) {
// printf("mppt mode \n");
// printf(" vout : %d/100 \n", (int)(g_Mppt_Para.Battery_Voltage * 100));
g_Mppt_Para.MPPT_Mode = CONSTANTVOLTAGE;
if ((((ConstantVoltageV < g_Mppt_Para.Battery_Voltage)
&& (FloatI > g_Mppt_Para.Charg_Current))
&& (FloatI > g_Mppt_Para.Discharg_Current))) {
// || g_Mppt_Para.MPPT_Mode == FLOAT) {
g_Mppt_Para.MPPT_Mode = FLOAT;
return;
}
@ -699,7 +792,6 @@ void MpptMode(void)
return;
}
}
void findMiNDutyRatio(void)
@ -735,27 +827,53 @@ void test(void)
// mppt_constantCurrentO(1);
// if (g_interruptNum < 5) {
// g_interruptNum++;
// return;
// }
// g_Mppt_Para.Charg_Current = get_capturedata(get_CHG_CURR);
// g_Mppt_Para.Discharg_Current = get_capturedata(get_DSG_CURR);
// g_Mppt_Para.Output_Voltage = get_capturedata(get_PV_VOLT_OUT);
// g_Mppt_Para.Battery_Voltage = g_Mppt_Para.Output_Voltage;
g_Mppt_Para.Charg_Current = get_CHG_CURR();
g_Mppt_Para.Discharg_Current = get_DSG_CURR();
g_Mppt_Para.Output_Voltage = get_PV_VOLT_OUT();
g_Mppt_Para.Input_Voltage = get_PV1_VOLT_IN();
// mppt_constantVoltage(18);
// return;
if (g_Mppt_Para.Discharg_Current == 0 && g_Mppt_Para.Charg_Current == 0) {
return;
}
// g_Mppt_Para.Battery_Voltage = g_Mppt_Para.Output_Voltage;
// static float_t Volt = 0.7;
// static float_t Curr = 5.5;
static float_t Res = 0.7 / 5.5;
// static float_t loopImpedance;
// static uint8_t onlyone = 1;
// if (onlyone) {
// loopImpedance = (float_t)g_slConfigInfo.loopImpedance / 100;
// }
static float_t inBatteryCurr;
static float_t outBatteryCurr;
inBatteryCurr = g_Mppt_Para.Charg_Current - g_Mppt_Para.Discharg_Current;
if (inBatteryCurr > 0.5) {
g_Mppt_Para.Battery_Voltage = g_Mppt_Para.Output_Voltage - inBatteryCurr * Res;
outBatteryCurr = g_Mppt_Para.Discharg_Current - g_Mppt_Para.Charg_Current;
if (inBatteryCurr > 0.1) {
g_Mppt_Para.Battery_Voltage = g_Mppt_Para.Output_Voltage - inBatteryCurr * g_impedance;
} else {
g_Mppt_Para.Battery_Voltage = g_Mppt_Para.Output_Voltage;
}
if (g_batteryState == 0 && (inBatteryCurr > 0.1 || outBatteryCurr > 0.1) && g_Mppt_Para.Output_Voltage < 14.2) {
// printf("int g_batteryState : %d\n", g_batteryState);
g_batteryState = 1;
// TimeSliceOffset_Register(&m_impedanceCalculation, Task_impedanceCalculation
// , impedanceCalculation_reloadVal, impedanceCalculation_reloadVal);
}
// mppt_constantVoltage(18);

View File

@ -336,6 +336,7 @@ void SL_MsgProcFunc_Registration_request(device_handle device, void *pMsg, uint3
recvbroadcast_flag = 1;
RegistrationRequestFlag = 0;
TimeSliceOffset_Unregister(&m_recvbroadcast);
m_recvbroadcast.runFlag = 0;
SL_Mppt_RegistrationReply_pack *rpack = (SL_Mppt_RegistrationReply_pack *)pMsg;
g_Mppt_Para.Registration_Status = chang_8_to_16(rpack->registration_Status_L, rpack->registration_Status_H);

View File

@ -24,11 +24,13 @@
#include "collect_Conversion.h"
//uint8_t g_interruptNum = 0; /* 每次关闭或重新开启定时器3时先清零该引脚 */
void stop_mpptWork(void)
{
// GPIO_WriteBit(EnPowerSupply_GPIO, EnPowerSupply_PIN, SET);
g_duty_ratio = 0.7;
TIM_Cmd(TIM3, DISABLE);
// g_interruptNum = 0;
TIM_SetCompare4(TIM4, 0);
// TimeSliceOffset_Register(&m_startMpptControl, Task_startMpptControl
// , startMpptControl_reloadVal, startMpptControl_offset);
@ -39,11 +41,13 @@ void stop_mpptWork(void)
void start_mpptWork(void)
{
// GPIO_WriteBit(EnPowerSupply_GPIO, EnPowerSupply_PIN, RESET);
// g_interruptNum = 0;
TIM_Cmd(TIM3, ENABLE);
// TIM3->CNT = 0;
g_Mppt_Para.MPPT_Mode = CONSTANTCURRENT;
// TimeSliceOffset_Unregister(&m_startMpptControl);
// Delay_Ms(500);
GPIO_WriteBit(POW_OUT_CON_GPIO, POW_OUT_CON_PIN, SET);
// GPIO_WriteBit(POW_OUT_CON_GPIO, POW_OUT_CON_PIN, SET);
}
/**
@ -72,7 +76,6 @@ void Task_RunLED(void)
// printf(" 0.没有工作; 1.涓流模式; 2.恒流模式; 3.恒压模式; 4.浮充模式; 5.没有电池 : %d \n", g_Mppt_Para.MPPT_Mode);
//
// printf(" \n");
// uart_sendstr(g_bat485_uart3_handle, " \n");
uart_dev_write(g_bat485_uart3_handle, " \n", sizeof(" \n"));
@ -82,6 +85,10 @@ void Task_RunLED(void)
sprintf(buffer, " duty_ratio : %d/1000 \n", (int)(g_duty_ratio * 1000));
uart_dev_write(g_bat485_uart3_handle, buffer, sizeof(buffer));
memset(buffer, 0, sizeof(buffer));
sprintf(buffer, " Input_Voltage : %d/100 \n", (int)(g_Mppt_Para.Input_Voltage * 100));
uart_dev_write(g_bat485_uart3_handle, buffer, sizeof(buffer));
memset(buffer, 0, sizeof(buffer));
sprintf(buffer, " vout : %d/100 \n", (int)(g_Mppt_Para.Output_Voltage * 100));
uart_dev_write(g_bat485_uart3_handle, buffer, sizeof(buffer));
@ -102,10 +109,38 @@ void Task_RunLED(void)
sprintf(buffer, " mosT : %d/10 \n", (int)(g_Mppt_Para.HighSideMos_Temperature * 10));
uart_dev_write(g_bat485_uart3_handle, buffer, sizeof(buffer));
memset(buffer, 0, sizeof(buffer));
sprintf(buffer, " impedance : %d/1000 \n", (int)(g_impedance * 1000));
uart_dev_write(g_bat485_uart3_handle, buffer, sizeof(buffer));
memset(buffer, 0, sizeof(buffer));
sprintf(buffer, " g_impedanceStart : %d \n", g_impedanceStart);
uart_dev_write(g_bat485_uart3_handle, buffer, sizeof(buffer));
memset(buffer, 0, sizeof(buffer));
sprintf(buffer, " mosState : %d \n", (int)(g_Mppt_Para.DischargMos_State));
uart_dev_write(g_bat485_uart3_handle, buffer, sizeof(buffer));
memset(buffer, 0, sizeof(buffer));
sprintf(buffer, " batteryState : %d \n", g_batteryState);
uart_dev_write(g_bat485_uart3_handle, buffer, sizeof(buffer));
memset(buffer, 0, sizeof(buffer));
sprintf(buffer, " outputAgainFlag : %d \n", outputAgainFlag);
uart_dev_write(g_bat485_uart3_handle, buffer, sizeof(buffer));
memset(buffer, 0, sizeof(buffer));
sprintf(buffer, " excessiveLoadFlag : %d \n", excessiveLoadFlag);
uart_dev_write(g_bat485_uart3_handle, buffer, sizeof(buffer));
memset(buffer, 0, sizeof(buffer));
sprintf(buffer, " inPower : %d \n", (int)(g_Mppt_Para.inPower));
uart_dev_write(g_bat485_uart3_handle, buffer, sizeof(buffer));
memset(buffer, 0, sizeof(buffer));
sprintf(buffer, " outPower : %d \n", (int)(g_Mppt_Para.outPower));
uart_dev_write(g_bat485_uart3_handle, buffer, sizeof(buffer));
memset(buffer, 0, sizeof(buffer));
sprintf(buffer, " 0.没有工作; 1.涓流模式; 2.恒流模式; 3.恒压模式; 4.浮充模式; 5.没有电池 : %d \n", g_Mppt_Para.MPPT_Mode);
uart_dev_write(g_bat485_uart3_handle, buffer, sizeof(buffer));
@ -121,10 +156,11 @@ void Task_RunLED(void)
flag = !flag;
GPIO_WriteBit(RUN_LED_GPIO, RUN_LED_PIN, flag);
// static uint8_t num = 0;
// if (10 == ++num) {
// GPIO_WriteBit(POW_OUT_CON_GPIO, POW_OUT_CON_PIN, SET);
// }
static uint8_t num = 0;
if (10 == ++num) {
GPIO_WriteBit(POW_OUT_CON_GPIO, POW_OUT_CON_PIN, SET);
}
return;
}
@ -149,16 +185,23 @@ void Task_startMpptControl(void)
checkSolarOpenCircuitVTimeFlag = 0;
g_Mppt_Para.Solar_Open_Circuit_Voltage = get_PV1_VOLT_IN();
// printf("volt in : %d/100 \n", (int)(g_Mppt_Para.Solar_Open_Circuit_Voltage * 100));
char buff[50];
memset(buff, 0, sizeof(buff));
sprintf(buff, "volt in : %d/100 \n", (int)(g_Mppt_Para.Solar_Open_Circuit_Voltage * 100));
uart_dev_write(g_bat485_uart3_handle, buff, sizeof(buff));
// char buff[50];
// memset(buff, 0, sizeof(buff));
// sprintf(buff, "volt in : %d/100 \n", (int)(g_Mppt_Para.Solar_Open_Circuit_Voltage * 100));
// uart_dev_write(g_bat485_uart3_handle, buff, sizeof(buff));
if (g_Mppt_Para.Solar_Open_Circuit_Voltage
> ((float_t)g_slConfigInfo.startSolarOpenCircuitV / 100)) {
// start_mpptWork();
TimeSliceOffset_Register(&m_softStart, Task_softStart, softStart_reloadVal, softStart_offset);
TimeSliceOffset_Unregister(&m_startMpptControl);
m_startMpptControl.runFlag = 0;
// printf("1\n");
// start_mpptWork();
if (g_Mppt_Para.Output_Voltage > 11) {
g_batteryState = 1;
} else {
g_batteryState = 0;
}
TimeSliceOffset_Register(&m_softStart, Task_softStart, softStart_reloadVal, softStart_offset);
}
}
return;
@ -186,14 +229,44 @@ void Task_softStart(void)
}
else if (num > 70 || dutyRatio > g_duty_ratio) {
TimeSliceOffset_Unregister(&m_softStart);
m_softStart.runFlag = 0;
dutyRatio = 0;
num = 0;
Set_duty_ratio(&g_duty_ratio);
TimeSliceOffset_Unregister(&m_softStart);
if (g_batteryState == 1) {
start_mpptWork();
// GPIO_WriteBit(POW_OUT_CON_GPIO, POW_OUT_CON_PIN, SET);
// TimeSliceOffset_Register(&m_impedanceCalculation, Task_impedanceCalculation
// , impedanceCalculation_reloadVal, impedanceCalculation_reloadVal);
return;
} else {
dutyRatio = 0;
num = 0;
Set_duty_ratio(&g_duty_ratio);
// TimeSliceOffset_Unregister(&m_softStart);
// m_softStart.runFlag = 0;
//软起动后bms保护板开启电池充电
if (get_CHG_CURR() - get_DSG_CURR() > 0.1
|| get_DSG_CURR() - get_CHG_CURR() > 0.1) {
// printf("111\n");
// TimeSliceOffset_Register(&m_impedanceCalculation, Task_impedanceCalculation
// , impedanceCalculation_reloadVal, impedanceCalculation_reloadVal);
start_mpptWork();
// GPIO_WriteBit(POW_OUT_CON_GPIO, POW_OUT_CON_PIN, SET);
return;
}
g_Mppt_Para.MPPT_Mode = FLOAT;
TIM_Cmd(TIM3, ENABLE);
// GPIO_WriteBit(POW_OUT_CON_GPIO, POW_OUT_CON_PIN, SET);
return;
}
}
else {
dutyRatio += 0.01;
@ -251,17 +324,36 @@ void Task_refreshRegister(void)
// g_Mppt_Para.Charg_Current = get_capturedata(get_CHG_CURR);
// g_Mppt_Para.Discharg_Current = get_capturedata(get_DSG_CURR);
// g_Mppt_Para.HighSideMos_Temperature = get_capturedata(get_MOSFET_Temper);
g_Mppt_Para.Battery_Voltage = get_PV_VOLT_OUT();
// g_Mppt_Para.Battery_Voltage = get_PV_VOLT_OUT();
g_Mppt_Para.Output_Voltage = get_PV_VOLT_OUT();
g_Mppt_Para.Charg_Current = get_CHG_CURR();
g_Mppt_Para.Discharg_Current = get_DSG_CURR();
g_Mppt_Para.HighSideMos_Temperature = get_MOSFET_Temper();
g_Mppt_Para.DischargMos_State = GPIO_ReadOutputDataBit(POW_OUT_CON_GPIO, POW_OUT_CON_PIN)
&& GPIO_ReadInputDataBit(DSG_PROT_GPIO, DSG_PROT_PIN);
if (g_Mppt_Para.Charg_Current - g_Mppt_Para.Discharg_Current < -0.1) {
g_Mppt_Para.Battery_Voltage = g_Mppt_Para.Output_Voltage
- (g_Mppt_Para.Charg_Current - g_Mppt_Para.Discharg_Current) * g_impedance;
}
float_t inBatteryCurr = g_Mppt_Para.Charg_Current - g_Mppt_Para.Discharg_Current;
float_t outBatteryCurr = g_Mppt_Para.Discharg_Current - g_Mppt_Para.Charg_Current;
if (g_batteryState == 0 && (inBatteryCurr > 0.1 || outBatteryCurr > 0.1) && g_Mppt_Para.Output_Voltage < 14.2) {
g_batteryState = 1;
}
/* 有电池,太阳能输出功率大,同时回路阻抗未测试或需要重新测试 */
if (g_batteryState == 1 && (g_Mppt_Para.Charg_Current > 3.0) && (g_impedanceStart == 1 || g_impedance == 0.0)) {
TimeSliceOffset_Register(&m_impedanceCalculation, Task_impedanceCalculation
, impedanceCalculation_reloadVal, impedanceCalculation_reloadVal);
}
// g_Mppt_Para.DischargMos_State = GPIO_ReadOutputDataBit(POW_OUT_CON_GPIO, POW_OUT_CON_PIN);
// g_Mppt_Para.Solar_Open_Circuit_Voltage = get_capturedata(get_PV1_VOLT_IN);
g_Mppt_Para.Solar_Open_Circuit_Voltage = get_PV1_VOLT_IN();
g_Mppt_Para.Input_Voltage = get_PV1_VOLT_IN();
if (g_Mppt_Para.HighSideMos_Temperature < g_slConfigInfo.HighSideMosTemperature_start) {
if (g_Mppt_Para.HighSideMos_Temperature < g_slConfigInfo.HighSideMosTemperature_start + 3) {
if (overTemperature == 2) {
// start_mpptWork();
TimeSliceOffset_Register(&m_softStart, Task_softStart, softStart_reloadVal, softStart_offset);
@ -270,18 +362,19 @@ void Task_refreshRegister(void)
return;
}
if (g_Mppt_Para.HighSideMos_Temperature > g_slConfigInfo.HighSideMosTemperature_end) {
if (g_Mppt_Para.HighSideMos_Temperature > g_slConfigInfo.HighSideMosTemperature_end + 3
&& g_Mppt_Para.HighSideMos_Temperature < g_slConfigInfo.HighSideMosTemperature_stop) {
// g_Mppt_Para.MPPT_Mode = NoBattery;
g_duty_ratio = 0.5;
// g_duty_ratio -= 0.1;
g_duty_ratio = 0.6;
Set_duty_ratio(&g_duty_ratio);
overTemperature = 1;
}
if (g_Mppt_Para.HighSideMos_Temperature > g_slConfigInfo.HighSideMosTemperature_stop) {
if (g_Mppt_Para.HighSideMos_Temperature > g_slConfigInfo.HighSideMosTemperature_stop + 3) {
overTemperature = 2;
stop_mpptWork();
}
}
}
@ -302,6 +395,7 @@ void Task_recvbroadcast(void)
RegistrationRequestFlag = 0;
run_number = 0;
TimeSliceOffset_Unregister(&m_recvbroadcast);
m_recvbroadcast.runFlag = 0;
return;
}
// if (g_Mppt_Para.Registration_Status == REGISTER_SUCCESS) {
@ -384,7 +478,9 @@ void Task_recvbroadcast(void)
*/
STR_TimeSliceOffset m_impedanceCalculation;
float_t g_impedance = 0; /* 回路阻抗的值 */
float_t voltOut = 0; /* 输出电压的值 */
uint8_t g_batteryState = 0; /* 有无电池 */
uint8_t g_impedanceStart = 0; /* 是否开始测量回路阻抗 */
//config_info tempConfigInfo;
void Task_impedanceCalculation(void)
{
static uint8_t num = 0;
@ -392,46 +488,121 @@ void Task_impedanceCalculation(void)
static float_t voltOne = 0;
static float_t currTwo = 0;
static float_t voltTwo = 0;
// static uint8_t only_one = 1;
// if (only_one) {
// g_impedance = g_slConfigInfo.loopImpedance;
// }
if (g_Mppt_Para.MPPT_Mode == CONSTANTCURRENT
|| g_Mppt_Para.MPPT_Mode == CONSTANTVOLTAGE) {
++num;
} else {
num = 0;
// if (g_Mppt_Para.MPPT_Mode == CONSTANTCURRENT
// || g_Mppt_Para.MPPT_Mode == CONSTANTVOLTAGE) {
// ++num;
// } else {
// num = 0;
// }
//
// if (num == 10) {
// num = 0;
// TIM_Cmd(TIM3, DISABLE);
//
// TIM_SetCompare4(TIM4, 300);
// Delay_Ms(500);
//
// TIM_SetCompare4(TIM4, 420);
// Delay_Ms(5);
//// currOne = get_capturedata(get_CHG_CURR) - get_capturedata(get_DSG_CURR);
//// voltOne = get_capturedata(get_PV_VOLT_OUT);
// currOne = get_CHG_CURR() - get_DSG_CURR();
// voltOne = get_PV_VOLT_OUT();
//
//// currTwo = get_capturedata(get_CHG_CURR) - get_capturedata(get_DSG_CURR);
//// voltTwo = get_capturedata(get_PV_VOLT_OUT);
// currTwo = get_CHG_CURR() - get_DSG_CURR();
// voltTwo = get_PV_VOLT_OUT();
//
// g_impedance = (voltOne - voltTwo) / (currOne - currTwo);
//
// printf("currOne = %d/1000, voltOne = %d/100 \n", (int)(currOne * 1000), (int)(voltOne * 100));
// printf("currTwo = %d/1000, voltTwo = %d/100 \n", (int)(currTwo * 1000), (int)(voltTwo * 100));
// printf("Res = %d/1000, E = %d/100 \n", (int)(g_impedance * 1000), (int)((voltTwo - currTwo * g_impedance) * 100));
//
//// TIM_Cmd(TIM3, ENABLE);
// }
num++;
// printf("g_batteryState : %d\n", g_batteryState);
if (num == 1) {
TIM_Cmd(TIM3, DISABLE);
// g_interruptNum = 0;
TIM_SetCompare4(TIM4, 300);
return;
}
if (num == 10) {
num = 0;
TIM_Cmd(TIM3, DISABLE);
TIM_SetCompare4(TIM4, 420);
Delay_Ms(5);
// currOne = get_capturedata(get_CHG_CURR) - get_capturedata(get_DSG_CURR);
// voltOne = get_capturedata(get_PV_VOLT_OUT);
if (num == 11) {
currOne = get_CHG_CURR() - get_DSG_CURR();
voltOne = get_PV_VOLT_OUT();
TIM_SetCompare4(TIM4, 420);
return;
}
if (num == 21) {
TimeSliceOffset_Unregister(&m_impedanceCalculation);
m_impedanceCalculation.runFlag = 0;
TIM_SetCompare4(TIM4, 300);
Delay_Ms(5);
// currTwo = get_capturedata(get_CHG_CURR) - get_capturedata(get_DSG_CURR);
// voltTwo = get_capturedata(get_PV_VOLT_OUT);
currTwo = get_CHG_CURR() - get_DSG_CURR();
voltTwo = get_PV_VOLT_OUT();
g_impedance = (voltOne - voltTwo) / (currOne - currTwo);
printf("currOne = %d/1000, voltOne = %d/100 \n", (int)(currOne * 1000), (int)(voltOne * 100));
printf("currTwo = %d/1000, voltTwo = %d/100 \n", (int)(currTwo * 1000), (int)(voltTwo * 100));
printf("Res = %d/1000, E = %d/100 \n", (int)(g_impedance * 1000), (int)((voltTwo - currTwo * g_impedance) * 100));
// printf("g_batteryState : %d\n", g_batteryState);
TIM_Cmd(TIM3, ENABLE);
// printf("currOne = %d/1000, voltOne = %d/100 \n", (int)(currOne * 1000), (int)(voltOne * 100));
// printf("currTwo = %d/1000, voltTwo = %d/100 \n", (int)(currTwo * 1000), (int)(voltTwo * 100));
// printf("Res = %d/1000, E = %d/100 \n", (int)(g_impedance * 1000), (int)((voltTwo - currTwo * g_impedance) * 100));
/* 判断回路阻抗是否合理 */
if (g_impedance > 1.0 || g_impedance < 0.05) {
g_impedance = 0;
num = 0;
start_mpptWork();
return;
}
/* 将回路阻抗的值放入flash中 */
config_info tempConfigInfo;
if (read_config_info1(&tempConfigInfo)) {
tempConfigInfo.loopImpedance = (uint16_t)(g_impedance * 1000);
save_config_info(&tempConfigInfo);
} else {
tempConfigInfo = g_slConfigInfo;
tempConfigInfo.loopImpedance = (uint16_t)(g_impedance * 1000);
save_config_info(&tempConfigInfo);
}
// uart_dev_write(g_bat485_uart3_handle, "\n\n\n\n\n", sizeof("\n\n\n\n\n"));
// char buffer[80];
// memset(buffer, 0, sizeof(buffer));
// sprintf(buffer, " tempConfigInfo.loopImpedance : %d/1000 \n", tempConfigInfo.loopImpedance);
// uart_dev_write(g_bat485_uart3_handle, buffer, sizeof(buffer));
// memset(buffer, 0, sizeof(buffer));
// config_info tempConfigInfo2 = {0};
// read_config_info1(&tempConfigInfo2);
// sprintf(buffer, " tempConfigInfo2.loopImpedance : %d/1000 \n", tempConfigInfo2.loopImpedance);
// uart_dev_write(g_bat485_uart3_handle, buffer, sizeof(buffer));
// uart_dev_write(g_bat485_uart3_handle, "\n\n\n\n\n", sizeof("\n\n\n\n\n"));
g_impedanceStart = 0;
num = 0;
start_mpptWork();
// TIM_Cmd(TIM3, ENABLE);
return;
}
return;
}
/**
* @brief
* @brief
* @param
* @retval
*/
@ -439,14 +610,94 @@ STR_TimeSliceOffset m_outputAgain;
uint8_t outputAgainFlag = 0;
void Task_outputAgain(void)
{
static uint8_t num = 0;
num++;
if (outputAgainFlag == 1) {
// if (outputAgainFlag == 1) {
//// outputAgainFlag = 0;
// GPIO_WriteBit(POW_OUT_CON_GPIO, POW_OUT_CON_PIN, RESET);
// TimeSliceOffset_Unregister(&m_outputAgain);
// m_outputAgain.runFlag = 0;
// num = 0;
// }
// printf(" in POW_OUT_CON\n");
if (num == g_slConfigInfo.outputAgainFlagTime) {
num = 0;
outputAgainFlag = 0;
TimeSliceOffset_Unregister(&m_outputAgain);
m_outputAgain.runFlag = 0;
// printf(" in POW_OUT_CON control %d \n", GPIO_ReadInputDataBit(DSG_PROT_GPIO, DSG_PROT_PIN));
if (!(GPIO_ReadInputDataBit(DSG_PROT_GPIO, DSG_PROT_PIN))) {
// uart_dev_write(g_bat485_uart3_handle, " \n\n\n\n\n", sizeof(" \n\n\n\n\n"));
// uart_dev_write(g_bat485_uart3_handle, " in task pow_out_con reset", sizeof(" in task pow_out_con reset"));
// uart_dev_write(g_bat485_uart3_handle, " \n\n\n\n\n", sizeof(" \n\n\n\n\n"));
// printf(" in POW_OUT_CON RESET \n");
GPIO_WriteBit(POW_OUT_CON_GPIO, POW_OUT_CON_PIN, RESET);
}
}
if (outputAgainFlag == 2) {
TimeSliceOffset_Unregister(&m_outputAgain);
return;
}
/**
* @brief
* @param
* @retval
*/
STR_TimeSliceOffset m_excessiveLoad;
uint8_t excessiveLoadFlag = 0;
void Task_excessiveLoad(void)
{
static uint8_t num = 0;
static uint16_t numLong = 0;
// if (outputAgainFlag == 1) {
//// outputAgainFlag = 0;
// GPIO_WriteBit(POW_OUT_CON_GPIO, POW_OUT_CON_PIN, RESET);
// TimeSliceOffset_Unregister(&m_outputAgain);
// m_outputAgain.runFlag = 0;
// num = 0;
// }
// printf(" in POW_OUT_CON\n");
if (outputAgainFlag == 1) {
num = 0;
numLong = 0;
excessiveLoadFlag = 0;
TimeSliceOffset_Unregister(&m_excessiveLoad);
m_excessiveLoad.runFlag = 0;
}
if (excessiveLoadFlag == 1) {
num++;
}
if (num == g_slConfigInfo.excessiveLoadFlagTime) {
num = 0;
excessiveLoadFlag = 0;
TimeSliceOffset_Unregister(&m_excessiveLoad);
m_excessiveLoad.runFlag = 0;
return;
}
if (excessiveLoadFlag >= 2) {
GPIO_WriteBit(POW_OUT_CON_GPIO, POW_OUT_CON_PIN, RESET);
num = 0;
}
if (!(GPIO_ReadOutputDataBit(POW_OUT_CON_GPIO, POW_OUT_CON_PIN))) {
numLong++;
}
if (numLong == g_slConfigInfo.eLAgainTime) {
numLong = 0;
GPIO_WriteBit(POW_OUT_CON_GPIO, POW_OUT_CON_PIN, SET);
excessiveLoadFlag = 0;
TimeSliceOffset_Unregister(&m_excessiveLoad);
m_excessiveLoad.runFlag = 0;
}
return;
@ -470,6 +721,7 @@ void Task_sensorEnableBroadcast(void)
enabBroadcastTimeFlag = 0;
run_Broadcast = 1;
TimeSliceOffset_Unregister(&m_sensorEnableBroadcast);
m_sensorEnableBroadcast.runFlag = 0;
}
return;
}
@ -481,6 +733,8 @@ void Task_sensorEnableBroadcast(void)
*/
void g_Mppt_Para_Init(void)
{
g_impedance = (float_t)g_slConfigInfo.loopImpedance / 1000;
g_Mppt_Para.Registration_Status = UNREGISTER;
g_Mppt_Para.address[0] = g_slConfigInfo.address[0];
g_Mppt_Para.address[1] = g_slConfigInfo.address[1];
@ -500,14 +754,17 @@ void g_Mppt_Para_Init(void)
// g_Mppt_Para.HighSideMos_Temperature = get_capturedata(get_MOSFET_Temper); g_Mppt_Para.Output_Voltage = get_capturedata(get_PV_VOLT_OUT);
g_Mppt_Para.Output_Voltage = get_PV_VOLT_OUT();
g_Mppt_Para.Battery_Voltage = g_Mppt_Para.Output_Voltage;
// g_Mppt_Para.Battery_Voltage = g_Mppt_Para.Output_Voltage;
g_Mppt_Para.Charg_Current = get_CHG_CURR();
g_Mppt_Para.Discharg_Current = get_DSG_CURR();
g_Mppt_Para.Battery_Voltage = g_Mppt_Para.Output_Voltage
- (g_Mppt_Para.Charg_Current - g_Mppt_Para.Discharg_Current) * g_impedance;
g_Mppt_Para.Solar_Open_Circuit_Voltage = get_PV1_VOLT_IN();
g_Mppt_Para.HighSideMos_Temperature = get_MOSFET_Temper();
if (g_Mppt_Para.Battery_Voltage < 1 || g_Mppt_Para.Battery_Voltage > 9) {
GPIO_WriteBit(POW_OUT_CON_GPIO, POW_OUT_CON_PIN, SET);
if (g_Mppt_Para.Battery_Voltage < 15 || g_Mppt_Para.Battery_Voltage > 11) {
// GPIO_WriteBit(POW_OUT_CON_GPIO, POW_OUT_CON_PIN, SET);
g_impedanceStart = 1;
}
g_Mppt_Para.DischargMos_State = GPIO_ReadOutputDataBit(POW_OUT_CON_GPIO, POW_OUT_CON_PIN)
&& GPIO_ReadInputDataBit(DSG_PROT_GPIO, DSG_PROT_PIN);
@ -559,20 +816,26 @@ void task_Init(void)
*/
void hardware_Init(void)
{
TIM2_Init(1);
uart_dev_init();
PWM_TIM_Configuration();
// TIM_SetCompare4(TIM4, 0);
ADC_all_Init();
RUN_LED_Init();
WDI_INPUT_Init();
SPI_Flash_Init();
POW_OUT_CON_Init();
DSG_PROT_Init();
WORK_VOLT_INT_Init();
// EnPowerSupply_Init();
// Set_duty_ratio(&g_duty_ratio);
uart_dev_write(g_bat485_uart3_handle, " hello world \n", sizeof(" hello world \n"));
// uart_dev_write(g_bat485_uart3_handle, " hello world \n", sizeof(" hello world \n"));
TIM3_Init(1);
// TIM_Cmd(TIM3, ENABLE); //TIM3使能
currBuffInit();
TIM2_Init(1);
}

View File

@ -0,0 +1,91 @@
/*
* ring_queue.c
*
* Created on: 2024621
* Author: psx
*/
//循环队列
#include <stdio.h>
#include <stdlib.h>
#include "ring_queue2.h"
//#define RING_QUEUE_DEBUG
//#ifdef RING_QUEUE_DEBUG
//#define //rq_debug term_printf
//#else
//void rq_debug(const char *fmt, ...){};
//#endif
#define RQ_OK 1
#define RQ_ERROR 0
#define RQ_OVERFLOW -2
//初始化队列
int InitRingQueue2(RingQueue2 *q, RQ_ElementType2 *buff, int size)
{
q->elems = buff;
q->size = size;
q->front=q->rear=0;
return RQ_OK;
}
//遍历队列,
//消费者使用故对生产者可能修改的rear先读取缓存
int ShowRingQueue2(RingQueue2 *q)
{
//int i;
int rear = q->rear;
if(q->front == rear)
{
//rq_debug("队列为空\n");
return RQ_ERROR;
}
//rq_debug("队列中的元素为:\n");
//for(i=((q->front)%q->size); i != rear; i=((i+1)%q->size))
//rq_debug(" %c\n",q->elems[i]);
//rq_debug("\n");
//rq_debug("队首元素为%c\n",q->elems[q->front]);
//rq_debug("队尾元素为%c\n",q->elems[rear - 1]);
return RQ_OK;
}
//向队尾插入元素e
int InRingQueue2(RingQueue2 *q,RQ_ElementType2 e)
{
if(RingQueueFull2(q))
{
//rq_debug("空间不足\n");
return(RQ_OVERFLOW);
}
q->elems[q->rear] = e;
q->rear = (q->rear+1) % q->size;
//rq_debug("rear = %d\n",q->rear);
return RQ_OK;
}
//从队首取回并删除元素
int OutRingQueue2(RingQueue2 *q, RQ_ElementType2 *e)
{
if(RingQueueEmpty2(q))
{
//rq_debug("队列为空\n");
return RQ_ERROR;
}
*e = q->elems[q->front];
//rq_debug("被删除的队首元素为%c\n",q->elems[q->front]);
q->front = (q->front+1) % q->size;
return RQ_OK;
}
//队列中的元素个数
int RingQueueLength2(RingQueue2 *q)
{
return ((q->rear - q->front) + q->size) % q->size;
}

View File

@ -0,0 +1,44 @@
/*
* ring_queue.h
*
* Created on: 2024621
* Author: psx
*/
#ifndef DRIVERS_RINGQUEUE_RING_QUEUE2_H_
#define DRIVERS_RINGQUEUE_RING_QUEUE2_H_
//#define RING_QUEUE_DEBUG //定义本宏会打印RingQueue的调试信息
//typedef unsigned char RQ_ElementType2;//元素类型
typedef uint16_t RQ_ElementType2;//元素类型
typedef struct _ring_queue2
{
RQ_ElementType2 *elems;
int size;
volatile int front, rear;
}RingQueue2;
//初始化队列,需传入保存队列状态的结构q队列使用的buffer和buffer大小
int InitRingQueue2(RingQueue2 *q, RQ_ElementType2 *buff, int size);
#define RingQueueFull2(q) (((q)->rear+1) % (q)->size == (q)->front)
#define RingQueueEmpty2(q) ((q)->front == (q)->rear)
//遍历队列,
//消费者使用故对生产者可能修改的rear先读取缓存
int ShowRingQueue2(RingQueue2 *q);
//向队尾插入元素e
int InRingQueue2(RingQueue2 *q,RQ_ElementType2 e);
//从队首删除元素
int OutRingQueue2(RingQueue2 *q, RQ_ElementType2 *e);
//队列中的元素个数
int RingQueueLength2(RingQueue2 *q);
#endif /* DRIVERS_RINGQUEUE_RING_QUEUE_H_ */

View File

@ -66,4 +66,10 @@ void DSG_PROT_Init(void);
#define EnPowerSupply_PIN GPIO_Pin_3
void EnPowerSupply_Init(void);
/* 电压低于11V进入中断 */
/* WORK_VOLT_INT --> PA12 */
#define WORK_VOLT_INT_GPIO GPIOA
#define WORK_VOLT_INT_PIN GPIO_Pin_12
void WORK_VOLT_INT_Init(void);
#endif /* HARDWARE_INC_GPIO_H_ */

View File

@ -13,7 +13,7 @@ void ADC_all_Init(void)
RCC_PB2PeriphClockCmd(RCC_PB2Periph_ADC1, ENABLE);
RCC_ADCCLKConfig(RCC_PCLK2_Div2);
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_1|GPIO_Pin_2|GPIO_Pin_3|GPIO_Pin_4|GPIO_Pin_5|GPIO_Pin_6|GPIO_Pin_7; //PA1~7对应ADC通道1~7
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_1|GPIO_Pin_2|GPIO_Pin_3|GPIO_Pin_4|GPIO_Pin_5|GPIO_Pin_6; //PA1~7对应ADC通道1~7
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AIN;
GPIO_Init(GPIOA, &GPIO_InitStructure);

View File

@ -100,22 +100,23 @@ void DSG_PROT_Init(void)
void EXTI2_IRQHandler(void)
{
if(EXTI_GetITStatus(EXTI_Line2)==SET) { //EXTI_GetITStatus用来获取中断标志位状态如果EXTI线产生中断则返回SET否则返回RESET
// printf("Run at EXTI\r\n");
GPIO_WriteBit(DSG_PROT_GPIO, DSG_PROT_PIN, RESET);
if (outputAgainFlag == 0) {
Delay_Ms(1);
GPIO_WriteBit(DSG_PROT_GPIO, DSG_PROT_PIN, SET);
// TimeSliceOffset_Register(&m_outputAgain, Task_outputAgain
// , outputAgain_reloadVal, outputAgain_offset);
outputAgainFlag = 1;
}
if (outputAgainFlag == 1) {
// GPIO_WriteBit(POW_OUT_CON_GPIO, POW_OUT_CON_PIN, RESET);
outputAgainFlag = 2;
}
// GPIO_WriteBit(DSG_PROT_GPIO, DSG_PROT_PIN, RESET);
EXTI_ClearITPendingBit(EXTI_Line2); //清除中断标志位
// printf("Run at EXTI 111\r\n");
if (outputAgainFlag == 0) {
outputAgainFlag = 1;
TimeSliceOffset_Register(&m_outputAgain, Task_outputAgain
, outputAgain_reloadVal, outputAgain_offset);
// m_outputAgain.runFlag = 1;
return;
}
// if (outputAgainFlag == 1) {
// GPIO_WriteBit(POW_OUT_CON_GPIO, POW_OUT_CON_PIN, RESET);
// EXTI_ClearITPendingBit(EXTI_Line2); //清除中断标志位
// return;
// }
}
}
@ -132,5 +133,49 @@ void EnPowerSupply_Init(void)
GPIO_WriteBit(EnPowerSupply_GPIO, EnPowerSupply_PIN, RESET);
}
void EXTI15_10_IRQHandler(void) __attribute__((interrupt("WCH-Interrupt-fast")));
void WORK_VOLT_INT_Init(void)
{
RCC_PB2PeriphClockCmd(RCC_PB2Periph_AFIO | RCC_PB2Periph_GPIOA, ENABLE);
GPIO_InitTypeDef GPIO_InitStructure;
GPIO_InitStructure.GPIO_Pin = WORK_VOLT_INT_PIN;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IPD; //下拉输入
GPIO_Init(WORK_VOLT_INT_GPIO, &GPIO_InitStructure);
/* GPIOA ----> EXTI_Line12 */
EXTI_InitTypeDef EXTI_InitStructure;
GPIO_EXTILineConfig(GPIO_PortSourceGPIOA, GPIO_PinSource12);//指定中断/事件线的输入源实际上是设定外部中断配置寄存器AFIO_EXTICRx的值此处为PA12
EXTI_InitStructure.EXTI_Line = EXTI_Line12; //EXTI中断/事件线选择此处选择EXTI_Line12
EXTI_InitStructure.EXTI_Mode = EXTI_Mode_Interrupt; //EXTI模式选择此处选择为产生中断模式
EXTI_InitStructure.EXTI_Trigger = EXTI_Trigger_Rising; //EXTI边沿触发事件此处选择为上升沿触发
EXTI_InitStructure.EXTI_LineCmd = ENABLE; //使能EXTI线
EXTI_Init(&EXTI_InitStructure);
NVIC_InitTypeDef NVIC_InitStructure;
NVIC_InitStructure.NVIC_IRQChannel = EXTI15_10_IRQn; //使能EXTI12中断通道
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 1; //设置抢占优先级为1
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 3; //设置子优先级为2
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; //使能外部中断通道
NVIC_Init(&NVIC_InitStructure); //中断优先级分组初始化
}
void EXTI15_10_IRQHandler(void)
{
if(EXTI_GetITStatus(EXTI_Line12)==SET) { //EXTI_GetITStatus用来获取中断标志位状态如果EXTI线产生中断则返回SET否则返回RESET
// printf(" vout low 11V \n");
EXTI_ClearITPendingBit(EXTI_Line12); //清除中断标志位
excessiveLoadFlag++;
TimeSliceOffset_Register(&m_excessiveLoad, Task_excessiveLoad
, excessiveLoad_reloadVal, excessiveLoad_offset);
// uart_dev_write(g_bat485_uart3_handle, "\n\n\n\n\n in vout low 8V (Set)\n\n\n\n\n", sizeof("\n\n\n\n\n in vout low 8V (Set)\n\n\n\n\n"));
}
// uart_dev_write(g_bat485_uart3_handle, "\n\n\n\n\n in vout low 8V\n\n\n\n\n", sizeof("\n\n\n\n\n in vout low 8V\n\n\n\n\n"));
// if(EXTI_GetITStatus(EXTI_Line12)==SET) { //EXTI_GetITStatus用来获取中断标志位状态如果EXTI线产生中断则返回SET否则返回RESET
//// printf(" vout low 11V \n");
// uart_dev_write(g_bat485_uart3_handle, "\n\n\n\n\n in vout low 8V\n\n\n\n\n", sizeof("\n\n\n\n\n in vout low 8V\n\n\n\n\n"));
// }
}

View File

@ -52,8 +52,8 @@ void PWM_TIM_Configuration(void)
void Set_duty_ratio(float *duty_ratio)
{
if (*duty_ratio < 0.1) {
*duty_ratio = 0.1;
if (*duty_ratio < 0.05) {
*duty_ratio = 0.05;
// return;
} else if (*duty_ratio > 0.9) {
*duty_ratio = 0.9;

View File

@ -10,6 +10,8 @@
#include "pwm.h"
#include "mppt_control.h"
#include "task.h"
#include "collect_Conversion.h"
#include "sl_protocol.h"
void TIM3_IRQHandler(void) __attribute__((interrupt("WCH-Interrupt-fast")));
void TIM2_IRQHandler(void) __attribute__((interrupt("WCH-Interrupt-fast")));
@ -41,6 +43,7 @@ void TIM3_Int_Init(uint16_t arr, uint16_t psc)
TIM_TimeBaseStructure.TIM_CounterMode = TIM_CounterMode_Up; //TIM计数模式向上计数模式
TIM_TimeBaseInit(TIM3, &TIM_TimeBaseStructure); //根据指定的参数初始化TIMx的时间基数单位
TIM_ClearITPendingBit(TIM3, TIM_IT_Update); //Çå³ýTIM3µÄÖжϹÒÆðλ¡£
TIM_ITConfig(TIM3, TIM_IT_Update, ENABLE ); //使能TIM3中断允许更新中断
//初始化TIM NVIC设置中断优先级分组
@ -57,6 +60,7 @@ void TIM3_IRQHandler(void)
{
if (TIM_GetITStatus(TIM3, TIM_IT_Update) != RESET) { //检查TIM3中断是否发生。
TIM_ClearITPendingBit(TIM3, TIM_IT_Update); //清除TIM3的中断挂起位。
// uart_dev_write(g_bat485_uart3_handle, "\n\n\n\n\nin tim3 irt\n\n\n\n\n", sizeof("\n\n\n\n\nin tim3 irt\n\n\n\n\n"));
test();
}
}
@ -101,9 +105,12 @@ void TIM2_IRQHandler(void)
if (TIM_GetITStatus(TIM2, TIM_IT_Update) != RESET) { //检查TIM2中断是否发生。
TIM_ClearITPendingBit(TIM2, TIM_IT_Update); //清除TIM1的中断挂起位。
TimeSliceOffset_Produce();
if (outputAgainFlag == 1) {
outputAgainFlag = 0;
}
g_Mppt_Para.Charg_Current = get_CHG_CURR();
g_Mppt_Para.Discharg_Current = get_DSG_CURR();
g_Mppt_Para.inPower += g_Mppt_Para.Charg_Current * g_Mppt_Para.Output_Voltage;
g_Mppt_Para.outPower += g_Mppt_Para.Discharg_Current * g_Mppt_Para.Output_Voltage;
}
}

View File

@ -26,8 +26,9 @@ App/src/collect_Conversion.o: ../App/src/collect_Conversion.c \
D:\psx\MPPT\git\Peripheral\inc/ch32l103_misc.h \
D:\psx\MPPT\git\Peripheral\inc/ch32l103_lptim.h \
D:\psx\MPPT\git\Peripheral\inc/ch32l103_opa.h \
D:\psx\MPPT\git\Hardware\inc/adc.h D:\psx\MPPT\git\Hardware\inc/gpio.h \
D:\psx\MPPT\git\App\inc/uart_dev.h \
D:\psx\MPPT\git\Hardware\inc/adc.h \
D:\psx\MPPT\git\Drivers\RingQueue2/ring_queue2.h \
D:\psx\MPPT\git\Hardware\inc/gpio.h D:\psx\MPPT\git\App\inc/uart_dev.h \
D:\psx\MPPT\git\Drivers\RingQueue/ring_queue.h \
D:\psx\MPPT\git\Hardware\inc/rs485.h
@ -91,6 +92,8 @@ D:\psx\MPPT\git\Peripheral\inc/ch32l103_opa.h:
D:\psx\MPPT\git\Hardware\inc/adc.h:
D:\psx\MPPT\git\Drivers\RingQueue2/ring_queue2.h:
D:\psx\MPPT\git\Hardware\inc/gpio.h:
D:\psx\MPPT\git\App\inc/uart_dev.h:

Binary file not shown.

Binary file not shown.

View File

@ -27,8 +27,10 @@ App/src/mppt_control.o: ../App/src/mppt_control.c \
D:\psx\MPPT\git\Peripheral\inc/ch32l103_lptim.h \
D:\psx\MPPT\git\Peripheral\inc/ch32l103_opa.h \
D:\psx\MPPT\git\App\inc/collect_Conversion.h \
D:\psx\MPPT\git\Hardware\inc/adc.h D:\psx\MPPT\git\Hardware\inc/pwm.h \
D:\psx\MPPT\git\App\inc/inflash.h D:\psx\MPPT\git\Hardware\inc/gpio.h \
D:\psx\MPPT\git\Hardware\inc/adc.h \
D:\psx\MPPT\git\Drivers\RingQueue2/ring_queue2.h \
D:\psx\MPPT\git\Hardware\inc/pwm.h D:\psx\MPPT\git\App\inc/inflash.h \
D:\psx\MPPT\git\Hardware\inc/gpio.h \
D:\psx\MPPT\git\App\inc/sl_protocol.h D:\psx\MPPT\git\App\inc/uart_dev.h \
D:\psx\MPPT\git\Drivers\RingQueue/ring_queue.h \
D:\psx\MPPT\git\Hardware\inc/rs485.h D:\psx\MPPT\git\App\inc/task.h \
@ -97,6 +99,8 @@ D:\psx\MPPT\git\App\inc/collect_Conversion.h:
D:\psx\MPPT\git\Hardware\inc/adc.h:
D:\psx\MPPT\git\Drivers\RingQueue2/ring_queue2.h:
D:\psx\MPPT\git\Hardware\inc/pwm.h:
D:\psx\MPPT\git\App\inc/inflash.h:

Binary file not shown.

Binary file not shown.

View File

@ -31,6 +31,6 @@ C_DEPS += \
# Each subdirectory must supply rules for building sources it contributes
App/src/%.o: ../App/src/%.c
@ @ riscv-none-embed-gcc -march=rv32imacxw -mabi=ilp32 -msmall-data-limit=8 -msave-restore -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -fno-common -Wunused -Wuninitialized -g -I"D:\psx\MPPT\git\Debug" -I"D:\psx\MPPT\git\Core" -I"D:\psx\MPPT\git\User" -I"D:\psx\MPPT\git\Peripheral\inc" -I"D:\psx\MPPT\git\App\inc" -I"D:\psx\MPPT\git\Hardware\inc" -I"D:\psx\MPPT\git\Drivers\RingQueue" -I"D:\psx\MPPT\git\Drivers\TimeSliceOffset" -std=gnu99 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<"
@ @ riscv-none-embed-gcc -march=rv32imacxw -mabi=ilp32 -msmall-data-limit=8 -msave-restore -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -fno-common -Wunused -Wuninitialized -g -I"D:\psx\MPPT\git\Debug" -I"D:\psx\MPPT\git\Core" -I"D:\psx\MPPT\git\User" -I"D:\psx\MPPT\git\Peripheral\inc" -I"D:\psx\MPPT\git\App\inc" -I"D:\psx\MPPT\git\Hardware\inc" -I"D:\psx\MPPT\git\Drivers\RingQueue" -I"D:\psx\MPPT\git\Drivers\TimeSliceOffset" -I"D:\psx\MPPT\git\Drivers\RingQueue2" -std=gnu99 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<"
@ @

View File

@ -34,7 +34,8 @@ App/src/task.o: ../App/src/task.c D:\psx\MPPT\git\App\inc/task.h \
D:\psx\MPPT\git\Hardware\inc/flash.h \
D:\psx\MPPT\git\App\inc/sl_protocol.h \
D:\psx\MPPT\git\App\inc/mppt_control.h D:\psx\MPPT\git\App\inc/inflash.h \
D:\psx\MPPT\git\App\inc/collect_Conversion.h
D:\psx\MPPT\git\App\inc/collect_Conversion.h \
D:\psx\MPPT\git\Drivers\RingQueue2/ring_queue2.h
D:\psx\MPPT\git\App\inc/task.h:
@ -121,3 +122,5 @@ D:\psx\MPPT\git\App\inc/mppt_control.h:
D:\psx\MPPT\git\App\inc/inflash.h:
D:\psx\MPPT\git\App\inc/collect_Conversion.h:
D:\psx\MPPT\git\Drivers\RingQueue2/ring_queue2.h:

Binary file not shown.

Binary file not shown.

View File

@ -16,6 +16,6 @@ C_DEPS += \
# Each subdirectory must supply rules for building sources it contributes
Core/%.o: ../Core/%.c
@ @ riscv-none-embed-gcc -march=rv32imacxw -mabi=ilp32 -msmall-data-limit=8 -msave-restore -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -fno-common -Wunused -Wuninitialized -g -I"D:\psx\MPPT\git\Debug" -I"D:\psx\MPPT\git\Core" -I"D:\psx\MPPT\git\User" -I"D:\psx\MPPT\git\Peripheral\inc" -I"D:\psx\MPPT\git\App\inc" -I"D:\psx\MPPT\git\Hardware\inc" -I"D:\psx\MPPT\git\Drivers\RingQueue" -I"D:\psx\MPPT\git\Drivers\TimeSliceOffset" -std=gnu99 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<"
@ @ riscv-none-embed-gcc -march=rv32imacxw -mabi=ilp32 -msmall-data-limit=8 -msave-restore -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -fno-common -Wunused -Wuninitialized -g -I"D:\psx\MPPT\git\Debug" -I"D:\psx\MPPT\git\Core" -I"D:\psx\MPPT\git\User" -I"D:\psx\MPPT\git\Peripheral\inc" -I"D:\psx\MPPT\git\App\inc" -I"D:\psx\MPPT\git\Hardware\inc" -I"D:\psx\MPPT\git\Drivers\RingQueue" -I"D:\psx\MPPT\git\Drivers\TimeSliceOffset" -I"D:\psx\MPPT\git\Drivers\RingQueue2" -std=gnu99 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<"
@ @

View File

@ -16,6 +16,6 @@ C_DEPS += \
# Each subdirectory must supply rules for building sources it contributes
Debug/%.o: ../Debug/%.c
@ @ riscv-none-embed-gcc -march=rv32imacxw -mabi=ilp32 -msmall-data-limit=8 -msave-restore -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -fno-common -Wunused -Wuninitialized -g -I"D:\psx\MPPT\git\Debug" -I"D:\psx\MPPT\git\Core" -I"D:\psx\MPPT\git\User" -I"D:\psx\MPPT\git\Peripheral\inc" -I"D:\psx\MPPT\git\App\inc" -I"D:\psx\MPPT\git\Hardware\inc" -I"D:\psx\MPPT\git\Drivers\RingQueue" -I"D:\psx\MPPT\git\Drivers\TimeSliceOffset" -std=gnu99 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<"
@ @ riscv-none-embed-gcc -march=rv32imacxw -mabi=ilp32 -msmall-data-limit=8 -msave-restore -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -fno-common -Wunused -Wuninitialized -g -I"D:\psx\MPPT\git\Debug" -I"D:\psx\MPPT\git\Core" -I"D:\psx\MPPT\git\User" -I"D:\psx\MPPT\git\Peripheral\inc" -I"D:\psx\MPPT\git\App\inc" -I"D:\psx\MPPT\git\Hardware\inc" -I"D:\psx\MPPT\git\Drivers\RingQueue" -I"D:\psx\MPPT\git\Drivers\TimeSliceOffset" -I"D:\psx\MPPT\git\Drivers\RingQueue2" -std=gnu99 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<"
@ @

View File

@ -16,6 +16,6 @@ C_DEPS += \
# Each subdirectory must supply rules for building sources it contributes
Drivers/RingQueue/%.o: ../Drivers/RingQueue/%.c
@ @ riscv-none-embed-gcc -march=rv32imacxw -mabi=ilp32 -msmall-data-limit=8 -msave-restore -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -fno-common -Wunused -Wuninitialized -g -I"D:\psx\MPPT\git\Debug" -I"D:\psx\MPPT\git\Core" -I"D:\psx\MPPT\git\User" -I"D:\psx\MPPT\git\Peripheral\inc" -I"D:\psx\MPPT\git\App\inc" -I"D:\psx\MPPT\git\Hardware\inc" -I"D:\psx\MPPT\git\Drivers\RingQueue" -I"D:\psx\MPPT\git\Drivers\TimeSliceOffset" -std=gnu99 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<"
@ @ riscv-none-embed-gcc -march=rv32imacxw -mabi=ilp32 -msmall-data-limit=8 -msave-restore -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -fno-common -Wunused -Wuninitialized -g -I"D:\psx\MPPT\git\Debug" -I"D:\psx\MPPT\git\Core" -I"D:\psx\MPPT\git\User" -I"D:\psx\MPPT\git\Peripheral\inc" -I"D:\psx\MPPT\git\App\inc" -I"D:\psx\MPPT\git\Hardware\inc" -I"D:\psx\MPPT\git\Drivers\RingQueue" -I"D:\psx\MPPT\git\Drivers\TimeSliceOffset" -I"D:\psx\MPPT\git\Drivers\RingQueue2" -std=gnu99 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<"
@ @

View File

@ -0,0 +1,4 @@
Drivers/RingQueue2/ring_queue2.o: ../Drivers/RingQueue2/ring_queue2.c \
../Drivers/RingQueue2/ring_queue2.h
../Drivers/RingQueue2/ring_queue2.h:

Binary file not shown.

View File

@ -0,0 +1,21 @@
################################################################################
# MRS Version: 1.9.0
# 自动生成的文件。不要编辑!
################################################################################
# Add inputs and outputs from these tool invocations to the build variables
C_SRCS += \
../Drivers/RingQueue2/ring_queue2.c
OBJS += \
./Drivers/RingQueue2/ring_queue2.o
C_DEPS += \
./Drivers/RingQueue2/ring_queue2.d
# Each subdirectory must supply rules for building sources it contributes
Drivers/RingQueue2/%.o: ../Drivers/RingQueue2/%.c
@ @ riscv-none-embed-gcc -march=rv32imacxw -mabi=ilp32 -msmall-data-limit=8 -msave-restore -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -fno-common -Wunused -Wuninitialized -g -I"D:\psx\MPPT\git\Debug" -I"D:\psx\MPPT\git\Core" -I"D:\psx\MPPT\git\User" -I"D:\psx\MPPT\git\Peripheral\inc" -I"D:\psx\MPPT\git\App\inc" -I"D:\psx\MPPT\git\Hardware\inc" -I"D:\psx\MPPT\git\Drivers\RingQueue" -I"D:\psx\MPPT\git\Drivers\TimeSliceOffset" -I"D:\psx\MPPT\git\Drivers\RingQueue2" -std=gnu99 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<"
@ @

View File

@ -16,6 +16,6 @@ C_DEPS += \
# Each subdirectory must supply rules for building sources it contributes
Drivers/TimeSliceOffset/%.o: ../Drivers/TimeSliceOffset/%.c
@ @ riscv-none-embed-gcc -march=rv32imacxw -mabi=ilp32 -msmall-data-limit=8 -msave-restore -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -fno-common -Wunused -Wuninitialized -g -I"D:\psx\MPPT\git\Debug" -I"D:\psx\MPPT\git\Core" -I"D:\psx\MPPT\git\User" -I"D:\psx\MPPT\git\Peripheral\inc" -I"D:\psx\MPPT\git\App\inc" -I"D:\psx\MPPT\git\Hardware\inc" -I"D:\psx\MPPT\git\Drivers\RingQueue" -I"D:\psx\MPPT\git\Drivers\TimeSliceOffset" -std=gnu99 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<"
@ @ riscv-none-embed-gcc -march=rv32imacxw -mabi=ilp32 -msmall-data-limit=8 -msave-restore -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -fno-common -Wunused -Wuninitialized -g -I"D:\psx\MPPT\git\Debug" -I"D:\psx\MPPT\git\Core" -I"D:\psx\MPPT\git\User" -I"D:\psx\MPPT\git\Peripheral\inc" -I"D:\psx\MPPT\git\App\inc" -I"D:\psx\MPPT\git\Hardware\inc" -I"D:\psx\MPPT\git\Drivers\RingQueue" -I"D:\psx\MPPT\git\Drivers\TimeSliceOffset" -I"D:\psx\MPPT\git\Drivers\RingQueue2" -std=gnu99 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<"
@ @

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -31,6 +31,6 @@ C_DEPS += \
# Each subdirectory must supply rules for building sources it contributes
Hardware/src/%.o: ../Hardware/src/%.c
@ @ riscv-none-embed-gcc -march=rv32imacxw -mabi=ilp32 -msmall-data-limit=8 -msave-restore -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -fno-common -Wunused -Wuninitialized -g -I"D:\psx\MPPT\git\Debug" -I"D:\psx\MPPT\git\Core" -I"D:\psx\MPPT\git\User" -I"D:\psx\MPPT\git\Peripheral\inc" -I"D:\psx\MPPT\git\App\inc" -I"D:\psx\MPPT\git\Hardware\inc" -I"D:\psx\MPPT\git\Drivers\RingQueue" -I"D:\psx\MPPT\git\Drivers\TimeSliceOffset" -std=gnu99 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<"
@ @ riscv-none-embed-gcc -march=rv32imacxw -mabi=ilp32 -msmall-data-limit=8 -msave-restore -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -fno-common -Wunused -Wuninitialized -g -I"D:\psx\MPPT\git\Debug" -I"D:\psx\MPPT\git\Core" -I"D:\psx\MPPT\git\User" -I"D:\psx\MPPT\git\Peripheral\inc" -I"D:\psx\MPPT\git\App\inc" -I"D:\psx\MPPT\git\Hardware\inc" -I"D:\psx\MPPT\git\Drivers\RingQueue" -I"D:\psx\MPPT\git\Drivers\TimeSliceOffset" -I"D:\psx\MPPT\git\Drivers\RingQueue2" -std=gnu99 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<"
@ @

View File

@ -31,7 +31,11 @@ Hardware/src/tim.o: ../Hardware/src/tim.c \
D:\psx\MPPT\git\Drivers\RingQueue/ring_queue.h \
D:\psx\MPPT\git\Hardware\inc/rs485.h D:\psx\MPPT\git\Hardware\inc/pwm.h \
D:\psx\MPPT\git\App\inc/mppt_control.h D:\psx\MPPT\git\App\inc/task.h \
D:\psx\MPPT\git\App\inc/uart_dev.h
D:\psx\MPPT\git\App\inc/uart_dev.h \
D:\psx\MPPT\git\App\inc/collect_Conversion.h \
D:\psx\MPPT\git\Hardware\inc/adc.h \
D:\psx\MPPT\git\Drivers\RingQueue2/ring_queue2.h \
D:\psx\MPPT\git\App\inc/sl_protocol.h
D:\psx\MPPT\git\Hardware\inc/tim.h:
@ -106,3 +110,11 @@ D:\psx\MPPT\git\App\inc/mppt_control.h:
D:\psx\MPPT\git\App\inc/task.h:
D:\psx\MPPT\git\App\inc/uart_dev.h:
D:\psx\MPPT\git\App\inc/collect_Conversion.h:
D:\psx\MPPT\git\Hardware\inc/adc.h:
D:\psx\MPPT\git\Drivers\RingQueue2/ring_queue2.h:
D:\psx\MPPT\git\App\inc/sl_protocol.h:

Binary file not shown.

View File

@ -76,6 +76,6 @@ C_DEPS += \
# Each subdirectory must supply rules for building sources it contributes
Peripheral/src/%.o: ../Peripheral/src/%.c
@ @ riscv-none-embed-gcc -march=rv32imacxw -mabi=ilp32 -msmall-data-limit=8 -msave-restore -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -fno-common -Wunused -Wuninitialized -g -I"D:\psx\MPPT\git\Debug" -I"D:\psx\MPPT\git\Core" -I"D:\psx\MPPT\git\User" -I"D:\psx\MPPT\git\Peripheral\inc" -I"D:\psx\MPPT\git\App\inc" -I"D:\psx\MPPT\git\Hardware\inc" -I"D:\psx\MPPT\git\Drivers\RingQueue" -I"D:\psx\MPPT\git\Drivers\TimeSliceOffset" -std=gnu99 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<"
@ @ riscv-none-embed-gcc -march=rv32imacxw -mabi=ilp32 -msmall-data-limit=8 -msave-restore -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -fno-common -Wunused -Wuninitialized -g -I"D:\psx\MPPT\git\Debug" -I"D:\psx\MPPT\git\Core" -I"D:\psx\MPPT\git\User" -I"D:\psx\MPPT\git\Peripheral\inc" -I"D:\psx\MPPT\git\App\inc" -I"D:\psx\MPPT\git\Hardware\inc" -I"D:\psx\MPPT\git\Drivers\RingQueue" -I"D:\psx\MPPT\git\Drivers\TimeSliceOffset" -I"D:\psx\MPPT\git\Drivers\RingQueue2" -std=gnu99 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<"
@ @

Binary file not shown.

View File

@ -22,6 +22,6 @@ C_DEPS += \
# Each subdirectory must supply rules for building sources it contributes
User/%.o: ../User/%.c
@ @ riscv-none-embed-gcc -march=rv32imacxw -mabi=ilp32 -msmall-data-limit=8 -msave-restore -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -fno-common -Wunused -Wuninitialized -g -I"D:\psx\MPPT\git\Debug" -I"D:\psx\MPPT\git\Core" -I"D:\psx\MPPT\git\User" -I"D:\psx\MPPT\git\Peripheral\inc" -I"D:\psx\MPPT\git\App\inc" -I"D:\psx\MPPT\git\Hardware\inc" -I"D:\psx\MPPT\git\Drivers\RingQueue" -I"D:\psx\MPPT\git\Drivers\TimeSliceOffset" -std=gnu99 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<"
@ @ riscv-none-embed-gcc -march=rv32imacxw -mabi=ilp32 -msmall-data-limit=8 -msave-restore -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -fno-common -Wunused -Wuninitialized -g -I"D:\psx\MPPT\git\Debug" -I"D:\psx\MPPT\git\Core" -I"D:\psx\MPPT\git\User" -I"D:\psx\MPPT\git\Peripheral\inc" -I"D:\psx\MPPT\git\App\inc" -I"D:\psx\MPPT\git\Hardware\inc" -I"D:\psx\MPPT\git\Drivers\RingQueue" -I"D:\psx\MPPT\git\Drivers\TimeSliceOffset" -I"D:\psx\MPPT\git\Drivers\RingQueue2" -std=gnu99 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<"
@ @

View File

@ -14,6 +14,7 @@ RM := rm -rf
-include Peripheral/src/subdir.mk
-include Hardware/src/subdir.mk
-include Drivers/TimeSliceOffset/subdir.mk
-include Drivers/RingQueue2/subdir.mk
-include Drivers/RingQueue/subdir.mk
-include Debug/subdir.mk
-include Core/subdir.mk
@ -68,12 +69,17 @@ mppt_Nos_V0.4.lst: mppt_Nos_V0.4.elf
mppt_Nos_V0.4.siz: mppt_Nos_V0.4.elf
@ riscv-none-embed-size --format=berkeley "mppt_Nos_V0.4.elf"
@ @
$(MAKE) --no-print-directory post-build
# ÆäËûÄ¿±ê
clean:
-$(RM) $(ASM_UPPER_DEPS)$(OBJS)$(SECONDARY_FLASH)$(SECONDARY_LIST)$(SECONDARY_SIZE)$(ASM_DEPS)$(S_DEPS)$(S_UPPER_DEPS)$(C_DEPS) mppt_Nos_V0.4.elf
-@
post-build:
-riscv-none-embed-objcopy -O binary "mppt_Nos_V0.4.elf" "mppt_Nos_V0.4.bin"
-@
secondary-outputs: $(SECONDARY_FLASH) $(SECONDARY_LIST) $(SECONDARY_SIZE)
.PHONY: all clean dependents
.PHONY: all clean dependents post-build
-include ../makefile.targets

BIN
obj/mppt_Nos_V0.4.bin Normal file

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

326
obj/mppt_Nos_V0.4.mem Normal file
View File

@ -0,0 +1,326 @@
.text
| 0x00000140 | __riscv_save_12 | FUNC | 0x30
| 0x00000148 | __riscv_save_8 | FUNC | 0x28
| 0x00000156 | __riscv_save_7 | FUNC | 0x1a
| 0x00000170 | __riscv_save_1 | FUNC | 0xc
| 0x0000017c | __riscv_restore_12 | FUNC | 0x24
| 0x00000180 | __riscv_restore_10 | FUNC | 0x20
| 0x0000018a | __riscv_restore_5 | FUNC | 0x16
| 0x00000194 | __riscv_restore_3 | FUNC | 0xc
| 0x000001a0 | memset | FUNC | 0xa8
| 0x00000248 | NMI_Handler | FUNC | 0x2
| 0x0000024a | HardFault_Handler | FUNC | 0x2
| 0x0000024c | main | FUNC | 0x4a
| 0x00000296 | SystemInit | FUNC | 0x106
| 0x0000039c | SystemCoreClockUpdate | FUNC | 0xa4
| 0x000004c8 | ADC_DeInit | FUNC | 0x28
| 0x000004f0 | ADC_Init | FUNC | 0x56
| 0x00000546 | ADC_Cmd | FUNC | 0x10
| 0x00000556 | ADC_ResetCalibration | FUNC | 0xa
| 0x00000560 | ADC_GetResetCalibrationStatus | FUNC | 0x8
| 0x00000568 | ADC_StartCalibration | FUNC | 0xa
| 0x00000572 | ADC_GetCalibrationStatus | FUNC | 0x8
| 0x0000057a | ADC_SoftwareStartConvCmd | FUNC | 0x18
| 0x00000592 | ADC_RegularChannelConfig | FUNC | 0xb8
| 0x0000064a | ADC_GetConversionValue | FUNC | 0x8
| 0x00000652 | ADC_GetFlagStatus | FUNC | 0xa
| 0x0000065c | ADC_BufferCmd | FUNC | 0x18
| 0x00000674 | ADC_DutyDelayCmd | FUNC | 0x12
| 0x00000686 | ADC_FIFO_Cmd | FUNC | 0x12
| 0x00000698 | ADC_Sample_ModeConfig | FUNC | 0x10
| 0x000006a8 | Get_CalibrationValue | FUNC | 0x1d4
| 0x0000087c | DBGMCU_GetCHIPID | FUNC | 0x6
| 0x00000882 | EXTI_Init | FUNC | 0x6a
| 0x000008ec | EXTI_GetITStatus | FUNC | 0x1e
| 0x0000090a | EXTI_ClearITPendingBit | FUNC | 0xa
| 0x00000914 | GPIO_Init | FUNC | 0xc0
| 0x000009d4 | GPIO_ReadInputDataBit | FUNC | 0xa
| 0x000009de | GPIO_ReadOutputDataBit | FUNC | 0xa
| 0x000009e8 | GPIO_SetBits | FUNC | 0x4
| 0x000009ec | GPIO_WriteBit | FUNC | 0xa
| 0x000009f6 | GPIO_PinRemapConfig | FUNC | 0x12c
| 0x00000b22 | GPIO_EXTILineConfig | FUNC | 0x2c
| 0x00000b4e | GPIO_IPD_Unused | FUNC | 0x190
| 0x00000cde | NVIC_PriorityGroupConfig | FUNC | 0x6
| 0x00000ce4 | NVIC_Init | FUNC | 0x54
| 0x00000d38 | RCC_ADCCLKConfig | FUNC | 0x14
| 0x00000d4c | RCC_GetClocksFreq | FUNC | 0xd6
| 0x00000e22 | RCC_PB2PeriphClockCmd | FUNC | 0x1e
| 0x00000e40 | RCC_PB1PeriphClockCmd | FUNC | 0x1e
| 0x00000e5e | RCC_PB2PeriphResetCmd | FUNC | 0x1e
| 0x00000e7c | SPI_Init | FUNC | 0x32
| 0x00000eae | SPI_Cmd | FUNC | 0x1a
| 0x00000ec8 | SPI_I2S_SendData | FUNC | 0x4
| 0x00000ecc | SPI_I2S_ReceiveData | FUNC | 0x4
| 0x00000ed0 | SPI_I2S_GetFlagStatus | FUNC | 0xa
| 0x00000eda | TIM_TimeBaseInit | FUNC | 0x76
| 0x00000f50 | TIM_OC4Init | FUNC | 0x7c
| 0x00000fcc | TIM_Cmd | FUNC | 0x18
| 0x00000fe4 | TIM_CtrlPWMOutputs | FUNC | 0x16
| 0x00000ffa | TIM_ITConfig | FUNC | 0x12
| 0x0000100c | TIM_ARRPreloadConfig | FUNC | 0x1a
| 0x00001026 | TIM_OC4PreloadConfig | FUNC | 0x16
| 0x0000103c | TIM_SetCompare4 | FUNC | 0x16
| 0x00001052 | TIM_GetCounter | FUNC | 0x18
| 0x0000106a | TIM_GetITStatus | FUNC | 0x18
| 0x00001082 | TIM_ClearITPendingBit | FUNC | 0xc
| 0x0000108e | USART_Init | FUNC | 0xba
| 0x00001148 | USART_Cmd | FUNC | 0x16
| 0x0000115e | USART_ITConfig | FUNC | 0x36
| 0x00001194 | USART_SendData | FUNC | 0x8
| 0x0000119c | USART_ReceiveData | FUNC | 0x8
| 0x000011a4 | USART_GetFlagStatus | FUNC | 0xa
| 0x000011ae | USART_GetITStatus | FUNC | 0x3c
| 0x000011ea | ADC_all_Init | FUNC | 0xf0
| 0x000012da | SPI_Flash_Init | FUNC | 0xa4
| 0x0000137e | SPI_ReadWriteByte | FUNC | 0x5a
| 0x000013d8 | SPI_Flash_Read | FUNC | 0x68
| 0x00001440 | RUN_LED_Init | FUNC | 0x2e
| 0x0000146e | WDI_INPUT_Init | FUNC | 0x32
| 0x000014a0 | POW_OUT_CON_Init | FUNC | 0x3e
| 0x000014de | DSG_PROT_Init | FUNC | 0x5a
| 0x00001538 | EXTI2_IRQHandler | FUNC | 0x5e
| 0x00001596 | EXTI1_IRQHandler | FUNC | 0x1c
| 0x000015b2 | PWM_GPIO_Configuration | FUNC | 0x48
| 0x000015fa | PWM_TIM_Configuration | FUNC | 0x6c
| 0x00001666 | Set_duty_ratio | FUNC | 0x86
| 0x000016ec | GW_485_Init | FUNC | 0xb2
| 0x0000179e | BAT_485_Init | FUNC | 0xbe
| 0x0000185c | USARTx_SendByte | FUNC | 0x1a
| 0x00001876 | USART3_IRQHandler | FUNC | 0x46
| 0x000018bc | USART4_IRQHandler | FUNC | 0x46
| 0x00001902 | TIM3_Int_Init | FUNC | 0x52
| 0x00001954 | TIM3_Init | FUNC | 0x28
| 0x0000197c | TIM3_IRQHandler | FUNC | 0x2a
| 0x000019a6 | TIM2_Int_Init | FUNC | 0x58
| 0x000019fe | TIM2_Init | FUNC | 0x2e
| 0x00001a2c | TIM2_IRQHandler | FUNC | 0x2a
| 0x00001a56 | SysTick_Handler | FUNC | 0xe
| 0x00001a64 | TIM1_UP_IRQHandler | FUNC | 0x32
| 0x00001a96 | TimeSliceOffset_Register | FUNC | 0x3e
| 0x00001ad4 | TimeSliceOffset_Unregister | FUNC | 0x2e
| 0x00001b02 | TimeSliceOffset_Start | FUNC | 0x22
| 0x00001b24 | TimeSliceOffset_Produce | FUNC | 0x28
| 0x00001b4c | InitRingQueue | FUNC | 0x10
| 0x00001b5c | InRingQueue | FUNC | 0x2c
| 0x00001b88 | OutRingQueue | FUNC | 0x26
| 0x00001bae | RingQueueLength | FUNC | 0x10
| 0x00001bbe | Delay_Init | FUNC | 0x20
| 0x00001bde | Delay_Ms | FUNC | 0x36
| 0x00001c14 | USART_Printf_Init | FUNC | 0x5a
| 0x00001c6e | _write | FUNC | 0x3e
| 0x00001cac | _sbrk | FUNC | 0x26
| 0x00001cd2 | Get_ConversionVal | FUNC | 0x2a
| 0x00001cfc | middleAverageFilter | FUNC | 0x92
| 0x00001d8e | get_CHG_CURR | FUNC | 0x44
| 0x00001dd2 | get_PV_VOLT_OUT | FUNC | 0x44
| 0x00001e16 | get_DSG_CURR | FUNC | 0x44
| 0x00001e5a | get_PV1_VOLT_IN | FUNC | 0x44
| 0x00001e9e | get_MOSFET_Temper | FUNC | 0x56
| 0x00001ef4 | read_config_info | FUNC | 0x86
| 0x00001f7a | mppt_constantVoltage | FUNC | 0x66
| 0x00001fe0 | mppt_constantVoltageO | FUNC | 0x62
| 0x00002042 | mppt_constantCurrentO | FUNC | 0x62
| 0x000020a4 | MpptContorl | FUNC | 0xe8
| 0x0000218c | MpptMode | FUNC | 0x2da
| 0x00002466 | test | FUNC | 0x188
| 0x000025ee | SL_ReadRegisterMPPTMode | FUNC | 0x2a
| 0x00002618 | SL_ReadRegisterDischargMosState | FUNC | 0x24
| 0x0000263c | SL_ReadRegisterHighSideMosTemperature | FUNC | 0x3e
| 0x0000267a | SL_ReadRegisterSolarOpenCircuitVoltage | FUNC | 0x3e
| 0x000026b8 | SL_ReadRegisterDischargCurrent | FUNC | 0x3c
| 0x000026f4 | SL_ReadRegisterChargCurrent | FUNC | 0x3c
| 0x00002730 | SL_ReadRegisterBatteryVoltage | FUNC | 0x3c
| 0x0000276c | SL_MsgProcFunc_Registration_request | FUNC | 0x54
| 0x000027c0 | SL_MsgProcFunc_Broadcast_Scan | FUNC | 0x34
| 0x000027f4 | SL_MsgProcFunc_Write_Register | FUNC | 0x56
| 0x0000284a | CheckFunc | FUNC | 0x3e
| 0x00002888 | randomDelay | FUNC | 0x2c
| 0x000028b4 | Check_485_bus_busy | FUNC | 0x7a
| 0x0000292e | SL_MsgProcFunc_Remote_Upgrade | FUNC | 0x9e
| 0x000029cc | SL_MsgProcFunc_Update_Profile | FUNC | 0x9e
| 0x00002a6a | SL_MsgProcFunc_Read_Register | FUNC | 0x18c
| 0x00002bf6 | FRT_MsgHandler | FUNC | 0x32
| 0x00002c28 | read_and_process_uart_data | FUNC | 0x2ca
| 0x00002ef2 | Task_wdi | FUNC | 0x52
| 0x00002f44 | Task_RunLED | FUNC | 0x326
| 0x0000326a | Task_usart | FUNC | 0x10
| 0x0000327a | Task_startMpptControl | FUNC | 0x136
| 0x000033b0 | Task_softStart | FUNC | 0x12a
| 0x000034da | stop_mpptWork | FUNC | 0x30
| 0x0000350a | Task_refreshRegister | FUNC | 0x24c
| 0x00003756 | start_mpptWork | FUNC | 0x36
| 0x0000378c | Task_impedanceCalculation | FUNC | 0x17e
| 0x0000390a | Task_recvbroadcast | FUNC | 0x154
| 0x00003a5e | Task_sensorEnableBroadcast | FUNC | 0x4c
| 0x00003aaa | g_Mppt_Para_Init | FUNC | 0x176
| 0x00003c20 | task_Init | FUNC | 0x84
| 0x00003ca4 | hardware_Init | FUNC | 0x42
| 0x00003ce6 | uart_putchar | FUNC | 0x46
| 0x00003d2c | uart_dev_init | FUNC | 0x52
| 0x00003d7e | bat485_tx_enabla | FUNC | 0x1a
| 0x00003d98 | bat485_tx_disenabla | FUNC | 0x1a
| 0x00003db2 | gw485_tx_enabla | FUNC | 0x18
| 0x00003dca | gw485_tx_disenabla | FUNC | 0x18
| 0x00003de2 | uart_dev_write | FUNC | 0x62
| 0x00003e44 | uart_dev_char_present | FUNC | 0x18
| 0x00003e5c | uart_dev_in_char | FUNC | 0x28
| 0x00003e84 | ring_queue_length | FUNC | 0xe
| 0x00003e92 | __adddf3 | FUNC | 0x730
| 0x000045c2 | __gtdf2 | FUNC | 0xae
| 0x00004670 | __ltdf2 | FUNC | 0xb6
| 0x00004726 | __muldf3 | FUNC | 0x4b8
| 0x00004bde | __subdf3 | FUNC | 0x73e
| 0x0000531c | __floatsidf | FUNC | 0x72
| 0x0000538e | __addsf3 | FUNC | 0x36a
| 0x000056f8 | __divsf3 | FUNC | 0x2b2
| 0x000059aa | __nesf2 | FUNC | 0x5c
| 0x00005a06 | __gtsf2 | FUNC | 0x86
| 0x00005a8c | __lesf2 | FUNC | 0x8c
| 0x00005b18 | __mulsf3 | FUNC | 0x294
| 0x00005dac | __subsf3 | FUNC | 0x388
| 0x00006134 | __fixsfsi | FUNC | 0x62
| 0x00006196 | __fixunssfsi | FUNC | 0x56
| 0x000061ec | __floatsisf | FUNC | 0xc6
| 0x000062b2 | __floatunsisf | FUNC | 0xce
| 0x00006380 | __extendsfdf2 | FUNC | 0xac
| 0x0000642c | __truncdfsf2 | FUNC | 0x16a
| 0x00006596 | __clzsi2 | FUNC | 0x6e
| 0x00006604 | memcpy | FUNC | 0xb2
| 0x000066b6 | printf | FUNC | 0x40
| 0x000066f6 | _puts_r | FUNC | 0xd4
| 0x000067ca | puts | FUNC | 0xc
| 0x000067d6 | srand | FUNC | 0x58
| 0x0000682e | rand | FUNC | 0x84
| 0x000068b2 | sprintf | FUNC | 0x46
| 0x000068f8 | __swbuf_r | FUNC | 0xbc
| 0x000069b4 | __swsetup_r | FUNC | 0xfc
| 0x00006ab0 | __sflush_r | FUNC | 0x130
| 0x00006be0 | _fflush_r | FUNC | 0x66
| 0x00006c46 | std | FUNC | 0x66
| 0x00006cac | _cleanup_r | FUNC | 0xa
| 0x00006cb6 | __sfmoreglue | FUNC | 0x46
| 0x00006cfc | __sinit | FUNC | 0x6c
| 0x00006d68 | __sfp | FUNC | 0xa0
| 0x00006e08 | _fwalk_reent | FUNC | 0x6a
| 0x00006e72 | __swhatbuf_r | FUNC | 0x58
| 0x00006eca | __smakebuf_r | FUNC | 0x92
| 0x00006f5c | malloc | FUNC | 0xa
| 0x00006f66 | _free_r | FUNC | 0xa8
| 0x0000700e | _malloc_r | FUNC | 0xda
| 0x000070e8 | __ssputs_r | FUNC | 0xe4
| 0x000071cc | _svfprintf_r | FUNC | 0x26a
| 0x00007436 | __sfputc_r | FUNC | 0x28
| 0x0000745e | __sfputs_r | FUNC | 0x42
| 0x000074a0 | _vfiprintf_r | FUNC | 0x288
| 0x00007728 | _printf_common | FUNC | 0x10c
| 0x00007834 | _printf_i | FUNC | 0x2a2
| 0x00007ad6 | _sbrk_r | FUNC | 0x2a
| 0x00007b00 | __sread | FUNC | 0x2c
| 0x00007b2c | __swrite | FUNC | 0x48
| 0x00007b74 | __sseek | FUNC | 0x30
| 0x00007ba4 | __sclose | FUNC | 0x6
| 0x00007baa | _write_r | FUNC | 0x2e
| 0x00007bd8 | _close_r | FUNC | 0x28
| 0x00007c00 | _fstat_r | FUNC | 0x2a
| 0x00007c2a | _isatty_r | FUNC | 0x28
| 0x00007c52 | _lseek_r | FUNC | 0x2c
| 0x00007c7e | memchr | FUNC | 0x18
| 0x00007c96 | memmove | FUNC | 0x46
| 0x00007cdc | __malloc_lock | FUNC | 0x2
| 0x00007cde | __malloc_unlock | FUNC | 0x2
| 0x00007ce0 | _realloc_r | FUNC | 0x58
| 0x00007d38 | _read_r | FUNC | 0x2c
| 0x00007d64 | _malloc_usable_size_r | FUNC | 0x14
| 0x00007d78 | _close | FUNC | 0xc
| 0x00007d84 | _fstat | FUNC | 0xc
| 0x00007d90 | _isatty | FUNC | 0xc
| 0x00007d9c | _lseek | FUNC | 0xc
| 0x00007da8 | _read | FUNC | 0xc
| 0x00007e60 | mosTemperADC | OBJECT | 0x1e2
| 0x00008718 | __clz_tab | OBJECT | 0x100
| 0x00008818 | __sf_fake_stderr | OBJECT | 0x20
| 0x00008838 | __sf_fake_stdin | OBJECT | 0x20
| 0x00008858 | __sf_fake_stdout | OBJECT | 0x20
.data
| 0x20000000 | HBPrescTable | OBJECT | 0x10
| 0x20000010 | PBHBPrescTable | OBJECT | 0x10
| 0x20000020 | g_slConfigInfo | OBJECT | 0x2c
| 0x2000004c | defaultValue | OBJECT | 0xe
| 0x2000005c | g_MsgTbl | OBJECT | 0x30
| 0x2000008c | g_RegTblR | OBJECT | 0x38
| 0x200000c4 | uart_devices | OBJECT | 0x38
| 0x200000fc | impure_data | OBJECT | 0x60
| 0x20000160 | SystemCoreClock | OBJECT | 0x4
| 0x20000164 | ADCPrescTable | OBJECT | 0x4
| 0x20000168 | curbrk.5007 | OBJECT | 0x4
| 0x2000016c | g_duty_ratio | OBJECT | 0x4
| 0x20000170 | onlyOnce.5797 | OBJECT | 0x1
| 0x20000171 | onlyOnce.5805 | OBJECT | 0x1
| 0x20000172 | onlyOnce.5810 | OBJECT | 0x1
| 0x20000173 | only_once.5830 | OBJECT | 0x1
| 0x20000174 | only_once.6423 | OBJECT | 0x1
| 0x20000175 | run_Broadcast | OBJECT | 0x1
| 0x20000178 | _impure_ptr | OBJECT | 0x4
| 0x2000017c | _global_impure_ptr | OBJECT | 0x4
.bss
| 0x20000180 | ADC_Trim | OBJECT | 0x2
| 0x20000184 | CHIPID | OBJECT | 0x4
| 0x20000188 | OPA_Trim | OBJECT | 0x4
| 0x2000018c | TS_Val | OBJECT | 0x4
| 0x20000190 | NVIC_Priority_Group | OBJECT | 0x4
| 0x20000194 | Calibrattion_Val | OBJECT | 0x2
| 0x20000198 | USART3_Rbuffer | OBJECT | 0x1
| 0x2000019c | USART4_Rbuffer | OBJECT | 0x1
| 0x200001a0 | pTimeSliceList | OBJECT | 0x4
| 0x200001a4 | p_ms | OBJECT | 0x2
| 0x200001a6 | p_us | OBJECT | 0x2
| 0x200001a8 | ConstantCurrentV.5826 | OBJECT | 0x4
| 0x200001ac | ConstantVoltageChargeV.5804 | OBJECT | 0x4
| 0x200001b0 | ConstantVoltageV.5827 | OBJECT | 0x4
| 0x200001b4 | FloatChargeV.5809 | OBJECT | 0x4
| 0x200001b8 | FloatI.5828 | OBJECT | 0x4
| 0x200001bc | StopSolarOpenCircuitV.5829 | OBJECT | 0x4
| 0x200001c0 | TrickleChargeC.5796 | OBJECT | 0x4
| 0x200001c4 | RegistrationRequestFlag | OBJECT | 0x1
| 0x200001c6 | checkRegisterRefreshTimeFlag.6446 | OBJECT | 0x2
| 0x200001c8 | checkSolarOpenCircuitVTimeFlag.6422 | OBJECT | 0x2
| 0x200001cc | currOne.6468 | OBJECT | 0x4
| 0x200001d0 | currTwo.6470 | OBJECT | 0x4
| 0x200001d4 | dutyRatio.6430 | OBJECT | 0x4
| 0x200001d8 | enabBroadcastTimeFlag.6482 | OBJECT | 0x4
| 0x200001dc | flag.6417 | OBJECT | 0x1
| 0x200001dd | g_batteryState | OBJECT | 0x1
| 0x200001e0 | g_impedance | OBJECT | 0x4
| 0x200001e4 | g_recvBroadcastDevice | OBJECT | 0x4
| 0x200001e8 | g_recvBroadcastRegisterNumber | OBJECT | 0x1
| 0x200001ea | num.6429 | OBJECT | 0x2
| 0x200001ec | num.6467 | OBJECT | 0x1
| 0x200001ed | outputAgainFlag | OBJECT | 0x1
| 0x200001ee | overTemperature | OBJECT | 0x1
| 0x200001ef | recvbroadcast_flag | OBJECT | 0x1
| 0x200001f0 | run_number.6454 | OBJECT | 0x1
| 0x200001f4 | temp.6440 | OBJECT | 0x4
| 0x200001f8 | voltOne.6469 | OBJECT | 0x4
| 0x200001fc | voltTwo.6471 | OBJECT | 0x4
| 0x20000200 | g_bat485_uart3_handle | OBJECT | 0x4
| 0x20000204 | g_gw485_uart4_handle | OBJECT | 0x4
| 0x20000208 | __malloc_free_list | OBJECT | 0x4
| 0x2000020c | __malloc_sbrk_start | OBJECT | 0x4
| 0x20000210 | g_Mppt_Para | OBJECT | 0x2d
| 0x20000240 | rs485_buff | OBJECT | 0x32
| 0x20000274 | m_impedanceCalculation | OBJECT | 0x10
| 0x20000284 | m_recvbroadcast | OBJECT | 0x10
| 0x20000294 | m_refreshRegister | OBJECT | 0x10
| 0x200002a4 | m_runled | OBJECT | 0x10
| 0x200002b4 | m_sensorEnableBroadcast | OBJECT | 0x10
| 0x200002c4 | m_softStart | OBJECT | 0x10
| 0x200002d4 | m_startMpptControl | OBJECT | 0x10
| 0x200002e4 | m_usart | OBJECT | 0x10
| 0x200002f4 | m_wdi | OBJECT | 0x10
| 0x20000304 | bat485_in_buff | OBJECT | 0xc8
| 0x200003cc | gw485_in_buff | OBJECT | 0x12c
| 0x200004f8 | errno | OBJECT | 0x4

View File

@ -27,6 +27,7 @@ App/src \
Core \
Debug \
Drivers/RingQueue \
Drivers/RingQueue2 \
Drivers/TimeSliceOffset \
Hardware/src \
Peripheral/src \