修正主机程序,开启485功能正常输出

This commit is contained in:
hold the blade 2025-11-10 23:20:45 +08:00
parent 68617b5ba5
commit 9c52a55744
88 changed files with 5538 additions and 2546 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -34,13 +34,24 @@ typedef enum {
STATE_WORKING = 2 // 工作状态
} MasterState_t;
// 从机状态定义
typedef enum {
SLAVE_ONLINE = 0, // 从机在线
SLAVE_OFFLINE = 1, // 从机离线
SLAVE_ERROR = 2 // 从机错误
} SlaveStatus_t;
// 从机信息结构
typedef struct {
uint8_t address; // 从机地址
SlaveStatus_t status; // 从机状态
uint8_t is_ready; // 是否准备就绪
uint8_t matrix_data[5]; // 矩阵数据 (压缩后的5字节)
uint8_t data_valid; // 数据是否有效
uint32_t last_update; // 最后更新时间
uint32_t last_query_time; // 最后查询时间
uint8_t error_count; // 错误计数
uint32_t offline_time; // 离线时间
} SlaveDevice_t;
/* USER CODE END PTD */
@ -60,11 +71,13 @@ typedef struct {
#define STATUS_QUERY_INTERVAL 1000 // 状态查询间隔(ms)
#define MATRIX_QUERY_INTERVAL 200 // 矩阵查询间隔(ms)
#define RESPONSE_TIMEOUT 100 // 响应超时(ms)
#define OFFLINE_RETRY_INTERVAL 5000 // 离线从机重试间隔(ms)
#define MAX_ERROR_COUNT 3 // 最大错误次数
// 通信端口定义
#define RS485_PORT &huart1 // 与从机通信的RS485
#define RS232_PORT &huart2 // 对外输出的RS232
#define DEBUG_PORT &huart3 // 调试串口
// 通信端口定义(根据实际硬件连接)
#define RS485_SLAVE_PORT &huart1 // 串口1: 与从机通信的RS485
#define RS485_OUTPUT_PORT &huart2 // 串口2: 对外输出的RS485
#define RS232_OUTPUT_PORT &huart3 // 串口3: 对外输出的RS232
/* USER CODE END PD */
/* Private macro -------------------------------------------------------------*/
@ -77,19 +90,20 @@ typedef struct {
/* USER CODE BEGIN PV */
// 从机设备数组
SlaveDevice_t slaves[SLAVE_COUNT] = {
{0x01, 0, {0}, 0, 0}, // 从机1
{0x02, 0, {0}, 0, 0}, // 从机2
{0x03, 0, {0}, 0, 0} // 从机3
{0x01, SLAVE_ONLINE, 0, {0}, 0, 0, 0, 0, 0}, // 从机1
{0x02, SLAVE_ONLINE, 0, {0}, 0, 0, 0, 0, 0}, // 从机2
{0x03, SLAVE_ONLINE, 0, {0}, 0, 0, 0, 0, 0} // 从机3
};
// 全局矩阵状态 (90个点)
uint8_t global_matrix[TOTAL_MATRIX_POINTS] = {0};
// 通信缓冲区
uint8_t rs485_rx_buffer[16];
uint8_t rs485_tx_buffer[16];
uint8_t rs232_tx_buffer[64];
uint8_t debug_buffer[128];
uint8_t rs485_slave_rx_buffer[16]; // 与从机通信的接收缓冲区
uint8_t rs485_slave_tx_buffer[16]; // 与从机通信的发送缓冲区
uint8_t rs485_output_buffer[64]; // RS485输出缓冲区
uint8_t rs232_output_buffer[64]; // RS232输出缓冲区
uint8_t debug_buffer[128]; // 调试信息缓冲区
// 状态和计时变量
MasterState_t master_state = STATE_INIT;
@ -100,6 +114,7 @@ uint32_t last_matrix_query_time = 0;
uint32_t last_response_time = 0;
uint8_t waiting_response = 0;
uint8_t response_timeout = 0;
uint8_t current_query_address = 0; // 当前查询的从机地址
/* USER CODE END PV */
/* Private function prototypes -----------------------------------------------*/
@ -116,15 +131,22 @@ uint8_t Process_Slave_Response(uint8_t *data, uint8_t length);
void Update_Global_Matrix(void);
void Parse_Slave_Matrix_Data(uint8_t slave_index, uint8_t *matrix_data);
uint8_t Get_Matrix_Point_Index(uint8_t slave_index, uint8_t row, uint8_t col);
void Mark_Slave_Offline(uint8_t slave_index);
void Mark_Slave_Online(uint8_t slave_index);
void Handle_Slave_Error(uint8_t slave_index, const char *error_msg);
// 通信函数
void Send_RS232_Modbus_Frame(void);
void Send_RS485_Modbus_Frame(void);
void Send_RS232_Output_Frame(void);
void Send_RS485_Output_Frame(void);
void Send_Debug_Message(char *message);
// 状态机函数
void Master_State_Machine(void);
void Master_Initialization(void);
void Check_Response_Timeout(void);
void Check_Offline_Slaves(void);
uint8_t Get_Next_Online_Slave(void);
uint8_t Get_Online_Slave_Count(void);
/* USER CODE END PFP */
/* Private user code ---------------------------------------------------------*/
@ -174,9 +196,8 @@ int main(void)
// 启动定时器
HAL_TIM_Base_Start_IT(&htim2);
// 启动串口接收
HAL_UART_Receive_DMA(RS485_PORT, rs485_rx_buffer, sizeof(rs485_rx_buffer));
// 启动串口接收只接收与从机通信的RS485
HAL_UART_Receive_DMA(RS485_SLAVE_PORT, rs485_slave_rx_buffer, sizeof(rs485_slave_rx_buffer));
// 发送启动信息
Send_Debug_Message("Master Controller Started\r\n");
@ -190,6 +211,50 @@ int main(void)
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
// 执行主状态机
Master_State_Machine();
// 检查响应超时
Check_Response_Timeout();
// 检查离线从机重试
Check_Offline_Slaves();
// 处理接收完成的数据
if(rs485_rx_complete)
{
// 处理从机响应
if(Process_Slave_Response(rs485_slave_rx_buffer, sizeof(rs485_slave_rx_buffer)))
{
// 响应处理成功
waiting_response = 0;
response_timeout = 0;
}
else
{
// 响应处理失败
char error_msg[64];
snprintf(error_msg, sizeof(error_msg),
"Invalid response from slave %02X\r\n", current_query_address);
Send_Debug_Message(error_msg);
// 查找对应的从机索引
for(uint8_t i = 0; i < SLAVE_COUNT; i++)
{
if(slaves[i].address == current_query_address)
{
Handle_Slave_Error(i, "Invalid response format");
break;
}
}
}
// 重新启动接收
rs485_rx_complete = 0;
HAL_UART_Receive_DMA(RS485_SLAVE_PORT, rs485_slave_rx_buffer, sizeof(rs485_slave_rx_buffer));
}
HAL_Delay(10); // 防止过度占用CPU
}
/* USER CODE END 3 */
}
@ -283,23 +348,24 @@ void Send_Status_Query(uint8_t slave_address)
uint8_t frame_index = 0;
// 设备地址
rs485_tx_buffer[frame_index++] = slave_address;
rs485_slave_tx_buffer[frame_index++] = slave_address;
// 功能码
rs485_tx_buffer[frame_index++] = CMD_READ_STATUS;
rs485_slave_tx_buffer[frame_index++] = CMD_READ_STATUS;
// 计算CRC16
uint16_t crc = Calculate_CRC16(rs485_tx_buffer, frame_index);
rs485_tx_buffer[frame_index++] = crc & 0xFF;
rs485_tx_buffer[frame_index++] = (crc >> 8) & 0xFF;
uint16_t crc = Calculate_CRC16(rs485_slave_tx_buffer, frame_index);
rs485_slave_tx_buffer[frame_index++] = crc & 0xFF;
rs485_slave_tx_buffer[frame_index++] = (crc >> 8) & 0xFF;
// 发送查询命令
HAL_UART_Transmit(RS485_PORT, rs485_tx_buffer, STATUS_FRAME_SIZE, HAL_MAX_DELAY);
// 发送查询命令到从机
HAL_UART_Transmit(RS485_SLAVE_PORT, rs485_slave_tx_buffer, STATUS_FRAME_SIZE, HAL_MAX_DELAY);
// 更新状态
waiting_response = 1;
last_response_time = HAL_GetTick();
current_query_address = slave_address;
char query_msg[64];
snprintf(query_msg, sizeof(query_msg),
@ -315,23 +381,24 @@ void Send_Matrix_Query(uint8_t slave_address)
uint8_t frame_index = 0;
// 设备地址
rs485_tx_buffer[frame_index++] = slave_address;
rs485_slave_tx_buffer[frame_index++] = slave_address;
// 功能码
rs485_tx_buffer[frame_index++] = CMD_READ_MATRIX;
rs485_slave_tx_buffer[frame_index++] = CMD_READ_MATRIX;
// 计算CRC16
uint16_t crc = Calculate_CRC16(rs485_tx_buffer, frame_index);
rs485_tx_buffer[frame_index++] = crc & 0xFF;
rs485_tx_buffer[frame_index++] = (crc >> 8) & 0xFF;
uint16_t crc = Calculate_CRC16(rs485_slave_tx_buffer, frame_index);
rs485_slave_tx_buffer[frame_index++] = crc & 0xFF;
rs485_slave_tx_buffer[frame_index++] = (crc >> 8) & 0xFF;
// 发送查询命令
HAL_UART_Transmit(RS485_PORT, rs485_tx_buffer, MATRIX_FRAME_SIZE, HAL_MAX_DELAY);
// 发送查询命令到从机
HAL_UART_Transmit(RS485_SLAVE_PORT, rs485_slave_tx_buffer, MATRIX_FRAME_SIZE, HAL_MAX_DELAY);
// 更新状态
waiting_response = 1;
last_response_time = HAL_GetTick();
current_query_address = slave_address;
char query_msg[64];
snprintf(query_msg, sizeof(query_msg),
@ -363,7 +430,11 @@ uint8_t Process_Slave_Response(uint8_t *data, uint8_t length)
}
}
if(!frame_found) return 0;
if(!frame_found)
{
Send_Debug_Message("No valid frame found in response\r\n");
return 0;
}
// 计算帧长度
uint8_t frame_length = 0;
@ -376,7 +447,11 @@ uint8_t Process_Slave_Response(uint8_t *data, uint8_t length)
frame_length = MATRIX_RESPONSE_SIZE;
}
if(frame_start + frame_length > length) return 0;
if(frame_start + frame_length > length)
{
Send_Debug_Message("Incomplete frame in response\r\n");
return 0;
}
// 验证CRC
if(!Verify_CRC16(&data[frame_start], frame_length))
@ -396,12 +471,19 @@ uint8_t Process_Slave_Response(uint8_t *data, uint8_t length)
return 0;
}
// 标记从机在线
if(slaves[slave_index].status == SLAVE_OFFLINE)
{
Mark_Slave_Online(slave_index);
}
if(function_code == CMD_READ_STATUS)
{
// 状态响应
uint8_t status = data[frame_start+2];
slaves[slave_index].is_ready = (status == 0x01);
slaves[slave_index].last_update = HAL_GetTick();
slaves[slave_index].error_count = 0; // 重置错误计数
char status_msg[64];
snprintf(status_msg, sizeof(status_msg),
@ -417,7 +499,7 @@ uint8_t Process_Slave_Response(uint8_t *data, uint8_t length)
uint8_t data_length = data[frame_start+2];
if(data_length != MATRIX_ROWS)
{
Send_Debug_Message("Invalid data length in matrix response\r\n");
Handle_Slave_Error(slave_index, "Invalid data length in matrix response");
return 0;
}
@ -425,6 +507,7 @@ uint8_t Process_Slave_Response(uint8_t *data, uint8_t length)
memcpy(slaves[slave_index].matrix_data, &data[frame_start+3], MATRIX_ROWS);
slaves[slave_index].data_valid = 1;
slaves[slave_index].last_update = HAL_GetTick();
slaves[slave_index].error_count = 0; // 重置错误计数
// 更新全局矩阵
Parse_Slave_Matrix_Data(slave_index, slaves[slave_index].matrix_data);
@ -440,6 +523,82 @@ uint8_t Process_Slave_Response(uint8_t *data, uint8_t length)
return 0;
}
/**
* @brief 线
*/
void Mark_Slave_Offline(uint8_t slave_index)
{
if(slave_index >= SLAVE_COUNT) return;
if(slaves[slave_index].status != SLAVE_OFFLINE)
{
slaves[slave_index].status = SLAVE_OFFLINE;
slaves[slave_index].is_ready = 0;
slaves[slave_index].data_valid = 0;
slaves[slave_index].offline_time = HAL_GetTick();
char offline_msg[64];
snprintf(offline_msg, sizeof(offline_msg),
"Slave %02X marked OFFLINE\r\n", slaves[slave_index].address);
Send_Debug_Message(offline_msg);
// 清除该从机对应的矩阵数据
uint8_t start_index = slave_index * (MATRIX_ROWS * MATRIX_COLS);
uint8_t end_index = start_index + (MATRIX_ROWS * MATRIX_COLS);
for(uint8_t i = start_index; i < end_index && i < TOTAL_MATRIX_POINTS; i++)
{
global_matrix[i] = 0;
}
// 发送更新后的数据
Send_RS232_Output_Frame();
Send_RS485_Output_Frame();
}
}
/**
* @brief 线
*/
void Mark_Slave_Online(uint8_t slave_index)
{
if(slave_index >= SLAVE_COUNT) return;
if(slaves[slave_index].status == SLAVE_OFFLINE)
{
slaves[slave_index].status = SLAVE_ONLINE;
slaves[slave_index].error_count = 0;
char online_msg[64];
snprintf(online_msg, sizeof(online_msg),
"Slave %02X is now ONLINE\r\n", slaves[slave_index].address);
Send_Debug_Message(online_msg);
}
}
/**
* @brief
*/
void Handle_Slave_Error(uint8_t slave_index, const char *error_msg)
{
if(slave_index >= SLAVE_COUNT) return;
slaves[slave_index].error_count++;
char error_log[128];
snprintf(error_log, sizeof(error_log),
"Slave %02X error (%d/%d): %s\r\n",
slaves[slave_index].address,
slaves[slave_index].error_count,
MAX_ERROR_COUNT, error_msg);
Send_Debug_Message(error_log);
// 如果错误次数超过阈值,标记为离线
if(slaves[slave_index].error_count >= MAX_ERROR_COUNT)
{
Mark_Slave_Offline(slave_index);
}
}
/**
* @brief
*/
@ -464,8 +623,8 @@ void Parse_Slave_Matrix_Data(uint8_t slave_index, uint8_t *matrix_data)
}
// 发送更新后的数据
Send_RS232_Modbus_Frame();
Send_RS485_Modbus_Frame();
Send_RS232_Output_Frame();
Send_RS485_Output_Frame();
}
/**
@ -486,107 +645,167 @@ uint8_t Get_Matrix_Point_Index(uint8_t slave_index, uint8_t row, uint8_t col)
}
/**
* @brief
* @brief RS232输出帧
*/
void Update_Global_Matrix(void)
{
// 检查所有从机数据是否有效
uint8_t all_data_valid = 1;
for(uint8_t i = 0; i < SLAVE_COUNT; i++)
{
if(!slaves[i].data_valid || !slaves[i].is_ready)
{
all_data_valid = 0;
break;
}
}
if(all_data_valid)
{
Send_RS232_Modbus_Frame();
Send_RS485_Modbus_Frame();
}
}
/**
* @brief RS232 Modbus帧
*/
void Send_RS232_Modbus_Frame(void)
void Send_RS232_Output_Frame(void)
{
// 构建Modbus帧 - 功能码0x10 (写多个寄存器)
uint8_t frame_index = 0;
// 设备地址 (主机作为从机时的地址)
rs232_tx_buffer[frame_index++] = 0x10; // 主机地址
rs232_output_buffer[frame_index++] = 0x10; // 主机地址
// 功能码 - 写多个寄存器
rs232_tx_buffer[frame_index++] = 0x10;
rs232_output_buffer[frame_index++] = 0x10;
// 起始地址 (0x0000)
rs232_tx_buffer[frame_index++] = 0x00;
rs232_tx_buffer[frame_index++] = 0x00;
rs232_output_buffer[frame_index++] = 0x00;
rs232_output_buffer[frame_index++] = 0x00;
// 寄存器数量 (90个点)
rs232_tx_buffer[frame_index++] = 0x00;
rs232_tx_buffer[frame_index++] = TOTAL_MATRIX_POINTS;
rs232_output_buffer[frame_index++] = 0x00;
rs232_output_buffer[frame_index++] = TOTAL_MATRIX_POINTS;
// 字节数 (90 * 2 = 180)
rs232_tx_buffer[frame_index++] = TOTAL_MATRIX_POINTS * 2;
rs232_output_buffer[frame_index++] = TOTAL_MATRIX_POINTS * 2;
// 数据 (每个点用2字节表示)
for(uint8_t i = 0; i < TOTAL_MATRIX_POINTS; i++)
{
rs232_tx_buffer[frame_index++] = 0x00; // 高字节
rs232_tx_buffer[frame_index++] = global_matrix[i]; // 低字节 (0或1)
rs232_output_buffer[frame_index++] = 0x00; // 高字节
rs232_output_buffer[frame_index++] = global_matrix[i]; // 低字节 (0或1)
}
// 计算CRC16
uint16_t crc = Calculate_CRC16(rs232_tx_buffer, frame_index);
rs232_tx_buffer[frame_index++] = crc & 0xFF;
rs232_tx_buffer[frame_index++] = (crc >> 8) & 0xFF;
uint16_t crc = Calculate_CRC16(rs232_output_buffer, frame_index);
rs232_output_buffer[frame_index++] = crc & 0xFF;
rs232_output_buffer[frame_index++] = (crc >> 8) & 0xFF;
// 发送RS232
HAL_UART_Transmit(RS232_PORT, rs232_tx_buffer, frame_index, HAL_MAX_DELAY);
// 通过RS232发送输出
HAL_UART_Transmit(RS232_OUTPUT_PORT, rs232_output_buffer, frame_index, HAL_MAX_DELAY);
}
/**
* @brief RS485 Modbus
* @brief RS485输出
*/
void Send_RS485_Modbus_Frame(void)
void Send_RS485_Output_Frame(void)
{
// 构建与RS232相同的Modbus帧
uint8_t frame_index = 0;
rs485_tx_buffer[frame_index++] = 0x10; // 主机地址
rs485_tx_buffer[frame_index++] = 0x10; // 功能码
rs485_tx_buffer[frame_index++] = 0x00; // 起始地址高
rs485_tx_buffer[frame_index++] = 0x00; // 起始地址低
rs485_tx_buffer[frame_index++] = 0x00; // 寄存器数量高
rs485_tx_buffer[frame_index++] = TOTAL_MATRIX_POINTS; // 寄存器数量低
rs485_tx_buffer[frame_index++] = TOTAL_MATRIX_POINTS * 2; // 字节数
rs485_output_buffer[frame_index++] = 0x10; // 主机地址
rs485_output_buffer[frame_index++] = 0x10; // 功能码
rs485_output_buffer[frame_index++] = 0x00; // 起始地址高
rs485_output_buffer[frame_index++] = 0x00; // 起始地址低
rs485_output_buffer[frame_index++] = 0x00; // 寄存器数量高
rs485_output_buffer[frame_index++] = TOTAL_MATRIX_POINTS; // 寄存器数量低
rs485_output_buffer[frame_index++] = TOTAL_MATRIX_POINTS * 2; // 字节数
for(uint8_t i = 0; i < TOTAL_MATRIX_POINTS; i++)
{
rs485_tx_buffer[frame_index++] = 0x00;
rs485_tx_buffer[frame_index++] = global_matrix[i];
rs485_output_buffer[frame_index++] = 0x00;
rs485_output_buffer[frame_index++] = global_matrix[i];
}
uint16_t crc = Calculate_CRC16(rs485_tx_buffer, frame_index);
rs485_tx_buffer[frame_index++] = crc & 0xFF;
rs485_tx_buffer[frame_index++] = (crc >> 8) & 0xFF;
// 发送RS485帧
HAL_UART_Transmit(RS485_PORT, rs485_tx_buffer, frame_index, HAL_MAX_DELAY);
uint16_t crc = Calculate_CRC16(rs485_output_buffer, frame_index);
rs485_output_buffer[frame_index++] = crc & 0xFF;
rs485_output_buffer[frame_index++] = (crc >> 8) & 0xFF;
// 通过RS485发送输出帧
HAL_UART_Transmit(RS485_OUTPUT_PORT, rs485_output_buffer, frame_index, HAL_MAX_DELAY);
}
/**
* @brief
* @brief RS232输出
*/
void Send_Debug_Message(char *message)
{
HAL_UART_Transmit(DEBUG_PORT, (uint8_t*)message, strlen(message), HAL_MAX_DELAY);
// 调试信息通过RS232输出端口发送
HAL_UART_Transmit(RS232_OUTPUT_PORT, (uint8_t*)message, strlen(message), HAL_MAX_DELAY);
}
/**
* @brief
*/
void Check_Response_Timeout(void)
{
if(waiting_response && (HAL_GetTick() - last_response_time > RESPONSE_TIMEOUT))
{
response_timeout = 1;
waiting_response = 0;
// 查找对应的从机索引
for(uint8_t i = 0; i < SLAVE_COUNT; i++)
{
if(slaves[i].address == current_query_address)
{
Handle_Slave_Error(i, "Response timeout");
break;
}
}
Send_Debug_Message("Response timeout occurred\r\n");
}
}
/**
* @brief 线
*/
void Check_Offline_Slaves(void)
{
uint32_t current_time = HAL_GetTick();
for(uint8_t i = 0; i < SLAVE_COUNT; i++)
{
if(slaves[i].status == SLAVE_OFFLINE &&
(current_time - slaves[i].offline_time > OFFLINE_RETRY_INTERVAL))
{
// 尝试重新查询离线从机
Send_Status_Query(slaves[i].address);
slaves[i].offline_time = current_time; // 更新重试时间
char retry_msg[64];
snprintf(retry_msg, sizeof(retry_msg),
"Retrying offline slave %02X...\r\n", slaves[i].address);
Send_Debug_Message(retry_msg);
break; // 一次只重试一个从机
}
}
}
/**
* @brief 线
*/
uint8_t Get_Next_Online_Slave(void)
{
static uint8_t last_online_slave = 0;
uint8_t start_index = last_online_slave;
do {
last_online_slave = (last_online_slave + 1) % SLAVE_COUNT;
if(slaves[last_online_slave].status == SLAVE_ONLINE)
{
return last_online_slave;
}
} while(last_online_slave != start_index);
return 0xFF; // 没有在线从机
}
/**
* @brief 线
*/
uint8_t Get_Online_Slave_Count(void)
{
uint8_t count = 0;
for(uint8_t i = 0; i < SLAVE_COUNT; i++)
{
if(slaves[i].status == SLAVE_ONLINE)
{
count++;
}
}
return count;
}
/**
@ -600,9 +819,13 @@ void Master_Initialization(void)
for(uint8_t i = 0; i < SLAVE_COUNT; i++)
{
slaves[i].address = 0x01 + i;
slaves[i].status = SLAVE_ONLINE;
slaves[i].is_ready = 0;
slaves[i].data_valid = 0;
slaves[i].last_update = 0;
slaves[i].last_query_time = 0;
slaves[i].error_count = 0;
slaves[i].offline_time = 0;
memset(slaves[i].matrix_data, 0, sizeof(slaves[i].matrix_data));
}
@ -613,6 +836,7 @@ void Master_Initialization(void)
waiting_response = 0;
response_timeout = 0;
current_query_slave = 0;
current_query_address = 0;
last_status_query_time = HAL_GetTick();
last_matrix_query_time = HAL_GetTick();
@ -630,45 +854,58 @@ void Master_State_Machine(void)
switch(master_state)
{
case STATE_QUERY_STATUS:
// 状态查询阶段
// 状态查询阶段 - 只查询在线从机
if(!waiting_response && (current_time - last_status_query_time >= STATUS_QUERY_INTERVAL))
{
Send_Status_Query(slaves[current_query_slave].address);
uint8_t next_slave = Get_Next_Online_Slave();
if(next_slave != 0xFF)
{
Send_Status_Query(slaves[next_slave].address);
last_status_query_time = current_time;
// 切换到下一个从机
current_query_slave = (current_query_slave + 1) % SLAVE_COUNT;
}
else
{
// 所有从机都离线
Send_Debug_Message("All slaves are offline!\r\n");
}
}
// 检查是否所有从机都就绪
// 检查是否至少有一个从机就绪
{
uint8_t all_ready = 1;
uint8_t any_ready = 0;
for(uint8_t i = 0; i < SLAVE_COUNT; i++)
{
if(!slaves[i].is_ready)
if(slaves[i].is_ready && slaves[i].status == SLAVE_ONLINE)
{
all_ready = 0;
any_ready = 1;
break;
}
}
if(all_ready)
if(any_ready && Get_Online_Slave_Count() > 0)
{
master_state = STATE_WORKING;
Send_Debug_Message("All slaves ready, starting matrix polling\r\n");
Send_Debug_Message("Some slaves ready, starting matrix polling\r\n");
}
}
break;
case STATE_WORKING:
// 工作阶段 - 定期查询矩阵数据
// 工作阶段 - 定期查询在线从机的矩阵数据
if(!waiting_response && (current_time - last_matrix_query_time >= MATRIX_QUERY_INTERVAL))
{
Send_Matrix_Query(slaves[current_query_slave].address);
uint8_t next_slave = Get_Next_Online_Slave();
if(next_slave != 0xFF && slaves[next_slave].is_ready)
{
Send_Matrix_Query(slaves[next_slave].address);
last_matrix_query_time = current_time;
// 切换到下一个从机
current_query_slave = (current_query_slave + 1) % SLAVE_COUNT;
}
else if(Get_Online_Slave_Count() == 0)
{
// 所有从机都离线,回到状态查询
master_state = STATE_QUERY_STATUS;
Send_Debug_Message("All slaves offline, returning to status query mode\r\n");
}
}
break;
@ -693,7 +930,7 @@ void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim)
*/
void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart)
{
if(huart == RS485_PORT)
if(huart == RS485_SLAVE_PORT)
{
rs485_rx_complete = 1;
}

File diff suppressed because one or more lines are too long

View File

@ -3,65 +3,68 @@
<pre>
<h1>µVision Build Log</h1>
<h2>Tool Versions:</h2>
IDE-Version: ¦ÌVision V5.41.0.0
Copyright (C) 2024 ARM Ltd and ARM Germany GmbH. All rights reserved.
License Information: 123 1543588107@qq.com, 123, LIC=65ISZ-J0KE9-011P1-CAV5H-FN80T-C8A3E
IDE-Version: ¦ÌVision V5.43.1.0
Copyright (C) 2025 ARM Ltd and ARM Germany GmbH. All rights reserved.
License Information: 23 23, 2323, LIC=X96CK-Z03Q7-63IMB-2TXM6-GA9NR-VVDXS
Tool Versions:
Toolchain: MDK-ARM Plus Version: 5.41.0.0
Toolchain Path: C:\app\Keil_v5\ARM\ARMCC\Bin
Toolchain: MDK-ARM Plus Version: 5.43.0.0
Toolchain Path: C:\keil\ARM\ARMCC\Bin
C Compiler: Armcc.exe V5.06 update 7 (build 960)
Assembler: Armasm.exe V5.06 update 7 (build 960)
Linker/Locator: ArmLink.exe V5.06 update 7 (build 960)
Library Manager: ArmAr.exe V5.06 update 7 (build 960)
Hex Converter: FromElf.exe V5.06 update 7 (build 960)
CPU DLL: SARMCM3.DLL V5.41.0.0
CPU DLL: SARMCM3.DLL V5.43.0.0
Dialog DLL: DCM.DLL V1.17.5.0
Target DLL: STLink\ST-LINKIII-KEIL_SWO.dll V3.3.0.0
Dialog DLL: TCM.DLL V1.56.4.0
Target DLL: STLink\ST-LINKIII-KEIL_SWO.dll V3.3.1.0
Dialog DLL: TCM.DLL V1.56.6.0
<h2>Project:</h2>
C:\Users\15435\Desktop\PressureSensorBoard\Software\master\PressureSensorBoardMaster\MDK-ARM\PressureSensorBoardMaster.uvprojx
Project File Date: 11/06/2025
C:\Users\kkkjt\Desktop\PressureSensorBoard\Software\master\PressureSensorBoardMaster\MDK-ARM\PressureSensorBoardMaster.uvprojx
Project File Date: 11/10/2025
<h2>Output:</h2>
*** Using Compiler 'V5.06 update 7 (build 960)', folder: 'C:\app\Keil_v5\ARM\ARMCC\Bin'
*** Using Compiler 'V5.06 update 7 (build 960)', folder: 'C:\keil\ARM\ARMCC\Bin'
Rebuild target 'PressureSensorBoardMaster'
assembling startup_stm32f103xb.s...
compiling tim.c...
compiling dma.c...
compiling usart.c...
compiling main.c...
../Core/Src/main.c(969): warning: #1-D: last line of file ends without a newline
#endif /* USE_FULL_ASSERT */
../Core/Src/main.c: 1 warning, 0 errors
compiling gpio.c...
compiling stm32f1xx_hal_msp.c...
compiling stm32f1xx_hal_rcc_ex.c...
compiling stm32f1xx_it.c...
compiling stm32f1xx_hal_gpio_ex.c...
compiling gpio.c...
compiling dma.c...
compiling tim.c...
compiling stm32f1xx_hal_gpio.c...
compiling usart.c...
compiling stm32f1xx_hal.c...
compiling stm32f1xx_hal_cortex.c...
compiling main.c...
compiling stm32f1xx_hal_dma.c...
compiling stm32f1xx_hal_tim_ex.c...
compiling stm32f1xx_hal_rcc.c...
compiling stm32f1xx_hal_tim.c...
compiling stm32f1xx_hal_rcc_ex.c...
compiling stm32f1xx_hal.c...
compiling stm32f1xx_hal_gpio.c...
compiling stm32f1xx_hal_dma.c...
compiling stm32f1xx_hal_rcc.c...
compiling stm32f1xx_hal_exti.c...
compiling stm32f1xx_hal_cortex.c...
compiling stm32f1xx_hal_flash_ex.c...
compiling stm32f1xx_hal_pwr.c...
compiling stm32f1xx_hal_flash.c...
compiling stm32f1xx_hal_flash_ex.c...
compiling stm32f1xx_hal_exti.c...
compiling system_stm32f1xx.c...
compiling stm32f1xx_hal_uart.c...
linking...
Program Size: Code=7572 RO-data=312 RW-data=72 ZI-data=2248
Program Size: Code=11080 RO-data=368 RW-data=120 ZI-data=2312
FromELF: creating hex file...
"PressureSensorBoardMaster\PressureSensorBoardMaster.axf" - 0 Error(s), 0 Warning(s).
"PressureSensorBoardMaster\PressureSensorBoardMaster.axf" - 0 Error(s), 1 Warning(s).
<h2>Software Packages used:</h2>
Package Vendor: ARM
https://www.keil.com/pack/ARM.CMSIS.6.1.0.pack
ARM::CMSIS@6.1.0
https://www.keil.com/pack/ARM.CMSIS.6.2.0.pack
ARM::CMSIS@6.2.0
CMSIS (Common Microcontroller Software Interface Standard)
* Component: CORE Version: 6.1.0
* Component: CORE Version: 6.1.1
Package Vendor: Keil
https://www.keil.com/pack/Keil.STM32F1xx_DFP.2.4.1.pack
@ -70,14 +73,14 @@ Package Vendor: Keil
<h2>Collection of Component include folders:</h2>
./RTE/_PressureSensorBoardMaster
C:/app/Keil_v5/ARM/Packs/ARM/CMSIS/6.1.0/CMSIS/Core/Include
C:/app/Keil_v5/ARM/Packs/Keil/STM32F1xx_DFP/2.4.1/Device/Include
C:/keil/ARM/CMSIS/6.2.0/CMSIS/Core/Include
C:/keil/Keil/STM32F1xx_DFP/2.4.1/Device/Include
<h2>Collection of Component Files used:</h2>
* Component: ARM::CMSIS:CORE@6.1.0
* Component: ARM::CMSIS:CORE@6.1.1
Include file: CMSIS/Core/Include/tz_context.h
Build Time Elapsed: 00:00:03
Build Time Elapsed: 00:00:16
</pre>
</body>
</html>

View File

@ -8,14 +8,14 @@ pressuresensorboardmaster\dma.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_h
pressuresensorboardmaster\dma.o: ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h
pressuresensorboardmaster\dma.o: ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h
pressuresensorboardmaster\dma.o: ../Drivers/CMSIS/Include/core_cm3.h
pressuresensorboardmaster\dma.o: C:\app\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h
pressuresensorboardmaster\dma.o: C:\keil\ARM\ARMCC\Bin\..\include\stdint.h
pressuresensorboardmaster\dma.o: ../Drivers/CMSIS/Include/cmsis_version.h
pressuresensorboardmaster\dma.o: ../Drivers/CMSIS/Include/cmsis_compiler.h
pressuresensorboardmaster\dma.o: ../Drivers/CMSIS/Include/cmsis_armcc.h
pressuresensorboardmaster\dma.o: ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h
pressuresensorboardmaster\dma.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h
pressuresensorboardmaster\dma.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h
pressuresensorboardmaster\dma.o: C:\app\Keil_v5\ARM\ARMCC\Bin\..\include\stddef.h
pressuresensorboardmaster\dma.o: C:\keil\ARM\ARMCC\Bin\..\include\stddef.h
pressuresensorboardmaster\dma.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h
pressuresensorboardmaster\dma.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h
pressuresensorboardmaster\dma.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h

View File

@ -8,14 +8,14 @@ pressuresensorboardmaster\gpio.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_
pressuresensorboardmaster\gpio.o: ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h
pressuresensorboardmaster\gpio.o: ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h
pressuresensorboardmaster\gpio.o: ../Drivers/CMSIS/Include/core_cm3.h
pressuresensorboardmaster\gpio.o: C:\app\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h
pressuresensorboardmaster\gpio.o: C:\keil\ARM\ARMCC\Bin\..\include\stdint.h
pressuresensorboardmaster\gpio.o: ../Drivers/CMSIS/Include/cmsis_version.h
pressuresensorboardmaster\gpio.o: ../Drivers/CMSIS/Include/cmsis_compiler.h
pressuresensorboardmaster\gpio.o: ../Drivers/CMSIS/Include/cmsis_armcc.h
pressuresensorboardmaster\gpio.o: ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h
pressuresensorboardmaster\gpio.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h
pressuresensorboardmaster\gpio.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h
pressuresensorboardmaster\gpio.o: C:\app\Keil_v5\ARM\ARMCC\Bin\..\include\stddef.h
pressuresensorboardmaster\gpio.o: C:\keil\ARM\ARMCC\Bin\..\include\stddef.h
pressuresensorboardmaster\gpio.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h
pressuresensorboardmaster\gpio.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h
pressuresensorboardmaster\gpio.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h

View File

@ -7,14 +7,14 @@ pressuresensorboardmaster\main.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_
pressuresensorboardmaster\main.o: ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h
pressuresensorboardmaster\main.o: ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h
pressuresensorboardmaster\main.o: ../Drivers/CMSIS/Include/core_cm3.h
pressuresensorboardmaster\main.o: C:\app\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h
pressuresensorboardmaster\main.o: C:\keil\ARM\ARMCC\Bin\..\include\stdint.h
pressuresensorboardmaster\main.o: ../Drivers/CMSIS/Include/cmsis_version.h
pressuresensorboardmaster\main.o: ../Drivers/CMSIS/Include/cmsis_compiler.h
pressuresensorboardmaster\main.o: ../Drivers/CMSIS/Include/cmsis_armcc.h
pressuresensorboardmaster\main.o: ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h
pressuresensorboardmaster\main.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h
pressuresensorboardmaster\main.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h
pressuresensorboardmaster\main.o: C:\app\Keil_v5\ARM\ARMCC\Bin\..\include\stddef.h
pressuresensorboardmaster\main.o: C:\keil\ARM\ARMCC\Bin\..\include\stddef.h
pressuresensorboardmaster\main.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h
pressuresensorboardmaster\main.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h
pressuresensorboardmaster\main.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h
@ -32,6 +32,6 @@ pressuresensorboardmaster\main.o: ../Core/Inc/dma.h
pressuresensorboardmaster\main.o: ../Core/Inc/tim.h
pressuresensorboardmaster\main.o: ../Core/Inc/usart.h
pressuresensorboardmaster\main.o: ../Core/Inc/gpio.h
pressuresensorboardmaster\main.o: C:\app\Keil_v5\ARM\ARMCC\Bin\..\include\stdio.h
pressuresensorboardmaster\main.o: C:\app\Keil_v5\ARM\ARMCC\Bin\..\include\string.h
pressuresensorboardmaster\main.o: C:\app\Keil_v5\ARM\ARMCC\Bin\..\include\stdlib.h
pressuresensorboardmaster\main.o: C:\keil\ARM\ARMCC\Bin\..\include\stdio.h
pressuresensorboardmaster\main.o: C:\keil\ARM\ARMCC\Bin\..\include\string.h
pressuresensorboardmaster\main.o: C:\keil\ARM\ARMCC\Bin\..\include\stdlib.h

View File

@ -6,14 +6,14 @@ pressuresensorboardmaster\stm32f1xx_hal.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/s
pressuresensorboardmaster\stm32f1xx_hal.o: ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h
pressuresensorboardmaster\stm32f1xx_hal.o: ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h
pressuresensorboardmaster\stm32f1xx_hal.o: ../Drivers/CMSIS/Include/core_cm3.h
pressuresensorboardmaster\stm32f1xx_hal.o: C:\app\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h
pressuresensorboardmaster\stm32f1xx_hal.o: C:\keil\ARM\ARMCC\Bin\..\include\stdint.h
pressuresensorboardmaster\stm32f1xx_hal.o: ../Drivers/CMSIS/Include/cmsis_version.h
pressuresensorboardmaster\stm32f1xx_hal.o: ../Drivers/CMSIS/Include/cmsis_compiler.h
pressuresensorboardmaster\stm32f1xx_hal.o: ../Drivers/CMSIS/Include/cmsis_armcc.h
pressuresensorboardmaster\stm32f1xx_hal.o: ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h
pressuresensorboardmaster\stm32f1xx_hal.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h
pressuresensorboardmaster\stm32f1xx_hal.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h
pressuresensorboardmaster\stm32f1xx_hal.o: C:\app\Keil_v5\ARM\ARMCC\Bin\..\include\stddef.h
pressuresensorboardmaster\stm32f1xx_hal.o: C:\keil\ARM\ARMCC\Bin\..\include\stddef.h
pressuresensorboardmaster\stm32f1xx_hal.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h
pressuresensorboardmaster\stm32f1xx_hal.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h
pressuresensorboardmaster\stm32f1xx_hal.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h

View File

@ -6,14 +6,14 @@ pressuresensorboardmaster\stm32f1xx_hal_cortex.o: ../Drivers/STM32F1xx_HAL_Drive
pressuresensorboardmaster\stm32f1xx_hal_cortex.o: ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h
pressuresensorboardmaster\stm32f1xx_hal_cortex.o: ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h
pressuresensorboardmaster\stm32f1xx_hal_cortex.o: ../Drivers/CMSIS/Include/core_cm3.h
pressuresensorboardmaster\stm32f1xx_hal_cortex.o: C:\app\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h
pressuresensorboardmaster\stm32f1xx_hal_cortex.o: C:\keil\ARM\ARMCC\Bin\..\include\stdint.h
pressuresensorboardmaster\stm32f1xx_hal_cortex.o: ../Drivers/CMSIS/Include/cmsis_version.h
pressuresensorboardmaster\stm32f1xx_hal_cortex.o: ../Drivers/CMSIS/Include/cmsis_compiler.h
pressuresensorboardmaster\stm32f1xx_hal_cortex.o: ../Drivers/CMSIS/Include/cmsis_armcc.h
pressuresensorboardmaster\stm32f1xx_hal_cortex.o: ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h
pressuresensorboardmaster\stm32f1xx_hal_cortex.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h
pressuresensorboardmaster\stm32f1xx_hal_cortex.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h
pressuresensorboardmaster\stm32f1xx_hal_cortex.o: C:\app\Keil_v5\ARM\ARMCC\Bin\..\include\stddef.h
pressuresensorboardmaster\stm32f1xx_hal_cortex.o: C:\keil\ARM\ARMCC\Bin\..\include\stddef.h
pressuresensorboardmaster\stm32f1xx_hal_cortex.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h
pressuresensorboardmaster\stm32f1xx_hal_cortex.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h
pressuresensorboardmaster\stm32f1xx_hal_cortex.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h

View File

@ -6,14 +6,14 @@ pressuresensorboardmaster\stm32f1xx_hal_dma.o: ../Drivers/STM32F1xx_HAL_Driver/I
pressuresensorboardmaster\stm32f1xx_hal_dma.o: ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h
pressuresensorboardmaster\stm32f1xx_hal_dma.o: ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h
pressuresensorboardmaster\stm32f1xx_hal_dma.o: ../Drivers/CMSIS/Include/core_cm3.h
pressuresensorboardmaster\stm32f1xx_hal_dma.o: C:\app\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h
pressuresensorboardmaster\stm32f1xx_hal_dma.o: C:\keil\ARM\ARMCC\Bin\..\include\stdint.h
pressuresensorboardmaster\stm32f1xx_hal_dma.o: ../Drivers/CMSIS/Include/cmsis_version.h
pressuresensorboardmaster\stm32f1xx_hal_dma.o: ../Drivers/CMSIS/Include/cmsis_compiler.h
pressuresensorboardmaster\stm32f1xx_hal_dma.o: ../Drivers/CMSIS/Include/cmsis_armcc.h
pressuresensorboardmaster\stm32f1xx_hal_dma.o: ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h
pressuresensorboardmaster\stm32f1xx_hal_dma.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h
pressuresensorboardmaster\stm32f1xx_hal_dma.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h
pressuresensorboardmaster\stm32f1xx_hal_dma.o: C:\app\Keil_v5\ARM\ARMCC\Bin\..\include\stddef.h
pressuresensorboardmaster\stm32f1xx_hal_dma.o: C:\keil\ARM\ARMCC\Bin\..\include\stddef.h
pressuresensorboardmaster\stm32f1xx_hal_dma.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h
pressuresensorboardmaster\stm32f1xx_hal_dma.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h
pressuresensorboardmaster\stm32f1xx_hal_dma.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h

View File

@ -6,14 +6,14 @@ pressuresensorboardmaster\stm32f1xx_hal_exti.o: ../Drivers/STM32F1xx_HAL_Driver/
pressuresensorboardmaster\stm32f1xx_hal_exti.o: ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h
pressuresensorboardmaster\stm32f1xx_hal_exti.o: ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h
pressuresensorboardmaster\stm32f1xx_hal_exti.o: ../Drivers/CMSIS/Include/core_cm3.h
pressuresensorboardmaster\stm32f1xx_hal_exti.o: C:\app\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h
pressuresensorboardmaster\stm32f1xx_hal_exti.o: C:\keil\ARM\ARMCC\Bin\..\include\stdint.h
pressuresensorboardmaster\stm32f1xx_hal_exti.o: ../Drivers/CMSIS/Include/cmsis_version.h
pressuresensorboardmaster\stm32f1xx_hal_exti.o: ../Drivers/CMSIS/Include/cmsis_compiler.h
pressuresensorboardmaster\stm32f1xx_hal_exti.o: ../Drivers/CMSIS/Include/cmsis_armcc.h
pressuresensorboardmaster\stm32f1xx_hal_exti.o: ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h
pressuresensorboardmaster\stm32f1xx_hal_exti.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h
pressuresensorboardmaster\stm32f1xx_hal_exti.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h
pressuresensorboardmaster\stm32f1xx_hal_exti.o: C:\app\Keil_v5\ARM\ARMCC\Bin\..\include\stddef.h
pressuresensorboardmaster\stm32f1xx_hal_exti.o: C:\keil\ARM\ARMCC\Bin\..\include\stddef.h
pressuresensorboardmaster\stm32f1xx_hal_exti.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h
pressuresensorboardmaster\stm32f1xx_hal_exti.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h
pressuresensorboardmaster\stm32f1xx_hal_exti.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h

View File

@ -6,14 +6,14 @@ pressuresensorboardmaster\stm32f1xx_hal_flash.o: ../Drivers/STM32F1xx_HAL_Driver
pressuresensorboardmaster\stm32f1xx_hal_flash.o: ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h
pressuresensorboardmaster\stm32f1xx_hal_flash.o: ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h
pressuresensorboardmaster\stm32f1xx_hal_flash.o: ../Drivers/CMSIS/Include/core_cm3.h
pressuresensorboardmaster\stm32f1xx_hal_flash.o: C:\app\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h
pressuresensorboardmaster\stm32f1xx_hal_flash.o: C:\keil\ARM\ARMCC\Bin\..\include\stdint.h
pressuresensorboardmaster\stm32f1xx_hal_flash.o: ../Drivers/CMSIS/Include/cmsis_version.h
pressuresensorboardmaster\stm32f1xx_hal_flash.o: ../Drivers/CMSIS/Include/cmsis_compiler.h
pressuresensorboardmaster\stm32f1xx_hal_flash.o: ../Drivers/CMSIS/Include/cmsis_armcc.h
pressuresensorboardmaster\stm32f1xx_hal_flash.o: ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h
pressuresensorboardmaster\stm32f1xx_hal_flash.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h
pressuresensorboardmaster\stm32f1xx_hal_flash.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h
pressuresensorboardmaster\stm32f1xx_hal_flash.o: C:\app\Keil_v5\ARM\ARMCC\Bin\..\include\stddef.h
pressuresensorboardmaster\stm32f1xx_hal_flash.o: C:\keil\ARM\ARMCC\Bin\..\include\stddef.h
pressuresensorboardmaster\stm32f1xx_hal_flash.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h
pressuresensorboardmaster\stm32f1xx_hal_flash.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h
pressuresensorboardmaster\stm32f1xx_hal_flash.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h

View File

@ -6,14 +6,14 @@ pressuresensorboardmaster\stm32f1xx_hal_flash_ex.o: ../Drivers/STM32F1xx_HAL_Dri
pressuresensorboardmaster\stm32f1xx_hal_flash_ex.o: ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h
pressuresensorboardmaster\stm32f1xx_hal_flash_ex.o: ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h
pressuresensorboardmaster\stm32f1xx_hal_flash_ex.o: ../Drivers/CMSIS/Include/core_cm3.h
pressuresensorboardmaster\stm32f1xx_hal_flash_ex.o: C:\app\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h
pressuresensorboardmaster\stm32f1xx_hal_flash_ex.o: C:\keil\ARM\ARMCC\Bin\..\include\stdint.h
pressuresensorboardmaster\stm32f1xx_hal_flash_ex.o: ../Drivers/CMSIS/Include/cmsis_version.h
pressuresensorboardmaster\stm32f1xx_hal_flash_ex.o: ../Drivers/CMSIS/Include/cmsis_compiler.h
pressuresensorboardmaster\stm32f1xx_hal_flash_ex.o: ../Drivers/CMSIS/Include/cmsis_armcc.h
pressuresensorboardmaster\stm32f1xx_hal_flash_ex.o: ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h
pressuresensorboardmaster\stm32f1xx_hal_flash_ex.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h
pressuresensorboardmaster\stm32f1xx_hal_flash_ex.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h
pressuresensorboardmaster\stm32f1xx_hal_flash_ex.o: C:\app\Keil_v5\ARM\ARMCC\Bin\..\include\stddef.h
pressuresensorboardmaster\stm32f1xx_hal_flash_ex.o: C:\keil\ARM\ARMCC\Bin\..\include\stddef.h
pressuresensorboardmaster\stm32f1xx_hal_flash_ex.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h
pressuresensorboardmaster\stm32f1xx_hal_flash_ex.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h
pressuresensorboardmaster\stm32f1xx_hal_flash_ex.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h

View File

@ -6,14 +6,14 @@ pressuresensorboardmaster\stm32f1xx_hal_gpio.o: ../Drivers/STM32F1xx_HAL_Driver/
pressuresensorboardmaster\stm32f1xx_hal_gpio.o: ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h
pressuresensorboardmaster\stm32f1xx_hal_gpio.o: ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h
pressuresensorboardmaster\stm32f1xx_hal_gpio.o: ../Drivers/CMSIS/Include/core_cm3.h
pressuresensorboardmaster\stm32f1xx_hal_gpio.o: C:\app\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h
pressuresensorboardmaster\stm32f1xx_hal_gpio.o: C:\keil\ARM\ARMCC\Bin\..\include\stdint.h
pressuresensorboardmaster\stm32f1xx_hal_gpio.o: ../Drivers/CMSIS/Include/cmsis_version.h
pressuresensorboardmaster\stm32f1xx_hal_gpio.o: ../Drivers/CMSIS/Include/cmsis_compiler.h
pressuresensorboardmaster\stm32f1xx_hal_gpio.o: ../Drivers/CMSIS/Include/cmsis_armcc.h
pressuresensorboardmaster\stm32f1xx_hal_gpio.o: ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h
pressuresensorboardmaster\stm32f1xx_hal_gpio.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h
pressuresensorboardmaster\stm32f1xx_hal_gpio.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h
pressuresensorboardmaster\stm32f1xx_hal_gpio.o: C:\app\Keil_v5\ARM\ARMCC\Bin\..\include\stddef.h
pressuresensorboardmaster\stm32f1xx_hal_gpio.o: C:\keil\ARM\ARMCC\Bin\..\include\stddef.h
pressuresensorboardmaster\stm32f1xx_hal_gpio.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h
pressuresensorboardmaster\stm32f1xx_hal_gpio.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h
pressuresensorboardmaster\stm32f1xx_hal_gpio.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h

View File

@ -6,14 +6,14 @@ pressuresensorboardmaster\stm32f1xx_hal_gpio_ex.o: ../Drivers/STM32F1xx_HAL_Driv
pressuresensorboardmaster\stm32f1xx_hal_gpio_ex.o: ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h
pressuresensorboardmaster\stm32f1xx_hal_gpio_ex.o: ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h
pressuresensorboardmaster\stm32f1xx_hal_gpio_ex.o: ../Drivers/CMSIS/Include/core_cm3.h
pressuresensorboardmaster\stm32f1xx_hal_gpio_ex.o: C:\app\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h
pressuresensorboardmaster\stm32f1xx_hal_gpio_ex.o: C:\keil\ARM\ARMCC\Bin\..\include\stdint.h
pressuresensorboardmaster\stm32f1xx_hal_gpio_ex.o: ../Drivers/CMSIS/Include/cmsis_version.h
pressuresensorboardmaster\stm32f1xx_hal_gpio_ex.o: ../Drivers/CMSIS/Include/cmsis_compiler.h
pressuresensorboardmaster\stm32f1xx_hal_gpio_ex.o: ../Drivers/CMSIS/Include/cmsis_armcc.h
pressuresensorboardmaster\stm32f1xx_hal_gpio_ex.o: ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h
pressuresensorboardmaster\stm32f1xx_hal_gpio_ex.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h
pressuresensorboardmaster\stm32f1xx_hal_gpio_ex.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h
pressuresensorboardmaster\stm32f1xx_hal_gpio_ex.o: C:\app\Keil_v5\ARM\ARMCC\Bin\..\include\stddef.h
pressuresensorboardmaster\stm32f1xx_hal_gpio_ex.o: C:\keil\ARM\ARMCC\Bin\..\include\stddef.h
pressuresensorboardmaster\stm32f1xx_hal_gpio_ex.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h
pressuresensorboardmaster\stm32f1xx_hal_gpio_ex.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h
pressuresensorboardmaster\stm32f1xx_hal_gpio_ex.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h

View File

@ -7,14 +7,14 @@ pressuresensorboardmaster\stm32f1xx_hal_msp.o: ../Drivers/STM32F1xx_HAL_Driver/I
pressuresensorboardmaster\stm32f1xx_hal_msp.o: ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h
pressuresensorboardmaster\stm32f1xx_hal_msp.o: ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h
pressuresensorboardmaster\stm32f1xx_hal_msp.o: ../Drivers/CMSIS/Include/core_cm3.h
pressuresensorboardmaster\stm32f1xx_hal_msp.o: C:\app\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h
pressuresensorboardmaster\stm32f1xx_hal_msp.o: C:\keil\ARM\ARMCC\Bin\..\include\stdint.h
pressuresensorboardmaster\stm32f1xx_hal_msp.o: ../Drivers/CMSIS/Include/cmsis_version.h
pressuresensorboardmaster\stm32f1xx_hal_msp.o: ../Drivers/CMSIS/Include/cmsis_compiler.h
pressuresensorboardmaster\stm32f1xx_hal_msp.o: ../Drivers/CMSIS/Include/cmsis_armcc.h
pressuresensorboardmaster\stm32f1xx_hal_msp.o: ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h
pressuresensorboardmaster\stm32f1xx_hal_msp.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h
pressuresensorboardmaster\stm32f1xx_hal_msp.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h
pressuresensorboardmaster\stm32f1xx_hal_msp.o: C:\app\Keil_v5\ARM\ARMCC\Bin\..\include\stddef.h
pressuresensorboardmaster\stm32f1xx_hal_msp.o: C:\keil\ARM\ARMCC\Bin\..\include\stddef.h
pressuresensorboardmaster\stm32f1xx_hal_msp.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h
pressuresensorboardmaster\stm32f1xx_hal_msp.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h
pressuresensorboardmaster\stm32f1xx_hal_msp.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h

View File

@ -6,14 +6,14 @@ pressuresensorboardmaster\stm32f1xx_hal_pwr.o: ../Drivers/STM32F1xx_HAL_Driver/I
pressuresensorboardmaster\stm32f1xx_hal_pwr.o: ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h
pressuresensorboardmaster\stm32f1xx_hal_pwr.o: ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h
pressuresensorboardmaster\stm32f1xx_hal_pwr.o: ../Drivers/CMSIS/Include/core_cm3.h
pressuresensorboardmaster\stm32f1xx_hal_pwr.o: C:\app\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h
pressuresensorboardmaster\stm32f1xx_hal_pwr.o: C:\keil\ARM\ARMCC\Bin\..\include\stdint.h
pressuresensorboardmaster\stm32f1xx_hal_pwr.o: ../Drivers/CMSIS/Include/cmsis_version.h
pressuresensorboardmaster\stm32f1xx_hal_pwr.o: ../Drivers/CMSIS/Include/cmsis_compiler.h
pressuresensorboardmaster\stm32f1xx_hal_pwr.o: ../Drivers/CMSIS/Include/cmsis_armcc.h
pressuresensorboardmaster\stm32f1xx_hal_pwr.o: ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h
pressuresensorboardmaster\stm32f1xx_hal_pwr.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h
pressuresensorboardmaster\stm32f1xx_hal_pwr.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h
pressuresensorboardmaster\stm32f1xx_hal_pwr.o: C:\app\Keil_v5\ARM\ARMCC\Bin\..\include\stddef.h
pressuresensorboardmaster\stm32f1xx_hal_pwr.o: C:\keil\ARM\ARMCC\Bin\..\include\stddef.h
pressuresensorboardmaster\stm32f1xx_hal_pwr.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h
pressuresensorboardmaster\stm32f1xx_hal_pwr.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h
pressuresensorboardmaster\stm32f1xx_hal_pwr.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h

View File

@ -6,14 +6,14 @@ pressuresensorboardmaster\stm32f1xx_hal_rcc.o: ../Drivers/STM32F1xx_HAL_Driver/I
pressuresensorboardmaster\stm32f1xx_hal_rcc.o: ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h
pressuresensorboardmaster\stm32f1xx_hal_rcc.o: ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h
pressuresensorboardmaster\stm32f1xx_hal_rcc.o: ../Drivers/CMSIS/Include/core_cm3.h
pressuresensorboardmaster\stm32f1xx_hal_rcc.o: C:\app\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h
pressuresensorboardmaster\stm32f1xx_hal_rcc.o: C:\keil\ARM\ARMCC\Bin\..\include\stdint.h
pressuresensorboardmaster\stm32f1xx_hal_rcc.o: ../Drivers/CMSIS/Include/cmsis_version.h
pressuresensorboardmaster\stm32f1xx_hal_rcc.o: ../Drivers/CMSIS/Include/cmsis_compiler.h
pressuresensorboardmaster\stm32f1xx_hal_rcc.o: ../Drivers/CMSIS/Include/cmsis_armcc.h
pressuresensorboardmaster\stm32f1xx_hal_rcc.o: ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h
pressuresensorboardmaster\stm32f1xx_hal_rcc.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h
pressuresensorboardmaster\stm32f1xx_hal_rcc.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h
pressuresensorboardmaster\stm32f1xx_hal_rcc.o: C:\app\Keil_v5\ARM\ARMCC\Bin\..\include\stddef.h
pressuresensorboardmaster\stm32f1xx_hal_rcc.o: C:\keil\ARM\ARMCC\Bin\..\include\stddef.h
pressuresensorboardmaster\stm32f1xx_hal_rcc.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h
pressuresensorboardmaster\stm32f1xx_hal_rcc.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h
pressuresensorboardmaster\stm32f1xx_hal_rcc.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h

View File

@ -6,14 +6,14 @@ pressuresensorboardmaster\stm32f1xx_hal_rcc_ex.o: ../Drivers/STM32F1xx_HAL_Drive
pressuresensorboardmaster\stm32f1xx_hal_rcc_ex.o: ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h
pressuresensorboardmaster\stm32f1xx_hal_rcc_ex.o: ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h
pressuresensorboardmaster\stm32f1xx_hal_rcc_ex.o: ../Drivers/CMSIS/Include/core_cm3.h
pressuresensorboardmaster\stm32f1xx_hal_rcc_ex.o: C:\app\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h
pressuresensorboardmaster\stm32f1xx_hal_rcc_ex.o: C:\keil\ARM\ARMCC\Bin\..\include\stdint.h
pressuresensorboardmaster\stm32f1xx_hal_rcc_ex.o: ../Drivers/CMSIS/Include/cmsis_version.h
pressuresensorboardmaster\stm32f1xx_hal_rcc_ex.o: ../Drivers/CMSIS/Include/cmsis_compiler.h
pressuresensorboardmaster\stm32f1xx_hal_rcc_ex.o: ../Drivers/CMSIS/Include/cmsis_armcc.h
pressuresensorboardmaster\stm32f1xx_hal_rcc_ex.o: ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h
pressuresensorboardmaster\stm32f1xx_hal_rcc_ex.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h
pressuresensorboardmaster\stm32f1xx_hal_rcc_ex.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h
pressuresensorboardmaster\stm32f1xx_hal_rcc_ex.o: C:\app\Keil_v5\ARM\ARMCC\Bin\..\include\stddef.h
pressuresensorboardmaster\stm32f1xx_hal_rcc_ex.o: C:\keil\ARM\ARMCC\Bin\..\include\stddef.h
pressuresensorboardmaster\stm32f1xx_hal_rcc_ex.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h
pressuresensorboardmaster\stm32f1xx_hal_rcc_ex.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h
pressuresensorboardmaster\stm32f1xx_hal_rcc_ex.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h

View File

@ -6,14 +6,14 @@ pressuresensorboardmaster\stm32f1xx_hal_tim.o: ../Drivers/STM32F1xx_HAL_Driver/I
pressuresensorboardmaster\stm32f1xx_hal_tim.o: ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h
pressuresensorboardmaster\stm32f1xx_hal_tim.o: ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h
pressuresensorboardmaster\stm32f1xx_hal_tim.o: ../Drivers/CMSIS/Include/core_cm3.h
pressuresensorboardmaster\stm32f1xx_hal_tim.o: C:\app\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h
pressuresensorboardmaster\stm32f1xx_hal_tim.o: C:\keil\ARM\ARMCC\Bin\..\include\stdint.h
pressuresensorboardmaster\stm32f1xx_hal_tim.o: ../Drivers/CMSIS/Include/cmsis_version.h
pressuresensorboardmaster\stm32f1xx_hal_tim.o: ../Drivers/CMSIS/Include/cmsis_compiler.h
pressuresensorboardmaster\stm32f1xx_hal_tim.o: ../Drivers/CMSIS/Include/cmsis_armcc.h
pressuresensorboardmaster\stm32f1xx_hal_tim.o: ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h
pressuresensorboardmaster\stm32f1xx_hal_tim.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h
pressuresensorboardmaster\stm32f1xx_hal_tim.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h
pressuresensorboardmaster\stm32f1xx_hal_tim.o: C:\app\Keil_v5\ARM\ARMCC\Bin\..\include\stddef.h
pressuresensorboardmaster\stm32f1xx_hal_tim.o: C:\keil\ARM\ARMCC\Bin\..\include\stddef.h
pressuresensorboardmaster\stm32f1xx_hal_tim.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h
pressuresensorboardmaster\stm32f1xx_hal_tim.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h
pressuresensorboardmaster\stm32f1xx_hal_tim.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h

View File

@ -6,14 +6,14 @@ pressuresensorboardmaster\stm32f1xx_hal_tim_ex.o: ../Drivers/STM32F1xx_HAL_Drive
pressuresensorboardmaster\stm32f1xx_hal_tim_ex.o: ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h
pressuresensorboardmaster\stm32f1xx_hal_tim_ex.o: ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h
pressuresensorboardmaster\stm32f1xx_hal_tim_ex.o: ../Drivers/CMSIS/Include/core_cm3.h
pressuresensorboardmaster\stm32f1xx_hal_tim_ex.o: C:\app\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h
pressuresensorboardmaster\stm32f1xx_hal_tim_ex.o: C:\keil\ARM\ARMCC\Bin\..\include\stdint.h
pressuresensorboardmaster\stm32f1xx_hal_tim_ex.o: ../Drivers/CMSIS/Include/cmsis_version.h
pressuresensorboardmaster\stm32f1xx_hal_tim_ex.o: ../Drivers/CMSIS/Include/cmsis_compiler.h
pressuresensorboardmaster\stm32f1xx_hal_tim_ex.o: ../Drivers/CMSIS/Include/cmsis_armcc.h
pressuresensorboardmaster\stm32f1xx_hal_tim_ex.o: ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h
pressuresensorboardmaster\stm32f1xx_hal_tim_ex.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h
pressuresensorboardmaster\stm32f1xx_hal_tim_ex.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h
pressuresensorboardmaster\stm32f1xx_hal_tim_ex.o: C:\app\Keil_v5\ARM\ARMCC\Bin\..\include\stddef.h
pressuresensorboardmaster\stm32f1xx_hal_tim_ex.o: C:\keil\ARM\ARMCC\Bin\..\include\stddef.h
pressuresensorboardmaster\stm32f1xx_hal_tim_ex.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h
pressuresensorboardmaster\stm32f1xx_hal_tim_ex.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h
pressuresensorboardmaster\stm32f1xx_hal_tim_ex.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h

View File

@ -6,14 +6,14 @@ pressuresensorboardmaster\stm32f1xx_hal_uart.o: ../Drivers/STM32F1xx_HAL_Driver/
pressuresensorboardmaster\stm32f1xx_hal_uart.o: ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h
pressuresensorboardmaster\stm32f1xx_hal_uart.o: ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h
pressuresensorboardmaster\stm32f1xx_hal_uart.o: ../Drivers/CMSIS/Include/core_cm3.h
pressuresensorboardmaster\stm32f1xx_hal_uart.o: C:\app\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h
pressuresensorboardmaster\stm32f1xx_hal_uart.o: C:\keil\ARM\ARMCC\Bin\..\include\stdint.h
pressuresensorboardmaster\stm32f1xx_hal_uart.o: ../Drivers/CMSIS/Include/cmsis_version.h
pressuresensorboardmaster\stm32f1xx_hal_uart.o: ../Drivers/CMSIS/Include/cmsis_compiler.h
pressuresensorboardmaster\stm32f1xx_hal_uart.o: ../Drivers/CMSIS/Include/cmsis_armcc.h
pressuresensorboardmaster\stm32f1xx_hal_uart.o: ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h
pressuresensorboardmaster\stm32f1xx_hal_uart.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h
pressuresensorboardmaster\stm32f1xx_hal_uart.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h
pressuresensorboardmaster\stm32f1xx_hal_uart.o: C:\app\Keil_v5\ARM\ARMCC\Bin\..\include\stddef.h
pressuresensorboardmaster\stm32f1xx_hal_uart.o: C:\keil\ARM\ARMCC\Bin\..\include\stddef.h
pressuresensorboardmaster\stm32f1xx_hal_uart.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h
pressuresensorboardmaster\stm32f1xx_hal_uart.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h
pressuresensorboardmaster\stm32f1xx_hal_uart.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h

View File

@ -7,14 +7,14 @@ pressuresensorboardmaster\stm32f1xx_it.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/st
pressuresensorboardmaster\stm32f1xx_it.o: ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h
pressuresensorboardmaster\stm32f1xx_it.o: ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h
pressuresensorboardmaster\stm32f1xx_it.o: ../Drivers/CMSIS/Include/core_cm3.h
pressuresensorboardmaster\stm32f1xx_it.o: C:\app\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h
pressuresensorboardmaster\stm32f1xx_it.o: C:\keil\ARM\ARMCC\Bin\..\include\stdint.h
pressuresensorboardmaster\stm32f1xx_it.o: ../Drivers/CMSIS/Include/cmsis_version.h
pressuresensorboardmaster\stm32f1xx_it.o: ../Drivers/CMSIS/Include/cmsis_compiler.h
pressuresensorboardmaster\stm32f1xx_it.o: ../Drivers/CMSIS/Include/cmsis_armcc.h
pressuresensorboardmaster\stm32f1xx_it.o: ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h
pressuresensorboardmaster\stm32f1xx_it.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h
pressuresensorboardmaster\stm32f1xx_it.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h
pressuresensorboardmaster\stm32f1xx_it.o: C:\app\Keil_v5\ARM\ARMCC\Bin\..\include\stddef.h
pressuresensorboardmaster\stm32f1xx_it.o: C:\keil\ARM\ARMCC\Bin\..\include\stddef.h
pressuresensorboardmaster\stm32f1xx_it.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h
pressuresensorboardmaster\stm32f1xx_it.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h
pressuresensorboardmaster\stm32f1xx_it.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h

View File

@ -2,7 +2,7 @@ pressuresensorboardmaster\system_stm32f1xx.o: ../Core/Src/system_stm32f1xx.c
pressuresensorboardmaster\system_stm32f1xx.o: ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h
pressuresensorboardmaster\system_stm32f1xx.o: ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h
pressuresensorboardmaster\system_stm32f1xx.o: ../Drivers/CMSIS/Include/core_cm3.h
pressuresensorboardmaster\system_stm32f1xx.o: C:\app\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h
pressuresensorboardmaster\system_stm32f1xx.o: C:\keil\ARM\ARMCC\Bin\..\include\stdint.h
pressuresensorboardmaster\system_stm32f1xx.o: ../Drivers/CMSIS/Include/cmsis_version.h
pressuresensorboardmaster\system_stm32f1xx.o: ../Drivers/CMSIS/Include/cmsis_compiler.h
pressuresensorboardmaster\system_stm32f1xx.o: ../Drivers/CMSIS/Include/cmsis_armcc.h
@ -13,7 +13,7 @@ pressuresensorboardmaster\system_stm32f1xx.o: ../Drivers/STM32F1xx_HAL_Driver/In
pressuresensorboardmaster\system_stm32f1xx.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h
pressuresensorboardmaster\system_stm32f1xx.o: ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h
pressuresensorboardmaster\system_stm32f1xx.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h
pressuresensorboardmaster\system_stm32f1xx.o: C:\app\Keil_v5\ARM\ARMCC\Bin\..\include\stddef.h
pressuresensorboardmaster\system_stm32f1xx.o: C:\keil\ARM\ARMCC\Bin\..\include\stddef.h
pressuresensorboardmaster\system_stm32f1xx.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h
pressuresensorboardmaster\system_stm32f1xx.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h
pressuresensorboardmaster\system_stm32f1xx.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h

View File

@ -8,14 +8,14 @@ pressuresensorboardmaster\tim.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_h
pressuresensorboardmaster\tim.o: ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h
pressuresensorboardmaster\tim.o: ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h
pressuresensorboardmaster\tim.o: ../Drivers/CMSIS/Include/core_cm3.h
pressuresensorboardmaster\tim.o: C:\app\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h
pressuresensorboardmaster\tim.o: C:\keil\ARM\ARMCC\Bin\..\include\stdint.h
pressuresensorboardmaster\tim.o: ../Drivers/CMSIS/Include/cmsis_version.h
pressuresensorboardmaster\tim.o: ../Drivers/CMSIS/Include/cmsis_compiler.h
pressuresensorboardmaster\tim.o: ../Drivers/CMSIS/Include/cmsis_armcc.h
pressuresensorboardmaster\tim.o: ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h
pressuresensorboardmaster\tim.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h
pressuresensorboardmaster\tim.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h
pressuresensorboardmaster\tim.o: C:\app\Keil_v5\ARM\ARMCC\Bin\..\include\stddef.h
pressuresensorboardmaster\tim.o: C:\keil\ARM\ARMCC\Bin\..\include\stddef.h
pressuresensorboardmaster\tim.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h
pressuresensorboardmaster\tim.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h
pressuresensorboardmaster\tim.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h

View File

@ -8,14 +8,14 @@ pressuresensorboardmaster\usart.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx
pressuresensorboardmaster\usart.o: ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h
pressuresensorboardmaster\usart.o: ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h
pressuresensorboardmaster\usart.o: ../Drivers/CMSIS/Include/core_cm3.h
pressuresensorboardmaster\usart.o: C:\app\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h
pressuresensorboardmaster\usart.o: C:\keil\ARM\ARMCC\Bin\..\include\stdint.h
pressuresensorboardmaster\usart.o: ../Drivers/CMSIS/Include/cmsis_version.h
pressuresensorboardmaster\usart.o: ../Drivers/CMSIS/Include/cmsis_compiler.h
pressuresensorboardmaster\usart.o: ../Drivers/CMSIS/Include/cmsis_armcc.h
pressuresensorboardmaster\usart.o: ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h
pressuresensorboardmaster\usart.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h
pressuresensorboardmaster\usart.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h
pressuresensorboardmaster\usart.o: C:\app\Keil_v5\ARM\ARMCC\Bin\..\include\stddef.h
pressuresensorboardmaster\usart.o: C:\keil\ARM\ARMCC\Bin\..\include\stddef.h
pressuresensorboardmaster\usart.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h
pressuresensorboardmaster\usart.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h
pressuresensorboardmaster\usart.o: ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h

View File

@ -0,0 +1,36 @@
// File: STM32F101_102_103_105_107.dbgconf
// Version: 1.0.0
// Note: refer to STM32F101xx STM32F102xx STM32F103xx STM32F105xx STM32F107xx Reference manual (RM0008)
// STM32F101xx STM32F102xx STM32F103xx STM32F105xx STM32F107xx datasheets
// <<< Use Configuration Wizard in Context Menu >>>
// <h> Debug MCU configuration register (DBGMCU_CR)
// <i> Reserved bits must be kept at reset value
// <o.30> DBG_TIM11_STOP <i> TIM11 counter stopped when core is halted
// <o.29> DBG_TIM10_STOP <i> TIM10 counter stopped when core is halted
// <o.28> DBG_TIM9_STOP <i> TIM9 counter stopped when core is halted
// <o.27> DBG_TIM14_STOP <i> TIM14 counter stopped when core is halted
// <o.26> DBG_TIM13_STOP <i> TIM13 counter stopped when core is halted
// <o.25> DBG_TIM12_STOP <i> TIM12 counter stopped when core is halted
// <o.21> DBG_CAN2_STOP <i> Debug CAN2 stopped when core is halted
// <o.20> DBG_TIM7_STOP <i> TIM7 counter stopped when core is halted
// <o.19> DBG_TIM6_STOP <i> TIM6 counter stopped when core is halted
// <o.18> DBG_TIM5_STOP <i> TIM5 counter stopped when core is halted
// <o.17> DBG_TIM8_STOP <i> TIM8 counter stopped when core is halted
// <o.16> DBG_I2C2_SMBUS_TIMEOUT <i> SMBUS timeout mode stopped when core is halted
// <o.15> DBG_I2C1_SMBUS_TIMEOUT <i> SMBUS timeout mode stopped when core is halted
// <o.14> DBG_CAN1_STOP <i> Debug CAN1 stopped when Core is halted
// <o.13> DBG_TIM4_STOP <i> TIM4 counter stopped when core is halted
// <o.12> DBG_TIM3_STOP <i> TIM3 counter stopped when core is halted
// <o.11> DBG_TIM2_STOP <i> TIM2 counter stopped when core is halted
// <o.10> DBG_TIM1_STOP <i> TIM1 counter stopped when core is halted
// <o.9> DBG_WWDG_STOP <i> Debug window watchdog stopped when core is halted
// <o.8> DBG_IWDG_STOP <i> Debug independent watchdog stopped when core is halted
// <o.2> DBG_STANDBY <i> Debug standby mode
// <o.1> DBG_STOP <i> Debug stop mode
// <o.0> DBG_SLEEP <i> Debug sleep mode
// </h>
DbgMCU_CR = 0x00000007;
// <<< end of configuration section >>>

View File

@ -0,0 +1,36 @@
// File: STM32F101_102_103_105_107.dbgconf
// Version: 1.0.0
// Note: refer to STM32F101xx STM32F102xx STM32F103xx STM32F105xx STM32F107xx Reference manual (RM0008)
// STM32F101xx STM32F102xx STM32F103xx STM32F105xx STM32F107xx datasheets
// <<< Use Configuration Wizard in Context Menu >>>
// <h> Debug MCU configuration register (DBGMCU_CR)
// <i> Reserved bits must be kept at reset value
// <o.30> DBG_TIM11_STOP <i> TIM11 counter stopped when core is halted
// <o.29> DBG_TIM10_STOP <i> TIM10 counter stopped when core is halted
// <o.28> DBG_TIM9_STOP <i> TIM9 counter stopped when core is halted
// <o.27> DBG_TIM14_STOP <i> TIM14 counter stopped when core is halted
// <o.26> DBG_TIM13_STOP <i> TIM13 counter stopped when core is halted
// <o.25> DBG_TIM12_STOP <i> TIM12 counter stopped when core is halted
// <o.21> DBG_CAN2_STOP <i> Debug CAN2 stopped when core is halted
// <o.20> DBG_TIM7_STOP <i> TIM7 counter stopped when core is halted
// <o.19> DBG_TIM6_STOP <i> TIM6 counter stopped when core is halted
// <o.18> DBG_TIM5_STOP <i> TIM5 counter stopped when core is halted
// <o.17> DBG_TIM8_STOP <i> TIM8 counter stopped when core is halted
// <o.16> DBG_I2C2_SMBUS_TIMEOUT <i> SMBUS timeout mode stopped when core is halted
// <o.15> DBG_I2C1_SMBUS_TIMEOUT <i> SMBUS timeout mode stopped when core is halted
// <o.14> DBG_CAN1_STOP <i> Debug CAN1 stopped when Core is halted
// <o.13> DBG_TIM4_STOP <i> TIM4 counter stopped when core is halted
// <o.12> DBG_TIM3_STOP <i> TIM3 counter stopped when core is halted
// <o.11> DBG_TIM2_STOP <i> TIM2 counter stopped when core is halted
// <o.10> DBG_TIM1_STOP <i> TIM1 counter stopped when core is halted
// <o.9> DBG_WWDG_STOP <i> Debug window watchdog stopped when core is halted
// <o.8> DBG_IWDG_STOP <i> Debug independent watchdog stopped when core is halted
// <o.2> DBG_STANDBY <i> Debug standby mode
// <o.1> DBG_STOP <i> Debug stop mode
// <o.0> DBG_SLEEP <i> Debug sleep mode
// </h>
DbgMCU_CR = 0x00000007;
// <<< end of configuration section >>>

View File

@ -473,11 +473,10 @@ ARM Macro Assembler Page 8
00000000
Command Line: --debug --xref --diag_suppress=9931 --cpu=Cortex-M3 --apcs=interw
ork --depend=pressuresensorboardmaster\startup_stm32f103xb.d -opressuresensorbo
ardmaster\startup_stm32f103xb.o -I.\RTE\_PressureSensorBoardMaster -IC:\app\Kei
l_v5\ARM\Packs\ARM\CMSIS\6.1.0\CMSIS\Core\Include -IC:\app\Keil_v5\ARM\Packs\Ke
il\STM32F1xx_DFP\2.4.1\Device\Include --predefine="__UVISION_VERSION SETA 541"
--predefine="STM32F10X_MD SETA 1" --predefine="_RTE_ SETA 1" --list=startup_stm
32f103xb.lst startup_stm32f103xb.s
ardmaster\startup_stm32f103xb.o -I.\RTE\_PressureSensorBoardMaster -IC:\keil\AR
M\CMSIS\6.2.0\CMSIS\Core\Include -IC:\keil\Keil\STM32F1xx_DFP\2.4.1\Device\Incl
ude --predefine="__UVISION_VERSION SETA 543" --predefine="STM32F10X_MD SETA 1"
--predefine="_RTE_ SETA 1" --list=startup_stm32f103xb.lst startup_stm32f103xb.s

View File

@ -56,6 +56,7 @@ void DebugMon_Handler(void);
void PendSV_Handler(void);
void SysTick_Handler(void);
void DMA1_Channel1_IRQHandler(void);
void DMA1_Channel5_IRQHandler(void);
/* USER CODE BEGIN EFP */
/* USER CODE END EFP */

View File

@ -46,6 +46,9 @@ void MX_DMA_Init(void)
/* DMA1_Channel1_IRQn interrupt configuration */
HAL_NVIC_SetPriority(DMA1_Channel1_IRQn, 0, 0);
HAL_NVIC_EnableIRQ(DMA1_Channel1_IRQn);
/* DMA1_Channel5_IRQn interrupt configuration */
HAL_NVIC_SetPriority(DMA1_Channel5_IRQn, 0, 0);
HAL_NVIC_EnableIRQ(DMA1_Channel5_IRQn);
}

