Skip to content

Commit

Permalink
add target 'HGLRC_G071'
Browse files Browse the repository at this point in the history
add target 'HGLRC_G071'

add target

commit
  • Loading branch information
CRazypZival committed Aug 27, 2024
1 parent 976462f commit 6933b1b
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 1 deletion.
63 changes: 63 additions & 0 deletions Inc/targets.h
Original file line number Diff line number Diff line change
Expand Up @@ -801,6 +801,18 @@
#define SIXTY_FOUR_KB_MEMORY
#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_G071
#define FILE_NAME "SEQURE_G071"
#define FIRMWARE_NAME "SEQURE G071 "
Expand Down Expand Up @@ -1748,6 +1760,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

#ifdef HARDWARE_GROUP_G4_A

#define MCU_G431
Expand Down
2 changes: 1 addition & 1 deletion g071makefile.mk
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

TARGETS_G071 := \
PWM_ENABLE_G071 OPEN_DRAIN_G071 OPEN_DRAIN_B_G071 GEN_64K_G071 DT120_64K_G071 IFLIGHT_BLITZ_G071 \
NEUTRONRC_G071 AIKON_PRO_G071 TMOTOR_G071
NEUTRONRC_G071 AIKON_PRO_G071 TMOTOR_G071 HGLRC_G071

HAL_FOLDER_G071 := $(HAL_FOLDER)/g071

Expand Down

0 comments on commit 6933b1b

Please sign in to comment.