diff --git a/Hardware/Firmware/PiRobot_Firmware v1.0/README.md b/Hardware/Firmware/PiRobot_Firmware v1.0/README.md index 9706518..f9e4297 100644 --- a/Hardware/Firmware/PiRobot_Firmware v1.0/README.md +++ b/Hardware/Firmware/PiRobot_Firmware v1.0/README.md @@ -1,6 +1,6 @@ # 固件使用说明 -> zhanli : 更新 2023-12-12 +> zhanli : 更新 2023-12-26 :小车驱动经过验证更新 ## 一、注意事项以及环境安装 diff --git a/Hardware/Firmware/PiRobot_Firmware v1.0/STM32/Lib/IMU/GY87.cpp b/Hardware/Firmware/PiRobot_Firmware v1.0/STM32/Lib/IMU/GY87.cpp index 138da11..248ffdc 100644 --- a/Hardware/Firmware/PiRobot_Firmware v1.0/STM32/Lib/IMU/GY87.cpp +++ b/Hardware/Firmware/PiRobot_Firmware v1.0/STM32/Lib/IMU/GY87.cpp @@ -12,6 +12,9 @@ bool GY87::init() { delay_ms(500); +#if IMU_DEBUG_ENABLE + pb_printf("GY87::init"); +#endif Board::get()->i2c_init(); if (!mpu6050.testConnection()) { diff --git a/Hardware/Firmware/PiRobot_Firmware v1.0/STM32/RTE/_Target_1/RTE_Components.h b/Hardware/Firmware/PiRobot_Firmware v1.0/STM32/RTE/_Target_1/RTE_Components.h new file mode 100644 index 0000000..5e19985 --- /dev/null +++ b/Hardware/Firmware/PiRobot_Firmware v1.0/STM32/RTE/_Target_1/RTE_Components.h @@ -0,0 +1,21 @@ + +/* + * Auto generated Run-Time-Environment Configuration File + * *** Do not modify ! *** + * + * Project: 'pibot' + * Target: 'Target 1' + */ + +#ifndef RTE_COMPONENTS_H +#define RTE_COMPONENTS_H + + +/* + * Define the Device Header File: + */ +#define CMSIS_device_header "stm32f10x.h" + + + +#endif /* RTE_COMPONENTS_H */ diff --git a/Hardware/Firmware/PiRobot_Firmware v1.0/STM32/User/robot.cpp b/Hardware/Firmware/PiRobot_Firmware v1.0/STM32/User/robot.cpp index a957377..23c4db6 100644 --- a/Hardware/Firmware/PiRobot_Firmware v1.0/STM32/User/robot.cpp +++ b/Hardware/Firmware/PiRobot_Firmware v1.0/STM32/User/robot.cpp @@ -114,7 +114,7 @@ void Robot::init_imu() static GY87 gy87; imu = &gy87; } else { - pb_printf("imu default"); + pb_printf("imu default null driver"); imu = NULL; } diff --git a/Hardware/Firmware/PiRobot_Firmware v1.0/STM32/User/stm32f10x_it.cpp b/Hardware/Firmware/PiRobot_Firmware v1.0/STM32/User/stm32f10x_it.cpp index 4042736..bf047fe 100644 --- a/Hardware/Firmware/PiRobot_Firmware v1.0/STM32/User/stm32f10x_it.cpp +++ b/Hardware/Firmware/PiRobot_Firmware v1.0/STM32/User/stm32f10x_it.cpp @@ -156,10 +156,8 @@ void USART3_IRQHandler(void) if (!Board::get()->usart_getDataQueue(USART_3)->put(data)){ //err } - USART_ClearITPendingBit(USART3,USART_IT_RXNE); //clear interrupt flag } - } /******************************************************************************/ diff --git a/Hardware/Firmware/PiRobot_Firmware v1.0/STM32/params.mk b/Hardware/Firmware/PiRobot_Firmware v1.0/STM32/params.mk index 48fe55b..1a61e24 100644 --- a/Hardware/Firmware/PiRobot_Firmware v1.0/STM32/params.mk +++ b/Hardware/Firmware/PiRobot_Firmware v1.0/STM32/params.mk @@ -20,7 +20,7 @@ -DMOTOR_DRIVER_TB6612=1 -DMOTOR_DRIVER_DRV8870=2 --DMOTOR_DRIVER=MOTOR_DRIVER_TB6612 +-DMOTOR_DRIVER=MOTOR_DRIVER_DRV8870 #uart -DMASTER_USART=3 @@ -42,7 +42,7 @@ #imu -DIMU_ENABLE=1 --DIMU_DEBUG_ENABLE=0 +-DIMU_DEBUG_ENABLE=1 # intervel -DCALC_ODOM_INTERVAL=10 diff --git a/Hardware/Firmware/PiRobot_Firmware v1.0/STM32/pibot.uvoptx b/Hardware/Firmware/PiRobot_Firmware v1.0/STM32/pibot.uvoptx index 95b95e2..9ae53f8 100644 --- a/Hardware/Firmware/PiRobot_Firmware v1.0/STM32/pibot.uvoptx +++ b/Hardware/Firmware/PiRobot_Firmware v1.0/STM32/pibot.uvoptx @@ -81,26 +81,21 @@ 0 - Quick Start Guide (MCBSTM32E) - C:\Keil_v5\ARM\PACK\Keil\STM32F1xx_DFP\2.2.0\Boards\Keil\MCBSTM32E\Documentation\STM32E_QSG.pdf + Base Board Schematics (MCBSTM32E) + D:\Program Files\Keilv5\ARM\PACK\Keil\STM32F1xx_DFP\1.1.0\Documents\mcbstm32e-base-board-schematics.pdf 1 - Base Board Schematics (MCBSTM32E) - C:\Keil_v5\ARM\PACK\Keil\STM32F1xx_DFP\2.2.0\Boards\Keil\MCBSTM32E\Documentation\mcbstm32e-base-board-schematics.pdf + Display Board Schematics (MCBSTM32E) + D:\Program Files\Keilv5\ARM\PACK\Keil\STM32F1xx_DFP\1.1.0\Documents\mcbstm32e-display-board-schematics.pdf 2 - Display Board Schematics (MCBSTM32E) - C:\Keil_v5\ARM\PACK\Keil\STM32F1xx_DFP\2.2.0\Boards\Keil\MCBSTM32E\Documentation\mcbstm32e-display-board-schematics.pdf + User Manual (MCBSTM32E) + D:\Program Files\Keilv5\ARM\PACK\Keil\STM32F1xx_DFP\1.1.0\Documents\mcbstm32e.chm 3 - User Manual (MCBSTM32E) - C:\Keil_v5\ARM\PACK\Keil\STM32F1xx_DFP\2.2.0\Boards\Keil\MCBSTM32E\Documentation\mcbstm32e.chm - - - 4 MCBSTM32E Evaluation Board Web Page (MCBSTM32E) http://www.keil.com/mcbstm32e/ @@ -127,7 +122,7 @@ 1 0 0 - 3 + 5 @@ -138,13 +133,18 @@ - Segger\JL2CM3.dll + STLink\ST-LINKIII-KEIL_SWO.dll + + 0 + ST-LINKIII-KEIL_SWO + -U303030303030303030303031 -I0 -O206 -S1 -C0 -A0 -N00("ARM CoreSight SW-DP") -D00(1BA01477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO15 -FD20000000 -FC1000 -FN1 -FF0STM32F10x_128.FLM -FS08000000 -FL020000 -FP0($$Device:STM32F103C8$Flash\STM32F10x_128.FLM) + 0 JL2CM3 - -U20090928 -O78 -S8 -ZTIFSpeedSel50000 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -N00("ARM CoreSight SW-DP") -D00(1BA01477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO15 -FD20000000 -FC1000 -FN1 -FF0STM32F10x_128.FLM -FS08000000 -FL020000 -FP0($$Device:STM32F103C8$Flash\STM32F10x_128.FLM) + -U69408076 -O78 -S5 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -N00("ARM CoreSight SW-DP") -D00(1BA01477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO15 -FD20000000 -FC1000 -FN1 -FF0STM32F10x_128.FLM -FS08000000 -FL020000 -FP0($$Device:STM32F103C8$Flash\STM32F10x_128.FLM) 0 diff --git a/Hardware/Firmware/PiRobot_Firmware v1.0/STM32/pibot.uvprojx b/Hardware/Firmware/PiRobot_Firmware v1.0/STM32/pibot.uvprojx index 90c1637..cfb0a8f 100644 --- a/Hardware/Firmware/PiRobot_Firmware v1.0/STM32/pibot.uvprojx +++ b/Hardware/Firmware/PiRobot_Firmware v1.0/STM32/pibot.uvprojx @@ -10,12 +10,12 @@ Target 1 0x4 ARM-ADS - 5060183::V5.06 update 2 (build 183)::ARMCC + 5060300::V5.06 update 3 (build 300)::ARMCC STM32F103C8 STMicroelectronics - Keil.STM32F1xx_DFP.2.2.0 + Keil.STM32F1xx_DFP.1.1.0 http://www.keil.com/pack/ IRAM(0x20000000,0x5000) IROM(0x08000000,0x10000) CPUTYPE("Cortex-M3") CLOCK(12000000) ELITTLE @@ -330,6 +330,7 @@ 1 0 0 + 0 --via .\params.mk USE_STDPERIPH_DRIVER,STM32F10X_MD @@ -347,6 +348,7 @@ 0 0 0 + 0 diff --git a/Hardware/Firmware/PiRobot_Firmware v1.0/驱动固件的配置与使用.md b/Hardware/Firmware/PiRobot_Firmware v1.0/驱动固件的配置与使用.md new file mode 100644 index 0000000..21dedaa --- /dev/null +++ b/Hardware/Firmware/PiRobot_Firmware v1.0/驱动固件的配置与使用.md @@ -0,0 +1,6 @@ +# 驱动固件的配置与使用 + +#### 一、下位机驱动板的通信 + +​ 小车驱动底板主要采用是串口通信,接口上支持`USB`通信。小车与`ROS`交互使用的是`uart3`(小车底板上的`micro usb`接口),小车打印log采用是`uart1`(小车底板上的排针)。 + diff --git a/Hardware/Firmware/README.md b/Hardware/Firmware/README.md index b6ebae4..2ffc5ad 100644 --- a/Hardware/Firmware/README.md +++ b/Hardware/Firmware/README.md @@ -1,4 +1,4 @@ # 目录说明 -1. GeekRobotTiny_Firmware : 詹力开发的机器人地盘固件 -2. PiRobot : 目前实验室使用的扫地机器人和割草机器人的固件 \ No newline at end of file +1. `GeekRobotTiny_Firmware` : 詹力开发的机器人地盘固件 +2. `PiRobot` : 目前实验室使用的扫地机器人和割草机器人的固件 \ No newline at end of file