Skip to content

Commit

Permalink
Merge branch 'master' into update_readme
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeller authored Mar 3, 2018
2 parents cec1b1a + dedad2f commit e8cc230
Show file tree
Hide file tree
Showing 8 changed files with 188 additions and 160 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
![Important Notice: Support for STM32F1 based flight controllers has been dropped in Betaflight release 3.3. This includes NAZE, CC3D (original) and CJMCU like flight controllers](https://raw.githubusercontent.com/wiki/betaflight/betaflight/images/betaflight/bf3_3_notice.png)
![Important Notice: Support for STM32F1 based flight controllers has been dropped in Betaflight release 3.3. This includes NAZE, CC3D (original) and CJMCU like flight controllers](https://raw.githubusercontent.com/wiki/betaflight/betaflight/images/betaflight/stm32f1_support_notice.png)


![Betaflight](https://raw.githubusercontent.com/wiki/betaflight/betaflight/images/betaflight/bf_logo.png)

Expand Down
9 changes: 1 addition & 8 deletions src/main/drivers/pwm_output.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,16 +110,14 @@ typedef enum {
typedef struct {
TIM_TypeDef *timer;
#if defined(USE_DSHOT) && defined(USE_DSHOT_DMAR)
#if !defined(USE_HAL_DRIVER)
#ifdef STM32F3
DMA_Channel_TypeDef *dmaBurstRef;
#else
DMA_Stream_TypeDef *dmaBurstRef;
#endif
uint16_t dmaBurstLength;
#endif
#endif
uint32_t dmaBurstBuffer[DSHOT_DMA_BUFFER_SIZE * 4];
#endif
uint16_t timerDmaSources;
} motorDmaTimer_t;

Expand All @@ -138,11 +136,6 @@ typedef struct {
#else
uint8_t dmaBuffer[DSHOT_DMA_BUFFER_SIZE];
#endif
#if defined(USE_HAL_DRIVER)
TIM_HandleTypeDef TimHandle;
DMA_HandleTypeDef hdma_tim;
uint16_t timerDmaIndex;
#endif
} motorDmaOutput_t;

motorDmaOutput_t *getMotorDmaOutput(uint8_t index);
Expand Down
307 changes: 159 additions & 148 deletions src/main/drivers/pwm_output_dshot_hal.c

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions src/main/interface/msp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1773,6 +1773,9 @@ static mspResult_e mspProcessInCommand(uint8_t cmdMSP, sbuf_t *src)
{
const uint8_t command = sbufReadU8(src);
uint8_t disableRunawayTakeoff = 0;
#ifndef USE_RUNAWAY_TAKEOFF
UNUSED(disableRunawayTakeoff);
#endif
if (sbufBytesRemaining(src)) {
disableRunawayTakeoff = sbufReadU8(src);
}
Expand Down
20 changes: 20 additions & 0 deletions src/main/osd_slave/osd_slave_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@

#include "pg/adc.h"
#include "pg/bus_i2c.h"
#include "pg/bus_spi.h"
#include "pg/pg.h"
#include "pg/pg_ids.h"
#include "pg/vcd.h"
Expand Down Expand Up @@ -119,6 +120,20 @@ static IO_t busSwitchResetPin = IO_NONE;
}
#endif


#ifdef USE_SPI
// Pre-initialize all CS pins to input with pull-up.
// It's sad that we can't do this with an initialized array,
// since we will be taking care of configurable CS pins shortly.

void spiPreInit(void)
{
#ifdef USE_MAX7456
spiPreInitCs(IO_TAG(MAX7456_SPI_CS_PIN));
#endif
}
#endif

void init(void)
{
#ifdef USE_HAL_DRIVER
Expand Down Expand Up @@ -186,6 +201,11 @@ void init(void)
#else

#ifdef USE_SPI
spiPinConfigure(spiPinConfig());

// Initialize CS lines and keep them high
spiPreInit();

#ifdef USE_SPI_DEVICE_1
spiInit(SPIDEV_1);
#endif
Expand Down
2 changes: 1 addition & 1 deletion src/main/target/NAZE/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ void targetConfiguration(void)

controlRateConfig->rcRates[FD_ROLL] = 100;
controlRateConfig->rcRates[FD_PITCH] = 100;
controlRateConfig->rcRate[FD_YAW] = 110;
controlRateConfig->rcRates[FD_YAW] = 110;
controlRateConfig->rcExpo[FD_ROLL] = 0;
controlRateConfig->rcExpo[FD_PITCH] = 0;
controlRateConfig->rates[FD_ROLL] = 77;
Expand Down
2 changes: 1 addition & 1 deletion src/main/target/stm32f7xx_hal_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@
#define PREFETCH_ENABLE 1U
#define ART_ACCLERATOR_ENABLE 1U /* To enable instruction cache and prefetch */
#define INSTRUCTION_CACHE_ENABLE 1U
#define DATA_CACHE_ENABLE 0U
#define DATA_CACHE_ENABLE 1U

/* ########################## Assert Selection ############################## */
/**
Expand Down
2 changes: 1 addition & 1 deletion src/main/target/system_stm32f7xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ void SystemInit(void)
/* Configure the system clock to 216 MHz */
SystemClock_Config();

if (SystemCoreClock != 216000000) {
if (SystemCoreClock != (PLL_N / PLL_P) * 1000000) {
// There is a mismatch between the configured clock and the expected clock in portable.h
while (1);
}
Expand Down

0 comments on commit e8cc230

Please sign in to comment.