From 44d20cea0a7469566d637259347f214b7f27b966 Mon Sep 17 00:00:00 2001 From: its-kronos <140297693+its-kronos@users.noreply.github.com> Date: Fri, 29 Aug 2025 16:23:34 -0400 Subject: [PATCH 01/10] Update boards.txt - declare custom devboard named databoard Signed-off-by: its-kronos <140297693+its-kronos@users.noreply.github.com> --- boards.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/boards.txt b/boards.txt index 70e6ab6f95..efcf5ef431 100644 --- a/boards.txt +++ b/boards.txt @@ -2971,6 +2971,16 @@ GenF1.menu.pnum.BLACKPILL_F103CB.build.variant_h=variant_PILL_F103Cx.h GenF1.menu.pnum.BLACKPILL_F103CB.build.variant=STM32F1xx/F103C8T_F103CB(T-U) GenF1.menu.pnum.BLACKPILL_F103CB.debug.svd_file={runtime.tools.STM32_SVD.path}/svd/STM32F1xx/STM32F103.svd +# Databoard board +GenF1.menu.pnum.DATABOARD=Databoard +GenF1.menu.pnum.DATABOARD.upload.maximum_size=65536 +GenF1.menu.pnum.DATABOARD.upload.maximum_data_size=20480 +GenF1.menu.pnum.DATABOARD.build.board=DATABOARD +GenF1.menu.pnum.DATABOARD.build.product_line=STM32F103xB +GenF1.menu.pnum.DATABOARD.build.variant_h=variant_{build.board}.h +GenF1.menu.pnum.DATABOARD.build.variant=STM32F1xx/F103C8T_F103CB(T-U) +GenF1.menu.pnum.DATABOARD.debug.svd_file={runtime.tools.STM32_SVD.path}/svd/STM32F1xx/STM32F103.svd + # VCCGND_F103ZET6_MINI board GenF1.menu.pnum.VCCGND_F103ZET6_MINI=VCCGND F103ZET6 Mini GenF1.menu.pnum.VCCGND_F103ZET6_MINI.upload.maximum_size=524288 From fa2f9383b4f0d3f66a86c05a480b626886a32d07 Mon Sep 17 00:00:00 2001 From: its-kronos <140297693+its-kronos@users.noreply.github.com> Date: Fri, 29 Aug 2025 16:36:11 -0400 Subject: [PATCH 02/10] Create variant_DATABOARD.h - add variant.h Signed-off-by: its-kronos <140297693+its-kronos@users.noreply.github.com> --- .../F103C8T_F103CB(T-U)/variant_DATABOARD.h | 173 ++++++++++++++++++ 1 file changed, 173 insertions(+) create mode 100644 variants/STM32F1xx/F103C8T_F103CB(T-U)/variant_DATABOARD.h diff --git a/variants/STM32F1xx/F103C8T_F103CB(T-U)/variant_DATABOARD.h b/variants/STM32F1xx/F103C8T_F103CB(T-U)/variant_DATABOARD.h new file mode 100644 index 0000000000..790bc46291 --- /dev/null +++ b/variants/STM32F1xx/F103C8T_F103CB(T-U)/variant_DATABOARD.h @@ -0,0 +1,173 @@ +/* + ******************************************************************************* + * Copyright (c) 2020, STMicroelectronics + * All rights reserved. + * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * opensource.org/licenses/BSD-3-Clause + * + ******************************************************************************* + */ +#pragma once + +/*---------------------------------------------------------------------------- + * STM32 pins number + *----------------------------------------------------------------------------*/ +#define PA0 PIN_A0 +#define PA1 PIN_A1 +#define PA2 PIN_A2 +#define PA3 PIN_A3 +#define PA4 PIN_A4 +#define PA5 PIN_A5 +#define PA6 PIN_A6 +#define PA7 PIN_A7 +#define PA8 8 +#define PA9 9 +#define PA10 10 +#define PA11 11 +#define PA12 12 +#define PA13 13 +#define PA14 14 +#define PA15 15 +#define PB0 PIN_A8 +#define PB1 PIN_A9 +#define PB2 18 +#define PB3 19 +#define PB4 20 +#define PB5 21 +#define PB6 22 +#define PB7 23 +#define PB8 24 +#define PB9 25 +#define PB10 26 +#define PB11 27 +#define PB12 28 +#define PB13 29 +#define PB14 30 +#define PB15 31 +#define PC13 32 +#define PC14 33 +#define PC15 34 +#define PD0 35 +#define PD1 36 + +// Alternate pins number +#define PA0_ALT1 (PA0 | ALT1) +#define PA1_ALT1 (PA1 | ALT1) +#define PA2_ALT1 (PA2 | ALT1) +#define PA3_ALT1 (PA3 | ALT1) +#define PA4_ALT1 (PA4 | ALT1) +#define PA5_ALT1 (PA5 | ALT1) +#define PA6_ALT1 (PA6 | ALT1) +#define PA7_ALT1 (PA7 | ALT1) +#define PA8_ALT1 (PA8 | ALT1) +#define PA9_ALT1 (PA9 | ALT1) +#define PA10_ALT1 (PA10 | ALT1) +#define PA11_ALT1 (PA11 | ALT1) +#define PA15_ALT1 (PA15 | ALT1) +#define PB0_ALT1 (PB0 | ALT1) +#define PB0_ALT2 (PB0 | ALT2) +#define PB1_ALT1 (PB1 | ALT1) +#define PB1_ALT2 (PB1 | ALT2) +#define PB3_ALT1 (PB3 | ALT1) +#define PB10_ALT1 (PB10 | ALT1) +#define PB11_ALT1 (PB11 | ALT1) +#define PB13_ALT1 (PB13 | ALT1) +#define PB14_ALT1 (PB14 | ALT1) + +#define NUM_DIGITAL_PINS 37 +#define NUM_ANALOG_INPUTS 10 + +// On-board LED pin number +#ifndef LED_BUILTIN + #define LED_BUILTIN PNUM_NOT_DEFINED +#endif + +// On-board user button +#ifndef USER_BTN + #define USER_BTN PNUM_NOT_DEFINED +#endif + +// SPI definitions +#ifndef PIN_SPI_SS + #define PIN_SPI_SS PA4 +#endif +#ifndef PIN_SPI_SS1 + #define PIN_SPI_SS1 PA15 +#endif +#ifndef PIN_SPI_SS2 + #define PIN_SPI_SS2 PNUM_NOT_DEFINED +#endif +#ifndef PIN_SPI_SS3 + #define PIN_SPI_SS3 PNUM_NOT_DEFINED +#endif +#ifndef PIN_SPI_MOSI + #define PIN_SPI_MOSI PA7 +#endif +#ifndef PIN_SPI_MISO + #define PIN_SPI_MISO PA6 +#endif +#ifndef PIN_SPI_SCK + #define PIN_SPI_SCK PA5 +#endif + +// I2C definitions +#ifndef PIN_WIRE_SDA + #define PIN_WIRE_SDA PB7 +#endif +#ifndef PIN_WIRE_SCL + #define PIN_WIRE_SCL PB6 +#endif + +// Timer Definitions +// Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin +#ifndef TIMER_TONE + #define TIMER_TONE TIM3 +#endif +#ifndef TIMER_SERVO + #define TIMER_SERVO TIM4 +#endif + +// UART Definitions +#ifndef SERIAL_UART_INSTANCE + #define SERIAL_UART_INSTANCE 2 +#endif + +// Default pin used for generic 'Serial' instance +// Mandatory for Firmata +#ifndef PIN_SERIAL_RX + #define PIN_SERIAL_RX PA3 +#endif +#ifndef PIN_SERIAL_TX + #define PIN_SERIAL_TX PA2 +#endif + +/*---------------------------------------------------------------------------- + * Arduino objects - C++ only + *----------------------------------------------------------------------------*/ + +#ifdef __cplusplus + // These serial port names are intended to allow libraries and architecture-neutral + // sketches to automatically default to the correct port name for a particular type + // of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN, + // the first hardware serial port whose RX/TX pins are not dedicated to another use. + // + // SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor + // + // SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial + // + // SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library + // + // SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins. + // + // SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX + // pins are NOT connected to anything by default. + #ifndef SERIAL_PORT_MONITOR + #define SERIAL_PORT_MONITOR Serial + #endif + #ifndef SERIAL_PORT_HARDWARE + #define SERIAL_PORT_HARDWARE Serial + #endif +#endif From fee1c66f4a50581b25c09f89e9d5d0a3567676df Mon Sep 17 00:00:00 2001 From: its-kronos <140297693+its-kronos@users.noreply.github.com> Date: Fri, 29 Aug 2025 16:36:53 -0400 Subject: [PATCH 03/10] Create variant_DATABOARD.cpp - add variant.cpp Signed-off-by: its-kronos <140297693+its-kronos@users.noreply.github.com> --- .../F103C8T_F103CB(T-U)/variant_DATABOARD.cpp | 72 +++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 variants/STM32F1xx/F103C8T_F103CB(T-U)/variant_DATABOARD.cpp diff --git a/variants/STM32F1xx/F103C8T_F103CB(T-U)/variant_DATABOARD.cpp b/variants/STM32F1xx/F103C8T_F103CB(T-U)/variant_DATABOARD.cpp new file mode 100644 index 0000000000..b61cea159c --- /dev/null +++ b/variants/STM32F1xx/F103C8T_F103CB(T-U)/variant_DATABOARD.cpp @@ -0,0 +1,72 @@ +/* + ******************************************************************************* + * Copyright (c) 2020, STMicroelectronics + * All rights reserved. + * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * opensource.org/licenses/BSD-3-Clause + * + ******************************************************************************* + */ +#if defined(ARDUINO_GENERIC_F103C8TX) || defined(ARDUINO_GENERIC_F103CBTX) ||\ + defined(ARDUINO_GENERIC_F103CBUX) +#include "pins_arduino.h" + +// Digital PinName array +const PinName digitalPin[] = { + PA_0, // D0/A0 + PA_1, // D1/A1 + PA_2, // D2/A2 + PA_3, // D3/A3 + PA_4, // D4/A4 + PA_5, // D5/A5 + PA_6, // D6/A6 + PA_7, // D7/A7 + PA_8, // D8 + PA_9, // D9 + PA_10, // D10 + PA_11, // D11 + PA_12, // D12 + PA_13, // D13 + PA_14, // D14 + PA_15, // D15 + PB_0, // D16/A8 + PB_1, // D17/A9 + PB_2, // D18 + PB_3, // D19 + PB_4, // D20 + PB_5, // D21 + PB_6, // D22 + PB_7, // D23 + PB_8, // D24 + PB_9, // D25 + PB_10, // D26 + PB_11, // D27 + PB_12, // D28 + PB_13, // D29 + PB_14, // D30 + PB_15, // D31 + PC_13, // D32 + PC_14, // D33 + PC_15, // D34 + PD_0, // D35 + PD_1 // D36 +}; + +// Analog (Ax) pin number array +const uint32_t analogInputPin[] = { + 0, // A0, PA0 + 1, // A1, PA1 + 2, // A2, PA2 + 3, // A3, PA3 + 4, // A4, PA4 + 5, // A5, PA5 + 6, // A6, PA6 + 7, // A7, PA7 + 16, // A8, PB0 + 17 // A9, PB1 +}; + +#endif /* ARDUINO_GENERIC_* */ From b8e9eb23d370a52fd8a94228d24e45e50299c49c Mon Sep 17 00:00:00 2001 From: its-kronos <140297693+its-kronos@users.noreply.github.com> Date: Fri, 29 Aug 2025 16:43:07 -0400 Subject: [PATCH 04/10] Update README.md - add new reference Signed-off-by: its-kronos <140297693+its-kronos@users.noreply.github.com> --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 07cd09856a..c714c7034f 100644 --- a/README.md +++ b/README.md @@ -303,6 +303,7 @@ User can add a STM32 based board following this [wiki](https://github.com/stm32d | :green_heart: | STM32F101ZC
STM32F101ZD
STM32F101ZE | Generic Board | *2.4.0* | | | :green_heart: | STM32F103C6
STM32F103C8
STM32F103CB | [Blue Pill](https://stm32-base.org/boards/STM32F103C8T6-Blue-Pill) | *1.2.0* | USB CDC support since *1.5.0*
Maple bootloaders support since *1.6.0* | | :green_heart: | STM32F103C8
STM32F103CB | [Black Pill](https://stm32-base.org/boards/STM32F103C8T6-Black-Pill) | *1.5.0* | | +| :yellow_heart: | STM32F103C8 | [Databoard](https://github.com/its-kronos/Databoard) | | | | :green_heart: | STM32F103C4
STM32F103C6
STM32F103C8
STM32F103CB | Generic Board | *1.9.0* | | | :green_heart: | STM32F103R8
STM32F103RB
STM32F103RC
STM32F103RE | [Blue Button F103Rx](https://stm32-base.org/boards/STM32F103RET6-Generic-Board) | *1.9.0* | | | :green_heart: | STM32F103R6
STM32F103R8
STM32F103RB
STM32F103RC
STM32F103RD
STM32F103RE
STM32F103RF
STM32F103RG | Generic Board | *1.9.0* | | From 4d53eed3fc210576b4fb10d66ee4cfe0cfa28dbe Mon Sep 17 00:00:00 2001 From: its-kronos <140297693+its-kronos@users.noreply.github.com> Date: Fri, 12 Sep 2025 18:28:06 -0400 Subject: [PATCH 05/10] Update variant_DATABOARD.h - add pin aliases Signed-off-by: its-kronos <140297693+its-kronos@users.noreply.github.com> --- .../F103C8T_F103CB(T-U)/variant_DATABOARD.h | 101 ++++++++++++++++++ 1 file changed, 101 insertions(+) diff --git a/variants/STM32F1xx/F103C8T_F103CB(T-U)/variant_DATABOARD.h b/variants/STM32F1xx/F103C8T_F103CB(T-U)/variant_DATABOARD.h index 790bc46291..416b097bd9 100644 --- a/variants/STM32F1xx/F103C8T_F103CB(T-U)/variant_DATABOARD.h +++ b/variants/STM32F1xx/F103C8T_F103CB(T-U)/variant_DATABOARD.h @@ -53,6 +53,107 @@ #define PD0 35 #define PD1 36 +// Pin Aliases + +#define IO1 PA10 +#define GPIO1 PA10 +#define GP1 PA10 + +#define IO2 PA9 +#define GPIO2 PA9 +#define GP2 PA9 + +#define IO3 PA8 +#define GPIO3 PA8 +#define GP3 PA8 + +#define IO4 PB15 +#define GPIO4 PB15 +#define GP4 PB15 + +#define IO5 PB14 +#define GPIO5 PB14 +#define GP5 PB14 + +#define IO6 PB13 +#define GPIO6 PB13 +#define GP6 PB13 + +#define IO7 PB12 +#define GPIO7 PB12 +#define GP7 PB12 + +#define AIO8 PA7 +#define IO8 PA7 +#define GPIO8 PA7 +#define GP8 PA7 + +#define AIO9 PA6 +#define IO9 PA6 +#define GPIO9 PA6 +#define GP9 PA6 + +#define AIO10 PA5 +#define IO10 PA5 +#define GPIO10 PA5 +#define GP10 PA5 + +#define IO11 PB11 +#define GPIO11 PB11 +#define GP11 PB11 + +#define IO12 PB10 +#define GPIO12 PB10 +#define GP12 PB10 + +#define AIO13 PB1 +#define IO13 PB1 +#define GPIO13 PB1 +#define GP13 PB1 + +#define AIO14 PA4 +#define IO14 PA4 +#define GPIO14 PA4 +#define GP14 PA4 + +#define AIO15 PA3 +#define IO15 PA3 +#define GPIO15 PA3 +#define GP15 PA3 + +#define AIO16 PA2 +#define IO16 PA2 +#define GPIO16 PA2 +#define GP16 PA2 + +#define AIO17 PA1 +#define IO17 PA1 +#define GPIO17 PA1 +#define GP17 PA1 + +#define AIO18 PA0 +#define IO18 PA0 +#define GPIO18 PA0 +#define GP18 PA0 + +#define WIFI_EN PB8 +#define WIFI PB8 +#define WIFI_RX PB7 +#define WIFI_TX PB6 +#define WIFI_BOOT PB9 +#define WIFI_BOOT_EN PB9 +#define WIFI_BOOT_UART PB0 +#define WIFI_BOOT_UART_EN PB0 + +#define MICROSD PB2 +#define MICROSD_EN PB2 +#define MICROSD_MOSI PB5 +#define MICROSD_CLOCK PB3 +#define MICROSD_CLK PB3 +#define MICROSD_MISO PB4 + + + // Alternate pins number #define PA0_ALT1 (PA0 | ALT1) #define PA1_ALT1 (PA1 | ALT1) From c091ba1a33e89bd0f59559ba7f57819eabaf1e3a Mon Sep 17 00:00:00 2001 From: its-kronos <140297693+its-kronos@users.noreply.github.com> Date: Fri, 12 Sep 2025 18:29:48 -0400 Subject: [PATCH 06/10] Update variant_DATABOARD.h -- add HSE conf Signed-off-by: its-kronos <140297693+its-kronos@users.noreply.github.com> --- variants/STM32F1xx/F103C8T_F103CB(T-U)/variant_DATABOARD.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/variants/STM32F1xx/F103C8T_F103CB(T-U)/variant_DATABOARD.h b/variants/STM32F1xx/F103C8T_F103CB(T-U)/variant_DATABOARD.h index 416b097bd9..0b9e314959 100644 --- a/variants/STM32F1xx/F103C8T_F103CB(T-U)/variant_DATABOARD.h +++ b/variants/STM32F1xx/F103C8T_F103CB(T-U)/variant_DATABOARD.h @@ -245,6 +245,8 @@ #define PIN_SERIAL_TX PA2 #endif +#define HSE_VALUE 16000000U // HSE - External Oscillator Frequency in hertz (16MHZ) + /*---------------------------------------------------------------------------- * Arduino objects - C++ only *----------------------------------------------------------------------------*/ From fabee99f6d41dca6fb4b68f832f9e0c79bcaa84e Mon Sep 17 00:00:00 2001 From: its-kronos <140297693+its-kronos@users.noreply.github.com> Date: Fri, 12 Sep 2025 18:30:55 -0400 Subject: [PATCH 07/10] Update variant_DATABOARD.cpp - replace generic name with board name Signed-off-by: its-kronos <140297693+its-kronos@users.noreply.github.com> --- variants/STM32F1xx/F103C8T_F103CB(T-U)/variant_DATABOARD.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/variants/STM32F1xx/F103C8T_F103CB(T-U)/variant_DATABOARD.cpp b/variants/STM32F1xx/F103C8T_F103CB(T-U)/variant_DATABOARD.cpp index b61cea159c..85311a425c 100644 --- a/variants/STM32F1xx/F103C8T_F103CB(T-U)/variant_DATABOARD.cpp +++ b/variants/STM32F1xx/F103C8T_F103CB(T-U)/variant_DATABOARD.cpp @@ -69,4 +69,4 @@ const uint32_t analogInputPin[] = { 17 // A9, PB1 }; -#endif /* ARDUINO_GENERIC_* */ +#endif /* ARDUINO_DATABOARD */ From 0c77dec32ff91ea0880d19cac455fc742eee0a7e Mon Sep 17 00:00:00 2001 From: its-kronos <140297693+its-kronos@users.noreply.github.com> Date: Fri, 12 Sep 2025 18:32:56 -0400 Subject: [PATCH 08/10] Update variant_DATABOARD.cpp - replace if statement to board name rather than generic Signed-off-by: its-kronos <140297693+its-kronos@users.noreply.github.com> --- variants/STM32F1xx/F103C8T_F103CB(T-U)/variant_DATABOARD.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/variants/STM32F1xx/F103C8T_F103CB(T-U)/variant_DATABOARD.cpp b/variants/STM32F1xx/F103C8T_F103CB(T-U)/variant_DATABOARD.cpp index 85311a425c..b68868c37a 100644 --- a/variants/STM32F1xx/F103C8T_F103CB(T-U)/variant_DATABOARD.cpp +++ b/variants/STM32F1xx/F103C8T_F103CB(T-U)/variant_DATABOARD.cpp @@ -10,8 +10,7 @@ * ******************************************************************************* */ -#if defined(ARDUINO_GENERIC_F103C8TX) || defined(ARDUINO_GENERIC_F103CBTX) ||\ - defined(ARDUINO_GENERIC_F103CBUX) +#if defined(ARDUINO_DATABOARD) #include "pins_arduino.h" // Digital PinName array From 43cac0d81dc55f72fc643ce61c0defb11b075ed3 Mon Sep 17 00:00:00 2001 From: its-kronos <140297693+its-kronos@users.noreply.github.com> Date: Fri, 12 Sep 2025 18:39:44 -0400 Subject: [PATCH 09/10] Update variant_DATABOARD.cpp - add clock config w/ HSE prediv Signed-off-by: its-kronos <140297693+its-kronos@users.noreply.github.com> --- .../F103C8T_F103CB(T-U)/variant_DATABOARD.cpp | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/variants/STM32F1xx/F103C8T_F103CB(T-U)/variant_DATABOARD.cpp b/variants/STM32F1xx/F103C8T_F103CB(T-U)/variant_DATABOARD.cpp index b68868c37a..b3f6f06765 100644 --- a/variants/STM32F1xx/F103C8T_F103CB(T-U)/variant_DATABOARD.cpp +++ b/variants/STM32F1xx/F103C8T_F103CB(T-U)/variant_DATABOARD.cpp @@ -68,4 +68,72 @@ const uint32_t analogInputPin[] = { 17 // A9, PB1 }; + +// ---------------------------------------------------------------------------- + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief System Clock Configuration + * The system Clock is configured as follow : + * System Clock source = PLL (HSE) + * SYSCLK(Hz) = 72000000 + * HCLK(Hz) = 72000000 + * AHB Prescaler = 1 + * APB1 Prescaler = 2 + * APB2 Prescaler = 1 + * PLL_Source = HSE + * PLL_Mul = 9 + * Flash Latency(WS) = 2 + * ADC Prescaler = 6 + * USB Prescaler = 1.5 + * @param None + * @retval None + */ +WEAK void SystemClock_Config(void) +{ + RCC_OscInitTypeDef RCC_OscInitStruct = {}; + RCC_ClkInitTypeDef RCC_ClkInitStruct = {}; + RCC_PeriphCLKInitTypeDef PeriphClkInit = {}; + + /* Initializes the CPU, AHB and APB busses clocks */ + RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE; + RCC_OscInitStruct.HSEState = RCC_HSE_ON; + RCC_OscInitStruct.HSEPredivValue = RCC_HSE_PREDIV_DIV2; + RCC_OscInitStruct.HSIState = RCC_HSI_ON; + RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; + RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE; + RCC_OscInitStruct.PLL.PLLMUL = RCC_PLL_MUL9; + if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) { + Error_Handler(); + } + + /* Initializes the CPU, AHB and APB busses clocks */ + RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK + | RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2; + RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK; + RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1; + RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV2; + RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1; + + if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_2) != HAL_OK) { + Error_Handler(); + } + + PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_ADC | RCC_PERIPHCLK_USB; + PeriphClkInit.AdcClockSelection = RCC_ADCPCLK2_DIV6; + PeriphClkInit.UsbClockSelection = RCC_USBCLKSOURCE_PLL_DIV1_5; + if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInit) != HAL_OK) { + Error_Handler(); + } +} + +#ifdef __cplusplus +} +#endif + + + #endif /* ARDUINO_DATABOARD */ From d54052f7cc8a1b338cc960f2b1c5880d3122abab Mon Sep 17 00:00:00 2001 From: its-kronos <140297693+its-kronos@users.noreply.github.com> Date: Fri, 12 Sep 2025 18:41:14 -0400 Subject: [PATCH 10/10] Update README.md - add first stm32duino version that "databoard" will be available Co-authored-by: Frederic Pillon Signed-off-by: its-kronos <140297693+its-kronos@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c714c7034f..4c397ff2cb 100644 --- a/README.md +++ b/README.md @@ -303,7 +303,7 @@ User can add a STM32 based board following this [wiki](https://github.com/stm32d | :green_heart: | STM32F101ZC
STM32F101ZD
STM32F101ZE | Generic Board | *2.4.0* | | | :green_heart: | STM32F103C6
STM32F103C8
STM32F103CB | [Blue Pill](https://stm32-base.org/boards/STM32F103C8T6-Blue-Pill) | *1.2.0* | USB CDC support since *1.5.0*
Maple bootloaders support since *1.6.0* | | :green_heart: | STM32F103C8
STM32F103CB | [Black Pill](https://stm32-base.org/boards/STM32F103C8T6-Black-Pill) | *1.5.0* | | -| :yellow_heart: | STM32F103C8 | [Databoard](https://github.com/its-kronos/Databoard) | | | +| :yellow_heart: | STM32F103C8 | [Databoard](https://github.com/its-kronos/Databoard) | **2.12.0** | | | :green_heart: | STM32F103C4
STM32F103C6
STM32F103C8
STM32F103CB | Generic Board | *1.9.0* | | | :green_heart: | STM32F103R8
STM32F103RB
STM32F103RC
STM32F103RE | [Blue Button F103Rx](https://stm32-base.org/boards/STM32F103RET6-Generic-Board) | *1.9.0* | | | :green_heart: | STM32F103R6
STM32F103R8
STM32F103RB
STM32F103RC
STM32F103RD
STM32F103RE
STM32F103RF
STM32F103RG | Generic Board | *1.9.0* | |