View File

@ -6,7 +6,6 @@
******************************************************************************
*/
/* USER CODE END Header */
/* Includes ------------------------------------------------------------------*/
#include "main.h"
#include "adc.h"
@ -61,6 +60,11 @@ typedef enum {
/* USER CODE END PD */
/* Private macro -------------------------------------------------------------*/
/* USER CODE BEGIN PM */
/* USER CODE END PM */
/* Private variables ---------------------------------------------------------*/
/* USER CODE BEGIN PV */
@ -425,13 +429,32 @@ void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart)
*/
int main(void)
{
/* USER CODE BEGIN 1 */
/* USER CODE END 1 */
/* MCU Configuration--------------------------------------------------------*/
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
HAL_Init();
/* USER CODE BEGIN Init */
/* USER CODE END Init */
/* Configure the system clock */
SystemClock_Config();
/* USER CODE BEGIN SysInit */
/* USER CODE END SysInit */
/* Initialize all configured peripherals */
MX_GPIO_Init();
MX_DMA_Init();
MX_ADC1_Init();
MX_USART1_UART_Init();
/* USER CODE BEGIN 2 */
// 初始化设备地址
Device_Address_Init();
@ -455,41 +478,13 @@ int main(void)
/* USER CODE BEGIN WHILE */
while (1)
{
// 处理串口接收到的命令
if(uart_rx_complete)
{
uart_rx_complete = 0;
Process_Modbus_Command();
}
/* USER CODE END WHILE */
// 矩阵扫描处理
if(adc_data_ready && device_state == STATE_WORKING)
{
adc_data_ready = 0;
current_row++;
if(current_row >= MATRIX_ROWS)
{
current_row = ROW_PA15;
matrix_scan_complete = 1;
}
if(matrix_scan_complete)
{
Matrix_Process_Data();
matrix_scan_complete = 0;
}
Matrix_Scan_Next_Row();
}
HAL_Delay(1);
/* USER CODE BEGIN 3 */
}
/* USER CODE END 3 */
}
// 其他必要函数保持不变...
/**
* @brief System Clock Configuration
* @retval None
@ -522,14 +517,14 @@ void SystemClock_Config(void)
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV2;
RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV2;
RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1;
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_2) != HAL_OK)
{
Error_Handler();
}
PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_ADC;
PeriphClkInit.AdcClockSelection = RCC_ADCPCLK2_DIV4;
PeriphClkInit.AdcClockSelection = RCC_ADCPCLK2_DIV6;
if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInit) != HAL_OK)
{
Error_Handler();
@ -554,7 +549,6 @@ void Error_Handler(void)
}
/* USER CODE END Error_Handler_Debug */
}
#ifdef USE_FULL_ASSERT
/**
* @brief Reports the name of the source file and the source line number
@ -571,4 +565,3 @@ void assert_failed(uint8_t *file, uint32_t line)
/* USER CODE END 6 */
}
#endif /* USE_FULL_ASSERT */

