Compare commits
2 Commits
Author | SHA1 | Date |
---|---|---|
起床就犯困 | 1b9253b0dc | |
起床就犯困 | c6668e7f9a |
|
@ -71,6 +71,7 @@
|
||||||
<listOptionValue builtIn="false" value=""${workspace_loc:/mppt_Nos_V0.4/Hardware/inc}""/>
|
<listOptionValue builtIn="false" value=""${workspace_loc:/mppt_Nos_V0.4/Hardware/inc}""/>
|
||||||
<listOptionValue builtIn="false" value=""${workspace_loc:/mppt_Nos_V0.4/Drivers/RingQueue}""/>
|
<listOptionValue builtIn="false" value=""${workspace_loc:/mppt_Nos_V0.4/Drivers/RingQueue}""/>
|
||||||
<listOptionValue builtIn="false" value=""${workspace_loc:/mppt_Nos_V0.4/Drivers/TimeSliceOffset}""/>
|
<listOptionValue builtIn="false" value=""${workspace_loc:/mppt_Nos_V0.4/Drivers/TimeSliceOffset}""/>
|
||||||
|
<listOptionValue builtIn="false" value=""${workspace_loc:/mppt_Nos_V0.4/Drivers/RingQueue2}""/>
|
||||||
</option>
|
</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 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"/>
|
<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"/>
|
||||||
|
@ -150,4 +151,5 @@
|
||||||
</storageModule>
|
</storageModule>
|
||||||
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
|
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
|
||||||
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
|
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
|
||||||
|
<storageModule moduleId="refreshScope"/>
|
||||||
</cproject>
|
</cproject>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
|
<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.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
|
||||||
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" 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 "${INPUTS}"" 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 "${INPUTS}"" prefer-non-shared="true">
|
||||||
<language-scope id="org.eclipse.cdt.core.gcc"/>
|
<language-scope id="org.eclipse.cdt.core.gcc"/>
|
||||||
<language-scope id="org.eclipse.cdt.core.g++"/>
|
<language-scope id="org.eclipse.cdt.core.g++"/>
|
||||||
</provider>
|
</provider>
|
||||||
|
|
|
@ -10,6 +10,16 @@
|
||||||
|
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include "adc.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_CHG_CURR(void);
|
||||||
float get_PV_VOLT_OUT(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_PV_VOLT_IN1(void);
|
||||||
float get_MOSFET_Temper(void);
|
float get_MOSFET_Temper(void);
|
||||||
float get_PV2_VOLT_IN(void);
|
float get_PV2_VOLT_IN(void);
|
||||||
|
void currBuffInit(void);
|
||||||
|
|
||||||
#endif /* APP_INC_COLLECT_CONVERSION_H_ */
|
#endif /* APP_INC_COLLECT_CONVERSION_H_ */
|
||||||
|
|
|
@ -233,6 +233,8 @@ typedef struct _SL_Mppt_para{
|
||||||
float_t HighSideMos_Temperature; /* 高端mos的温度 */
|
float_t HighSideMos_Temperature; /* 高端mos的温度 */
|
||||||
uint16_t DischargMos_State; /* 放电mos的状态 */
|
uint16_t DischargMos_State; /* 放电mos的状态 */
|
||||||
uint16_t MPPT_Mode; /* 工作模式 */
|
uint16_t MPPT_Mode; /* 工作模式 */
|
||||||
|
float_t inPower; /* ×ܳäµçµçÁ¿ */
|
||||||
|
float_t outPower; /* ×ÜÏûºÄµçÁ¿ */
|
||||||
}SL_Mppt_para;
|
}SL_Mppt_para;
|
||||||
extern SL_Mppt_para g_Mppt_Para;
|
extern SL_Mppt_para g_Mppt_Para;
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,8 @@
|
||||||
#include "uart_dev.h"
|
#include "uart_dev.h"
|
||||||
#include "math.h"
|
#include "math.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//extern uint8_t g_interruptNum;
|
//extern uint8_t g_interruptNum;
|
||||||
void stop_mpptWork(void);
|
void stop_mpptWork(void);
|
||||||
void start_mpptWork(void);
|
void start_mpptWork(void);
|
||||||
|
|
|
@ -129,6 +129,10 @@ const uint16_t mosTemperADC[mosTemperADCLen] = {
|
||||||
336 /* 100 ¡æ */
|
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_adc(uint8_t ADC_Channel);
|
||||||
static uint16_t get_aftercalculationAdc(uint8_t ADC_Channel);
|
static uint16_t get_aftercalculationAdc(uint8_t ADC_Channel);
|
||||||
|
@ -144,7 +148,7 @@ uint16_t get_aftercalculationAdc(uint8_t ADC_Channel)
|
||||||
return middleAverageFilter(ADC_Channel);
|
return middleAverageFilter(ADC_Channel);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define N 6
|
#define N 4
|
||||||
/**
|
/**
|
||||||
* @brief ÖÐλֵƽ¾ùÂ˲¨
|
* @brief ÖÐλֵƽ¾ùÂ˲¨
|
||||||
* @param ADC_Channel ADCͨµÀ
|
* @param ADC_Channel ADCͨµÀ
|
||||||
|
@ -172,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];
|
sum += value_buf[i];
|
||||||
}
|
}
|
||||||
return sum/(N-4);
|
return sum/(N-2);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -221,7 +225,16 @@ float get_CHG_CURR(void)
|
||||||
uint16_t I_ADC;
|
uint16_t I_ADC;
|
||||||
|
|
||||||
// I_ADC = Get_ConversionVal(get_adc(CHG_CURR));
|
// 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);
|
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_ADC = get_adc(CHG_CURR);
|
||||||
|
|
||||||
// I = (float)(I_ADC) / 4095 * 3.3 * P_CHG_CURR * 2;
|
// I = (float)(I_ADC) / 4095 * 3.3 * P_CHG_CURR * 2;
|
||||||
|
@ -276,9 +289,21 @@ float get_DSG_CURR(void)
|
||||||
uint16_t I_ADC;
|
uint16_t I_ADC;
|
||||||
|
|
||||||
// I_ADC = Get_ConversionVal(get_adc(DSG_CURR));
|
// 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);
|
// 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 * 3.3 * P_DSG_CURR * 2;
|
||||||
I = (float)(I_ADC) / 4095 * 2.5 * P_DSG_CURR;
|
I = (float)(I_ADC) / 4095 * 2.5 * P_DSG_CURR;
|
||||||
|
|
||||||
|
@ -415,6 +440,19 @@ float get_PV2_VOLT_IN(void)
|
||||||
return V;
|
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));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -705,11 +705,13 @@ void MpptMode(void)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (g_Mppt_Para.Input_Voltage < StopSolarOpenCircuitV
|
// if (g_Mppt_Para.Input_Voltage < StopSolarOpenCircuitV
|
||||||
&& (g_Mppt_Para.Discharg_Current >= g_Mppt_Para.Charg_Current
|
// && (g_Mppt_Para.Discharg_Current >= g_Mppt_Para.Charg_Current
|
||||||
|| g_Mppt_Para.Charg_Current - g_Mppt_Para.Discharg_Current < 0.05)) {
|
// || 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;
|
g_Mppt_Para.MPPT_Mode = NoWork;
|
||||||
printf("nowork \n");
|
// printf("nowork \n");
|
||||||
stop_mpptWork();
|
stop_mpptWork();
|
||||||
TimeSliceOffset_Register(&m_startMpptControl, Task_startMpptControl
|
TimeSliceOffset_Register(&m_startMpptControl, Task_startMpptControl
|
||||||
, startMpptControl_reloadVal, startMpptControl_offset);
|
, startMpptControl_reloadVal, startMpptControl_offset);
|
||||||
|
@ -834,8 +836,7 @@ void test(void)
|
||||||
// g_Mppt_Para.Discharg_Current = get_capturedata(get_DSG_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.Output_Voltage = get_capturedata(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.Output_Voltage = get_PV_VOLT_OUT();
|
g_Mppt_Para.Output_Voltage = get_PV_VOLT_OUT();
|
||||||
g_Mppt_Para.Input_Voltage = get_PV1_VOLT_IN();
|
g_Mppt_Para.Input_Voltage = get_PV1_VOLT_IN();
|
||||||
|
|
||||||
|
|
|
@ -133,6 +133,14 @@ void Task_RunLED(void)
|
||||||
sprintf(buffer, " excessiveLoadFlag : %d \n", excessiveLoadFlag);
|
sprintf(buffer, " excessiveLoadFlag : %d \n", excessiveLoadFlag);
|
||||||
uart_dev_write(g_bat485_uart3_handle, buffer, sizeof(buffer));
|
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));
|
memset(buffer, 0, sizeof(buffer));
|
||||||
sprintf(buffer, " 0.没有工作; 1.涓流模式; 2.恒流模式; 3.恒压模式; 4.浮充模式; 5.没有电池 : %d \n", g_Mppt_Para.MPPT_Mode);
|
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));
|
uart_dev_write(g_bat485_uart3_handle, buffer, sizeof(buffer));
|
||||||
|
@ -140,7 +148,6 @@ void Task_RunLED(void)
|
||||||
uart_dev_write(g_bat485_uart3_handle, " \n", sizeof(" \n"));
|
uart_dev_write(g_bat485_uart3_handle, " \n", sizeof(" \n"));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// printf("vout : %d/100 \n", (int)(get_capturedata(get_PV_VOLT_OUT) * 100));
|
// printf("vout : %d/100 \n", (int)(get_capturedata(get_PV_VOLT_OUT) * 100));
|
||||||
|
|
||||||
// get_CHG_CURR();
|
// get_CHG_CURR();
|
||||||
|
@ -809,7 +816,6 @@ void task_Init(void)
|
||||||
*/
|
*/
|
||||||
void hardware_Init(void)
|
void hardware_Init(void)
|
||||||
{
|
{
|
||||||
TIM2_Init(1);
|
|
||||||
uart_dev_init();
|
uart_dev_init();
|
||||||
PWM_TIM_Configuration();
|
PWM_TIM_Configuration();
|
||||||
// TIM_SetCompare4(TIM4, 0);
|
// TIM_SetCompare4(TIM4, 0);
|
||||||
|
@ -826,7 +832,10 @@ void hardware_Init(void)
|
||||||
|
|
||||||
// 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(10);
|
TIM3_Init(1);
|
||||||
// TIM_Cmd(TIM3, ENABLE); //TIM3使能
|
// TIM_Cmd(TIM3, ENABLE); //TIM3使能
|
||||||
|
|
||||||
|
currBuffInit();
|
||||||
|
TIM2_Init(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,91 @@
|
||||||
|
/*
|
||||||
|
* ring_queue.c
|
||||||
|
*
|
||||||
|
* Created on: 2024年6月21日
|
||||||
|
* 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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,44 @@
|
||||||
|
/*
|
||||||
|
* ring_queue.h
|
||||||
|
*
|
||||||
|
* Created on: 2024年6月21日
|
||||||
|
* 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_ */
|
|
@ -13,7 +13,7 @@ void ADC_all_Init(void)
|
||||||
RCC_PB2PeriphClockCmd(RCC_PB2Periph_ADC1, ENABLE);
|
RCC_PB2PeriphClockCmd(RCC_PB2Periph_ADC1, ENABLE);
|
||||||
RCC_ADCCLKConfig(RCC_PCLK2_Div2);
|
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_InitStructure.GPIO_Mode = GPIO_Mode_AIN;
|
||||||
GPIO_Init(GPIOA, &GPIO_InitStructure);
|
GPIO_Init(GPIOA, &GPIO_InitStructure);
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
#include "pwm.h"
|
#include "pwm.h"
|
||||||
#include "mppt_control.h"
|
#include "mppt_control.h"
|
||||||
#include "task.h"
|
#include "task.h"
|
||||||
|
#include "collect_Conversion.h"
|
||||||
|
#include "sl_protocol.h"
|
||||||
|
|
||||||
void TIM3_IRQHandler(void) __attribute__((interrupt("WCH-Interrupt-fast")));
|
void TIM3_IRQHandler(void) __attribute__((interrupt("WCH-Interrupt-fast")));
|
||||||
void TIM2_IRQHandler(void) __attribute__((interrupt("WCH-Interrupt-fast")));
|
void TIM2_IRQHandler(void) __attribute__((interrupt("WCH-Interrupt-fast")));
|
||||||
|
@ -23,7 +25,7 @@ void TIM3_Init(uint16_t delay_ms)
|
||||||
/* 分频系数 */
|
/* 分频系数 */
|
||||||
uint16_t psc = (SystemCoreClock / 10000) - 1;
|
uint16_t psc = (SystemCoreClock / 10000) - 1;
|
||||||
/* 周期数 */
|
/* 周期数 */
|
||||||
uint16_t arr = delay_ms * 1 - 1;
|
uint16_t arr = delay_ms * 10 - 1;
|
||||||
|
|
||||||
TIM3_Int_Init(arr, psc);
|
TIM3_Int_Init(arr, psc);
|
||||||
}
|
}
|
||||||
|
@ -103,9 +105,12 @@ void TIM2_IRQHandler(void)
|
||||||
if (TIM_GetITStatus(TIM2, TIM_IT_Update) != RESET) { //检查TIM2中断是否发生。
|
if (TIM_GetITStatus(TIM2, TIM_IT_Update) != RESET) { //检查TIM2中断是否发生。
|
||||||
TIM_ClearITPendingBit(TIM2, TIM_IT_Update); //清除TIM1的中断挂起位。
|
TIM_ClearITPendingBit(TIM2, TIM_IT_Update); //清除TIM1的中断挂起位。
|
||||||
TimeSliceOffset_Produce();
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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_misc.h \
|
||||||
D:\psx\MPPT\git\Peripheral\inc/ch32l103_lptim.h \
|
D:\psx\MPPT\git\Peripheral\inc/ch32l103_lptim.h \
|
||||||
D:\psx\MPPT\git\Peripheral\inc/ch32l103_opa.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\Hardware\inc/adc.h \
|
||||||
D:\psx\MPPT\git\App\inc/uart_dev.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\Drivers\RingQueue/ring_queue.h \
|
||||||
D:\psx\MPPT\git\Hardware\inc/rs485.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\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\Hardware\inc/gpio.h:
|
||||||
|
|
||||||
D:\psx\MPPT\git\App\inc/uart_dev.h:
|
D:\psx\MPPT\git\App\inc/uart_dev.h:
|
||||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -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_lptim.h \
|
||||||
D:\psx\MPPT\git\Peripheral\inc/ch32l103_opa.h \
|
D:\psx\MPPT\git\Peripheral\inc/ch32l103_opa.h \
|
||||||
D:\psx\MPPT\git\App\inc/collect_Conversion.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\Hardware\inc/adc.h \
|
||||||
D:\psx\MPPT\git\App\inc/inflash.h D:\psx\MPPT\git\Hardware\inc/gpio.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\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\Drivers\RingQueue/ring_queue.h \
|
||||||
D:\psx\MPPT\git\Hardware\inc/rs485.h D:\psx\MPPT\git\App\inc/task.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\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\Hardware\inc/pwm.h:
|
||||||
|
|
||||||
D:\psx\MPPT\git\App\inc/inflash.h:
|
D:\psx\MPPT\git\App\inc/inflash.h:
|
||||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -31,6 +31,6 @@ C_DEPS += \
|
||||||
|
|
||||||
# Each subdirectory must supply rules for building sources it contributes
|
# Each subdirectory must supply rules for building sources it contributes
|
||||||
App/src/%.o: ../App/src/%.c
|
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 "$@" "$<"
|
||||||
@ @
|
@ @
|
||||||
|
|
||||||
|
|
|
@ -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\Hardware\inc/flash.h \
|
||||||
D:\psx\MPPT\git\App\inc/sl_protocol.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/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:
|
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/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:
|
||||||
|
|
Binary file not shown.
|
@ -16,6 +16,6 @@ C_DEPS += \
|
||||||
|
|
||||||
# Each subdirectory must supply rules for building sources it contributes
|
# Each subdirectory must supply rules for building sources it contributes
|
||||||
Core/%.o: ../Core/%.c
|
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 "$@" "$<"
|
||||||
@ @
|
@ @
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,6 @@ C_DEPS += \
|
||||||
|
|
||||||
# Each subdirectory must supply rules for building sources it contributes
|
# Each subdirectory must supply rules for building sources it contributes
|
||||||
Debug/%.o: ../Debug/%.c
|
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 "$@" "$<"
|
||||||
@ @
|
@ @
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,6 @@ C_DEPS += \
|
||||||
|
|
||||||
# Each subdirectory must supply rules for building sources it contributes
|
# Each subdirectory must supply rules for building sources it contributes
|
||||||
Drivers/RingQueue/%.o: ../Drivers/RingQueue/%.c
|
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 "$@" "$<"
|
||||||
@ @
|
@ @
|
||||||
|
|
||||||
|
|
|
@ -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.
|
@ -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 "$@" "$<"
|
||||||
|
@ @
|
||||||
|
|
|
@ -16,6 +16,6 @@ C_DEPS += \
|
||||||
|
|
||||||
# Each subdirectory must supply rules for building sources it contributes
|
# Each subdirectory must supply rules for building sources it contributes
|
||||||
Drivers/TimeSliceOffset/%.o: ../Drivers/TimeSliceOffset/%.c
|
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.
|
@ -31,6 +31,6 @@ C_DEPS += \
|
||||||
|
|
||||||
# Each subdirectory must supply rules for building sources it contributes
|
# Each subdirectory must supply rules for building sources it contributes
|
||||||
Hardware/src/%.o: ../Hardware/src/%.c
|
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 "$@" "$<"
|
||||||
@ @
|
@ @
|
||||||
|
|
||||||
|
|
|
@ -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\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\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/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:
|
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/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:
|
||||||
|
|
Binary file not shown.
|
@ -76,6 +76,6 @@ C_DEPS += \
|
||||||
|
|
||||||
# Each subdirectory must supply rules for building sources it contributes
|
# Each subdirectory must supply rules for building sources it contributes
|
||||||
Peripheral/src/%.o: ../Peripheral/src/%.c
|
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 "$@" "$<"
|
||||||
@ @
|
@ @
|
||||||
|
|
||||||
|
|
BIN
obj/User/main.o
BIN
obj/User/main.o
Binary file not shown.
|
@ -22,6 +22,6 @@ C_DEPS += \
|
||||||
|
|
||||||
# Each subdirectory must supply rules for building sources it contributes
|
# Each subdirectory must supply rules for building sources it contributes
|
||||||
User/%.o: ../User/%.c
|
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 "$@" "$<"
|
||||||
@ @
|
@ @
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,7 @@ RM := rm -rf
|
||||||
-include Peripheral/src/subdir.mk
|
-include Peripheral/src/subdir.mk
|
||||||
-include Hardware/src/subdir.mk
|
-include Hardware/src/subdir.mk
|
||||||
-include Drivers/TimeSliceOffset/subdir.mk
|
-include Drivers/TimeSliceOffset/subdir.mk
|
||||||
|
-include Drivers/RingQueue2/subdir.mk
|
||||||
-include Drivers/RingQueue/subdir.mk
|
-include Drivers/RingQueue/subdir.mk
|
||||||
-include Debug/subdir.mk
|
-include Debug/subdir.mk
|
||||||
-include Core/subdir.mk
|
-include Core/subdir.mk
|
||||||
|
|
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
20394
obj/mppt_Nos_V0.4.lst
20394
obj/mppt_Nos_V0.4.lst
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -27,6 +27,7 @@ App/src \
|
||||||
Core \
|
Core \
|
||||||
Debug \
|
Debug \
|
||||||
Drivers/RingQueue \
|
Drivers/RingQueue \
|
||||||
|
Drivers/RingQueue2 \
|
||||||
Drivers/TimeSliceOffset \
|
Drivers/TimeSliceOffset \
|
||||||
Hardware/src \
|
Hardware/src \
|
||||||
Peripheral/src \
|
Peripheral/src \
|
||||||
|
|
Loading…
Reference in New Issue