Skip to content

Commit

Permalink
add target 'HGLRC_G071'
Browse files Browse the repository at this point in the history
  • Loading branch information
CRazypZival authored and tridge committed Oct 8, 2024
1 parent 97f0d66 commit 1106a74
Showing 1 changed file with 63 additions and 0 deletions.
63 changes: 63 additions & 0 deletions Inc/targets.h
Original file line number Diff line number Diff line change
Expand Up @@ -1349,6 +1349,18 @@
#define USE_LED_STRIP
#endif

#ifdef HGLRC_G071
#define FILE_NAME "HGLRC_G071"
#define FIRMWARE_NAME "HGLRC G071"
#define DEAD_TIME 60
#define MILLIVOLT_PER_AMP 67
#define CURRENT_OFFSET 0
#define TARGET_VOLTAGE_DIVIDER 110
#define HARDWARE_GROUP_G0_L
#define USE_SERIAL_TELEMETRY
#define SIXTY_FOUR_KB_MEMORY
#endif

#ifdef SEQURE_12S_G071
#define FILE_NAME "SEQURE_12S_G071"
#define FIRMWARE_NAME "SEQURE PRO "
Expand Down Expand Up @@ -2371,6 +2383,57 @@

#endif

#ifdef HARDWARE_GROUP_G0_L

#define MCU_G071
#define N_VARIANT
#define USE_TIMER_16_CHANNEL_1
#define INPUT_PIN LL_GPIO_PIN_6
#define INPUT_PIN_PORT GPIOA
#define IC_TIMER_CHANNEL LL_TIM_CHANNEL_CH1
#define IC_TIMER_REGISTER TIM16
#define IC_TIMER_POINTER htim16

#define INPUT_DMA_CHANNEL LL_DMA_CHANNEL_1
#define DMA_HANDLE_TYPE_DEF hdma_tim16_ch1
#define IC_DMA_IRQ_NAME DMA1_Channel1_IRQn

#define PHASE_A_GPIO_LOW LL_GPIO_PIN_7
#define PHASE_A_GPIO_PORT_LOW GPIOA
#define PHASE_A_GPIO_HIGH LL_GPIO_PIN_8
#define PHASE_A_GPIO_PORT_HIGH GPIOA

#define PHASE_B_GPIO_LOW LL_GPIO_PIN_0
#define PHASE_B_GPIO_PORT_LOW GPIOB
#define PHASE_B_GPIO_HIGH LL_GPIO_PIN_9
#define PHASE_B_GPIO_PORT_HIGH GPIOA

#define PHASE_C_GPIO_LOW LL_GPIO_PIN_15
#define PHASE_C_GPIO_PORT_LOW GPIOB
#define PHASE_C_GPIO_HIGH LL_GPIO_PIN_10
#define PHASE_C_GPIO_PORT_HIGH GPIOA

#define PHASE_A_COMP LL_COMP_INPUT_MINUS_IO3 // pa0
#define PHASE_B_COMP LL_COMP_INPUT_MINUS_IO3 // pa2
#define PHASE_C_COMP LL_COMP_INPUT_MINUS_IO2 // pb7

#define PHASE_A_EXTI_LINE LL_EXTI_LINE_17
#define PHASE_A_COMP_NUMBER COMP1

#define PHASE_B_EXTI_LINE LL_EXTI_LINE_18
#define PHASE_B_COMP_NUMBER COMP2

#define PHASE_C_EXTI_LINE LL_EXTI_LINE_18
#define PHASE_C_COMP_NUMBER COMP2

#define VOLTAGE_ADC_PIN LL_GPIO_PIN_5
#define VOLTAGE_ADC_CHANNEL LL_ADC_CHANNEL_5

#define CURRENT_ADC_PIN LL_GPIO_PIN_4
#define CURRENT_ADC_CHANNEL LL_ADC_CHANNEL_4

#endif // HARDWARE_GROUP_G0_L

#ifdef HARDWARE_GROUP_G4_A

#define MCU_G431
Expand Down

0 comments on commit 1106a74

Please sign in to comment.