Browse Source

update

master
zhaohe 1 year ago
parent
commit
1931c508ac
  1. 24
      README.md
  2. 2
      sdk
  3. 4
      usrc/main.cpp
  4. 8
      usrc/project_configs.h
  5. 4
      usrc/public_service/instance_init.hpp
  6. 2
      usrc/subboards/subboard20_plate_clamp_case/pri_board.h
  7. 2
      usrc/subboards/subboard30_shake_module/pri_board.h
  8. 2
      usrc/subboards/subboard60_inlet_and_outlet_module/pri_board.h
  9. 12
      usrc/subboards/subboard70_incubation_turntable/pri_board.h
  10. 2
      usrc/subboards/subboard70_incubation_turntable/subboard70_incubation_turntable.cpp
  11. 2
      usrc/subboards/subboard80_cliptip/pri_board.h
  12. 6
      usrc/subboards/subboard80_cliptip/subboard80_cliptip_board.c
  13. 2
      usrc/subboards/subboard90_optical_module/pri_board.h

24
README.md

@ -2,24 +2,12 @@
->main
最小硬件初始化
->时钟
对外暴露的时钟
->看门狗
->UART
最小软件初始化
FLASH配置
启动软件
检查ID
ID == 0,灯光调试指示灯快闪
ID == 1,
初始化相应的硬件
subboard20_plate_clamp_case OK
subboard30_shake_module OK
subboard60_inlet_and_outlet_module OK
subboard70_incubation_turntable
subboard80_cliptip
subboard90_optical_module
```

2
sdk

@ -1 +1 @@
Subproject commit 563e4ca7f479b028da851852ebec4fdfad95482e
Subproject commit cae0c02a77a7fde8ab474dd888fd2d56e796c3e4

4
usrc/main.cpp

@ -91,8 +91,8 @@ void umain() {
board_init();
Pin_t debugLight = PC_DEBUG_LIGHT_GPIO;
if (deviceId == 20) {
debugLight = PC_SUBBOARD20_LIGHT_GPIO;
if (deviceId == 20 || deviceId == 80) {
debugLight = PC_SUBBOARD_20_80_LIGHT_GPIO;
}
zos_cfg_t zoscfg = {0};

8
usrc/project_configs.h

@ -4,10 +4,10 @@
#define PC_PROJECT_NAME "a8000_subboard"
#define PC_IFLYTOP_ENABLE_OS 1
#define PC_DEBUG_UART huart1
#define PC_DEBUG_UART_RX_BUF_SIZE 1024
#define PC_DEBUG_LIGHT_GPIO PE2
#define PC_SUBBOARD20_LIGHT_GPIO PE8
#define PC_DEBUG_UART huart1
#define PC_DEBUG_UART_RX_BUF_SIZE 1024
#define PC_DEBUG_LIGHT_GPIO PE2
#define PC_SUBBOARD_20_80_LIGHT_GPIO PE8
//
#define PC_SYS_DELAY_US_TIMER htim6 // US延时定时器

4
usrc/public_service/instance_init.hpp

@ -1,10 +1,10 @@
#define TMC5130_MOTOR_INITER(MOTOR_INDEX, _id) \
{ \
static TMC5130 motor; \
static TMC51X0 motor; \
static StepMotorCtrlModule module; \
int subid = _id; \
\
TMC5130::cfg_t tmc5130cfg = { \
TMC51X0::cfg_t tmc5130cfg = { \
.spi = &TMC_MOTOR_SPI, \
.csgpio = MOTOR##MOTOR_INDEX##_CSN, \
.ennPin = MOTOR##MOTOR_INDEX##_ENN, \

2
usrc/subboards/subboard20_plate_clamp_case/pri_board.h

@ -51,7 +51,7 @@
#define MOTOR1_STEPMOTOR_IHOLD 3
#define MOTOR1_STEPMOTOR_IRUN 16
#define MOTOR1_STEPMOTOR_IHOLDDELAY 100
#define MOTOR1_STEPMOTOR_IGLOBALSCALER 1
#define MOTOR1_STEPMOTOR_IGLOBALSCALER 0
#define MOTOR1_MOTOR_DEFAULT_ACC 300
#define MOTOR1_MOTOR_DEFAULT_DEC 300
#define MOTOR1_MOTOR_DEFAULT_VELOCITY 500

2
usrc/subboards/subboard30_shake_module/pri_board.h

@ -42,7 +42,7 @@
#define MOTOR1_STEPMOTOR_IHOLD 2
#define MOTOR1_STEPMOTOR_IRUN 8
#define MOTOR1_STEPMOTOR_IHOLDDELAY 100
#define MOTOR1_STEPMOTOR_IGLOBALSCALER 1
#define MOTOR1_STEPMOTOR_IGLOBALSCALER 0
#define MOTOR1_MOTOR_DEFAULT_ACC 300
#define MOTOR1_MOTOR_DEFAULT_DEC 300
#define MOTOR1_MOTOR_DEFAULT_VELOCITY 150

2
usrc/subboards/subboard60_inlet_and_outlet_module/pri_board.h

@ -47,7 +47,7 @@
#define MOTOR1_STEPMOTOR_IHOLD 2
#define MOTOR1_STEPMOTOR_IRUN 24
#define MOTOR1_STEPMOTOR_IHOLDDELAY 100
#define MOTOR1_STEPMOTOR_IGLOBALSCALER 1
#define MOTOR1_STEPMOTOR_IGLOBALSCALER 0
#define MOTOR1_MOTOR_DEFAULT_ACC 300
#define MOTOR1_MOTOR_DEFAULT_DEC 300
#define MOTOR1_MOTOR_DEFAULT_VELOCITY 300

12
usrc/subboards/subboard70_incubation_turntable/pri_board.h

@ -45,16 +45,16 @@
#define TMC_MOTOR_SPI hspi1
#define MOTOR1_CSN PA4
#define MOTOR1_ENN PE3
#define MOTOR1_ENN PinNull
#define MOTOR1_SPI_MODE_SELECT PinNull
#define MOTOR1_nFREEZE_IO PE12
#define MOTOR1_nRESET_IO PinNull
#define MOTOR1_SUB_IC_ENN_IO PE11
#define MOTOR1_REFL PinNull
#define MOTOR1_REFR PinNull
#define MOTOR1_REFL_MIRROR false
#define MOTOR1_REFR_MIRROR false
#define MOTOR1_REFL PD3
#define MOTOR1_REFR PD2
#define MOTOR1_REFL_MIRROR true
#define MOTOR1_REFR_MIRROR true
#define MOTOR1_MOTOR_SHAFT false //
#define MOTOR1_MOTOR_ONE_CIRCLE_PULSE 387096 // 3600 = 93圈, 3600/93 = 38.70967741935484
@ -62,7 +62,7 @@
#define MOTOR1_STEPMOTOR_IHOLD 1
#define MOTOR1_STEPMOTOR_IRUN 5
#define MOTOR1_STEPMOTOR_IHOLDDELAY 100
#define MOTOR1_STEPMOTOR_IGLOBALSCALER 1
#define MOTOR1_STEPMOTOR_IGLOBALSCALER 0
#define MOTOR1_MOTOR_DEFAULT_ACC 900
#define MOTOR1_MOTOR_DEFAULT_DEC 900
#define MOTOR1_MOTOR_DEFAULT_VELOCITY 300

2
usrc/subboards/subboard70_incubation_turntable/subboard70_incubation_turntable.cpp

@ -13,7 +13,9 @@ extern "C" {
#define TAG "ShakeModule"
using namespace iflytop;
#define TAG "Subboard70IncubationTurntable"
void Subboard70IncubationTurntable::initialize() {
ZLOGI(TAG, "suboard 70 initialize");
IO_INIT();
GService::inst()->getZCanProtocolParser()->registerModule(this);

2
usrc/subboards/subboard80_cliptip/pri_board.h

@ -49,7 +49,7 @@
#define MOTOR1_STEPMOTOR_IHOLD 1
#define MOTOR1_STEPMOTOR_IRUN 8
#define MOTOR1_STEPMOTOR_IHOLDDELAY 100
#define MOTOR1_STEPMOTOR_IGLOBALSCALER 1
#define MOTOR1_STEPMOTOR_IGLOBALSCALER 0
#define MOTOR1_MOTOR_DEFAULT_ACC 300
#define MOTOR1_MOTOR_DEFAULT_DEC 300
#define MOTOR1_MOTOR_DEFAULT_VELOCITY 500

6
usrc/subboards/subboard80_cliptip/subboard80_cliptip_board.c

@ -175,13 +175,9 @@ static void UART4_Init() {
huart4_enable = true;
}
/**
* @brief
*/
void subboard80_cliptip_board_init() {
common_hardware_init();
MX_SPI1_Init();
UART2_Init(); //
UART2_Init();
UART4_Init();
}

2
usrc/subboards/subboard90_optical_module/pri_board.h

@ -50,7 +50,7 @@
#define MOTOR1_STEPMOTOR_IHOLD 1
#define MOTOR1_STEPMOTOR_IRUN 8
#define MOTOR1_STEPMOTOR_IHOLDDELAY 100
#define MOTOR1_STEPMOTOR_IGLOBALSCALER 1
#define MOTOR1_STEPMOTOR_IGLOBALSCALER 0
#define MOTOR1_MOTOR_DEFAULT_ACC 300
#define MOTOR1_MOTOR_DEFAULT_DEC 300
#define MOTOR1_MOTOR_DEFAULT_VELOCITY 500

Loading…
Cancel
Save