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 DemonF4 target #211

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
12 changes: 9 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#

# The target to build, see VALID_TARGETS below
TARGET ?= NAZE
TARGET ?= DEMONF4

# Compile-time options
OPTIONS ?=
Expand All @@ -41,9 +41,9 @@ FORKNAME = raceflight
CC3D_TARGETS = CC3D CC3D_OPBL
F1_TARGETS = NAZE OLIMEXINO CJMCU EUSTM32F103RC PORT103R ALIENWIIF1 AFROMINI
F3_TARGETS = STM32F3DISCOVERY CHEBUZZF3 NAZE32PRO SPRACINGF3 IRCFUSIONF3 SPARKY ALIENWIIF3 COLIBRI_RACE MOTOLAB RMDO LUX_RACE
F4_TARGETS = REVO REVO_OPBL SPARKY2 SPARKY2_OPBL REVONANO REVONANO_OPBL ALIENFLIGHTF4 BLUEJAYF4 VRCORE QUANTON KKNGF4
F4_TARGETS = REVO REVO_OPBL SPARKY2 SPARKY2_OPBL REVONANO REVONANO_OPBL ALIENFLIGHTF4 BLUEJAYF4 VRCORE QUANTON KKNGF4 DEMONF4

F405_TARGETS = REVO REVO_OPBL SPARKY2 SPARKY2_OPBL ALIENFLIGHTF4 BLUEJAYF4 VRCORE QUANTON KKNGF4
F405_TARGETS = REVO REVO_OPBL SPARKY2 SPARKY2_OPBL ALIENFLIGHTF4 BLUEJAYF4 VRCORE QUANTON KKNGF4 DEMONF4
F405_TARGETS_16 = QUANTON
F411_TARGETS = REVONANO REVONANO_OPBL

Expand Down Expand Up @@ -682,6 +682,12 @@ REVONANO_SRC = $(STM32F4xx_COMMON_SRC) \
$(HIGHEND_SRC) \
$(COMMON_SRC) \
$(VCPF4_SRC)

DEMONF4_SRC = $(STM32F4xx_COMMON_SRC) \
drivers/accgyro_spi_mpu9250.c \
$(HIGHEND_SRC) \
$(COMMON_SRC) \
$(VCPF4_SRC)

SPARKY2_SRC = $(STM32F4xx_COMMON_SRC) \
drivers/accgyro_spi_mpu9250.c \
Expand Down
20 changes: 20 additions & 0 deletions src/main/drivers/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,26 @@ const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = {

#endif


#if defined(DEMONF4)
const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = {

{ TIM8, GPIOC, Pin_6, TIM_Channel_2, TIM8_CC_IRQn, 0, GPIO_Mode_AF, GPIO_PinSource6, GPIO_AF_TIM8}, // PPM_IN

{ TIM5, GPIOA, Pin_0, TIM_Channel_1, TIM5_IRQn, 1, GPIO_Mode_AF, GPIO_PinSource0, GPIO_AF_TIM5}, // S1_OUT
{ TIM5, GPIOA, Pin_1, TIM_Channel_2, TIM5_IRQn, 1, GPIO_Mode_AF, GPIO_PinSource1, GPIO_AF_TIM5}, // S2_OUT
{ TIM5, GPIOA, Pin_2, TIM_Channel_3, TIM5_IRQn, 1, GPIO_Mode_AF, GPIO_PinSource2, GPIO_AF_TIM5}, // S3_OUT
{ TIM5, GPIOA, Pin_3, TIM_Channel_4, TIM5_IRQn, 1, GPIO_Mode_AF, GPIO_PinSource3, GPIO_AF_TIM5}, // S4_OUT
};

#define USED_TIMERS ( TIM_N(2) | TIM_N(3) | TIM_N(5) | TIM_N(12) | TIM_N(8) | TIM_N(9))

#define TIMER_APB1_PERIPHERALS (RCC_APB1Periph_TIM2 | RCC_APB1Periph_TIM3 | RCC_APB1Periph_TIM5 | RCC_APB1Periph_TIM12 | RCC_AHB1Periph_GPIOA | RCC_AHB1Periph_GPIOB | RCC_AHB1Periph_GPIOC)
#define TIMER_APB2_PERIPHERALS (RCC_APB2Periph_TIM8 | RCC_APB2Periph_TIM9)

#endif


#if defined(SPARKY2)
const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = {
{ TIM8, GPIOC, Pin_7, TIM_Channel_2, TIM8_CC_IRQn, 0, GPIO_Mode_AF, GPIO_PinSource7, GPIO_AF_TIM8}, // PPM IN
Expand Down
Loading