View File

@ -56,6 +56,7 @@
/* External variables --------------------------------------------------------*/
extern DMA_HandleTypeDef hdma_adc1;
extern DMA_HandleTypeDef hdma_usart1_rx;
/* USER CODE BEGIN EV */
/* USER CODE END EV */
@ -212,6 +213,20 @@ void DMA1_Channel1_IRQHandler(void)
/* USER CODE END DMA1_Channel1_IRQn 1 */
}
/**
* @brief This function handles DMA1 channel5 global interrupt.
*/
void DMA1_Channel5_IRQHandler(void)
{
/* USER CODE BEGIN DMA1_Channel5_IRQn 0 */
/* USER CODE END DMA1_Channel5_IRQn 0 */
HAL_DMA_IRQHandler(&hdma_usart1_rx);
/* USER CODE BEGIN DMA1_Channel5_IRQn 1 */
/* USER CODE END DMA1_Channel5_IRQn 1 */
}
/* USER CODE BEGIN 1 */
/* USER CODE END 1 */

View File

@ -25,6 +25,7 @@
/* USER CODE END 0 */
UART_HandleTypeDef huart1;
DMA_HandleTypeDef hdma_usart1_rx;
/* USART1 init function */
@ -83,6 +84,23 @@ void HAL_UART_MspInit(UART_HandleTypeDef* uartHandle)
GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
/* USART1 DMA Init */
/* USART1_RX Init */
hdma_usart1_rx.Instance = DMA1_Channel5;
hdma_usart1_rx.Init.Direction = DMA_PERIPH_TO_MEMORY;
hdma_usart1_rx.Init.PeriphInc = DMA_PINC_DISABLE;
hdma_usart1_rx.Init.MemInc = DMA_MINC_ENABLE;
hdma_usart1_rx.Init.PeriphDataAlignment = DMA_PDATAALIGN_BYTE;
hdma_usart1_rx.Init.MemDataAlignment = DMA_MDATAALIGN_BYTE;
hdma_usart1_rx.Init.Mode = DMA_NORMAL;
hdma_usart1_rx.Init.Priority = DMA_PRIORITY_MEDIUM;
if (HAL_DMA_Init(&hdma_usart1_rx) != HAL_OK)
{
Error_Handler();
}
__HAL_LINKDMA(uartHandle,hdmarx,hdma_usart1_rx);
/* USER CODE BEGIN USART1_MspInit 1 */
/* USER CODE END USART1_MspInit 1 */
@ -106,6 +124,8 @@ void HAL_UART_MspDeInit(UART_HandleTypeDef* uartHandle)
*/
HAL_GPIO_DeInit(GPIOA, GPIO_PIN_9|GPIO_PIN_10);
/* USART1 DMA DeInit */
HAL_DMA_DeInit(uartHandle->hdmarx);
/* USER CODE BEGIN USART1_MspDeInit 1 */
/* USER CODE END USART1_MspDeInit 1 */

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<?xml version="1.0" encoding="UTF-8"?>
<ProjectOpt xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="project_optx.xsd">
<SchemaVersion>1.0</SchemaVersion>
@ -45,7 +45,7 @@
<PageWidth>79</PageWidth>
<PageLength>66</PageLength>
<TabStop>8</TabStop>
<ListingPath></ListingPath>
<ListingPath />
</OPTLEX>
<ListingPage>
<CreateCListing>1</CreateCListing>
@ -104,16 +104,16 @@
<bSchkAxf>0</bSchkAxf>
<bTchkAxf>0</bTchkAxf>
<nTsel>6</nTsel>
<sDll></sDll>
<sDllPa></sDllPa>
<sDlgDll></sDlgDll>
<sDlgPa></sDlgPa>
<sIfile></sIfile>
<tDll></tDll>
<tDllPa></tDllPa>
<tDlgDll></tDlgDll>
<tDlgPa></tDlgPa>
<tIfile></tIfile>
<sDll />
<sDllPa />
<sDlgDll />
<sDlgPa />
<sIfile />
<tDll />
<tDllPa />
<tDlgDll />
<tDlgPa />
<tIfile />
<pMon>STLink\ST-LINKIII-KEIL_SWO.dll</pMon>
</DebugOpt>
<TargetDriverDllRegistry>
@ -130,7 +130,7 @@
<SetRegEntry>
<Number>0</Number>
<Key>ARMDBGFLAGS</Key>
<Name></Name>
<Name />
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
@ -167,8 +167,8 @@
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>0</BreakIfRCount>
<Filename>../Core/Src/main.c</Filename>
<ExecCommand></ExecCommand>
<Expression></Expression>
<ExecCommand />
<Expression />
</Bp>
</Breakpoint>
<Tracepoint>
@ -200,19 +200,19 @@
<newCpu>0</newCpu>
<uProt>0</uProt>
</DebugFlag>
<LintExecutable></LintExecutable>
<LintConfigFile></LintConfigFile>
<LintExecutable />
<LintConfigFile />
<bLintAuto>0</bLintAuto>
<bAutoGenD>0</bAutoGenD>
<LntExFlags>0</LntExFlags>
<pMisraName></pMisraName>
<pszMrule></pszMrule>
<pSingCmds></pSingCmds>
<pMultCmds></pMultCmds>
<pMisraNamep></pMisraNamep>
<pszMrulep></pszMrulep>
<pSingCmdsp></pSingCmdsp>
<pMultCmdsp></pMultCmdsp>
<pMisraName />
<pszMrule />
<pSingCmds />
<pMultCmds />
<pMisraNamep />
<pszMrulep />
<pSingCmdsp />
<pMultCmdsp />
<DebugDescription>
<Enable>1</Enable>
<EnableFlashSeq>0</EnableFlashSeq>

