Skip to content

Commit

Permalink
Merge pull request #9541 from iNavFlight/kakute-f405-v24
Browse files Browse the repository at this point in the history
Kakute F4 V2.4
  • Loading branch information
DzikuVx authored Dec 6, 2023
2 parents 01f9498 + d1ac51f commit 118cd48
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 14 deletions.
3 changes: 2 additions & 1 deletion src/main/target/KAKUTEF4/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
target_stm32f405xg(KAKUTEF4)
target_stm32f405xg(KAKUTEF4V2)
target_stm32f405xg(KAKUTEF4V23)
target_stm32f405xg(KAKUTEF4V23)
target_stm32f405xg(KAKUTEF4V24)
12 changes: 6 additions & 6 deletions src/main/target/KAKUTEF4/target.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,21 @@ timerHardware_t timerHardware[] = {
DEF_TIM(TIM3, CH3, PB0, TIM_USE_OUTPUT_AUTO, 0, 0), // S1_OUT - DMA1_ST7
DEF_TIM(TIM3, CH4, PB1, TIM_USE_OUTPUT_AUTO, 0, 0), // S2_OUT - DMA1_ST2
DEF_TIM(TIM2, CH4, PA3, TIM_USE_OUTPUT_AUTO, 0, 1), // S3_OUT - DMA1_ST6
#if !defined(KAKUTEF4V23)
DEF_TIM(TIM5, CH3, PA2, TIM_USE_OUTPUT_AUTO, 0, 0), // S4_OUT - DMA1_ST1

#else
DEF_TIM(TIM5, CH3, PA2, TIM_USE_OUTPUT_AUTO, 0, 0), // S4_OUT - DMA1_ST1
#if defined(KAKUTEF4V23) || defined(KAKUTEF4V24)
DEF_TIM(TIM5, CH3, PA2, TIM_USE_OUTPUT_AUTO, 0, 0), // S4_OUT - DMA1_ST1
DEF_TIM(TIM4, CH1, PB6, TIM_USE_OUTPUT_AUTO, 0, 0), // S5_OUT - DMA1_ST0
DEF_TIM(TIM4, CH2, PB7, TIM_USE_OUTPUT_AUTO, 0, 0), // S6_OUT - DMA1_ST3
#else
DEF_TIM(TIM5, CH3, PA2, TIM_USE_OUTPUT_AUTO, 0, 0), // S4_OUT - DMA1_ST1
#endif

#if defined(KAKUTEF4V2) || defined(KAKUTEF4V23)
#if defined(KAKUTEF4V2) || defined(KAKUTEF4V23) || defined(KAKUTEF4V24)
DEF_TIM(TIM8, CH3, PC8, TIM_USE_LED, 0, 0), // LED_STRIP - DMA2_ST2
#else
DEF_TIM(TIM5, CH1, PA0, TIM_USE_OUTPUT_AUTO, 0, 0), // S5_OUT - DMA1_ST2
DEF_TIM(TIM8, CH3, PC8, TIM_USE_OUTPUT_AUTO, 0, 1), // S6_OUT - DMA2_ST4
DEF_TIM(TIM5, CH2, PA1, TIM_USE_LED, 0, 0), // LED_STRIP - DMA1_ST4
DEF_TIM(TIM5, CH2, PA1, TIM_USE_LED, 0, 0), // LED_STRIP - DMA1_ST4
#endif
};

Expand Down
18 changes: 11 additions & 7 deletions src/main/target/KAKUTEF4/target.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
#elif defined(KAKUTEF4V23)
# define TARGET_BOARD_IDENTIFIER "KT23"
# define USBD_PRODUCT_STRING "KakuteF4-V2.3"
#elif defined(KAKUTEF4V24)
# define TARGET_BOARD_IDENTIFIER "KT24"
# define USBD_PRODUCT_STRING "KakuteF4-V2.4"
#else
# define TARGET_BOARD_IDENTIFIER "KTV1"
# define USBD_PRODUCT_STRING "KakuteF4-V1"
Expand All @@ -37,7 +40,7 @@
#define LED0 PB5
#define LED1 PB4

#if !defined(KAKUTEF4V23)
#if defined(KAKUTEF4) || defined(KAKUTEF4V2)
# define LED2 PB6
#endif

Expand All @@ -54,7 +57,7 @@
#define MPU6000_CS_PIN PC4
#define MPU6000_SPI_BUS BUS_SPI1

#if defined(KAKUTEF4V2) || defined(KAKUTEF4V23)
#if defined(KAKUTEF4V2) || defined(KAKUTEF4V23) || defined(KAKUTEF4V24)
# define USE_I2C
# define USE_I2C_DEVICE_1
# define I2C1_SCL PB8 // SCL pad
Expand All @@ -79,11 +82,12 @@
#define MAX7456_SPI_BUS BUS_SPI3
#define MAX7456_CS_PIN PB14

#define M25P16_CS_PIN PB3
#define M25P16_SPI_BUS BUS_SPI3

#define USE_FLASHFS

#define USE_FLASH_M25P16
#define M25P16_CS_PIN PB3
#define M25P16_SPI_BUS BUS_SPI3
#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT

#define USB_IO
#define USE_VCP
Expand All @@ -105,7 +109,7 @@
#define UART6_RX_PIN PC7
#define UART6_TX_PIN PC6

#if defined(KAKUTEF4V2) || defined(KAKUTEF4V23)
#if defined(KAKUTEF4V2) || defined(KAKUTEF4V23) || defined(KAKUTEF4V24)
# define USE_UART4
# define UART4_RX_PIN PA1
# define UART4_TX_PIN PA0
Expand Down Expand Up @@ -153,7 +157,7 @@
#define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
#define RSSI_ADC_CHANNEL ADC_CHN_3

#define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_TELEMETRY | FEATURE_OSD)
#define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_TELEMETRY | FEATURE_OSD | FEATURE_BLACKBOX)
#define DEFAULT_RX_TYPE RX_TYPE_SERIAL
#define SERIALRX_PROVIDER SERIALRX_SBUS
#define SERIALRX_UART SERIAL_PORT_USART3
Expand Down

0 comments on commit 118cd48

Please sign in to comment.