Skip to content

Commit ae90e85

Browse files
committed
Add Black F407VE support
Commit stm32duino#2 based on @fpistm suggestions
1 parent 83f6cc4 commit ae90e85

File tree

5 files changed

+33
-27
lines changed

5 files changed

+33
-27
lines changed

Diff for: boards.txt

+4
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,10 @@ BlkF407VE.menu.upload_method.serialMethod=Serial
528528
BlkF407VE.menu.upload_method.serialMethod.upload.protocol=maple_serial
529529
BlkF407VE.menu.upload_method.serialMethod.upload.tool=serial_upload
530530

531+
BlkF407VE.menu.upload_method.bmpMethod=BMP (Black Magic Probe)
532+
BlkF407VE.menu.upload_method.bmpMethod.upload.protocol=gdb_bmp
533+
BlkF407VE.menu.upload_method.bmpMethod.upload.tool=bmp_upload
534+
531535

532536
################################################################################
533537
# Serialx activation

Diff for: variants/BLACK_F407VE/PinNamesVar.h

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/* SYS_WKUP */
2+
#ifdef PWR_WAKEUP_PIN1
3+
SYS_WKUP1 = PA_0,
4+
#endif
5+
#ifdef PWR_WAKEUP_PIN2
6+
SYS_WKUP2 = NC,
7+
#endif
8+
#ifdef PWR_WAKEUP_PIN3
9+
SYS_WKUP3 = NC,
10+
#endif
11+
#ifdef PWR_WAKEUP_PIN4
12+
SYS_WKUP4 = NC,
13+
#endif
14+
#ifdef PWR_WAKEUP_PIN5
15+
SYS_WKUP5 = NC,
16+
#endif
17+
#ifdef PWR_WAKEUP_PIN6
18+
SYS_WKUP6 = NC,
19+
#endif
20+
#ifdef PWR_WAKEUP_PIN7
21+
SYS_WKUP7 = NC,
22+
#endif
23+
#ifdef PWR_WAKEUP_PIN8
24+
SYS_WKUP8 = NC,
25+
#endif

Diff for: variants/BLACK_F407VE/stm32f4xx_hal_conf.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -73,14 +73,14 @@
7373
#define HAL_PWR_MODULE_ENABLED
7474
#define HAL_RCC_MODULE_ENABLED
7575
/* #define HAL_RNG_MODULE_ENABLED */
76-
/* #define HAL_RTC_MODULE_ENABLED */
76+
#define HAL_RTC_MODULE_ENABLED
7777
/* #define HAL_SAI_MODULE_ENABLED */
7878
/* #define HAL_SD_MODULE_ENABLED */
7979
/* #define HAL_MMC_MODULE_ENABLED */
8080
#define HAL_SPI_MODULE_ENABLED
8181
#define HAL_TIM_MODULE_ENABLED
82-
#define HAL_UART_MODULE_ENABLED
83-
#define HAL_USART_MODULE_ENABLED
82+
/* #define HAL_UART_MODULE_ENABLED */
83+
/* #define HAL_USART_MODULE_ENABLED */
8484
/* #define HAL_IRDA_MODULE_ENABLED */
8585
/* #define HAL_SMARTCARD_MODULE_ENABLED */
8686
/* #define HAL_WWDG_MODULE_ENABLED */

Diff for: variants/BLACK_F407VE/variant.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ const PinName digitalPin[] = {
106106
PC_2,
107107
PC_3,
108108
PC_4,
109-
PC_5,
109+
PC_5
110110
};
111111

112112
#ifdef __cplusplus

Diff for: variants/BLACK_F407VE/variant.h

-23
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,6 @@ extern "C"{
4545
*----------------------------------------------------------------------------*/
4646
extern const PinName digitalPin[];
4747

48-
// Enum defining pin names to match digital pin number --> Dx
49-
// !!!
50-
// !!! Copy the digitalPin[] array in variant.cpp
51-
// !!! and remove all '_': PX_n --> PXn
52-
// !!! For NC, suffix by _x where x is the number of NC:
53-
// !!! NC_1, NC_2,...
54-
// !!! For duplicated pin name, suffix by _x where x is the number of pin:
55-
// !!! PA7, PA7_2, PA7_3,...
5648
enum {
5749
/* Left Side
5850
Ext Int */
@@ -126,24 +118,9 @@ enum {
126118
};
127119

128120
// This must be a literal with the same value as PEND
129-
// It is used with preprocessor tests (e.g. #if NUM_DIGITAL_PINS > 3)
130-
// so an enum will not work.
131121
#define NUM_DIGITAL_PINS 89
132-
133-
// Allow to define Arduino style alias for analog input pin number --> Ax
134-
// All pins are digital, analog inputs are a subset of digital pins
135-
// and must be contiguous to be able to loop on each value
136122
// This must be a literal with a value less than or equal to MAX_ANALOG_INPUTS
137-
// defined in pin_arduino.h
138-
// It is used with preprocessor tests (e.g. #if NUM_ANALOG_INPUTS > 3)
139-
// so an enum will not work.
140-
// !!!
141-
// !!! It must be aligned with the number of analog PinName
142-
// !!! defined in digitalPin[] array in variant.cpp
143-
// !!!
144123
#define NUM_ANALOG_INPUTS 14
145-
// Define digital pin number of the first analog input (i.e. which digital pin is A0)
146-
// First analog pin value (A0) must be greater than or equal to NUM_ANALOG_INPUTS
147124
#define NUM_ANALOG_FIRST 75
148125

149126
// Below ADC, DAC and PWM definitions already done in the core

0 commit comments

Comments
 (0)