View File

@ -1,10 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="project_projx.xsd">
<?xml version="1.0" encoding="UTF-8"?>
<Project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" noNamespaceSchemaLocation="project_projx.xsd">
<SchemaVersion>2.1</SchemaVersion>
<Header>### uVision Project, (C) Keil Software</Header>
<Targets>
<Target>
<TargetName>PressureSensorBoard-slave</TargetName>
@ -19,28 +16,28 @@
<PackID>Keil.STM32F1xx_DFP.2.4.1</PackID>
<PackURL>https://www.keil.com/pack/</PackURL>
<Cpu>IRAM(0x20000000-0x20004FFF) IROM(0x8000000-0x800FFFF) CLOCK(8000000) CPUTYPE("Cortex-M3") TZ</Cpu>
<FlashUtilSpec></FlashUtilSpec>
<StartupFile></StartupFile>
<FlashDriverDll></FlashDriverDll>
<FlashUtilSpec />
<StartupFile />
<FlashDriverDll />
<DeviceId>0</DeviceId>
<RegisterFile></RegisterFile>
<MemoryEnv></MemoryEnv>
<Cmp></Cmp>
<Asm></Asm>
<Linker></Linker>
<OHString></OHString>
<InfinionOptionDll></InfinionOptionDll>
<SLE66CMisc></SLE66CMisc>
<SLE66AMisc></SLE66AMisc>
<SLE66LinkerMisc></SLE66LinkerMisc>
<RegisterFile />
<MemoryEnv />
<Cmp />
<Asm />
<Linker />
<OHString />
<InfinionOptionDll />
<SLE66CMisc />
<SLE66AMisc />
<SLE66LinkerMisc />
<SFDFile>$$Device:STM32F103C8$SVD\STM32F103xx.svd</SFDFile>
<bCustSvd>0</bCustSvd>
<UseEnv>0</UseEnv>
<BinPath></BinPath>
<IncludePath></IncludePath>
<LibPath></LibPath>
<RegisterFilePath></RegisterFilePath>
<DBRegisterFilePath></DBRegisterFilePath>
<BinPath />
<IncludePath />
<LibPath />
<RegisterFilePath />
<DBRegisterFilePath />
<TargetStatus>
<Error>0</Error>
<ExitCodeStop>0</ExitCodeStop>
@ -55,15 +52,15 @@
<CreateHexFile>1</CreateHexFile>
<DebugInformation>1</DebugInformation>
<BrowseInformation>1</BrowseInformation>
<ListingPath></ListingPath>
<ListingPath />
<HexFormatSelection>1</HexFormatSelection>
<Merge32K>0</Merge32K>
<CreateBatchFile>0</CreateBatchFile>
<BeforeCompile>
<RunUserProg1>0</RunUserProg1>
<RunUserProg2>0</RunUserProg2>
<UserProg1Name></UserProg1Name>
<UserProg2Name></UserProg2Name>
<UserProg1Name />
<UserProg2Name />
<UserProg1Dos16Mode>0</UserProg1Dos16Mode>
<UserProg2Dos16Mode>0</UserProg2Dos16Mode>
<nStopU1X>0</nStopU1X>
@ -72,8 +69,8 @@
<BeforeMake>
<RunUserProg1>0</RunUserProg1>
<RunUserProg2>0</RunUserProg2>
<UserProg1Name></UserProg1Name>
<UserProg2Name></UserProg2Name>
<UserProg1Name />
<UserProg2Name />
<UserProg1Dos16Mode>0</UserProg1Dos16Mode>
<UserProg2Dos16Mode>0</UserProg2Dos16Mode>
<nStopB1X>0</nStopB1X>
@ -82,15 +79,15 @@
<AfterMake>
<RunUserProg1>0</RunUserProg1>
<RunUserProg2>1</RunUserProg2>
<UserProg1Name></UserProg1Name>
<UserProg2Name></UserProg2Name>
<UserProg1Name />
<UserProg2Name />
<UserProg1Dos16Mode>0</UserProg1Dos16Mode>
<UserProg2Dos16Mode>0</UserProg2Dos16Mode>
<nStopA1X>0</nStopA1X>
<nStopA2X>0</nStopA2X>
</AfterMake>
<SelectedForBatchBuild>1</SelectedForBatchBuild>
<SVCSIdString></SVCSIdString>
<SVCSIdString />
</TargetCommonOption>
<CommonProperty>
<UseCPPCompiler>0</UseCPPCompiler>
@ -104,8 +101,8 @@
<AssembleAssemblyFile>0</AssembleAssemblyFile>
<PublicsOnly>0</PublicsOnly>
<StopOnExitCode>3</StopOnExitCode>
<CustomArgument></CustomArgument>
<IncludeLibraryModules></IncludeLibraryModules>
<CustomArgument />
<IncludeLibraryModules />
<ComprImg>0</ComprImg>
</CommonProperty>
<DllOption>
@ -114,7 +111,7 @@
<SimDlgDll>DCM.DLL</SimDlgDll>
<SimDlgDllArguments>-pCM3</SimDlgDllArguments>
<TargetDllName>SARMCM3.DLL</TargetDllName>
<TargetDllArguments></TargetDllArguments>
<TargetDllArguments />
<TargetDlgDll>TCM.DLL</TargetDlgDll>
<TargetDlgDllArguments>-pCM3</TargetDlgDllArguments>
</DllOption>
@ -138,11 +135,11 @@
</Flash1>
<bUseTDR>1</bUseTDR>
<Flash2>BIN\UL2V8M.DLL</Flash2>
<Flash3></Flash3>
<Flash4></Flash4>
<pFcarmOut></pFcarmOut>
<pFcarmGrp></pFcarmGrp>
<pFcArmRoot></pFcArmRoot>
<Flash3 />
<Flash4 />
<pFcarmOut />
<pFcarmGrp />
<pFcArmRoot />
<FcArmLst>0</FcArmLst>
</Utilities>
<TargetArmAds>
@ -175,7 +172,7 @@
<RvctClst>0</RvctClst>
<GenPPlst>0</GenPPlst>
<AdsCpuType>"Cortex-M3"</AdsCpuType>
<RvctDeviceName></RvctDeviceName>
<RvctDeviceName />
<mOS>0</mOS>
<uocRom>0</uocRom>
<uocRam>0</uocRam>
@ -310,7 +307,7 @@
<Size>0x0</Size>
</OCR_RVCT10>
</OnChipMemories>
<RvctStartVector></RvctStartVector>
<RvctStartVector />
</ArmAdsMisc>
<Cads>
<interw>1</interw>
@ -337,9 +334,9 @@
<v6WtE>0</v6WtE>
<v6Rtti>0</v6Rtti>
<VariousControls>
<MiscControls></MiscControls>
<MiscControls />
<Define>USE_HAL_DRIVER,STM32F103xB</Define>
<Undefine></Undefine>
<Undefine />
<IncludePath>../Core/Inc;../Drivers/STM32F1xx_HAL_Driver/Inc;../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy;../Drivers/CMSIS/Device/ST/STM32F1xx/Include;../Drivers/CMSIS/Include</IncludePath>
</VariousControls>
</Cads>
@ -355,10 +352,10 @@
<useXO>0</useXO>
<ClangAsOpt>1</ClangAsOpt>
<VariousControls>
<MiscControls></MiscControls>
<Define></Define>
<Undefine></Undefine>
<IncludePath></IncludePath>
<MiscControls />
<Define />
<Undefine />
<IncludePath />
</VariousControls>
</Aads>
<LDads>
@ -368,15 +365,15 @@
<noStLib>0</noStLib>
<RepFail>1</RepFail>
<useFile>0</useFile>
<TextAddressRange></TextAddressRange>
<DataAddressRange></DataAddressRange>
<pXoBase></pXoBase>
<ScatterFile></ScatterFile>
<IncludeLibs></IncludeLibs>
<IncludeLibsPath></IncludeLibsPath>
<Misc></Misc>
<LinkerInputFile></LinkerInputFile>
<DisabledWarnings></DisabledWarnings>
<TextAddressRange />
<DataAddressRange />
<pXoBase />
<ScatterFile />
<IncludeLibs />
<IncludeLibsPath />
<Misc />
<LinkerInputFile />
<DisabledWarnings />
</LDads>
</TargetArmAds>
</TargetOption>
@ -426,8 +423,6 @@
<AssembleAssemblyFile>2</AssembleAssemblyFile>
<PublicsOnly>2</PublicsOnly>
<StopOnExitCode>11</StopOnExitCode>
<CustomArgument></CustomArgument>
<IncludeLibraryModules></IncludeLibraryModules>
<ComprImg>1</ComprImg>
</CommonProperty>
<FileArmAds>
@ -455,12 +450,6 @@
<v6Lto>2</v6Lto>
<v6WtE>2</v6WtE>
<v6Rtti>2</v6Rtti>
<VariousControls>
<MiscControls></MiscControls>
<Define></Define>
<Undefine></Undefine>
<IncludePath></IncludePath>
</VariousControls>
</Cads>
</FileArmAds>
</FileOption>
@ -482,8 +471,6 @@
<AssembleAssemblyFile>2</AssembleAssemblyFile>
<PublicsOnly>2</PublicsOnly>
<StopOnExitCode>11</StopOnExitCode>
<CustomArgument></CustomArgument>
<IncludeLibraryModules></IncludeLibraryModules>
<ComprImg>1</ComprImg>
</CommonProperty>
<FileArmAds>
@ -511,12 +498,6 @@
<v6Lto>2</v6Lto>
<v6WtE>2</v6WtE>
<v6Rtti>2</v6Rtti>
<VariousControls>
<MiscControls></MiscControls>
<Define></Define>
<Undefine></Undefine>
<IncludePath></IncludePath>
</VariousControls>
</Cads>
</FileArmAds>
</FileOption>
@ -618,8 +599,6 @@
<AssembleAssemblyFile>2</AssembleAssemblyFile>
<PublicsOnly>2</PublicsOnly>
<StopOnExitCode>11</StopOnExitCode>
<CustomArgument></CustomArgument>
<IncludeLibraryModules></IncludeLibraryModules>
<ComprImg>1</ComprImg>
</CommonProperty>
<FileArmAds>
@ -647,12 +626,6 @@
<v6Lto>2</v6Lto>
<v6WtE>2</v6WtE>
<v6Rtti>2</v6Rtti>
<VariousControls>
<MiscControls></MiscControls>
<Define></Define>
<Undefine></Undefine>
<IncludePath></IncludePath>
</VariousControls>
</Cads>
</FileArmAds>
</FileOption>
@ -675,18 +648,17 @@
</Groups>
</Target>
</Targets>
<RTE>
<apis/>
<apis />
<components>
<component Cclass="CMSIS" Cgroup="CORE" Cvendor="ARM" Cversion="4.3.0" condition="CMSIS Core">
<package name="CMSIS" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="ARM" version="4.5.0"/>
<package name="CMSIS" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="ARM" version="4.5.0" />
<targetInfos>
<targetInfo name="PressureSensorBoard-slave"/>
<targetInfo name="PressureSensorBoard-slave" />
</targetInfos>
</component>
</components>
<files/>
<files />
</RTE>
</Project>

