尝试使用中断发送串口数据
This commit is contained in:
parent
a3b56a4252
commit
1743b311fb
|
@ -92,6 +92,8 @@ typedef struct _Mppt_otherParameter{
|
|||
|
||||
uint8_t HYconfigModeState; /* HY通信协议是否进入了配置模式,0x00未进入,0xFF进入 */
|
||||
uint8_t HYconfigModeT; /* HY通信协议进入配置模式后的延时时间 */
|
||||
|
||||
uint8_t randomNumber; /* 随机数 */
|
||||
}Mppt_otherParameter;
|
||||
extern Mppt_otherParameter g_otherParameter;
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@ typedef enum
|
|||
{
|
||||
RS485 = 1,
|
||||
RJ45 = 2,
|
||||
Lora = 3,
|
||||
// Lora = 3, //暂时未使用
|
||||
}SL_COMMUNICATIONMETHODS;
|
||||
|
||||
/* ·Åµçmos¹Ü״̬ */
|
||||
|
|
|
@ -29,7 +29,7 @@ extern STR_TimeSliceOffset m_refreshRegister;
|
|||
extern void Task_refreshRegister(void);
|
||||
|
||||
/* 回路阻抗检测 */
|
||||
#define impedanceCalculation_reloadVal 200 /* 任务执行间隔 */
|
||||
#define impedanceCalculation_reloadVal 100 /* 任务执行间隔 */
|
||||
#define impedanceCalculation_offset 0 /* 任务执行偏移量 */
|
||||
extern STR_TimeSliceOffset g_impedanceCalculation;
|
||||
extern void Task_impedanceCalculation(void);
|
||||
|
|
|
@ -20,12 +20,10 @@
|
|||
#define ASCII_CHAR_FORM_FEED 0x0C /* '\f' */
|
||||
#define ASCII_CHAR_CARRIAGE_RETURN 0x0D /* '\r' */
|
||||
|
||||
#define RS485_MAX_PACK_DATA_LEN 30
|
||||
|
||||
typedef uint32_t device_handle;
|
||||
extern device_handle g_bat485_uart3_handle;
|
||||
extern device_handle g_gw485_uart4_handle;
|
||||
extern uint8_t rs485_out_buff[100];
|
||||
//extern uint8_t rs485_out_buff[100];
|
||||
|
||||
|
||||
typedef enum{
|
||||
|
@ -42,6 +40,10 @@ typedef struct _uart_device_info{
|
|||
RingQueue uart_ring_queue;
|
||||
}uart_device_info;
|
||||
|
||||
void bat485_tx_enabla(void);
|
||||
void bat485_tx_disenabla(void);
|
||||
void gw485_tx_enabla(void);
|
||||
void gw485_tx_disenabla(void);
|
||||
|
||||
//device_handle uart_dev_init(uartIndex_e uart_index, uint8_t *buff, int buff_size);
|
||||
device_handle uart_dev_init(void);
|
||||
|
|
|
@ -0,0 +1,61 @@
|
|||
/*
|
||||
* uart_send.h
|
||||
*
|
||||
* Created on: 2024年11月19日
|
||||
* Author: psx
|
||||
*/
|
||||
|
||||
#ifndef APP_INC_UART_SEND_H_
|
||||
#define APP_INC_UART_SEND_H_
|
||||
|
||||
#include "uart_dev.h"
|
||||
|
||||
#define RS485_MAX_PACK_DATA_LEN 60
|
||||
|
||||
/* 指定对齐方式为1字节 */
|
||||
#pragma pack(push,1)
|
||||
|
||||
typedef struct _send_data_info{
|
||||
device_handle device;
|
||||
uint8_t dataState; //储存数据的状态,1:有数据,0:无数据
|
||||
uint8_t dataLen; //数据长度
|
||||
uint8_t Counter; //已经发送的长度
|
||||
uint8_t *data; //储存数据的内容
|
||||
}send_data_info;
|
||||
|
||||
typedef struct _uart_send_info {
|
||||
uint8_t insertState; //能否插入指示,大于0代表能插入
|
||||
uint8_t sendStateGw:1; //能否发送指示,1:需要发送,0:不需要发送
|
||||
uint8_t sendStateBat:1; //能否发送指示
|
||||
uint8_t sendOverStateGw:1; //发送完成指示,1:发送完成,0:发送中
|
||||
uint8_t sendOverStateBat:1; //发送完成指示
|
||||
uint8_t GwState:1; //向上通信485总线空闲状态,1:空闲,0:繁忙
|
||||
uint8_t idleStateGw:1; //向上通信空闲状态,1:没数据到来,0:有数据到来
|
||||
uint8_t BatState:1; //向下通信485总线空闲状态
|
||||
uint8_t idleStateBat:1; //向下通信空闲状态
|
||||
// uint8_t sendStateGw; //能否发送指示,1:需要发送,0:不需要发送
|
||||
// uint8_t sendStateBat; //能否发送指示
|
||||
// uint8_t sendOverStateGw; //发送完成指示,1:发送完成,0:发送中
|
||||
// uint8_t sendOverStateBat; //发送完成指示
|
||||
// uint8_t GwState; //向上通信485总线空闲状态,1:空闲,0:繁忙
|
||||
// uint8_t idleStateGw; //向上通信空闲状态,1:没数据到来,0:有数据到来
|
||||
// uint8_t BatState; //向下通信485总线空闲状态
|
||||
// uint8_t idleStateBat; //向下通信空闲状态
|
||||
send_data_info *insertData; //通过该指针写入数据
|
||||
send_data_info *sendDataGw; //通过该指针发送数据
|
||||
send_data_info *sendDataBat; //通过该指针发送数据
|
||||
send_data_info data1; //储存数据的第1个位置
|
||||
send_data_info data2; //储存数据的第2个位置
|
||||
send_data_info data3; //储存数据的第3个位置
|
||||
}uart_send_info;
|
||||
/* 恢复默认的对齐设置 */
|
||||
#pragma pack(pop)
|
||||
|
||||
extern uart_send_info uart_send;
|
||||
|
||||
void send_init(void);
|
||||
void check_sendState(void);
|
||||
void uart_interruptSend(device_handle device, uint8_t buff[], uint8_t len);
|
||||
void uartDMA_Init(device_handle device, uint8_t buff[], uint8_t len);
|
||||
|
||||
#endif /* APP_INC_UART_SEND_H_ */
|
|
@ -15,6 +15,7 @@
|
|||
#include "tim.h"
|
||||
#include "sl_protocol.h"
|
||||
#include "parameter.h"
|
||||
#include "uart_send.h"
|
||||
|
||||
/* 电池状态数据报 */
|
||||
static void HY_MsgProcFunc_batteryStatus(device_handle device, void *pMsg, uint32_t MsgLen);
|
||||
|
@ -489,6 +490,8 @@ void HY_MsgProcFunc_batteryStatus(device_handle device, void *pMsg, uint32_t Msg
|
|||
|
||||
pack.end_Flag = g_otherParameter.endFlagHY;
|
||||
|
||||
// uart_interruptSend(device, (uint8_t *)&pack, HY_batteryStatusResponse_PACK_SIZE);
|
||||
|
||||
while (1) {
|
||||
if (!Check_485_bus_busy(device)) {
|
||||
uart_dev_write(device, &pack, HY_batteryStatusResponse_PACK_SIZE);
|
||||
|
|
|
@ -85,12 +85,14 @@ void checkFlashContent(void)
|
|||
read_config_info(&temp_configInfo);
|
||||
|
||||
|
||||
/* 配置文件正确就返回 */
|
||||
// printf("crc : %x %x\n", temp_configInfo.crc, configCheckFunc((uint8_t *)&temp_configInfo, CONFIG_INFO_SIZE - 2));
|
||||
if (temp_configInfo.crc == configCheckFunc((uint8_t *)&temp_configInfo, CONFIG_INFO_SIZE - 2)) {
|
||||
// printf("config\n");
|
||||
return;
|
||||
}
|
||||
|
||||
/* 更深处的配置文件正确就返回 */
|
||||
read_backups_config_info(&temp_configInfo);
|
||||
if (temp_configInfo.crc == configCheckFunc((uint8_t *)&temp_configInfo, CONFIG_INFO_SIZE - 2)) {
|
||||
// printf("backups config\n");
|
||||
|
@ -98,6 +100,8 @@ void checkFlashContent(void)
|
|||
return;
|
||||
}
|
||||
|
||||
|
||||
/* 配置文件错误使用默认配置 */
|
||||
config_info configInfo = {
|
||||
.address = {0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11},
|
||||
.Access_Node_Type = 0x01,
|
||||
|
@ -184,6 +188,7 @@ void config_info_start(void)
|
|||
{
|
||||
checkFlashContent();
|
||||
|
||||
/* 读取配置文件并将需要的参数保存在全局变量中 */
|
||||
config_info temp_configInfo;
|
||||
read_config_info(&temp_configInfo);
|
||||
|
||||
|
@ -286,6 +291,7 @@ void config_info_start(void)
|
|||
// readLoopImpedance(&g_controlParameter.loopImpedance);
|
||||
float_t fTemp;
|
||||
readLoopImpedance(&fTemp);
|
||||
/* 读取的回路阻抗偏差过大则不使用 */
|
||||
if (fTemp > 0.005 && fTemp < 1) {
|
||||
g_controlParameter.loopImpedance = fTemp;
|
||||
}
|
||||
|
|
|
@ -117,6 +117,7 @@ void mppt_constantVoltageO(float OutVoltage)
|
|||
g_controlParameter.dutyRatio -= StepPwm;
|
||||
}
|
||||
|
||||
/* 过温保护 */
|
||||
if (g_otherParameter.overTemperature == 0) {
|
||||
|
||||
} else if (g_otherParameter.overTemperature == 1) {
|
||||
|
@ -144,13 +145,13 @@ float_t lastPower = 0;
|
|||
float_t lastSolarInCircuitVoltage = 0;
|
||||
void mppt_readJust(void)
|
||||
{
|
||||
static float_t step1 = 0.01;
|
||||
static float_t step2 = 0.005;
|
||||
static float_t tempV = 0.1;
|
||||
static float_t step1 = 0.005;
|
||||
static float_t step2 = 0.001;
|
||||
static float_t tempV = 0.2;
|
||||
|
||||
static uint16_t flag = 0;
|
||||
flag++;
|
||||
if (flag < 600) {
|
||||
if (flag < 1000) {
|
||||
return;
|
||||
}
|
||||
flag = 0;
|
||||
|
@ -294,21 +295,27 @@ void MpptModeChoice(void)
|
|||
return;
|
||||
}
|
||||
|
||||
/* 流向电池的电流小于一定值或者电压过大或者过小采用浮充输出 */
|
||||
if ((g_otherParameter.Charg_BatteryCurrent < 0.05 && g_otherParameter.Charg_BatteryCurrent > -0.05)
|
||||
|| g_otherParameter.Battery_Voltage > 16 || g_otherParameter.Battery_Voltage < 8) {
|
||||
// /* 流向电池的电流小于一定值或者电压过大或者过小判定无电池采用浮充输出 */
|
||||
// if ((g_otherParameter.Charg_BatteryCurrent < 0.05 && g_otherParameter.Charg_BatteryCurrent > -0.05)
|
||||
// || g_otherParameter.Battery_Voltage > 16 || g_otherParameter.Battery_Voltage < 8) {
|
||||
// g_otherParameter.MPPT_Mode = FLOAT;
|
||||
// g_otherParameter.batteryState = 0;
|
||||
// return;
|
||||
// }
|
||||
if (g_otherParameter.Battery_Voltage > 16 || g_otherParameter.Battery_Voltage < 8) {
|
||||
g_otherParameter.MPPT_Mode = FLOAT;
|
||||
g_otherParameter.batteryState = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
/* */
|
||||
/* 当电压低于恒压充电阈值电压(-0.2V)且充电电流大于0.1A时采用恒流输出 */
|
||||
if ((g_controlParameter.constantVoltageV - 0.2) >= g_otherParameter.Battery_Voltage
|
||||
&& g_otherParameter.Charg_Current > 0.1) {
|
||||
g_otherParameter.MPPT_Mode = CONSTANTCURRENT;
|
||||
return;
|
||||
}
|
||||
|
||||
/* 当电压高于恒压充电阈值电压且充电电流大于浮充充电阈值(+0.1A)电流时采用恒压输出 */
|
||||
if ((g_controlParameter.constantVoltageV < g_otherParameter.Battery_Voltage)
|
||||
// && (g_controlParameter.floatI + 0.1 <= g_otherParameter.Charg_Current)) {
|
||||
&& ((g_controlParameter.floatI + 0.1 <= g_otherParameter.Charg_BatteryCurrent) || (g_controlParameter.floatI + 0.1 <= -g_otherParameter.Charg_Current))) {
|
||||
|
@ -316,6 +323,7 @@ void MpptModeChoice(void)
|
|||
return;
|
||||
}
|
||||
|
||||
/* 当电压高于恒压充电阈值电压且充电电流小于浮充充电阈值电流时采用恒压输出 */
|
||||
if ((((g_controlParameter.constantVoltageV < g_otherParameter.Battery_Voltage)
|
||||
&& (g_controlParameter.floatI > g_otherParameter.Charg_Current))
|
||||
&& (g_controlParameter.floatI > g_otherParameter.Discharg_Current))) {
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "collect_Conversion.h"
|
||||
#include "parameter.h"
|
||||
#include "hy_protocol.h"
|
||||
#include "uart_send.h"
|
||||
|
||||
/**
|
||||
* @brief 初始化
|
||||
|
@ -47,6 +48,26 @@ void Init()
|
|||
POW_FF_CON_Init();
|
||||
DSG_PROT_Init();
|
||||
|
||||
// for (int var = 0; var < 50; ++var) {
|
||||
// USART_Tbuffer[var] = var;
|
||||
// }
|
||||
// len = 51;
|
||||
// USART_Tbuffer[len] = '\n';
|
||||
// gw485_tx_enabla();
|
||||
// uartDMA_Init(g_gw485_uart4_handle, USART_Tbuffer, len);
|
||||
// USART_DMACmd(USART4, USART_DMAReq_Tx, ENABLE);
|
||||
// USART_ITConfig(USART4, USART_IT_TXE, ENABLE);
|
||||
// while(1){
|
||||
//// USART_DMACmd(USART4, USART_DMAReq_Tx, ENABLE);
|
||||
//// DMA_ClearFlag(DMA1_FLAG_TC1); //清除DMA1通道4传输完成挂起标志
|
||||
//// DMA_Cmd(DMA1_Channel1, ENABLE);
|
||||
//// printf("WHILE\n");
|
||||
// Delay_Ms(5000);
|
||||
//// uartDMA_Init(g_gw485_uart4_handle, USART_Tbuffer, len);
|
||||
//// USART_DMACmd(USART4, USART_DMAReq_Tx, ENABLE);
|
||||
// };
|
||||
|
||||
send_init();
|
||||
/* 1ms */
|
||||
TIM3_Init(10);
|
||||
|
||||
|
@ -80,10 +101,16 @@ void Init()
|
|||
STR_TimeSliceOffset m_WdiRunled;
|
||||
void Task_WdiRunled(void)
|
||||
{
|
||||
|
||||
// DMA_ClearFlag(DMA1_FLAG_TC1); //清除DMA1通道4传输完成挂起标志
|
||||
// USART_DMACmd(USART4, USART_DMAReq_Tx, ENABLE);
|
||||
|
||||
/* 控制LED的亮灭 */
|
||||
static uint8_t flag = RESET;
|
||||
flag = !flag;
|
||||
GPIO_WriteBit(RUN_LED_GPIO, RUN_LED_PIN, flag);
|
||||
|
||||
/* 每天复位一次,复位前将电量信息写入flash中 */
|
||||
static uint32_t temp = wdi_RESET;
|
||||
if (!(--temp)) {
|
||||
temp = 0;
|
||||
|
@ -92,20 +119,26 @@ void Task_WdiRunled(void)
|
|||
NVIC_SystemReset();
|
||||
}
|
||||
|
||||
/* tempT S后打开输出接口 */
|
||||
static uint8_t tempT = 15;
|
||||
if (tempT != 0) {
|
||||
tempT--;
|
||||
if (tempT == 0) {
|
||||
GPIO_WriteBit(POW_OUT_CON_GPIO, POW_OUT_CON_PIN, SET);
|
||||
GPIO_WriteBit(POW_FF_CON_GPIO, POW_FF_CON_PIN, SET);
|
||||
/* 延时1ms防止外部电容影响电平造成误判 */
|
||||
Delay_Ms(1);
|
||||
WORK_VOLT_INT_Init();
|
||||
}
|
||||
}
|
||||
|
||||
/* 喂狗 */
|
||||
GPIO_WriteBit(WDI_INPUT_GPIO, WDI_INPUT_PIN, SET);
|
||||
GPIO_WriteBit(WDI_INPUT_GPIO, WDI_INPUT_PIN, RESET);
|
||||
|
||||
srand(TIM_GetCounter(TIM4));
|
||||
g_otherParameter.randomNumber = 1 + rand() % 10;
|
||||
|
||||
// if (USART_RbufferLen != 0) {
|
||||
// printf("%s\n", USART_Rbuffer);
|
||||
// memset(USART_Rbuffer, 0, sizeof(USART_Rbuffer));
|
||||
|
@ -336,6 +369,7 @@ void Task_excessiveLoad(void)
|
|||
num++;
|
||||
}
|
||||
|
||||
/* 延迟一段时间打开输出接口 */
|
||||
if (num == 1 && g_otherParameter.excessiveLoadFlag == 1) {
|
||||
GPIO_WriteBit(POW_OUT_CON_GPIO, POW_OUT_CON_PIN, SET);
|
||||
}
|
||||
|
@ -465,6 +499,14 @@ void Task_dataJudgment(void)
|
|||
g_otherParameter.batteryState = 1;
|
||||
}
|
||||
|
||||
// /* 流向电池的电流小于一定值或者电压过大或者过小判定无电池采用浮充输出 */
|
||||
// if ((g_otherParameter.Charg_BatteryCurrent < 0.05 && g_otherParameter.Charg_BatteryCurrent > -0.05)
|
||||
// || g_otherParameter.Battery_Voltage > 16 || g_otherParameter.Battery_Voltage < 8) {
|
||||
// g_otherParameter.MPPT_Mode = FLOAT;
|
||||
// g_otherParameter.batteryState = 0;
|
||||
// return;
|
||||
// }
|
||||
|
||||
/* 有电池,太阳能输出功率大,同时回路阻抗未测试或需要重新测试 */
|
||||
if ((g_otherParameter.impedanceStart == 1 || g_controlParameter.loopImpedance == 0.0)
|
||||
&& g_otherParameter.batteryState == 1 && (g_otherParameter.Charg_Current > 3.0)
|
||||
|
@ -473,6 +515,7 @@ void Task_dataJudgment(void)
|
|||
, impedanceCalculation_reloadVal, impedanceCalculation_reloadVal);
|
||||
}
|
||||
|
||||
/* 根据不同的温度切换到不同输出模式,全功率,降功率和停止输出 */
|
||||
if (g_otherParameter.overTemperature != 0
|
||||
&& g_otherParameter.HighSideMos_Temperature < g_controlParameter.HighSideMosTemperature_start) {
|
||||
if (g_otherParameter.overTemperature == 3) {
|
||||
|
@ -527,6 +570,7 @@ uartJudgeHandle uart_judge_handle;
|
|||
STR_TimeSliceOffset m_usartJudge;
|
||||
void Task_usartJudge(void)
|
||||
{
|
||||
/* 检测到有数据启动读取并解析任务 */
|
||||
if (uart_dev_char_present(g_gw485_uart4_handle)) {
|
||||
TimeSliceOffset_Register(&m_usartHandle, Task_usartHandle
|
||||
, usartHandle_reloadVal, usartHandle_offset);
|
||||
|
@ -690,7 +734,7 @@ STR_TimeSliceOffset g_collectOpenCircuitVoltage;
|
|||
uint8_t g_collectOpenCircuitVoltageFlag = 0;
|
||||
void Task_collectOpenCircuitVoltage(void)
|
||||
{
|
||||
|
||||
/* 到达开路电压检测时间 */
|
||||
g_otherParameter.collectOpenCircuitVoltageNUM++;
|
||||
if (g_otherParameter.collectOpenCircuitVoltageNUM == g_controlParameter.collectOpenCircuitVoltageTime) {
|
||||
if (g_otherParameter.batteryState) {
|
||||
|
@ -699,18 +743,25 @@ void Task_collectOpenCircuitVoltage(void)
|
|||
Delay_Ms(1);
|
||||
TIM_SetCompare4(TIM4, 0);
|
||||
g_controlParameter.dutyRatio = 0;
|
||||
/* 设置延时为1000-500ms */
|
||||
g_collectOpenCircuitVoltage.count = 500;
|
||||
}
|
||||
}
|
||||
|
||||
/* 检测开路电压 */
|
||||
if (g_collectOpenCircuitVoltageFlag) {
|
||||
g_collectOpenCircuitVoltageFlag = 0;
|
||||
// printf("1\n");
|
||||
g_otherParameter.Solar_Open_Circuit_Voltage = get_PV1_VOLT_IN();
|
||||
TimeSliceOffset_Register(&m_softStart, Task_softStart, softStart_reloadVal, softStart_offset);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief HY通信协议下进入配置模式后,120S后自动退出
|
||||
* @param
|
||||
* @retval
|
||||
*
|
||||
*/
|
||||
STR_TimeSliceOffset g_configurationModeDelayedExit;
|
||||
void Task_configurationModeDelayedExit(void)
|
||||
{
|
||||
|
|
|
@ -21,7 +21,7 @@ device_handle g_gw485_uart4_handle;
|
|||
static uint8_t bat485_in_buff[200];
|
||||
static uint8_t gw485_in_buff[200];
|
||||
|
||||
uint8_t rs485_out_buff[100];
|
||||
//uint8_t rs485_out_buff[100];
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
@ -0,0 +1,285 @@
|
|||
/*
|
||||
* uart_send.c
|
||||
*
|
||||
* Created on: 2024年11月19日
|
||||
* Author: psx
|
||||
*/
|
||||
|
||||
#include "uart_send.h"
|
||||
#include "parameter.h"
|
||||
#include <string.h>
|
||||
|
||||
//static uint8_t dataLocation1[RS485_MAX_PACK_DATA_LEN];
|
||||
//static uint8_t dataLocation2[RS485_MAX_PACK_DATA_LEN];
|
||||
//static uint8_t dataLocation3[RS485_MAX_PACK_DATA_LEN];
|
||||
|
||||
static uint8_t dataLocation1[RS485_MAX_PACK_DATA_LEN];
|
||||
static uint8_t dataLocation2[RS485_MAX_PACK_DATA_LEN];
|
||||
static uint8_t dataLocation3[RS485_MAX_PACK_DATA_LEN];
|
||||
|
||||
uart_send_info uart_send;
|
||||
|
||||
/**
|
||||
* @brief 串口中断发送的初始化,通过空闲中断来判断总线空闲状态
|
||||
* @param
|
||||
* @retval
|
||||
*
|
||||
*/
|
||||
void send_init(void)
|
||||
{
|
||||
uart_send.data1.data = dataLocation1;
|
||||
uart_send.data2.data = dataLocation2;
|
||||
uart_send.data3.data = dataLocation3;
|
||||
uart_send.insertData = &uart_send.data1;
|
||||
uart_send.sendDataGw = NULL;
|
||||
uart_send.sendDataBat = NULL;
|
||||
|
||||
//有3个位置可以写入数据
|
||||
uart_send.insertState = 3;
|
||||
|
||||
//没有数据能够发送
|
||||
uart_send.sendStateGw = 0;
|
||||
uart_send.sendStateBat = 0;
|
||||
//发送完成
|
||||
uart_send.sendOverStateBat = 1;
|
||||
uart_send.sendOverStateGw = 1;
|
||||
|
||||
//485总线空闲
|
||||
uart_send.GwState = 1;
|
||||
uart_send.idleStateGw = 1;
|
||||
uart_send.BatState = 1;
|
||||
uart_send.idleStateBat = 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 发送检测函数,当有数据并且总线空闲时,将数据通过中断发送
|
||||
* @param
|
||||
* @retval
|
||||
*
|
||||
*/
|
||||
void check_sendState(void)
|
||||
{
|
||||
static uint8_t tempGwT = 0;
|
||||
static uint8_t tempBatT = 0;
|
||||
/* 进入空闲中断一段时间后,仍然没有数据到来判断485总线空闲 */
|
||||
if (!uart_send.GwState) {
|
||||
if (uart_send.idleStateGw) {
|
||||
tempGwT++;
|
||||
if (tempGwT >= g_otherParameter.randomNumber) {
|
||||
uart_send.GwState = 1;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
tempGwT = 0;
|
||||
}
|
||||
|
||||
/* 进入空闲中断一段时间后,仍然没有数据到来判断485总线空闲 */
|
||||
if (!uart_send.BatState) {
|
||||
if (uart_send.idleStateBat) {
|
||||
tempBatT++;
|
||||
if (tempBatT >= g_otherParameter.randomNumber) {
|
||||
uart_send.BatState = 1;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
tempBatT = 0;
|
||||
}
|
||||
|
||||
/* 向上通信总线空闲时,检测到有数据需要发送,同时上一次数据发送完成 */
|
||||
// if (uart_send.GwState && uart_send.sendStateGw && uart_send.sendOverStateGw) {
|
||||
if (uart_send.GwState && uart_send.sendStateGw && uart_send.sendOverStateGw) {
|
||||
printf("Gw in Tx\n");
|
||||
gw485_tx_enabla();
|
||||
// USART_ITConfig(USART4, USART_IT_TXE, ENABLE);
|
||||
uartDMA_Init(g_gw485_uart4_handle, uart_send.sendDataGw->data, uart_send.sendDataGw->dataLen);
|
||||
USART_DMACmd(USART4, USART_DMAReq_Tx, ENABLE);
|
||||
// uart_send.sendOverStateGw = 0;
|
||||
uart_send.sendOverStateGw = 0;
|
||||
}
|
||||
|
||||
/* 向下通信总线空闲时,检测到有数据需要发送,同时上一次数据发送完成 */
|
||||
// if (uart_send.BatState && uart_send.sendStateBat && uart_send.sendOverStateBat) {
|
||||
if (uart_send.BatState && uart_send.sendStateBat && uart_send.sendOverStateBat) {
|
||||
|
||||
printf("Bat in Tx\n");
|
||||
bat485_tx_enabla();
|
||||
// USART_ITConfig(USART3, USART_IT_TXE, ENABLE);
|
||||
// uartDMA_Init(g_bat485_uart3_handle, uart_send.sendDataBat->data, uart_send.sendDataBat->dataLen);
|
||||
USART_DMACmd(USART3, USART_DMAReq_Tx, ENABLE);
|
||||
// uart_send.sendOverStateBat = 0;
|
||||
uart_send.sendOverStateBat = 0;
|
||||
}
|
||||
|
||||
/* 向上通信时,依次查看有无向上通信的数据 */
|
||||
if (!uart_send.sendStateGw && (uart_send.insertState + uart_send.sendStateBat < 3)) {
|
||||
if (uart_send.data1.dataState) {
|
||||
if (uart_send.data1.device == g_gw485_uart4_handle) {
|
||||
uart_send.sendStateGw = 1;
|
||||
uart_send.sendDataGw = &uart_send.data1;
|
||||
}
|
||||
}
|
||||
if (uart_send.data2.dataState) {
|
||||
if (uart_send.data2.device == g_gw485_uart4_handle) {
|
||||
uart_send.sendStateGw= 1;
|
||||
uart_send.sendDataGw = &uart_send.data2;
|
||||
}
|
||||
}
|
||||
if (uart_send.data3.dataState) {
|
||||
if (uart_send.data3.device == g_gw485_uart4_handle) {
|
||||
uart_send.sendStateGw = 1;
|
||||
uart_send.sendDataGw = &uart_send.data3;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 向下通信时,依次查看有无向下通信的数据 */
|
||||
if (!uart_send.sendStateBat && (uart_send.insertState + uart_send.sendStateGw < 3)) {
|
||||
if (uart_send.data1.dataState) {
|
||||
if (uart_send.data1.device == g_bat485_uart3_handle) {
|
||||
uart_send.sendStateBat = 1;
|
||||
uart_send.sendDataBat = &uart_send.data1;
|
||||
}
|
||||
}
|
||||
if (uart_send.data2.dataState) {
|
||||
if (uart_send.data2.device == g_bat485_uart3_handle) {
|
||||
uart_send.sendStateBat = 1;
|
||||
uart_send.sendDataBat = &uart_send.data2;
|
||||
}
|
||||
}
|
||||
if (uart_send.data3.dataState) {
|
||||
if (uart_send.data3.device == g_bat485_uart3_handle) {
|
||||
uart_send.sendStateBat = 1;
|
||||
uart_send.sendDataBat = &uart_send.data3;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 当数据塞入发送结构体中
|
||||
* @param
|
||||
* @retval
|
||||
*
|
||||
*/
|
||||
void uart_interruptSend(device_handle device, uint8_t buff[], uint8_t len)
|
||||
{
|
||||
// printf("\n");
|
||||
// printf("buff");
|
||||
// for (int var = 0; var < len; ++var) {
|
||||
// printf(" %x ", buff[var]);
|
||||
// }
|
||||
// printf("\n");
|
||||
// printf("\n");
|
||||
|
||||
/* 拷贝数据到发送 */
|
||||
do {
|
||||
if (uart_send.insertState > 0 && uart_send.insertData != NULL) {
|
||||
// memcpy(uart_send.insertData->data, buff, len);
|
||||
for (int var = 0; var < len; ++var) {
|
||||
uart_send.insertData->data[var] = buff[var];
|
||||
// printf(" %x ", uart_send.insertData->data[var]);
|
||||
}
|
||||
uart_send.insertData->Counter = 0;
|
||||
uart_send.insertData->dataLen = len;
|
||||
uart_send.insertData->device = device;
|
||||
// uart_send.insertData->dataState = 1;
|
||||
// uart_send.insertState--;
|
||||
break;
|
||||
}
|
||||
} while (1);
|
||||
|
||||
/* 可插入数据大于0时,将插入指针指向空的储存位置,否则指向NULL */
|
||||
if (uart_send.insertState > 0) {
|
||||
if (!uart_send.data1.dataState) {
|
||||
uart_send.insertData = &uart_send.data1;
|
||||
}
|
||||
else if (!uart_send.data2.dataState) {
|
||||
uart_send.insertData = &uart_send.data2;
|
||||
}
|
||||
else if (!uart_send.data3.dataState) {
|
||||
uart_send.insertData = &uart_send.data3;
|
||||
}
|
||||
} else {
|
||||
uart_send.insertData = NULL;
|
||||
}
|
||||
|
||||
printf("uart_send.insertData->data");
|
||||
for (int var = 0; var < len; ++var) {
|
||||
printf(" %x ", uart_send.insertData->data[var]);
|
||||
}
|
||||
printf("\n");
|
||||
printf("uart_send.insertData->Counter : %d \n", uart_send.insertData->Counter);
|
||||
printf("uart_send.insertData->dataLen : %d \n", uart_send.insertData->dataLen);
|
||||
printf("uart_send.insertState : %d \n", uart_send.insertState);
|
||||
|
||||
uart_send.insertData->dataState = 1;
|
||||
uart_send.insertState--;
|
||||
}
|
||||
|
||||
void DMA1_Channel1_IRQHandler(void) __attribute__((interrupt("WCH-Interrupt-fast")));
|
||||
|
||||
void uartDMA_Init(device_handle device, uint8_t buff[], uint8_t len)
|
||||
{
|
||||
DMA_InitTypeDef DMA_InitStructure = {0};
|
||||
RCC_HBPeriphClockCmd(RCC_HBPeriph_DMA1, ENABLE);
|
||||
|
||||
DMA_DeInit(DMA1_Channel1);
|
||||
|
||||
DMA_ClearFlag(DMA1_FLAG_TC1);
|
||||
|
||||
if (device == g_bat485_uart3_handle) {
|
||||
DMA_InitStructure.DMA_PeripheralBaseAddr = (u32)(&USART3->DATAR);
|
||||
}
|
||||
else if (device == g_gw485_uart4_handle) {
|
||||
DMA_InitStructure.DMA_PeripheralBaseAddr = (u32)(&USART4->DATAR);
|
||||
}
|
||||
DMA_InitStructure.DMA_MemoryBaseAddr = (u32)buff;
|
||||
DMA_InitStructure.DMA_DIR = DMA_DIR_PeripheralDST;
|
||||
DMA_InitStructure.DMA_BufferSize = len;
|
||||
DMA_InitStructure.DMA_PeripheralInc = DMA_PeripheralInc_Disable;
|
||||
DMA_InitStructure.DMA_MemoryInc = DMA_MemoryInc_Enable;
|
||||
DMA_InitStructure.DMA_PeripheralDataSize = DMA_PeripheralDataSize_Byte;
|
||||
DMA_InitStructure.DMA_MemoryDataSize = DMA_MemoryDataSize_Byte;
|
||||
DMA_InitStructure.DMA_Mode = DMA_Mode_Normal;
|
||||
DMA_InitStructure.DMA_Priority = DMA_Priority_VeryHigh;
|
||||
DMA_InitStructure.DMA_M2M = DMA_M2M_Disable;
|
||||
DMA_Init(DMA1_Channel1, &DMA_InitStructure);
|
||||
|
||||
NVIC_InitTypeDef NVIC_InitStructure;
|
||||
NVIC_InitStructure.NVIC_IRQChannel = DMA1_Channel1_IRQn;
|
||||
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 1;
|
||||
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0;
|
||||
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
|
||||
NVIC_Init(&NVIC_InitStructure);
|
||||
|
||||
DMA_ITConfig(DMA1_Channel1, DMA_IT_TC, ENABLE); //使能传输完成中断
|
||||
|
||||
DMA_Cmd(DMA1_Channel1, ENABLE);
|
||||
}
|
||||
|
||||
//中断处理函数
|
||||
void DMA1_Channel1_IRQHandler(void)
|
||||
{
|
||||
if(DMA_GetITStatus(DMA1_IT_TC1) != RESET) {
|
||||
//中断处理代码
|
||||
Delay_Us(100);
|
||||
gw485_tx_disenabla();
|
||||
uart_send.sendStateGw = 0;
|
||||
uart_send.insertState++;
|
||||
// printf("\n\n bat uart_send.insertState : %d \n\n", uart_send.insertState);
|
||||
/* 插入指针指向为空时 */
|
||||
if (uart_send.insertData == NULL) {
|
||||
if (!uart_send.data1.dataState) {
|
||||
uart_send.insertData = &uart_send.data1;
|
||||
}
|
||||
if (!uart_send.data2.dataState) {
|
||||
uart_send.insertData = &uart_send.data2;
|
||||
}
|
||||
if (!uart_send.data3.dataState) {
|
||||
uart_send.insertData = &uart_send.data3;
|
||||
}
|
||||
}
|
||||
uart_send.sendOverStateGw = 1;
|
||||
DMA_ClearITPendingBit(DMA1_IT_TC1);
|
||||
}
|
||||
}
|
|
@ -9,6 +9,7 @@
|
|||
#include "uart_dev.h"
|
||||
#include "ring_queue.h"
|
||||
#include "pdebug.h"
|
||||
#include "uart_send.h"
|
||||
|
||||
void USART3_IRQHandler(void) __attribute__((interrupt("WCH-Interrupt-fast")));
|
||||
void USART4_IRQHandler(void) __attribute__((interrupt("WCH-Interrupt-fast")));
|
||||
|
@ -31,6 +32,9 @@ uint8_t USART4_Rbuffer[1] = {0x00};
|
|||
//uint8_t *USART3_Tbuffer;
|
||||
|
||||
|
||||
uart_send_info *GwSendInfo;
|
||||
uart_send_info *BatSendInfo;
|
||||
|
||||
/*
|
||||
* @brief 初始化GW485
|
||||
* @param
|
||||
|
@ -79,7 +83,7 @@ void GW_485_Init(int baud)
|
|||
NVIC_Init(&NVIC_InitStructure); //中断优先级初始化
|
||||
|
||||
USART_ITConfig(USART4, USART_IT_RXNE, ENABLE);
|
||||
// USART_ITConfig(USART4, USART_IT_IDLE, ENABLE);
|
||||
USART_ITConfig(USART4, USART_IT_IDLE, ENABLE);
|
||||
|
||||
USART_Cmd(USART4,ENABLE);
|
||||
}
|
||||
|
@ -130,7 +134,7 @@ void BAT_485_Init(int baud)
|
|||
NVIC_Init(&NVIC_InitStructure); //中断优先级初始化
|
||||
|
||||
USART_ITConfig(USART3, USART_IT_RXNE, ENABLE);
|
||||
// USART_ITConfig(USART3, USART_IT_IDLE, ENABLE);
|
||||
USART_ITConfig(USART3, USART_IT_IDLE, ENABLE);
|
||||
|
||||
USART_Cmd(USART3,ENABLE);
|
||||
}
|
||||
|
@ -269,22 +273,46 @@ void USART3_IRQHandler(void)
|
|||
{
|
||||
// printf(" in usart3 \n");
|
||||
// USART_ClearITPendingBit(USART3,USART_IT_RXNE); //清除中断标志
|
||||
|
||||
/* 有数据来时,总线不空闲 */
|
||||
uart_send.idleStateBat = 0;
|
||||
uart_send.BatState = 0;
|
||||
|
||||
USART3_Rbuffer[0] = USART_ReceiveData(USART3); //接收数据
|
||||
uint8_t c = 0;
|
||||
uart_device_info *dev = (uart_device_info *)g_bat485_uart3_handle;
|
||||
c = USART3_Rbuffer[0];
|
||||
if(!RingQueueFull(&dev->uart_ring_queue))
|
||||
InRingQueue(&dev->uart_ring_queue, c);
|
||||
InRingQueue(&dev->uart_ring_queue, USART3_Rbuffer[0]);
|
||||
}
|
||||
|
||||
// if(USART_GetFlagStatus(USART3,USART_FLAG_TC) == SET) //中断发送
|
||||
if(USART_GetITStatus(USART3, USART_IT_IDLE) != RESET) //中断产生
|
||||
{
|
||||
uart_send.idleStateGw = 1;
|
||||
USART_ReceiveData(USART3);
|
||||
}
|
||||
|
||||
// if(USART_GetITStatus(USART3, USART_FLAG_TXE) != RESET) //中断发送
|
||||
// {
|
||||
// USART_SendData(USART3, USART3_Tbuffer[USART3_Tbuffer_Num++]);
|
||||
// if (USART3_Tbuffer_Len == USART3_Tbuffer_Num) {
|
||||
// USART3_Tbuffer_Num = 0;
|
||||
// USART_ITConfig(USART3, USART_IT_TC, DISABLE);
|
||||
//// USART_ClearFlag(USART3,USART_FLAG_ORE); //清标志
|
||||
//// USART_ReceiveData(USART3); //读DR
|
||||
// USART_SendData(USART3, uart_send.sendDataBat->data[uart_send.sendDataBat->Counter++]);
|
||||
// if (uart_send.sendDataBat->dataLen == uart_send.sendDataBat->Counter) {
|
||||
// USART_ITConfig(USART3, USART_IT_TXE, DISABLE);
|
||||
// uart_send.sendOverStateBat = 1;
|
||||
// uart_send.sendStateBat = 0;
|
||||
// uart_send.insertState++;
|
||||
//// printf("\n\n bat uart_send.insertState : %d \n\n", uart_send.insertState);
|
||||
// /* 插入指针指向为空时 */
|
||||
// if (uart_send.insertData == NULL) {
|
||||
// if (!uart_send.data1.dataState) {
|
||||
// uart_send.insertData = &uart_send.data1;
|
||||
// }
|
||||
// if (!uart_send.data2.dataState) {
|
||||
// uart_send.insertData = &uart_send.data2;
|
||||
// }
|
||||
// if (!uart_send.data3.dataState) {
|
||||
// uart_send.insertData = &uart_send.data3;
|
||||
// }
|
||||
// }
|
||||
// Delay_Us(100);
|
||||
// bat485_tx_disenabla();
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
@ -298,22 +326,55 @@ void USART4_IRQHandler(void)
|
|||
{
|
||||
if(USART_GetITStatus(USART4, USART_IT_RXNE) != RESET) //中断产生
|
||||
{
|
||||
// printf(" in usart4 \n");
|
||||
// USART_ClearITPendingBit(USART4, USART_IT_RXNE); //清除中断标志
|
||||
// uint8_t c = 0;
|
||||
// c = USART4_Rbuffer[0];
|
||||
// log_info("%x ", (USART4_Rbuffer[0] & 0xff));
|
||||
|
||||
// USART_Rbuffer[USART_RbufferLen++] = USART_ReceiveData(USART4); //接收数据
|
||||
/* 有数据来时,总线不空闲 */
|
||||
uart_send.GwState = 0;
|
||||
uart_send.idleStateGw = 0;
|
||||
|
||||
USART4_Rbuffer[0] = USART_ReceiveData(USART4); //接收数据
|
||||
// printf("%x \r\n", USART4_Rbuffer[0]);
|
||||
uart_device_info *dev = (uart_device_info *)g_gw485_uart4_handle;
|
||||
//// log_info("%x ", (USART4_Rbuffer[0] & 0xff));
|
||||
if(!RingQueueFull(&dev->uart_ring_queue))
|
||||
InRingQueue(&dev->uart_ring_queue, USART4_Rbuffer[0]);
|
||||
}
|
||||
|
||||
if(USART_GetITStatus(USART4, USART_IT_IDLE) != RESET) //中断产生
|
||||
{
|
||||
uart_send.idleStateGw = 1;
|
||||
USART_ReceiveData(USART4);
|
||||
}
|
||||
|
||||
// if(USART_GetITStatus(USART4, USART_FLAG_TXE) != RESET) //中断发送
|
||||
// {
|
||||
//// USART_SendData(USART4, uart_send.sendDataGw->data[uart_send.sendDataGw->Counter++]);
|
||||
//
|
||||
//// USART_SendData(USART4, USART_Tbuffer[count++]);
|
||||
//// if (len == count) {
|
||||
//// USART_ITConfig(USART3, USART_IT_TXE, DISABLE);
|
||||
//////// }
|
||||
////// if (uart_send.sendDataGw->dataLen <= uart_send.sendDataGw->Counter) {
|
||||
////// USART_ITConfig(USART3, USART_IT_TXE, DISABLE);
|
||||
////// uart_send.sendOverStateGw = 1;
|
||||
////// uart_send.sendStateGw = 0;
|
||||
////// uart_send.insertState++;
|
||||
////// printf("\n\n Gw uart_send.insertState : %d \n\n", uart_send.insertState);
|
||||
////// /* 插入指针指向为空时 */
|
||||
////// if (uart_send.insertData == NULL) {
|
||||
////// if (!uart_send.data1.dataState) {
|
||||
////// uart_send.insertData = &uart_send.data1;
|
||||
////// }
|
||||
////// if (!uart_send.data2.dataState) {
|
||||
////// uart_send.insertData = &uart_send.data2;
|
||||
////// }
|
||||
////// if (!uart_send.data3.dataState) {
|
||||
////// uart_send.insertData = &uart_send.data3;
|
||||
////// }
|
||||
////// }
|
||||
//// Delay_Us(100);
|
||||
//// gw485_tx_disenabla();
|
||||
//// }
|
||||
// }
|
||||
|
||||
|
||||
|
||||
// if(USART_GetFlagStatus(USART4,USART_FLAG_TC) == SET) //中断发送
|
||||
// {
|
||||
// USART_SendData(USART4, USART4_Tbuffer[USART3_Tbuffer_Num++]);
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include "math.h"
|
||||
#include "parameter.h"
|
||||
#include "collect_Conversion.h"
|
||||
#include "uart_send.h"
|
||||
|
||||
void TIM3_IRQHandler(void) __attribute__((interrupt("WCH-Interrupt-fast")));
|
||||
void TIM2_IRQHandler(void) __attribute__((interrupt("WCH-Interrupt-fast")));
|
||||
|
@ -117,6 +118,7 @@ void TIM2_IRQHandler(void)
|
|||
totalChargCapacity += g_otherParameter.Charg_Current;
|
||||
totalElectricityConsumption += g_otherParameter.Discharg_Current;
|
||||
|
||||
check_sendState();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Binary file not shown.
|
@ -34,7 +34,7 @@ App/src/hy_protocol.o: ../App/src/hy_protocol.c \
|
|||
D:\psx\MPPT\git\Drivers\TimeSliceOffset/timeSliceOffset.h \
|
||||
D:\psx\MPPT\git\App\inc/uart_dev.h D:\psx\MPPT\git\Hardware\inc/tim.h \
|
||||
D:\psx\MPPT\git\App\inc/sl_protocol.h \
|
||||
D:\psx\MPPT\git\App\inc/parameter.h
|
||||
D:\psx\MPPT\git\App\inc/parameter.h D:\psx\MPPT\git\App\inc/uart_send.h
|
||||
|
||||
D:\psx\MPPT\git\App\inc/hy_protocol.h:
|
||||
|
||||
|
@ -117,3 +117,5 @@ D:\psx\MPPT\git\Hardware\inc/tim.h:
|
|||
D:\psx\MPPT\git\App\inc/sl_protocol.h:
|
||||
|
||||
D:\psx\MPPT\git\App\inc/parameter.h:
|
||||
|
||||
D:\psx\MPPT\git\App\inc/uart_send.h:
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -12,7 +12,8 @@ C_SRCS += \
|
|||
../App/src/parameter.c \
|
||||
../App/src/sl_protocol.c \
|
||||
../App/src/task.c \
|
||||
../App/src/uart_dev.c
|
||||
../App/src/uart_dev.c \
|
||||
../App/src/uart_send.c
|
||||
|
||||
OBJS += \
|
||||
./App/src/collect_Conversion.o \
|
||||
|
@ -22,7 +23,8 @@ OBJS += \
|
|||
./App/src/parameter.o \
|
||||
./App/src/sl_protocol.o \
|
||||
./App/src/task.o \
|
||||
./App/src/uart_dev.o
|
||||
./App/src/uart_dev.o \
|
||||
./App/src/uart_send.o
|
||||
|
||||
C_DEPS += \
|
||||
./App/src/collect_Conversion.d \
|
||||
|
@ -32,7 +34,8 @@ C_DEPS += \
|
|||
./App/src/parameter.d \
|
||||
./App/src/sl_protocol.d \
|
||||
./App/src/task.d \
|
||||
./App/src/uart_dev.d
|
||||
./App/src/uart_dev.d \
|
||||
./App/src/uart_send.d
|
||||
|
||||
|
||||
# Each subdirectory must supply rules for building sources it contributes
|
||||
|
|
|
@ -37,7 +37,8 @@ App/src/task.o: ../App/src/task.c D:\psx\MPPT\git\App\inc/task.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/parameter.h \
|
||||
D:\psx\MPPT\git\App\inc/hy_protocol.h
|
||||
D:\psx\MPPT\git\App\inc/hy_protocol.h \
|
||||
D:\psx\MPPT\git\App\inc/uart_send.h
|
||||
|
||||
D:\psx\MPPT\git\App\inc/task.h:
|
||||
|
||||
|
@ -130,3 +131,5 @@ D:\psx\MPPT\git\Drivers\RingQueue2/ring_queue2.h:
|
|||
D:\psx\MPPT\git\App\inc/parameter.h:
|
||||
|
||||
D:\psx\MPPT\git\App\inc/hy_protocol.h:
|
||||
|
||||
D:\psx\MPPT\git\App\inc/uart_send.h:
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,96 @@
|
|||
App/src/uart_send.o: ../App/src/uart_send.c \
|
||||
D:\psx\MPPT\git\App\inc/uart_send.h D:\psx\MPPT\git\App\inc/uart_dev.h \
|
||||
D:\psx\MPPT\git\Debug/debug.h D:\psx\MPPT\git\Peripheral\inc/ch32l103.h \
|
||||
D:\psx\MPPT\git\Core/core_riscv.h D:\psx\MPPT\git\User/system_ch32l103.h \
|
||||
D:\psx\MPPT\git\User/ch32l103_conf.h \
|
||||
D:\psx\MPPT\git\Peripheral\inc/ch32l103_adc.h \
|
||||
D:\psx\MPPT\git\Peripheral\inc/ch32l103.h \
|
||||
D:\psx\MPPT\git\Peripheral\inc/ch32l103_bkp.h \
|
||||
D:\psx\MPPT\git\Peripheral\inc/ch32l103_can.h \
|
||||
D:\psx\MPPT\git\Peripheral\inc/ch32l103_crc.h \
|
||||
D:\psx\MPPT\git\Peripheral\inc/ch32l103_dbgmcu.h \
|
||||
D:\psx\MPPT\git\Peripheral\inc/ch32l103_dma.h \
|
||||
D:\psx\MPPT\git\Peripheral\inc/ch32l103_exti.h \
|
||||
D:\psx\MPPT\git\Peripheral\inc/ch32l103_flash.h \
|
||||
D:\psx\MPPT\git\Peripheral\inc/ch32l103_gpio.h \
|
||||
D:\psx\MPPT\git\Peripheral\inc/ch32l103_i2c.h \
|
||||
D:\psx\MPPT\git\Peripheral\inc/ch32l103_iwdg.h \
|
||||
D:\psx\MPPT\git\Peripheral\inc/ch32l103_pwr.h \
|
||||
D:\psx\MPPT\git\Peripheral\inc/ch32l103_rcc.h \
|
||||
D:\psx\MPPT\git\Peripheral\inc/ch32l103_rtc.h \
|
||||
D:\psx\MPPT\git\Peripheral\inc/ch32l103_spi.h \
|
||||
D:\psx\MPPT\git\Peripheral\inc/ch32l103_tim.h \
|
||||
D:\psx\MPPT\git\Peripheral\inc/ch32l103_usart.h \
|
||||
D:\psx\MPPT\git\Peripheral\inc/ch32l103_wwdg.h \
|
||||
D:\psx\MPPT\git\User/ch32l103_it.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_opa.h \
|
||||
D:\psx\MPPT\git\Drivers\RingQueue/ring_queue.h \
|
||||
D:\psx\MPPT\git\Hardware\inc/rs485.h D:\psx\MPPT\git\App\inc/parameter.h
|
||||
|
||||
D:\psx\MPPT\git\App\inc/uart_send.h:
|
||||
|
||||
D:\psx\MPPT\git\App\inc/uart_dev.h:
|
||||
|
||||
D:\psx\MPPT\git\Debug/debug.h:
|
||||
|
||||
D:\psx\MPPT\git\Peripheral\inc/ch32l103.h:
|
||||
|
||||
D:\psx\MPPT\git\Core/core_riscv.h:
|
||||
|
||||
D:\psx\MPPT\git\User/system_ch32l103.h:
|
||||
|
||||
D:\psx\MPPT\git\User/ch32l103_conf.h:
|
||||
|
||||
D:\psx\MPPT\git\Peripheral\inc/ch32l103_adc.h:
|
||||
|
||||
D:\psx\MPPT\git\Peripheral\inc/ch32l103.h:
|
||||
|
||||
D:\psx\MPPT\git\Peripheral\inc/ch32l103_bkp.h:
|
||||
|
||||
D:\psx\MPPT\git\Peripheral\inc/ch32l103_can.h:
|
||||
|
||||
D:\psx\MPPT\git\Peripheral\inc/ch32l103_crc.h:
|
||||
|
||||
D:\psx\MPPT\git\Peripheral\inc/ch32l103_dbgmcu.h:
|
||||
|
||||
D:\psx\MPPT\git\Peripheral\inc/ch32l103_dma.h:
|
||||
|
||||
D:\psx\MPPT\git\Peripheral\inc/ch32l103_exti.h:
|
||||
|
||||
D:\psx\MPPT\git\Peripheral\inc/ch32l103_flash.h:
|
||||
|
||||
D:\psx\MPPT\git\Peripheral\inc/ch32l103_gpio.h:
|
||||
|
||||
D:\psx\MPPT\git\Peripheral\inc/ch32l103_i2c.h:
|
||||
|
||||
D:\psx\MPPT\git\Peripheral\inc/ch32l103_iwdg.h:
|
||||
|
||||
D:\psx\MPPT\git\Peripheral\inc/ch32l103_pwr.h:
|
||||
|
||||
D:\psx\MPPT\git\Peripheral\inc/ch32l103_rcc.h:
|
||||
|
||||
D:\psx\MPPT\git\Peripheral\inc/ch32l103_rtc.h:
|
||||
|
||||
D:\psx\MPPT\git\Peripheral\inc/ch32l103_spi.h:
|
||||
|
||||
D:\psx\MPPT\git\Peripheral\inc/ch32l103_tim.h:
|
||||
|
||||
D:\psx\MPPT\git\Peripheral\inc/ch32l103_usart.h:
|
||||
|
||||
D:\psx\MPPT\git\Peripheral\inc/ch32l103_wwdg.h:
|
||||
|
||||
D:\psx\MPPT\git\User/ch32l103_it.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_opa.h:
|
||||
|
||||
D:\psx\MPPT\git\Drivers\RingQueue/ring_queue.h:
|
||||
|
||||
D:\psx\MPPT\git\Hardware\inc/rs485.h:
|
||||
|
||||
D:\psx\MPPT\git\App\inc/parameter.h:
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -28,7 +28,8 @@ Hardware/src/rs485.o: ../Hardware/src/rs485.c \
|
|||
D:\psx\MPPT\git\Peripheral\inc/ch32l103_opa.h \
|
||||
D:\psx\MPPT\git\App\inc/uart_dev.h \
|
||||
D:\psx\MPPT\git\Drivers\RingQueue/ring_queue.h \
|
||||
D:\psx\MPPT\git\App\inc/pdebug.h D:\psx\MPPT\git\App\inc/uart_dev.h
|
||||
D:\psx\MPPT\git\App\inc/pdebug.h D:\psx\MPPT\git\App\inc/uart_dev.h \
|
||||
D:\psx\MPPT\git\App\inc/uart_send.h
|
||||
|
||||
D:\psx\MPPT\git\Hardware\inc/rs485.h:
|
||||
|
||||
|
@ -95,3 +96,5 @@ D:\psx\MPPT\git\Drivers\RingQueue/ring_queue.h:
|
|||
D:\psx\MPPT\git\App\inc/pdebug.h:
|
||||
|
||||
D:\psx\MPPT\git\App\inc/uart_dev.h:
|
||||
|
||||
D:\psx\MPPT\git\App\inc/uart_send.h:
|
||||
|
|
Binary file not shown.
|
@ -34,7 +34,8 @@ Hardware/src/tim.o: ../Hardware/src/tim.c \
|
|||
D:\psx\MPPT\git\App\inc/uart_dev.h D:\psx\MPPT\git\App\inc/parameter.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\Drivers\RingQueue2/ring_queue2.h \
|
||||
D:\psx\MPPT\git\App\inc/uart_send.h
|
||||
|
||||
D:\psx\MPPT\git\Hardware\inc/tim.h:
|
||||
|
||||
|
@ -117,3 +118,5 @@ 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/uart_send.h:
|
||||
|
|
Binary file not shown.
BIN
obj/User/main.o
BIN
obj/User/main.o
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
29066
obj/mppt_Nos_V0.4.lst
29066
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
Loading…
Reference in New Issue