Skip to content

Commit

Permalink
added TBS_12S_L431_CAN
Browse files Browse the repository at this point in the history
  • Loading branch information
tridge committed Dec 12, 2024
1 parent d9cd978 commit 6637738
Showing 1 changed file with 29 additions and 24 deletions.
53 changes: 29 additions & 24 deletions Inc/targets.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,28 @@
#define DRONECAN_SUPPORT 1
#define DEAD_TIME 45
#define HARDWARE_GROUP_L4_C
#define HARDWARE_GROUP_L4_054
#define TARGET_VOLTAGE_DIVIDER 100
#define MILLIVOLT_PER_AMP 100
#define USE_SERIAL_TELEMETRY
#endif

#ifdef TBS_12S_L431_CAN
#define FIRMWARE_NAME "TBS 12S CAN"
#define FILE_NAME "TBS_12S_L431_CAN"
#define DEAD_TIME 120
#define HARDWARE_GROUP_L4_C
#define HARDWARE_GROUP_L4_045
#define DRONECAN_SUPPORT 1
#define CAN_TERM_PIN GPIO_PORT_PIN(1, 3) // PB3
#define CAN_TERM_POLARITY 1 // active high
#define TARGET_VOLTAGE_DIVIDER 210
#define MILLIVOLT_PER_AMP 25
#define RAMP_SPEED_LOW_RPM 1
#define RAMP_SPEED_HIGH_RPM 1
#define LOOP_FREQUENCY_HZ 20000
#endif

#ifdef REF_L431
#define FILE_NAME "REF_L431"
#define FIRMWARE_NAME "L431 Neutron"
Expand Down Expand Up @@ -713,27 +730,6 @@
#define EEPROM_START_ADD (uint32_t)0x0801F800
#endif

#ifdef TBS_12S_F415_CAN
#define FIRMWARE_NAME "TBS 12S CAN"
#define FILE_NAME "TBS_12S_F415_CAN"
#define DEAD_TIME 120
#define HARDWARE_GROUP_AT_D
#define HARDWARE_GROUP_AT_045
#define DRONECAN_SUPPORT 1
#define CAN_TERM_PIN GPIO_PORT_PIN(1, 3) // PB3
#define CAN_TERM_POLARITY 1 // active high
#define USE_SERIAL_TELEMETRY
#define ADC_CHANNEL_VOLTAGE ADC_CHANNEL_6
#define ADC_CHANNEL_CURRENT ADC_CHANNEL_3
#define TARGET_VOLTAGE_DIVIDER 210
#define MILLIVOLT_PER_AMP 25
#define RAMP_SPEED_LOW_RPM 1
#define RAMP_SPEED_HIGH_RPM 1
#define LOOP_FREQUENCY_HZ 20000
#define PA6_VOLTAGE
#define EEPROM_START_ADD (uint32_t)0x0801F800
#endif

#ifdef AIKON_SINGLE_F421
#define FIRMWARE_NAME "AIKON S F4 "
#define FILE_NAME "AIKON_SINGLE_F421"
Expand Down Expand Up @@ -3400,9 +3396,6 @@
#define PHASE_C_GPIO_PORT_HIGH GPIOA

#define USE_COMP_1
#define PHASE_A_COMP LL_COMP_INPUT_MINUS_IO3 // pa0
#define PHASE_B_COMP LL_COMP_INPUT_MINUS_IO5 // pa5
#define PHASE_C_COMP LL_COMP_INPUT_MINUS_IO4 // pa4

#define COMMON_COMP LL_COMP_INPUT_PLUS_IO3 //pa1

Expand All @@ -3414,6 +3407,18 @@

#endif

#ifdef HARDWARE_GROUP_L4_045
#define PHASE_A_COMP LL_COMP_INPUT_MINUS_IO3 // pa0
#define PHASE_B_COMP LL_COMP_INPUT_MINUS_IO4 // pa4
#define PHASE_C_COMP LL_COMP_INPUT_MINUS_IO5 // pa5
#endif

#ifdef HARDWARE_GROUP_L4_054
#define PHASE_A_COMP LL_COMP_INPUT_MINUS_IO3 // pa0
#define PHASE_B_COMP LL_COMP_INPUT_MINUS_IO5 // pa5
#define PHASE_C_COMP LL_COMP_INPUT_MINUS_IO4 // pa4
#endif

#ifdef HARDWARE_GROUP_L4_N

#define MCU_L431
Expand Down

0 comments on commit 6637738

Please sign in to comment.