View File

@ -36,7 +36,17 @@ Dma.ADC1.0.PeriphInc=DMA_PINC_DISABLE
Dma.ADC1.0.Priority=DMA_PRIORITY_MEDIUM
Dma.ADC1.0.RequestParameters=Instance,Direction,PeriphInc,MemInc,PeriphDataAlignment,MemDataAlignment,Mode,Priority
Dma.Request0=ADC1
Dma.RequestsNb=1
Dma.Request1=USART1_RX
Dma.RequestsNb=2
Dma.USART1_RX.1.Direction=DMA_PERIPH_TO_MEMORY
Dma.USART1_RX.1.Instance=DMA1_Channel5
Dma.USART1_RX.1.MemDataAlignment=DMA_MDATAALIGN_BYTE
Dma.USART1_RX.1.MemInc=DMA_MINC_ENABLE
Dma.USART1_RX.1.Mode=DMA_NORMAL
Dma.USART1_RX.1.PeriphDataAlignment=DMA_PDATAALIGN_BYTE
Dma.USART1_RX.1.PeriphInc=DMA_PINC_DISABLE
Dma.USART1_RX.1.Priority=DMA_PRIORITY_MEDIUM
Dma.USART1_RX.1.RequestParameters=Instance,Direction,PeriphInc,MemInc,PeriphDataAlignment,MemDataAlignment,Mode,Priority
File.Version=6
GPIO.groupedBy=Group By Peripherals
KeepUserPlacement=false
@ -79,6 +89,7 @@ MxCube.Version=6.15.0
MxDb.Version=DB.6.0.150
NVIC.BusFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
NVIC.DMA1_Channel1_IRQn=true\:0\:0\:false\:false\:true\:false\:true\:true
NVIC.DMA1_Channel5_IRQn=true\:0\:0\:false\:false\:true\:false\:true\:true
NVIC.DebugMonitor_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
NVIC.ForceEnableDMAVector=true
NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false