update firmware defines to support pcb rev 2
This commit is contained in:
@@ -32,6 +32,20 @@
|
||||
#define CAN_TX PB8
|
||||
#define CAN_RX PB9
|
||||
|
||||
// CONTROL INPUTS
|
||||
#ifdef PCB_REV1
|
||||
#define STEP_PIN PB14
|
||||
#define DIR_PIN PB15
|
||||
#endif
|
||||
|
||||
#ifdef PCB_REV2
|
||||
#define STEP_PIN PC11
|
||||
#define DIR_PIN PA8
|
||||
|
||||
#define I2C_SDA PC11
|
||||
#define I2C_SCL PA8
|
||||
#endif
|
||||
|
||||
// AUX
|
||||
#define LED_GOOD PB10
|
||||
#define LED_FAULT PB11
|
||||
|
||||
@@ -20,7 +20,6 @@ test_dir = firmware/test
|
||||
platform = ststm32
|
||||
board = genericSTM32G431CB
|
||||
board_build.f_cpu = 168000000
|
||||
board_build.ldscript = ./firmware/ldscript.ld
|
||||
framework = arduino
|
||||
upload_protocol = stlink
|
||||
debug_tool = stlink
|
||||
@@ -35,7 +34,10 @@ build_flags =
|
||||
-D FDCAN_ALT1
|
||||
-D SN65HVD23x
|
||||
-D ARDUINO_GENERIC_G431CBUX
|
||||
-D PCB_REV1 ; or PCB_REV2
|
||||
|
||||
lib_deps =
|
||||
askuric/Simple FOC@^2.2.3
|
||||
simplefoc/SimpleFOCDrivers@^1.0.2
|
||||
|
||||
lib_archive = false
|
||||
|
||||
Reference in New Issue
Block a user