Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added TBS_12S_L431_CAN #126

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading