1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-15 12:25:20 +03:00

EUSTM32F103RC - First cut of support for this High-Density STM32F103

series development board.

These boards can be picked up for less than $11, coupled with a 10DOF
sensor board they make a great development platform or cheap expandable
FC.

Pretty much all pins are available to be used, unlike on the less
capable and more expensive OLIMEXINO.
This commit is contained in:
Dominic Clifton 2014-09-03 01:38:27 +01:00
parent 9977fce4bb
commit 3d382ea4c7
18 changed files with 705 additions and 43 deletions

View file

@ -39,7 +39,7 @@ static volatile uint32_t sysTickUptime = 0;
// from system_stm32f30x.c
void SetSysClock(void);
#endif
#ifdef STM32F10X_MD
#ifdef STM32F10X
// from system_stm32f10x.c
void SetSysClock(bool overclock);
#endif
@ -77,7 +77,7 @@ uint32_t millis(void)
void systemInit(bool overclock)
{
#ifdef STM32F303xC
#ifdef STM32F303
// start fpu
SCB->CPACR = (0x3 << (10*2)) | (0x3 << (11*2));
#endif
@ -85,7 +85,7 @@ void systemInit(bool overclock)
#ifdef STM32F303xC
SetSysClock();
#endif
#ifdef STM32F10X_MD
#ifdef STM32F10X
// Configure the System clock frequency, HCLK, PCLK2 and PCLK1 prescalers
// Configure the Flash Latency cycles and enable prefetch buffer
SetSysClock(overclock);
@ -94,7 +94,7 @@ void systemInit(bool overclock)
// Configure NVIC preempt/priority groups
NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2);
#ifdef STM32F10X_MD
#ifdef STM32F10X
// Turn on clocks for stuff we use
RCC_APB2PeriphClockCmd(RCC_APB2Periph_AFIO, ENABLE);
#endif
@ -105,7 +105,7 @@ void systemInit(bool overclock)
enableGPIOPowerUsageAndNoiseReductions();
#ifdef STM32F10X_MD
#ifdef STM32F10X
// Turn off JTAG port 'cause we're using the GPIO for leds
#define AFIO_MAPR_SWJ_CFG_NO_JTAG_SW (0x2 << 24)
AFIO->MAPR |= AFIO_MAPR_SWJ_CFG_NO_JTAG_SW;