forked from logzhan/RobotHardware-UESTC
更新验证后Pibot驱动
parent
313a5b8231
commit
60ddce89b5
|
@ -1,6 +1,6 @@
|
||||||
# 固件使用说明
|
# 固件使用说明
|
||||||
|
|
||||||
> zhanli : 更新 2023-12-12
|
> zhanli : 更新 2023-12-26 :小车驱动经过验证更新
|
||||||
|
|
||||||
## 一、注意事项以及环境安装
|
## 一、注意事项以及环境安装
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,9 @@
|
||||||
bool GY87::init()
|
bool GY87::init()
|
||||||
{
|
{
|
||||||
delay_ms(500);
|
delay_ms(500);
|
||||||
|
#if IMU_DEBUG_ENABLE
|
||||||
|
pb_printf("GY87::init");
|
||||||
|
#endif
|
||||||
Board::get()->i2c_init();
|
Board::get()->i2c_init();
|
||||||
|
|
||||||
if (!mpu6050.testConnection()) {
|
if (!mpu6050.testConnection()) {
|
||||||
|
|
|
@ -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 */
|
|
@ -114,7 +114,7 @@ void Robot::init_imu()
|
||||||
static GY87 gy87;
|
static GY87 gy87;
|
||||||
imu = &gy87;
|
imu = &gy87;
|
||||||
} else {
|
} else {
|
||||||
pb_printf("imu default");
|
pb_printf("imu default null driver");
|
||||||
imu = NULL;
|
imu = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -156,10 +156,8 @@ void USART3_IRQHandler(void)
|
||||||
if (!Board::get()->usart_getDataQueue(USART_3)->put(data)){
|
if (!Board::get()->usart_getDataQueue(USART_3)->put(data)){
|
||||||
//err
|
//err
|
||||||
}
|
}
|
||||||
|
|
||||||
USART_ClearITPendingBit(USART3,USART_IT_RXNE); //clear interrupt flag
|
USART_ClearITPendingBit(USART3,USART_IT_RXNE); //clear interrupt flag
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
-DMOTOR_DRIVER_TB6612=1
|
-DMOTOR_DRIVER_TB6612=1
|
||||||
-DMOTOR_DRIVER_DRV8870=2
|
-DMOTOR_DRIVER_DRV8870=2
|
||||||
|
|
||||||
-DMOTOR_DRIVER=MOTOR_DRIVER_TB6612
|
-DMOTOR_DRIVER=MOTOR_DRIVER_DRV8870
|
||||||
|
|
||||||
#uart
|
#uart
|
||||||
-DMASTER_USART=3
|
-DMASTER_USART=3
|
||||||
|
@ -42,7 +42,7 @@
|
||||||
|
|
||||||
#imu
|
#imu
|
||||||
-DIMU_ENABLE=1
|
-DIMU_ENABLE=1
|
||||||
-DIMU_DEBUG_ENABLE=0
|
-DIMU_DEBUG_ENABLE=1
|
||||||
|
|
||||||
# intervel
|
# intervel
|
||||||
-DCALC_ODOM_INTERVAL=10
|
-DCALC_ODOM_INTERVAL=10
|
||||||
|
|
|
@ -81,26 +81,21 @@
|
||||||
<Books>
|
<Books>
|
||||||
<Book>
|
<Book>
|
||||||
<Number>0</Number>
|
<Number>0</Number>
|
||||||
<Title>Quick Start Guide (MCBSTM32E)</Title>
|
<Title>Base Board Schematics (MCBSTM32E)</Title>
|
||||||
<Path>C:\Keil_v5\ARM\PACK\Keil\STM32F1xx_DFP\2.2.0\Boards\Keil\MCBSTM32E\Documentation\STM32E_QSG.pdf</Path>
|
<Path>D:\Program Files\Keilv5\ARM\PACK\Keil\STM32F1xx_DFP\1.1.0\Documents\mcbstm32e-base-board-schematics.pdf</Path>
|
||||||
</Book>
|
</Book>
|
||||||
<Book>
|
<Book>
|
||||||
<Number>1</Number>
|
<Number>1</Number>
|
||||||
<Title>Base Board Schematics (MCBSTM32E)</Title>
|
<Title>Display Board Schematics (MCBSTM32E)</Title>
|
||||||
<Path>C:\Keil_v5\ARM\PACK\Keil\STM32F1xx_DFP\2.2.0\Boards\Keil\MCBSTM32E\Documentation\mcbstm32e-base-board-schematics.pdf</Path>
|
<Path>D:\Program Files\Keilv5\ARM\PACK\Keil\STM32F1xx_DFP\1.1.0\Documents\mcbstm32e-display-board-schematics.pdf</Path>
|
||||||
</Book>
|
</Book>
|
||||||
<Book>
|
<Book>
|
||||||
<Number>2</Number>
|
<Number>2</Number>
|
||||||
<Title>Display Board Schematics (MCBSTM32E)</Title>
|
<Title>User Manual (MCBSTM32E)</Title>
|
||||||
<Path>C:\Keil_v5\ARM\PACK\Keil\STM32F1xx_DFP\2.2.0\Boards\Keil\MCBSTM32E\Documentation\mcbstm32e-display-board-schematics.pdf</Path>
|
<Path>D:\Program Files\Keilv5\ARM\PACK\Keil\STM32F1xx_DFP\1.1.0\Documents\mcbstm32e.chm</Path>
|
||||||
</Book>
|
</Book>
|
||||||
<Book>
|
<Book>
|
||||||
<Number>3</Number>
|
<Number>3</Number>
|
||||||
<Title>User Manual (MCBSTM32E)</Title>
|
|
||||||
<Path>C:\Keil_v5\ARM\PACK\Keil\STM32F1xx_DFP\2.2.0\Boards\Keil\MCBSTM32E\Documentation\mcbstm32e.chm</Path>
|
|
||||||
</Book>
|
|
||||||
<Book>
|
|
||||||
<Number>4</Number>
|
|
||||||
<Title>MCBSTM32E Evaluation Board Web Page (MCBSTM32E)</Title>
|
<Title>MCBSTM32E Evaluation Board Web Page (MCBSTM32E)</Title>
|
||||||
<Path>http://www.keil.com/mcbstm32e/</Path>
|
<Path>http://www.keil.com/mcbstm32e/</Path>
|
||||||
</Book>
|
</Book>
|
||||||
|
@ -127,7 +122,7 @@
|
||||||
<tRSysVw>1</tRSysVw>
|
<tRSysVw>1</tRSysVw>
|
||||||
<sRunDeb>0</sRunDeb>
|
<sRunDeb>0</sRunDeb>
|
||||||
<sLrtime>0</sLrtime>
|
<sLrtime>0</sLrtime>
|
||||||
<nTsel>3</nTsel>
|
<nTsel>5</nTsel>
|
||||||
<sDll></sDll>
|
<sDll></sDll>
|
||||||
<sDllPa></sDllPa>
|
<sDllPa></sDllPa>
|
||||||
<sDlgDll></sDlgDll>
|
<sDlgDll></sDlgDll>
|
||||||
|
@ -138,13 +133,18 @@
|
||||||
<tDlgDll></tDlgDll>
|
<tDlgDll></tDlgDll>
|
||||||
<tDlgPa></tDlgPa>
|
<tDlgPa></tDlgPa>
|
||||||
<tIfile></tIfile>
|
<tIfile></tIfile>
|
||||||
<pMon>Segger\JL2CM3.dll</pMon>
|
<pMon>STLink\ST-LINKIII-KEIL_SWO.dll</pMon>
|
||||||
</DebugOpt>
|
</DebugOpt>
|
||||||
<TargetDriverDllRegistry>
|
<TargetDriverDllRegistry>
|
||||||
|
<SetRegEntry>
|
||||||
|
<Number>0</Number>
|
||||||
|
<Key>ST-LINKIII-KEIL_SWO</Key>
|
||||||
|
<Name>-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)</Name>
|
||||||
|
</SetRegEntry>
|
||||||
<SetRegEntry>
|
<SetRegEntry>
|
||||||
<Number>0</Number>
|
<Number>0</Number>
|
||||||
<Key>JL2CM3</Key>
|
<Key>JL2CM3</Key>
|
||||||
<Name>-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)</Name>
|
<Name>-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)</Name>
|
||||||
</SetRegEntry>
|
</SetRegEntry>
|
||||||
<SetRegEntry>
|
<SetRegEntry>
|
||||||
<Number>0</Number>
|
<Number>0</Number>
|
||||||
|
|
|
@ -10,12 +10,12 @@
|
||||||
<TargetName>Target 1</TargetName>
|
<TargetName>Target 1</TargetName>
|
||||||
<ToolsetNumber>0x4</ToolsetNumber>
|
<ToolsetNumber>0x4</ToolsetNumber>
|
||||||
<ToolsetName>ARM-ADS</ToolsetName>
|
<ToolsetName>ARM-ADS</ToolsetName>
|
||||||
<pCCUsed>5060183::V5.06 update 2 (build 183)::ARMCC</pCCUsed>
|
<pCCUsed>5060300::V5.06 update 3 (build 300)::ARMCC</pCCUsed>
|
||||||
<TargetOption>
|
<TargetOption>
|
||||||
<TargetCommonOption>
|
<TargetCommonOption>
|
||||||
<Device>STM32F103C8</Device>
|
<Device>STM32F103C8</Device>
|
||||||
<Vendor>STMicroelectronics</Vendor>
|
<Vendor>STMicroelectronics</Vendor>
|
||||||
<PackID>Keil.STM32F1xx_DFP.2.2.0</PackID>
|
<PackID>Keil.STM32F1xx_DFP.1.1.0</PackID>
|
||||||
<PackURL>http://www.keil.com/pack/</PackURL>
|
<PackURL>http://www.keil.com/pack/</PackURL>
|
||||||
<Cpu>IRAM(0x20000000,0x5000) IROM(0x08000000,0x10000) CPUTYPE("Cortex-M3") CLOCK(12000000) ELITTLE</Cpu>
|
<Cpu>IRAM(0x20000000,0x5000) IROM(0x08000000,0x10000) CPUTYPE("Cortex-M3") CLOCK(12000000) ELITTLE</Cpu>
|
||||||
<FlashUtilSpec></FlashUtilSpec>
|
<FlashUtilSpec></FlashUtilSpec>
|
||||||
|
@ -330,6 +330,7 @@
|
||||||
<vShortWch>1</vShortWch>
|
<vShortWch>1</vShortWch>
|
||||||
<v6Lto>0</v6Lto>
|
<v6Lto>0</v6Lto>
|
||||||
<v6WtE>0</v6WtE>
|
<v6WtE>0</v6WtE>
|
||||||
|
<v6Rtti>0</v6Rtti>
|
||||||
<VariousControls>
|
<VariousControls>
|
||||||
<MiscControls>--via .\params.mk</MiscControls>
|
<MiscControls>--via .\params.mk</MiscControls>
|
||||||
<Define>USE_STDPERIPH_DRIVER,STM32F10X_MD</Define>
|
<Define>USE_STDPERIPH_DRIVER,STM32F10X_MD</Define>
|
||||||
|
@ -347,6 +348,7 @@
|
||||||
<NoWarn>0</NoWarn>
|
<NoWarn>0</NoWarn>
|
||||||
<uSurpInc>0</uSurpInc>
|
<uSurpInc>0</uSurpInc>
|
||||||
<useXO>0</useXO>
|
<useXO>0</useXO>
|
||||||
|
<uClangAs>0</uClangAs>
|
||||||
<VariousControls>
|
<VariousControls>
|
||||||
<MiscControls></MiscControls>
|
<MiscControls></MiscControls>
|
||||||
<Define></Define>
|
<Define></Define>
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
# 驱动固件的配置与使用
|
||||||
|
|
||||||
|
#### 一、下位机驱动板的通信
|
||||||
|
|
||||||
|
小车驱动底板主要采用是串口通信,接口上支持`USB`通信。小车与`ROS`交互使用的是`uart3`(小车底板上的`micro usb`接口),小车打印log采用是`uart1`(小车底板上的排针)。
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# 目录说明
|
# 目录说明
|
||||||
|
|
||||||
1. GeekRobotTiny_Firmware : 詹力开发的机器人地盘固件
|
1. `GeekRobotTiny_Firmware` : 詹力开发的机器人地盘固件
|
||||||
2. PiRobot : 目前实验室使用的扫地机器人和割草机器人的固件
|
2. `PiRobot` : 目前实验室使用的扫地机器人和割草机器人的固件
|
Loading…
Reference in New Issue