10 changed files with 143 additions and 107 deletions
-
2.cproject
-
1Core/Inc/stm32f4xx_it.h
-
4Core/Src/dma.c
-
15Core/Src/stm32f4xx_it.c
-
24Core/Src/usart.c
-
16hbot_robot_controler.ioc
-
2sdk
-
29usrc/board.h
-
94usrc/main.cpp
-
55usrc/project_configs.h
@ -1 +1 @@ |
|||
Subproject commit 8ce6efeeb5117fb2d1cd878178dec0aff4d7ed63 |
|||
Subproject commit 14654f98532a65013384eb1582845af08c9cf327 |
@ -0,0 +1,29 @@ |
|||
#pragma once |
|||
|
|||
#define BOARD_ID 1 |
|||
#define TMC_MOTOR_SPI hspi1 |
|||
|
|||
// MOTOR1 |
|||
#define TMC_MOTOR1_CHANNEL 1 |
|||
#define TMC_MOTOR1_SPI_SELECT1_IO PA4 |
|||
#define TMC_MOTOR1_nFREEZE_IO PC2 |
|||
#define TMC_MOTOR1_nRESET_IO PB3 |
|||
#define TMC_MOTOR1_SUB_IC_ENN_IO PC3 |
|||
#define TMC_MOTOR1_ENN_IO // unused |
|||
|
|||
// MOTOR2 |
|||
#define TMC_MOTOR2_CHANNEL 2 |
|||
#define TMC_MOTOR2_SPI_SELECT1_IO PA8 |
|||
#define TMC_MOTOR2_nFREEZE_IO PC6 |
|||
#define TMC_MOTOR2_nRESET_IO PB2 |
|||
#define TMC_MOTOR2_SUB_IC_ENN_IO PC7 |
|||
#define TMC_MOTOR2_ENN_IO // unused |
|||
|
|||
#define ARM_SENSOR1_GPIO PD0 |
|||
#define ARM_SENSOR2_GPIO PD1 |
|||
#define ARM_SENSOR3_GPIO PD2 |
|||
#define ARM_SENSOR4_GPIO PD3 |
|||
#define ARM_SENSOR5_GPIO PD4 |
|||
#define ARM_SENSOR6_GPIO PD5 |
|||
#define ARM_SENSOR7_GPIO PD6 |
|||
#define ARM_SENSOR8_GPIO PD7 |
@ -1,46 +1,21 @@ |
|||
#pragma once |
|||
|
|||
#define VERSION "v1.0.0" |
|||
#define MANUFACTURER "http://www.iflytop.com/" |
|||
#define PROJECT_NAME "xy_robot_board" |
|||
#define DEBUG_UART huart1 |
|||
#define DEBUG_LIGHT_GPIO PE2 |
|||
#define PC_VERSION "v1.0.0" |
|||
#define PC_MANUFACTURER "http://www.iflytop.com/" |
|||
#define PC_PROJECT_NAME "xy_robot_board" |
|||
#define PC_IFLYTOP_ENABLE_OS 1 |
|||
|
|||
#define DELAY_US_TIMER htim6 // US延时定时器 |
|||
#define TIM_IRQ_SCHEDULER_TIMER htim7 // 中断定时器中断调度器 |
|||
#define IFLTYOP_ZTICKET_TIMER TIM11 // 系统ticket定时器 |
|||
#define PC_DEBUG_UART huart1 |
|||
#define PC_DEBUG_UART_DMA_HANDLER hdma_usart1_rx |
|||
#define PC_DEBUG_UART_RX_BUF_SIZE 1024 |
|||
#define PC_DEBUG_LIGHT_GPIO PE2 |
|||
|
|||
#define IFLYTOP_ENABLE_OS 1 |
|||
#define IFLYTOP_PREEMPTPRIORITY_DEFAULT 5 |
|||
#define PC_SYS_DELAY_US_TIMER htim6 // US延时定时器 |
|||
#define PC_SYS_ZTICKET_TIMER TIM11 // 系统ticket定时器 |
|||
#define PC_SYS_TIM_IRQ_SCHEDULER_TIMER htim7 // 中断定时器中断调度器 |
|||
|
|||
#define MODULE_ID (1) |
|||
#define BOARD_ID (1) |
|||
#define PC_IRQ_PREEMPTPRIORITY_DEFAULT 5 |
|||
|
|||
/****************************************FLASH***************************************/ |
|||
#define IFLYTOP_NVS_CONFIG_FLASH_SECTOR 8 |
|||
/*********************************************************************************/ |
|||
|
|||
// MOTOR1 |
|||
#define TMC_MOTOR1_CHANNEL 1 |
|||
#define TMC_MOTOR1_SPI_SELECT1_IO PA4 |
|||
#define TMC_MOTOR1_nFREEZE_IO PC2 |
|||
#define TMC_MOTOR1_nRESET_IO PB3 |
|||
#define TMC_MOTOR1_SUB_IC_ENN_IO PC3 |
|||
#define TMC_MOTOR1_ENN_IO // unused |
|||
|
|||
// MOTOR2 |
|||
#define TMC_MOTOR2_CHANNEL 2 |
|||
#define TMC_MOTOR2_SPI_SELECT1_IO PA8 |
|||
#define TMC_MOTOR2_nFREEZE_IO PC6 |
|||
#define TMC_MOTOR2_nRESET_IO PB2 |
|||
#define TMC_MOTOR2_SUB_IC_ENN_IO PC7 |
|||
#define TMC_MOTOR2_ENN_IO // unused |
|||
|
|||
#define ARM_SENSOR1_GPIO PD0 |
|||
#define ARM_SENSOR2_GPIO PD1 |
|||
#define ARM_SENSOR3_GPIO PD2 |
|||
#define ARM_SENSOR4_GPIO PD3 |
|||
#define ARM_SENSOR5_GPIO PD4 |
|||
#define ARM_SENSOR6_GPIO PD5 |
|||
#define ARM_SENSOR7_GPIO PD6 |
|||
#define ARM_SENSOR8_GPIO PD7 |
|||
#define PC_NVS_ENABLE 1 |
|||
#define PC_NVS_CONFIG_FLASH_SECTOR 8 |
|||
#define PC_NVS_INIT_CB nvs_init_cb |
Write
Preview
Loading…
Cancel
Save
Reference in new issue