Skip to content

Commit

Permalink
Add all generated STM32H7xx generic variant files
Browse files Browse the repository at this point in the history
Signed-off-by: Frederic Pillon <[email protected]>
fpistm committed Apr 15, 2021
1 parent ec30479 commit 2f7d688
Showing 252 changed files with 52,283 additions and 0 deletions.
554 changes: 554 additions & 0 deletions variants/STM32H7xx/H723V(E-G)(H-T)_H733VG(H-T)/PeripheralPins.c

Large diffs are not rendered by default.

108 changes: 108 additions & 0 deletions variants/STM32H7xx/H723V(E-G)(H-T)_H733VG(H-T)/PinNamesVar.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
/* Dual pad pin name */
PC_2_C = PC_2 | PDUAL,
PC_3_C = PC_3 | PDUAL,

/* Alternate pin name */
PA_0_ALT1 = PA_0 | ALT1,
PA_1_ALT1 = PA_1 | ALT1,
PA_1_ALT2 = PA_1 | ALT2,
PA_2_ALT1 = PA_2 | ALT1,
PA_2_ALT2 = PA_2 | ALT2,
PA_3_ALT1 = PA_3 | ALT1,
PA_3_ALT2 = PA_3 | ALT2,
PA_4_ALT1 = PA_4 | ALT1,
PA_4_ALT2 = PA_4 | ALT2,
PA_5_ALT1 = PA_5 | ALT1,
PA_6_ALT1 = PA_6 | ALT1,
PA_7_ALT1 = PA_7 | ALT1,
PA_7_ALT2 = PA_7 | ALT2,
PA_7_ALT3 = PA_7 | ALT3,
PA_8_ALT1 = PA_8 | ALT1,
PA_9_ALT1 = PA_9 | ALT1,
PA_10_ALT1 = PA_10 | ALT1,
PA_11_ALT1 = PA_11 | ALT1,
PA_12_ALT1 = PA_12 | ALT1,
PA_15_ALT1 = PA_15 | ALT1,
PA_15_ALT2 = PA_15 | ALT2,
PB_0_ALT1 = PB_0 | ALT1,
PB_0_ALT2 = PB_0 | ALT2,
PB_1_ALT1 = PB_1 | ALT1,
PB_1_ALT2 = PB_1 | ALT2,
PB_3_ALT1 = PB_3 | ALT1,
PB_3_ALT2 = PB_3 | ALT2,
PB_4_ALT1 = PB_4 | ALT1,
PB_4_ALT2 = PB_4 | ALT2,
PB_5_ALT1 = PB_5 | ALT1,
PB_5_ALT2 = PB_5 | ALT2,
PB_6_ALT1 = PB_6 | ALT1,
PB_6_ALT2 = PB_6 | ALT2,
PB_7_ALT1 = PB_7 | ALT1,
PB_8_ALT1 = PB_8 | ALT1,
PB_8_ALT2 = PB_8 | ALT2,
PB_9_ALT1 = PB_9 | ALT1,
PB_9_ALT2 = PB_9 | ALT2,
PB_14_ALT1 = PB_14 | ALT1,
PB_14_ALT2 = PB_14 | ALT2,
PB_15_ALT1 = PB_15 | ALT1,
PB_15_ALT2 = PB_15 | ALT2,
PC_0_ALT1 = PC_0 | ALT1,
PC_0_ALT2 = PC_0 | ALT2,
PC_1_ALT1 = PC_1 | ALT1,
PC_1_ALT2 = PC_1 | ALT2,
PC_4_ALT1 = PC_4 | ALT1,
PC_5_ALT1 = PC_5 | ALT1,
PC_6_ALT1 = PC_6 | ALT1,
PC_6_ALT2 = PC_6 | ALT2,
PC_7_ALT1 = PC_7 | ALT1,
PC_7_ALT2 = PC_7 | ALT2,
PC_8_ALT1 = PC_8 | ALT1,
PC_9_ALT1 = PC_9 | ALT1,
PC_10_ALT1 = PC_10 | ALT1,
PC_11_ALT1 = PC_11 | ALT1,

/* SYS_WKUP */
#ifdef PWR_WAKEUP_PIN1
SYS_WKUP1 = PA_0,
#endif
#ifdef PWR_WAKEUP_PIN2
SYS_WKUP2 = PA_2,
#endif
#ifdef PWR_WAKEUP_PIN3
SYS_WKUP3 = NC,
#endif
#ifdef PWR_WAKEUP_PIN4
SYS_WKUP4 = PC_13,
#endif
#ifdef PWR_WAKEUP_PIN5
SYS_WKUP5 = NC,
#endif
#ifdef PWR_WAKEUP_PIN6
SYS_WKUP6 = PC_1,
#endif
#ifdef PWR_WAKEUP_PIN7
SYS_WKUP7 = NC,
#endif
#ifdef PWR_WAKEUP_PIN8
SYS_WKUP8 = NC,
#endif

/* USB */
#ifdef USBCON
USB_OTG_HS_DM = PA_11,
USB_OTG_HS_DP = PA_12,
USB_OTG_HS_ID = PA_10,
USB_OTG_HS_SOF = PA_8,
USB_OTG_HS_ULPI_CK = PA_5,
USB_OTG_HS_ULPI_D0 = PA_3,
USB_OTG_HS_ULPI_D1 = PB_0,
USB_OTG_HS_ULPI_D2 = PB_1,
USB_OTG_HS_ULPI_D3 = PB_10,
USB_OTG_HS_ULPI_D4 = PB_11,
USB_OTG_HS_ULPI_D5 = PB_12,
USB_OTG_HS_ULPI_D6 = PB_13,
USB_OTG_HS_ULPI_D7 = PB_5,
USB_OTG_HS_ULPI_DIR = PC_2_C,
USB_OTG_HS_ULPI_NXT = PC_3_C,
USB_OTG_HS_ULPI_STP = PC_0,
USB_OTG_HS_VBUS = PA_9,
#endif
53 changes: 53 additions & 0 deletions variants/STM32H7xx/H723V(E-G)(H-T)_H733VG(H-T)/boards_entry.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# This file help to add generic board entry.
# upload.maximum_size and product_line have to be verified
# and changed if needed.
# See: https://github.com/stm32duino/wiki/wiki/Add-a-new-variant-%28board%29

# Generic H723VEHx
GenH7.menu.pnum.GENERIC_H723VEHX=Generic H723VEHx
GenH7.menu.pnum.GENERIC_H723VEHX.upload.maximum_size=524288
GenH7.menu.pnum.GENERIC_H723VEHX.upload.maximum_data_size=1048576
GenH7.menu.pnum.GENERIC_H723VEHX.build.board=GENERIC_H723VEHX
GenH7.menu.pnum.GENERIC_H723VEHX.build.product_line=STM32H723xx
GenH7.menu.pnum.GENERIC_H723VEHX.build.variant=STM32H7xx/H723V(E-G)(H-T)_H733VG(H-T)

# Generic H723VETx
GenH7.menu.pnum.GENERIC_H723VETX=Generic H723VETx
GenH7.menu.pnum.GENERIC_H723VETX.upload.maximum_size=524288
GenH7.menu.pnum.GENERIC_H723VETX.upload.maximum_data_size=1048576
GenH7.menu.pnum.GENERIC_H723VETX.build.board=GENERIC_H723VETX
GenH7.menu.pnum.GENERIC_H723VETX.build.product_line=STM32H723xx
GenH7.menu.pnum.GENERIC_H723VETX.build.variant=STM32H7xx/H723V(E-G)(H-T)_H733VG(H-T)

# Generic H723VGHx
GenH7.menu.pnum.GENERIC_H723VGHX=Generic H723VGHx
GenH7.menu.pnum.GENERIC_H723VGHX.upload.maximum_size=1048576
GenH7.menu.pnum.GENERIC_H723VGHX.upload.maximum_data_size=1048576
GenH7.menu.pnum.GENERIC_H723VGHX.build.board=GENERIC_H723VGHX
GenH7.menu.pnum.GENERIC_H723VGHX.build.product_line=STM32H723xx
GenH7.menu.pnum.GENERIC_H723VGHX.build.variant=STM32H7xx/H723V(E-G)(H-T)_H733VG(H-T)

# Generic H723VGTx
GenH7.menu.pnum.GENERIC_H723VGTX=Generic H723VGTx
GenH7.menu.pnum.GENERIC_H723VGTX.upload.maximum_size=1048576
GenH7.menu.pnum.GENERIC_H723VGTX.upload.maximum_data_size=1048576
GenH7.menu.pnum.GENERIC_H723VGTX.build.board=GENERIC_H723VGTX
GenH7.menu.pnum.GENERIC_H723VGTX.build.product_line=STM32H723xx
GenH7.menu.pnum.GENERIC_H723VGTX.build.variant=STM32H7xx/H723V(E-G)(H-T)_H733VG(H-T)

# Generic H733VGHx
GenH7.menu.pnum.GENERIC_H733VGHX=Generic H733VGHx
GenH7.menu.pnum.GENERIC_H733VGHX.upload.maximum_size=1048576
GenH7.menu.pnum.GENERIC_H733VGHX.upload.maximum_data_size=1048576
GenH7.menu.pnum.GENERIC_H733VGHX.build.board=GENERIC_H733VGHX
GenH7.menu.pnum.GENERIC_H733VGHX.build.product_line=STM32H733xx
GenH7.menu.pnum.GENERIC_H733VGHX.build.variant=STM32H7xx/H723V(E-G)(H-T)_H733VG(H-T)

# Generic H733VGTx
GenH7.menu.pnum.GENERIC_H733VGTX=Generic H733VGTx
GenH7.menu.pnum.GENERIC_H733VGTX.upload.maximum_size=1048576
GenH7.menu.pnum.GENERIC_H733VGTX.upload.maximum_data_size=1048576
GenH7.menu.pnum.GENERIC_H733VGTX.build.board=GENERIC_H733VGTX
GenH7.menu.pnum.GENERIC_H733VGTX.build.product_line=STM32H733xx
GenH7.menu.pnum.GENERIC_H733VGTX.build.variant=STM32H7xx/H723V(E-G)(H-T)_H733VG(H-T)

29 changes: 29 additions & 0 deletions variants/STM32H7xx/H723V(E-G)(H-T)_H733VG(H-T)/generic_clock.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
*******************************************************************************
* Copyright (c) 2020-2021, 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_H723VEHX) || defined(ARDUINO_GENERIC_H723VETX) ||\
defined(ARDUINO_GENERIC_H723VGHX) || defined(ARDUINO_GENERIC_H723VGTX) ||\
defined(ARDUINO_GENERIC_H733VGHX) || defined(ARDUINO_GENERIC_H733VGTX)
#include "pins_arduino.h"

/**
* @brief System Clock Configuration
* @param None
* @retval None
*/
WEAK void SystemClock_Config(void)
{
/* SystemClock_Config can be generated by STM32CubeMX */
#warning "SystemClock_Config() is empty. Default clock at reset is used."
}

#endif /* ARDUINO_GENERIC_* */
124 changes: 124 additions & 0 deletions variants/STM32H7xx/H723V(E-G)(H-T)_H733VG(H-T)/variant_generic.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
/*
*******************************************************************************
* Copyright (c) 2020-2021, 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_H723VEHX) || defined(ARDUINO_GENERIC_H723VETX) ||\
defined(ARDUINO_GENERIC_H723VGHX) || defined(ARDUINO_GENERIC_H723VGTX) ||\
defined(ARDUINO_GENERIC_H733VGHX) || defined(ARDUINO_GENERIC_H733VGTX)
#include "pins_arduino.h"

// Digital PinName array
const PinName digitalPin[] = {
PA_0, // D1/A0
PA_1, // D2/A1
PA_2, // D3/A2
PA_3, // D4/A3
PA_4, // D5/A4
PA_5, // D6/A5
PA_6, // D7/A6
PA_7, // D8/A7
PA_8, // D9
PA_9, // D10
PA_10, // D11
PA_11, // D12
PA_12, // D13
PA_13, // D14
PA_14, // D15
PA_15, // D16
PB_0, // D17/A8
PB_1, // D18/A9
PB_2, // D19
PB_3, // D20
PB_4, // D21
PB_5, // D22
PB_6, // D23
PB_7, // D24
PB_8, // D25
PB_9, // D26
PB_10, // D27
PB_11, // D28
PB_12, // D29
PB_13, // D30
PB_14, // D31
PB_15, // D32
PC_0, // D33/A10
PC_1, // D34/A11
PC_4, // D35/A12
PC_5, // D36/A13
PC_6, // D37
PC_7, // D38
PC_8, // D39
PC_9, // D40
PC_10, // D41
PC_11, // D42
PC_12, // D43
PC_13, // D44
PC_14, // D45
PC_15, // D46
PD_0, // D47
PD_1, // D48
PD_2, // D49
PD_3, // D50
PD_4, // D51
PD_5, // D52
PD_6, // D53
PD_7, // D54
PD_8, // D55
PD_9, // D56
PD_10, // D57
PD_11, // D58
PD_12, // D59
PD_13, // D60
PD_14, // D61
PD_15, // D62
PE_0, // D63
PE_1, // D64
PE_2, // D65
PE_3, // D66
PE_4, // D67
PE_5, // D68
PE_6, // D69
PE_7, // D70
PE_8, // D71
PE_9, // D72
PE_10, // D73
PE_11, // D74
PE_12, // D75
PE_13, // D76
PE_14, // D77
PE_15, // D78
PH_0, // D79
PH_1, // D80
PC_2_C, // D81/A14
PC_3_C // D82/A15
};

// 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
32, // A10, PC0
33, // A11, PC1
34, // A12, PC4
35, // A13, PC5
80, // A14, PC2_C
81 // A15, PC3_C
};

#endif /* ARDUINO_GENERIC_* */
267 changes: 267 additions & 0 deletions variants/STM32H7xx/H723V(E-G)(H-T)_H733VG(H-T)/variant_generic.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,267 @@
/*
*******************************************************************************
* Copyright (c) 2020-2021, 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 PC0 PIN_A10
#define PC1 PIN_A11
#define PC4 PIN_A12
#define PC5 PIN_A13
#define PC6 36
#define PC7 37
#define PC8 38
#define PC9 39
#define PC10 40
#define PC11 41
#define PC12 42
#define PC13 43
#define PC14 44
#define PC15 45
#define PD0 46
#define PD1 47
#define PD2 48
#define PD3 49
#define PD4 50
#define PD5 51
#define PD6 52
#define PD7 53
#define PD8 54
#define PD9 55
#define PD10 56
#define PD11 57
#define PD12 58
#define PD13 59
#define PD14 60
#define PD15 61
#define PE0 62
#define PE1 63
#define PE2 64
#define PE3 65
#define PE4 66
#define PE5 67
#define PE6 68
#define PE7 69
#define PE8 70
#define PE9 71
#define PE10 72
#define PE11 73
#define PE12 74
#define PE13 75
#define PE14 76
#define PE15 77
#define PH0 78
#define PH1 79
#define PC2_C PIN_A14
#define PC3_C PIN_A15

// Alternate pins number
#define PA0_ALT1 (PA0 | ALT1)
#define PA1_ALT1 (PA1 | ALT1)
#define PA1_ALT2 (PA1 | ALT2)
#define PA2_ALT1 (PA2 | ALT1)
#define PA2_ALT2 (PA2 | ALT2)
#define PA3_ALT1 (PA3 | ALT1)
#define PA3_ALT2 (PA3 | ALT2)
#define PA4_ALT1 (PA4 | ALT1)
#define PA4_ALT2 (PA4 | ALT2)
#define PA5_ALT1 (PA5 | ALT1)
#define PA6_ALT1 (PA6 | ALT1)
#define PA7_ALT1 (PA7 | ALT1)
#define PA7_ALT2 (PA7 | ALT2)
#define PA7_ALT3 (PA7 | ALT3)
#define PA8_ALT1 (PA8 | ALT1)
#define PA9_ALT1 (PA9 | ALT1)
#define PA10_ALT1 (PA10 | ALT1)
#define PA11_ALT1 (PA11 | ALT1)
#define PA12_ALT1 (PA12 | ALT1)
#define PA15_ALT1 (PA15 | ALT1)
#define PA15_ALT2 (PA15 | ALT2)
#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 PB3_ALT2 (PB3 | ALT2)
#define PB4_ALT1 (PB4 | ALT1)
#define PB4_ALT2 (PB4 | ALT2)
#define PB5_ALT1 (PB5 | ALT1)
#define PB5_ALT2 (PB5 | ALT2)
#define PB6_ALT1 (PB6 | ALT1)
#define PB6_ALT2 (PB6 | ALT2)
#define PB7_ALT1 (PB7 | ALT1)
#define PB8_ALT1 (PB8 | ALT1)
#define PB8_ALT2 (PB8 | ALT2)
#define PB9_ALT1 (PB9 | ALT1)
#define PB9_ALT2 (PB9 | ALT2)
#define PB14_ALT1 (PB14 | ALT1)
#define PB14_ALT2 (PB14 | ALT2)
#define PB15_ALT1 (PB15 | ALT1)
#define PB15_ALT2 (PB15 | ALT2)
#define PC0_ALT1 (PC0 | ALT1)
#define PC0_ALT2 (PC0 | ALT2)
#define PC1_ALT1 (PC1 | ALT1)
#define PC1_ALT2 (PC1 | ALT2)
#define PC4_ALT1 (PC4 | ALT1)
#define PC5_ALT1 (PC5 | ALT1)
#define PC6_ALT1 (PC6 | ALT1)
#define PC6_ALT2 (PC6 | ALT2)
#define PC7_ALT1 (PC7 | ALT1)
#define PC7_ALT2 (PC7 | ALT2)
#define PC8_ALT1 (PC8 | ALT1)
#define PC9_ALT1 (PC9 | ALT1)
#define PC10_ALT1 (PC10 | ALT1)
#define PC11_ALT1 (PC11 | ALT1)

#define NUM_DIGITAL_PINS 82
#define NUM_DUALPAD_PINS 2
#define NUM_ANALOG_INPUTS 16

// 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 TIM6
#endif
#ifndef TIMER_SERVO
#define TIMER_SERVO TIM7
#endif

// UART Definitions
#ifndef SERIAL_UART_INSTANCE
#define SERIAL_UART_INSTANCE 4
#endif

// Default pin used for generic 'Serial' instance
// Mandatory for Firmata
#ifndef PIN_SERIAL_RX
#define PIN_SERIAL_RX PA1
#endif
#ifndef PIN_SERIAL_TX
#define PIN_SERIAL_TX PA0
#endif

// Extra HAL modules
#if !defined(HAL_DAC_MODULE_DISABLED)
#define HAL_DAC_MODULE_ENABLED
#endif
#if !defined(HAL_ETH_MODULE_DISABLED)
#define HAL_ETH_MODULE_ENABLED
#endif
#if !defined(HAL_OSPI_MODULE_DISABLED)
#define HAL_OSPI_MODULE_ENABLED
#endif
#if !defined(HAL_SD_MODULE_DISABLED)
#define HAL_SD_MODULE_ENABLED
#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
650 changes: 650 additions & 0 deletions variants/STM32H7xx/H723Z(E-G)I_H730ZBI_H733ZGI/PeripheralPins.c

Large diffs are not rendered by default.

116 changes: 116 additions & 0 deletions variants/STM32H7xx/H723Z(E-G)I_H730ZBI_H733ZGI/PinNamesVar.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
/* Alternate pin name */
PA_0_ALT1 = PA_0 | ALT1,
PA_1_ALT1 = PA_1 | ALT1,
PA_1_ALT2 = PA_1 | ALT2,
PA_2_ALT1 = PA_2 | ALT1,
PA_2_ALT2 = PA_2 | ALT2,
PA_3_ALT1 = PA_3 | ALT1,
PA_3_ALT2 = PA_3 | ALT2,
PA_4_ALT1 = PA_4 | ALT1,
PA_4_ALT2 = PA_4 | ALT2,
PA_5_ALT1 = PA_5 | ALT1,
PA_6_ALT1 = PA_6 | ALT1,
PA_7_ALT1 = PA_7 | ALT1,
PA_7_ALT2 = PA_7 | ALT2,
PA_7_ALT3 = PA_7 | ALT3,
PA_8_ALT1 = PA_8 | ALT1,
PA_9_ALT1 = PA_9 | ALT1,
PA_10_ALT1 = PA_10 | ALT1,
PA_11_ALT1 = PA_11 | ALT1,
PA_12_ALT1 = PA_12 | ALT1,
PA_15_ALT1 = PA_15 | ALT1,
PA_15_ALT2 = PA_15 | ALT2,
PB_0_ALT1 = PB_0 | ALT1,
PB_0_ALT2 = PB_0 | ALT2,
PB_1_ALT1 = PB_1 | ALT1,
PB_1_ALT2 = PB_1 | ALT2,
PB_3_ALT1 = PB_3 | ALT1,
PB_3_ALT2 = PB_3 | ALT2,
PB_4_ALT1 = PB_4 | ALT1,
PB_4_ALT2 = PB_4 | ALT2,
PB_5_ALT1 = PB_5 | ALT1,
PB_5_ALT2 = PB_5 | ALT2,
PB_6_ALT1 = PB_6 | ALT1,
PB_6_ALT2 = PB_6 | ALT2,
PB_7_ALT1 = PB_7 | ALT1,
PB_8_ALT1 = PB_8 | ALT1,
PB_8_ALT2 = PB_8 | ALT2,
PB_9_ALT1 = PB_9 | ALT1,
PB_9_ALT2 = PB_9 | ALT2,
PB_14_ALT1 = PB_14 | ALT1,
PB_14_ALT2 = PB_14 | ALT2,
PB_15_ALT1 = PB_15 | ALT1,
PB_15_ALT2 = PB_15 | ALT2,
PC_0_ALT1 = PC_0 | ALT1,
PC_0_ALT2 = PC_0 | ALT2,
PC_1_ALT1 = PC_1 | ALT1,
PC_1_ALT2 = PC_1 | ALT2,
PC_2_ALT1 = PC_2 | ALT1,
PC_2_ALT2 = PC_2 | ALT2,
PC_3_ALT1 = PC_3 | ALT1,
PC_4_ALT1 = PC_4 | ALT1,
PC_5_ALT1 = PC_5 | ALT1,
PC_6_ALT1 = PC_6 | ALT1,
PC_6_ALT2 = PC_6 | ALT2,
PC_7_ALT1 = PC_7 | ALT1,
PC_7_ALT2 = PC_7 | ALT2,
PC_8_ALT1 = PC_8 | ALT1,
PC_9_ALT1 = PC_9 | ALT1,
PC_10_ALT1 = PC_10 | ALT1,
PC_11_ALT1 = PC_11 | ALT1,
PF_0_ALT1 = PF_0 | ALT1,
PF_1_ALT1 = PF_1 | ALT1,
PF_6_ALT1 = PF_6 | ALT1,
PF_7_ALT1 = PF_7 | ALT1,
PF_8_ALT1 = PF_8 | ALT1,
PF_8_ALT2 = PF_8 | ALT2,
PF_9_ALT1 = PF_9 | ALT1,
PF_9_ALT2 = PF_9 | ALT2,
PG_13_ALT1 = PG_13 | ALT1,

/* SYS_WKUP */
#ifdef PWR_WAKEUP_PIN1
SYS_WKUP1 = PA_0,
#endif
#ifdef PWR_WAKEUP_PIN2
SYS_WKUP2 = PA_2,
#endif
#ifdef PWR_WAKEUP_PIN3
SYS_WKUP3 = NC,
#endif
#ifdef PWR_WAKEUP_PIN4
SYS_WKUP4 = PC_13,
#endif
#ifdef PWR_WAKEUP_PIN5
SYS_WKUP5 = NC,
#endif
#ifdef PWR_WAKEUP_PIN6
SYS_WKUP6 = PC_1,
#endif
#ifdef PWR_WAKEUP_PIN7
SYS_WKUP7 = NC,
#endif
#ifdef PWR_WAKEUP_PIN8
SYS_WKUP8 = NC,
#endif

/* USB */
#ifdef USBCON
USB_OTG_HS_DM = PA_11,
USB_OTG_HS_DP = PA_12,
USB_OTG_HS_ID = PA_10,
USB_OTG_HS_SOF = PA_8,
USB_OTG_HS_ULPI_CK = PA_5,
USB_OTG_HS_ULPI_D0 = PA_3,
USB_OTG_HS_ULPI_D1 = PB_0,
USB_OTG_HS_ULPI_D2 = PB_1,
USB_OTG_HS_ULPI_D3 = PB_10,
USB_OTG_HS_ULPI_D4 = PB_11,
USB_OTG_HS_ULPI_D5 = PB_12,
USB_OTG_HS_ULPI_D6 = PB_13,
USB_OTG_HS_ULPI_D7 = PB_5,
USB_OTG_HS_ULPI_DIR = PC_2,
USB_OTG_HS_ULPI_NXT = PC_3,
USB_OTG_HS_ULPI_STP = PC_0,
USB_OTG_HS_VBUS = PA_9,
#endif
37 changes: 37 additions & 0 deletions variants/STM32H7xx/H723Z(E-G)I_H730ZBI_H733ZGI/boards_entry.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# This file help to add generic board entry.
# upload.maximum_size and product_line have to be verified
# and changed if needed.
# See: https://github.com/stm32duino/wiki/wiki/Add-a-new-variant-%28board%29

# Generic H723ZEIx
GenH7.menu.pnum.GENERIC_H723ZEIX=Generic H723ZEIx
GenH7.menu.pnum.GENERIC_H723ZEIX.upload.maximum_size=524288
GenH7.menu.pnum.GENERIC_H723ZEIX.upload.maximum_data_size=1048576
GenH7.menu.pnum.GENERIC_H723ZEIX.build.board=GENERIC_H723ZEIX
GenH7.menu.pnum.GENERIC_H723ZEIX.build.product_line=STM32H723xx
GenH7.menu.pnum.GENERIC_H723ZEIX.build.variant=STM32H7xx/H723Z(E-G)I_H730ZBI_H733ZGI

# Generic H723ZGIx
GenH7.menu.pnum.GENERIC_H723ZGIX=Generic H723ZGIx
GenH7.menu.pnum.GENERIC_H723ZGIX.upload.maximum_size=1048576
GenH7.menu.pnum.GENERIC_H723ZGIX.upload.maximum_data_size=1048576
GenH7.menu.pnum.GENERIC_H723ZGIX.build.board=GENERIC_H723ZGIX
GenH7.menu.pnum.GENERIC_H723ZGIX.build.product_line=STM32H723xx
GenH7.menu.pnum.GENERIC_H723ZGIX.build.variant=STM32H7xx/H723Z(E-G)I_H730ZBI_H733ZGI

# Generic H730ZBIx
GenH7.menu.pnum.GENERIC_H730ZBIX=Generic H730ZBIx
GenH7.menu.pnum.GENERIC_H730ZBIX.upload.maximum_size=131072
GenH7.menu.pnum.GENERIC_H730ZBIX.upload.maximum_data_size=1048576
GenH7.menu.pnum.GENERIC_H730ZBIX.build.board=GENERIC_H730ZBIX
GenH7.menu.pnum.GENERIC_H730ZBIX.build.product_line=STM32H730xx
GenH7.menu.pnum.GENERIC_H730ZBIX.build.variant=STM32H7xx/H723Z(E-G)I_H730ZBI_H733ZGI

# Generic H733ZGIx
GenH7.menu.pnum.GENERIC_H733ZGIX=Generic H733ZGIx
GenH7.menu.pnum.GENERIC_H733ZGIX.upload.maximum_size=1048576
GenH7.menu.pnum.GENERIC_H733ZGIX.upload.maximum_data_size=1048576
GenH7.menu.pnum.GENERIC_H733ZGIX.build.board=GENERIC_H733ZGIX
GenH7.menu.pnum.GENERIC_H733ZGIX.build.product_line=STM32H733xx
GenH7.menu.pnum.GENERIC_H733ZGIX.build.variant=STM32H7xx/H723Z(E-G)I_H730ZBI_H733ZGI

28 changes: 28 additions & 0 deletions variants/STM32H7xx/H723Z(E-G)I_H730ZBI_H733ZGI/generic_clock.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
*******************************************************************************
* Copyright (c) 2020-2021, 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_H723ZEIX) || defined(ARDUINO_GENERIC_H723ZGIX) ||\
defined(ARDUINO_GENERIC_H730ZBIX) || defined(ARDUINO_GENERIC_H733ZGIX)
#include "pins_arduino.h"

/**
* @brief System Clock Configuration
* @param None
* @retval None
*/
WEAK void SystemClock_Config(void)
{
/* SystemClock_Config can be generated by STM32CubeMX */
#warning "SystemClock_Config() is empty. Default clock at reset is used."
}

#endif /* ARDUINO_GENERIC_* */
167 changes: 167 additions & 0 deletions variants/STM32H7xx/H723Z(E-G)I_H730ZBI_H733ZGI/variant_generic.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
/*
*******************************************************************************
* Copyright (c) 2020-2021, 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_H723ZEIX) || defined(ARDUINO_GENERIC_H723ZGIX) ||\
defined(ARDUINO_GENERIC_H730ZBIX) || defined(ARDUINO_GENERIC_H733ZGIX)
#include "pins_arduino.h"

// Digital PinName array
const PinName digitalPin[] = {
PA_0, // D1/A0
PA_1, // D2/A1
PA_2, // D3/A2
PA_3, // D4/A3
PA_4, // D5/A4
PA_5, // D6/A5
PA_6, // D7/A6
PA_7, // D8/A7
PA_8, // D9
PA_9, // D10
PA_10, // D11
PA_11, // D12
PA_12, // D13
PA_13, // D14
PA_14, // D15
PA_15, // D16
PB_0, // D17/A8
PB_1, // D18/A9
PB_2, // D19
PB_3, // D20
PB_4, // D21
PB_5, // D22
PB_6, // D23
PB_7, // D24
PB_8, // D25
PB_9, // D26
PB_10, // D27
PB_11, // D28
PB_12, // D29
PB_13, // D30
PB_14, // D31
PB_15, // D32
PC_0, // D33/A10
PC_1, // D34/A11
PC_2, // D35/A12
PC_3, // D36/A13
PC_4, // D37/A14
PC_5, // D38/A15
PC_6, // D39
PC_7, // D40
PC_8, // D41
PC_9, // D42
PC_10, // D43
PC_11, // D44
PC_12, // D45
PC_13, // D46
PC_14, // D47
PC_15, // D48
PD_0, // D49
PD_1, // D50
PD_2, // D51
PD_3, // D52
PD_4, // D53
PD_5, // D54
PD_6, // D55
PD_7, // D56
PD_8, // D57
PD_9, // D58
PD_10, // D59
PD_11, // D60
PD_12, // D61
PD_13, // D62
PD_14, // D63
PD_15, // D64
PE_0, // D65
PE_1, // D66
PE_2, // D67
PE_3, // D68
PE_4, // D69
PE_5, // D70
PE_6, // D71
PE_7, // D72
PE_8, // D73
PE_9, // D74
PE_10, // D75
PE_11, // D76
PE_12, // D77
PE_13, // D78
PE_14, // D79
PE_15, // D80
PF_0, // D81
PF_1, // D82
PF_2, // D83
PF_3, // D84/A16
PF_4, // D85/A17
PF_5, // D86/A18
PF_6, // D87/A19
PF_7, // D88/A20
PF_8, // D89/A21
PF_9, // D90/A22
PF_10, // D91/A23
PF_11, // D92/A24
PF_12, // D93/A25
PF_13, // D94/A26
PF_14, // D95/A27
PF_15, // D96
PG_0, // D97
PG_1, // D98
PG_2, // D99
PG_3, // D100
PG_4, // D101
PG_5, // D102
PG_6, // D103
PG_7, // D104
PG_8, // D105
PG_9, // D106
PG_10, // D107
PG_11, // D108
PG_12, // D109
PG_13, // D110
PG_14, // D111
PG_15, // D112
PH_0, // D113
PH_1 // D114
};

// 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
32, // A10, PC0
33, // A11, PC1
34, // A12, PC2
35, // A13, PC3
36, // A14, PC4
37, // A15, PC5
83, // A16, PF3
84, // A17, PF4
85, // A18, PF5
86, // A19, PF6
87, // A20, PF7
88, // A21, PF8
89, // A22, PF9
90, // A23, PF10
91, // A24, PF11
92, // A25, PF12
93, // A26, PF13
94 // A27, PF14
};

#endif /* ARDUINO_GENERIC_* */
310 changes: 310 additions & 0 deletions variants/STM32H7xx/H723Z(E-G)I_H730ZBI_H733ZGI/variant_generic.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,310 @@
/*
*******************************************************************************
* Copyright (c) 2020-2021, 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 PC0 PIN_A10
#define PC1 PIN_A11
#define PC2 PIN_A12
#define PC3 PIN_A13
#define PC4 PIN_A14
#define PC5 PIN_A15
#define PC6 38
#define PC7 39
#define PC8 40
#define PC9 41
#define PC10 42
#define PC11 43
#define PC12 44
#define PC13 45
#define PC14 46
#define PC15 47
#define PD0 48
#define PD1 49
#define PD2 50
#define PD3 51
#define PD4 52
#define PD5 53
#define PD6 54
#define PD7 55
#define PD8 56
#define PD9 57
#define PD10 58
#define PD11 59
#define PD12 60
#define PD13 61
#define PD14 62
#define PD15 63
#define PE0 64
#define PE1 65
#define PE2 66
#define PE3 67
#define PE4 68
#define PE5 69
#define PE6 70
#define PE7 71
#define PE8 72
#define PE9 73
#define PE10 74
#define PE11 75
#define PE12 76
#define PE13 77
#define PE14 78
#define PE15 79
#define PF0 80
#define PF1 81
#define PF2 82
#define PF3 PIN_A16
#define PF4 PIN_A17
#define PF5 PIN_A18
#define PF6 PIN_A19
#define PF7 PIN_A20
#define PF8 PIN_A21
#define PF9 PIN_A22
#define PF10 PIN_A23
#define PF11 PIN_A24
#define PF12 PIN_A25
#define PF13 PIN_A26
#define PF14 PIN_A27
#define PF15 95
#define PG0 96
#define PG1 97
#define PG2 98
#define PG3 99
#define PG4 100
#define PG5 101
#define PG6 102
#define PG7 103
#define PG8 104
#define PG9 105
#define PG10 106
#define PG11 107
#define PG12 108
#define PG13 109
#define PG14 110
#define PG15 111
#define PH0 112
#define PH1 113

// Alternate pins number
#define PA0_ALT1 (PA0 | ALT1)
#define PA1_ALT1 (PA1 | ALT1)
#define PA1_ALT2 (PA1 | ALT2)
#define PA2_ALT1 (PA2 | ALT1)
#define PA2_ALT2 (PA2 | ALT2)
#define PA3_ALT1 (PA3 | ALT1)
#define PA3_ALT2 (PA3 | ALT2)
#define PA4_ALT1 (PA4 | ALT1)
#define PA4_ALT2 (PA4 | ALT2)
#define PA5_ALT1 (PA5 | ALT1)
#define PA6_ALT1 (PA6 | ALT1)
#define PA7_ALT1 (PA7 | ALT1)
#define PA7_ALT2 (PA7 | ALT2)
#define PA7_ALT3 (PA7 | ALT3)
#define PA8_ALT1 (PA8 | ALT1)
#define PA9_ALT1 (PA9 | ALT1)
#define PA10_ALT1 (PA10 | ALT1)
#define PA11_ALT1 (PA11 | ALT1)
#define PA12_ALT1 (PA12 | ALT1)
#define PA15_ALT1 (PA15 | ALT1)
#define PA15_ALT2 (PA15 | ALT2)
#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 PB3_ALT2 (PB3 | ALT2)
#define PB4_ALT1 (PB4 | ALT1)
#define PB4_ALT2 (PB4 | ALT2)
#define PB5_ALT1 (PB5 | ALT1)
#define PB5_ALT2 (PB5 | ALT2)
#define PB6_ALT1 (PB6 | ALT1)
#define PB6_ALT2 (PB6 | ALT2)
#define PB7_ALT1 (PB7 | ALT1)
#define PB8_ALT1 (PB8 | ALT1)
#define PB8_ALT2 (PB8 | ALT2)
#define PB9_ALT1 (PB9 | ALT1)
#define PB9_ALT2 (PB9 | ALT2)
#define PB14_ALT1 (PB14 | ALT1)
#define PB14_ALT2 (PB14 | ALT2)
#define PB15_ALT1 (PB15 | ALT1)
#define PB15_ALT2 (PB15 | ALT2)
#define PC0_ALT1 (PC0 | ALT1)
#define PC0_ALT2 (PC0 | ALT2)
#define PC1_ALT1 (PC1 | ALT1)
#define PC1_ALT2 (PC1 | ALT2)
#define PC2_ALT1 (PC2 | ALT1)
#define PC2_ALT2 (PC2 | ALT2)
#define PC3_ALT1 (PC3 | ALT1)
#define PC4_ALT1 (PC4 | ALT1)
#define PC5_ALT1 (PC5 | ALT1)
#define PC6_ALT1 (PC6 | ALT1)
#define PC6_ALT2 (PC6 | ALT2)
#define PC7_ALT1 (PC7 | ALT1)
#define PC7_ALT2 (PC7 | ALT2)
#define PC8_ALT1 (PC8 | ALT1)
#define PC9_ALT1 (PC9 | ALT1)
#define PC10_ALT1 (PC10 | ALT1)
#define PC11_ALT1 (PC11 | ALT1)
#define PF0_ALT1 (PF0 | ALT1)
#define PF1_ALT1 (PF1 | ALT1)
#define PF6_ALT1 (PF6 | ALT1)
#define PF7_ALT1 (PF7 | ALT1)
#define PF8_ALT1 (PF8 | ALT1)
#define PF8_ALT2 (PF8 | ALT2)
#define PF9_ALT1 (PF9 | ALT1)
#define PF9_ALT2 (PF9 | ALT2)
#define PG13_ALT1 (PG13 | ALT1)

#define NUM_DIGITAL_PINS 114
#define NUM_ANALOG_INPUTS 28

// 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 PG10
#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 TIM6
#endif
#ifndef TIMER_SERVO
#define TIMER_SERVO TIM7
#endif

// UART Definitions
#ifndef SERIAL_UART_INSTANCE
#define SERIAL_UART_INSTANCE 4
#endif

// Default pin used for generic 'Serial' instance
// Mandatory for Firmata
#ifndef PIN_SERIAL_RX
#define PIN_SERIAL_RX PA1
#endif
#ifndef PIN_SERIAL_TX
#define PIN_SERIAL_TX PA0
#endif

// Extra HAL modules
#if !defined(HAL_DAC_MODULE_DISABLED)
#define HAL_DAC_MODULE_ENABLED
#endif
#if !defined(HAL_ETH_MODULE_DISABLED)
#define HAL_ETH_MODULE_ENABLED
#endif
#if !defined(HAL_OSPI_MODULE_DISABLED)
#define HAL_OSPI_MODULE_ENABLED
#endif
#if !defined(HAL_SD_MODULE_DISABLED)
#define HAL_SD_MODULE_ENABLED
#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
647 changes: 647 additions & 0 deletions variants/STM32H7xx/H723Z(E-G)T_H733ZGT/PeripheralPins.c

Large diffs are not rendered by default.

117 changes: 117 additions & 0 deletions variants/STM32H7xx/H723Z(E-G)T_H733ZGT/PinNamesVar.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
/* Dual pad pin name */
PC_2_C = PC_2 | PDUAL,
PC_3_C = PC_3 | PDUAL,

/* Alternate pin name */
PA_0_ALT1 = PA_0 | ALT1,
PA_1_ALT1 = PA_1 | ALT1,
PA_1_ALT2 = PA_1 | ALT2,
PA_2_ALT1 = PA_2 | ALT1,
PA_2_ALT2 = PA_2 | ALT2,
PA_3_ALT1 = PA_3 | ALT1,
PA_3_ALT2 = PA_3 | ALT2,
PA_4_ALT1 = PA_4 | ALT1,
PA_4_ALT2 = PA_4 | ALT2,
PA_5_ALT1 = PA_5 | ALT1,
PA_6_ALT1 = PA_6 | ALT1,
PA_7_ALT1 = PA_7 | ALT1,
PA_7_ALT2 = PA_7 | ALT2,
PA_7_ALT3 = PA_7 | ALT3,
PA_8_ALT1 = PA_8 | ALT1,
PA_9_ALT1 = PA_9 | ALT1,
PA_10_ALT1 = PA_10 | ALT1,
PA_11_ALT1 = PA_11 | ALT1,
PA_12_ALT1 = PA_12 | ALT1,
PA_15_ALT1 = PA_15 | ALT1,
PA_15_ALT2 = PA_15 | ALT2,
PB_0_ALT1 = PB_0 | ALT1,
PB_0_ALT2 = PB_0 | ALT2,
PB_1_ALT1 = PB_1 | ALT1,
PB_1_ALT2 = PB_1 | ALT2,
PB_3_ALT1 = PB_3 | ALT1,
PB_3_ALT2 = PB_3 | ALT2,
PB_4_ALT1 = PB_4 | ALT1,
PB_4_ALT2 = PB_4 | ALT2,
PB_5_ALT1 = PB_5 | ALT1,
PB_5_ALT2 = PB_5 | ALT2,
PB_6_ALT1 = PB_6 | ALT1,
PB_6_ALT2 = PB_6 | ALT2,
PB_7_ALT1 = PB_7 | ALT1,
PB_8_ALT1 = PB_8 | ALT1,
PB_8_ALT2 = PB_8 | ALT2,
PB_9_ALT1 = PB_9 | ALT1,
PB_9_ALT2 = PB_9 | ALT2,
PB_14_ALT1 = PB_14 | ALT1,
PB_14_ALT2 = PB_14 | ALT2,
PB_15_ALT1 = PB_15 | ALT1,
PB_15_ALT2 = PB_15 | ALT2,
PC_0_ALT1 = PC_0 | ALT1,
PC_0_ALT2 = PC_0 | ALT2,
PC_1_ALT1 = PC_1 | ALT1,
PC_1_ALT2 = PC_1 | ALT2,
PC_4_ALT1 = PC_4 | ALT1,
PC_5_ALT1 = PC_5 | ALT1,
PC_6_ALT1 = PC_6 | ALT1,
PC_6_ALT2 = PC_6 | ALT2,
PC_7_ALT1 = PC_7 | ALT1,
PC_7_ALT2 = PC_7 | ALT2,
PC_8_ALT1 = PC_8 | ALT1,
PC_9_ALT1 = PC_9 | ALT1,
PC_10_ALT1 = PC_10 | ALT1,
PC_11_ALT1 = PC_11 | ALT1,
PF_0_ALT1 = PF_0 | ALT1,
PF_1_ALT1 = PF_1 | ALT1,
PF_6_ALT1 = PF_6 | ALT1,
PF_7_ALT1 = PF_7 | ALT1,
PF_8_ALT1 = PF_8 | ALT1,
PF_8_ALT2 = PF_8 | ALT2,
PF_9_ALT1 = PF_9 | ALT1,
PF_9_ALT2 = PF_9 | ALT2,
PG_13_ALT1 = PG_13 | ALT1,

/* SYS_WKUP */
#ifdef PWR_WAKEUP_PIN1
SYS_WKUP1 = PA_0,
#endif
#ifdef PWR_WAKEUP_PIN2
SYS_WKUP2 = PA_2,
#endif
#ifdef PWR_WAKEUP_PIN3
SYS_WKUP3 = NC,
#endif
#ifdef PWR_WAKEUP_PIN4
SYS_WKUP4 = PC_13,
#endif
#ifdef PWR_WAKEUP_PIN5
SYS_WKUP5 = NC,
#endif
#ifdef PWR_WAKEUP_PIN6
SYS_WKUP6 = PC_1,
#endif
#ifdef PWR_WAKEUP_PIN7
SYS_WKUP7 = NC,
#endif
#ifdef PWR_WAKEUP_PIN8
SYS_WKUP8 = NC,
#endif

/* USB */
#ifdef USBCON
USB_OTG_HS_DM = PA_11,
USB_OTG_HS_DP = PA_12,
USB_OTG_HS_ID = PA_10,
USB_OTG_HS_SOF = PA_8,
USB_OTG_HS_ULPI_CK = PA_5,
USB_OTG_HS_ULPI_D0 = PA_3,
USB_OTG_HS_ULPI_D1 = PB_0,
USB_OTG_HS_ULPI_D2 = PB_1,
USB_OTG_HS_ULPI_D3 = PB_10,
USB_OTG_HS_ULPI_D4 = PB_11,
USB_OTG_HS_ULPI_D5 = PB_12,
USB_OTG_HS_ULPI_D6 = PB_13,
USB_OTG_HS_ULPI_D7 = PB_5,
USB_OTG_HS_ULPI_DIR = PC_2_C,
USB_OTG_HS_ULPI_NXT = PC_3_C,
USB_OTG_HS_ULPI_STP = PC_0,
USB_OTG_HS_VBUS = PA_9,
#endif
29 changes: 29 additions & 0 deletions variants/STM32H7xx/H723Z(E-G)T_H733ZGT/boards_entry.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# This file help to add generic board entry.
# upload.maximum_size and product_line have to be verified
# and changed if needed.
# See: https://github.com/stm32duino/wiki/wiki/Add-a-new-variant-%28board%29

# Generic H723ZETx
GenH7.menu.pnum.GENERIC_H723ZETX=Generic H723ZETx
GenH7.menu.pnum.GENERIC_H723ZETX.upload.maximum_size=524288
GenH7.menu.pnum.GENERIC_H723ZETX.upload.maximum_data_size=1048576
GenH7.menu.pnum.GENERIC_H723ZETX.build.board=GENERIC_H723ZETX
GenH7.menu.pnum.GENERIC_H723ZETX.build.product_line=STM32H723xx
GenH7.menu.pnum.GENERIC_H723ZETX.build.variant=STM32H7xx/H723Z(E-G)T_H733ZGT

# Generic H723ZGTx
GenH7.menu.pnum.GENERIC_H723ZGTX=Generic H723ZGTx
GenH7.menu.pnum.GENERIC_H723ZGTX.upload.maximum_size=1048576
GenH7.menu.pnum.GENERIC_H723ZGTX.upload.maximum_data_size=1048576
GenH7.menu.pnum.GENERIC_H723ZGTX.build.board=GENERIC_H723ZGTX
GenH7.menu.pnum.GENERIC_H723ZGTX.build.product_line=STM32H723xx
GenH7.menu.pnum.GENERIC_H723ZGTX.build.variant=STM32H7xx/H723Z(E-G)T_H733ZGT

# Generic H733ZGTx
GenH7.menu.pnum.GENERIC_H733ZGTX=Generic H733ZGTx
GenH7.menu.pnum.GENERIC_H733ZGTX.upload.maximum_size=1048576
GenH7.menu.pnum.GENERIC_H733ZGTX.upload.maximum_data_size=1048576
GenH7.menu.pnum.GENERIC_H733ZGTX.build.board=GENERIC_H733ZGTX
GenH7.menu.pnum.GENERIC_H733ZGTX.build.product_line=STM32H733xx
GenH7.menu.pnum.GENERIC_H733ZGTX.build.variant=STM32H7xx/H723Z(E-G)T_H733ZGT

28 changes: 28 additions & 0 deletions variants/STM32H7xx/H723Z(E-G)T_H733ZGT/generic_clock.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
*******************************************************************************
* Copyright (c) 2020-2021, 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_H723ZETX) || defined(ARDUINO_GENERIC_H723ZGTX) ||\
defined(ARDUINO_GENERIC_H733ZGTX)
#include "pins_arduino.h"

/**
* @brief System Clock Configuration
* @param None
* @retval None
*/
WEAK void SystemClock_Config(void)
{
/* SystemClock_Config can be generated by STM32CubeMX */
#warning "SystemClock_Config() is empty. Default clock at reset is used."
}

#endif /* ARDUINO_GENERIC_* */
167 changes: 167 additions & 0 deletions variants/STM32H7xx/H723Z(E-G)T_H733ZGT/variant_generic.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
/*
*******************************************************************************
* Copyright (c) 2020-2021, 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_H723ZETX) || defined(ARDUINO_GENERIC_H723ZGTX) ||\
defined(ARDUINO_GENERIC_H733ZGTX)
#include "pins_arduino.h"

// Digital PinName array
const PinName digitalPin[] = {
PA_0, // D1/A0
PA_1, // D2/A1
PA_2, // D3/A2
PA_3, // D4/A3
PA_4, // D5/A4
PA_5, // D6/A5
PA_6, // D7/A6
PA_7, // D8/A7
PA_8, // D9
PA_9, // D10
PA_10, // D11
PA_11, // D12
PA_12, // D13
PA_13, // D14
PA_14, // D15
PA_15, // D16
PB_0, // D17/A8
PB_1, // D18/A9
PB_2, // D19
PB_3, // D20
PB_4, // D21
PB_5, // D22
PB_6, // D23
PB_7, // D24
PB_8, // D25
PB_9, // D26
PB_10, // D27
PB_11, // D28
PB_12, // D29
PB_13, // D30
PB_14, // D31
PB_15, // D32
PC_0, // D33/A10
PC_1, // D34/A11
PC_4, // D35/A12
PC_5, // D36/A13
PC_6, // D37
PC_7, // D38
PC_8, // D39
PC_9, // D40
PC_10, // D41
PC_11, // D42
PC_12, // D43
PC_13, // D44
PC_14, // D45
PC_15, // D46
PD_0, // D47
PD_1, // D48
PD_2, // D49
PD_3, // D50
PD_4, // D51
PD_5, // D52
PD_6, // D53
PD_7, // D54
PD_8, // D55
PD_9, // D56
PD_10, // D57
PD_11, // D58
PD_12, // D59
PD_13, // D60
PD_14, // D61
PD_15, // D62
PE_0, // D63
PE_1, // D64
PE_2, // D65
PE_3, // D66
PE_4, // D67
PE_5, // D68
PE_6, // D69
PE_7, // D70
PE_8, // D71
PE_9, // D72
PE_10, // D73
PE_11, // D74
PE_12, // D75
PE_13, // D76
PE_14, // D77
PE_15, // D78
PF_0, // D79
PF_1, // D80
PF_2, // D81
PF_3, // D82/A14
PF_4, // D83/A15
PF_5, // D84/A16
PF_6, // D85/A17
PF_7, // D86/A18
PF_8, // D87/A19
PF_9, // D88/A20
PF_10, // D89/A21
PF_11, // D90/A22
PF_12, // D91/A23
PF_13, // D92/A24
PF_14, // D93/A25
PF_15, // D94
PG_0, // D95
PG_1, // D96
PG_2, // D97
PG_3, // D98
PG_4, // D99
PG_5, // D100
PG_6, // D101
PG_7, // D102
PG_8, // D103
PG_9, // D104
PG_10, // D105
PG_11, // D106
PG_12, // D107
PG_13, // D108
PG_14, // D109
PG_15, // D110
PH_0, // D111
PH_1, // D112
PC_2_C, // D113/A26
PC_3_C // D114/A27
};

// 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
32, // A10, PC0
33, // A11, PC1
34, // A12, PC4
35, // A13, PC5
81, // A14, PF3
82, // A15, PF4
83, // A16, PF5
84, // A17, PF6
85, // A18, PF7
86, // A19, PF8
87, // A20, PF9
88, // A21, PF10
89, // A22, PF11
90, // A23, PF12
91, // A24, PF13
92, // A25, PF14
112, // A26, PC2_C
113 // A27, PC3_C
};

#endif /* ARDUINO_GENERIC_* */
308 changes: 308 additions & 0 deletions variants/STM32H7xx/H723Z(E-G)T_H733ZGT/variant_generic.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,308 @@
/*
*******************************************************************************
* Copyright (c) 2020-2021, 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 PC0 PIN_A10
#define PC1 PIN_A11
#define PC4 PIN_A12
#define PC5 PIN_A13
#define PC6 36
#define PC7 37
#define PC8 38
#define PC9 39
#define PC10 40
#define PC11 41
#define PC12 42
#define PC13 43
#define PC14 44
#define PC15 45
#define PD0 46
#define PD1 47
#define PD2 48
#define PD3 49
#define PD4 50
#define PD5 51
#define PD6 52
#define PD7 53
#define PD8 54
#define PD9 55
#define PD10 56
#define PD11 57
#define PD12 58
#define PD13 59
#define PD14 60
#define PD15 61
#define PE0 62
#define PE1 63
#define PE2 64
#define PE3 65
#define PE4 66
#define PE5 67
#define PE6 68
#define PE7 69
#define PE8 70
#define PE9 71
#define PE10 72
#define PE11 73
#define PE12 74
#define PE13 75
#define PE14 76
#define PE15 77
#define PF0 78
#define PF1 79
#define PF2 80
#define PF3 PIN_A14
#define PF4 PIN_A15
#define PF5 PIN_A16
#define PF6 PIN_A17
#define PF7 PIN_A18
#define PF8 PIN_A19
#define PF9 PIN_A20
#define PF10 PIN_A21
#define PF11 PIN_A22
#define PF12 PIN_A23
#define PF13 PIN_A24
#define PF14 PIN_A25
#define PF15 93
#define PG0 94
#define PG1 95
#define PG2 96
#define PG3 97
#define PG4 98
#define PG5 99
#define PG6 100
#define PG7 101
#define PG8 102
#define PG9 103
#define PG10 104
#define PG11 105
#define PG12 106
#define PG13 107
#define PG14 108
#define PG15 109
#define PH0 110
#define PH1 111
#define PC2_C PIN_A26
#define PC3_C PIN_A27

// Alternate pins number
#define PA0_ALT1 (PA0 | ALT1)
#define PA1_ALT1 (PA1 | ALT1)
#define PA1_ALT2 (PA1 | ALT2)
#define PA2_ALT1 (PA2 | ALT1)
#define PA2_ALT2 (PA2 | ALT2)
#define PA3_ALT1 (PA3 | ALT1)
#define PA3_ALT2 (PA3 | ALT2)
#define PA4_ALT1 (PA4 | ALT1)
#define PA4_ALT2 (PA4 | ALT2)
#define PA5_ALT1 (PA5 | ALT1)
#define PA6_ALT1 (PA6 | ALT1)
#define PA7_ALT1 (PA7 | ALT1)
#define PA7_ALT2 (PA7 | ALT2)
#define PA7_ALT3 (PA7 | ALT3)
#define PA8_ALT1 (PA8 | ALT1)
#define PA9_ALT1 (PA9 | ALT1)
#define PA10_ALT1 (PA10 | ALT1)
#define PA11_ALT1 (PA11 | ALT1)
#define PA12_ALT1 (PA12 | ALT1)
#define PA15_ALT1 (PA15 | ALT1)
#define PA15_ALT2 (PA15 | ALT2)
#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 PB3_ALT2 (PB3 | ALT2)
#define PB4_ALT1 (PB4 | ALT1)
#define PB4_ALT2 (PB4 | ALT2)
#define PB5_ALT1 (PB5 | ALT1)
#define PB5_ALT2 (PB5 | ALT2)
#define PB6_ALT1 (PB6 | ALT1)
#define PB6_ALT2 (PB6 | ALT2)
#define PB7_ALT1 (PB7 | ALT1)
#define PB8_ALT1 (PB8 | ALT1)
#define PB8_ALT2 (PB8 | ALT2)
#define PB9_ALT1 (PB9 | ALT1)
#define PB9_ALT2 (PB9 | ALT2)
#define PB14_ALT1 (PB14 | ALT1)
#define PB14_ALT2 (PB14 | ALT2)
#define PB15_ALT1 (PB15 | ALT1)
#define PB15_ALT2 (PB15 | ALT2)
#define PC0_ALT1 (PC0 | ALT1)
#define PC0_ALT2 (PC0 | ALT2)
#define PC1_ALT1 (PC1 | ALT1)
#define PC1_ALT2 (PC1 | ALT2)
#define PC4_ALT1 (PC4 | ALT1)
#define PC5_ALT1 (PC5 | ALT1)
#define PC6_ALT1 (PC6 | ALT1)
#define PC6_ALT2 (PC6 | ALT2)
#define PC7_ALT1 (PC7 | ALT1)
#define PC7_ALT2 (PC7 | ALT2)
#define PC8_ALT1 (PC8 | ALT1)
#define PC9_ALT1 (PC9 | ALT1)
#define PC10_ALT1 (PC10 | ALT1)
#define PC11_ALT1 (PC11 | ALT1)
#define PF0_ALT1 (PF0 | ALT1)
#define PF1_ALT1 (PF1 | ALT1)
#define PF6_ALT1 (PF6 | ALT1)
#define PF7_ALT1 (PF7 | ALT1)
#define PF8_ALT1 (PF8 | ALT1)
#define PF8_ALT2 (PF8 | ALT2)
#define PF9_ALT1 (PF9 | ALT1)
#define PF9_ALT2 (PF9 | ALT2)
#define PG13_ALT1 (PG13 | ALT1)

#define NUM_DIGITAL_PINS 114
#define NUM_DUALPAD_PINS 2
#define NUM_ANALOG_INPUTS 28

// 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 PG10
#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 TIM6
#endif
#ifndef TIMER_SERVO
#define TIMER_SERVO TIM7
#endif

// UART Definitions
#ifndef SERIAL_UART_INSTANCE
#define SERIAL_UART_INSTANCE 4
#endif

// Default pin used for generic 'Serial' instance
// Mandatory for Firmata
#ifndef PIN_SERIAL_RX
#define PIN_SERIAL_RX PA1
#endif
#ifndef PIN_SERIAL_TX
#define PIN_SERIAL_TX PA0
#endif

// Extra HAL modules
#if !defined(HAL_DAC_MODULE_DISABLED)
#define HAL_DAC_MODULE_ENABLED
#endif
#if !defined(HAL_ETH_MODULE_DISABLED)
#define HAL_ETH_MODULE_ENABLED
#endif
#if !defined(HAL_OSPI_MODULE_DISABLED)
#define HAL_OSPI_MODULE_ENABLED
#endif
#if !defined(HAL_SD_MODULE_DISABLED)
#define HAL_SD_MODULE_ENABLED
#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
688 changes: 688 additions & 0 deletions variants/STM32H7xx/H725A(E-G)I_H735AGI/PeripheralPins.c

Large diffs are not rendered by default.

146 changes: 146 additions & 0 deletions variants/STM32H7xx/H725A(E-G)I_H735AGI/PinNamesVar.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
/* Dual pad pin name */
PA_0_C = PA_0 | PDUAL,
PA_1_C = PA_1 | PDUAL,
PC_2_C = PC_2 | PDUAL,
PC_3_C = PC_3 | PDUAL,

/* Alternate pin name */
PA_0_ALT1 = PA_0 | ALT1,
PA_0_C_ALT1 = PA_0_C | ALT1,
PA_1_ALT1 = PA_1 | ALT1,
PA_1_ALT2 = PA_1 | ALT2,
PA_1_C_ALT1 = PA_1_C | ALT1,
PA_1_C_ALT2 = PA_1_C | ALT2,
PA_2_ALT1 = PA_2 | ALT1,
PA_2_ALT2 = PA_2 | ALT2,
PA_3_ALT1 = PA_3 | ALT1,
PA_3_ALT2 = PA_3 | ALT2,
PA_4_ALT1 = PA_4 | ALT1,
PA_4_ALT2 = PA_4 | ALT2,
PA_5_ALT1 = PA_5 | ALT1,
PA_6_ALT1 = PA_6 | ALT1,
PA_7_ALT1 = PA_7 | ALT1,
PA_7_ALT2 = PA_7 | ALT2,
PA_7_ALT3 = PA_7 | ALT3,
PA_8_ALT1 = PA_8 | ALT1,
PA_9_ALT1 = PA_9 | ALT1,
PA_10_ALT1 = PA_10 | ALT1,
PA_11_ALT1 = PA_11 | ALT1,
PA_12_ALT1 = PA_12 | ALT1,
PA_15_ALT1 = PA_15 | ALT1,
PA_15_ALT2 = PA_15 | ALT2,
PB_0_ALT1 = PB_0 | ALT1,
PB_0_ALT2 = PB_0 | ALT2,
PB_1_ALT1 = PB_1 | ALT1,
PB_1_ALT2 = PB_1 | ALT2,
PB_3_ALT1 = PB_3 | ALT1,
PB_3_ALT2 = PB_3 | ALT2,
PB_4_ALT1 = PB_4 | ALT1,
PB_4_ALT2 = PB_4 | ALT2,
PB_5_ALT1 = PB_5 | ALT1,
PB_5_ALT2 = PB_5 | ALT2,
PB_6_ALT1 = PB_6 | ALT1,
PB_6_ALT2 = PB_6 | ALT2,
PB_7_ALT1 = PB_7 | ALT1,
PB_8_ALT1 = PB_8 | ALT1,
PB_8_ALT2 = PB_8 | ALT2,
PB_9_ALT1 = PB_9 | ALT1,
PB_9_ALT2 = PB_9 | ALT2,
PB_14_ALT1 = PB_14 | ALT1,
PB_14_ALT2 = PB_14 | ALT2,
PB_15_ALT1 = PB_15 | ALT1,
PB_15_ALT2 = PB_15 | ALT2,
PC_0_ALT1 = PC_0 | ALT1,
PC_0_ALT2 = PC_0 | ALT2,
PC_1_ALT1 = PC_1 | ALT1,
PC_1_ALT2 = PC_1 | ALT2,
PC_2_ALT1 = PC_2 | ALT1,
PC_2_ALT2 = PC_2 | ALT2,
PC_3_ALT1 = PC_3 | ALT1,
PC_4_ALT1 = PC_4 | ALT1,
PC_5_ALT1 = PC_5 | ALT1,
PC_6_ALT1 = PC_6 | ALT1,
PC_6_ALT2 = PC_6 | ALT2,
PC_7_ALT1 = PC_7 | ALT1,
PC_7_ALT2 = PC_7 | ALT2,
PC_8_ALT1 = PC_8 | ALT1,
PC_9_ALT1 = PC_9 | ALT1,
PC_10_ALT1 = PC_10 | ALT1,
PC_11_ALT1 = PC_11 | ALT1,
PF_0_ALT1 = PF_0 | ALT1,
PF_1_ALT1 = PF_1 | ALT1,
PF_6_ALT1 = PF_6 | ALT1,
PF_7_ALT1 = PF_7 | ALT1,
PF_8_ALT1 = PF_8 | ALT1,
PF_8_ALT2 = PF_8 | ALT2,
PF_9_ALT1 = PF_9 | ALT1,
PF_9_ALT2 = PF_9 | ALT2,

/* SYS_WKUP */
#ifdef PWR_WAKEUP_PIN1
SYS_WKUP1 = PA_0,
#endif
#ifdef PWR_WAKEUP_PIN2
SYS_WKUP2 = NC,
#endif
#ifdef PWR_WAKEUP_PIN3
SYS_WKUP3 = NC,
#endif
#ifdef PWR_WAKEUP_PIN4
SYS_WKUP4 = NC,
#endif
#ifdef PWR_WAKEUP_PIN5
SYS_WKUP5 = NC,
#endif
#ifdef PWR_WAKEUP_PIN6
SYS_WKUP6 = NC,
#endif
#ifdef PWR_WAKEUP_PIN7
SYS_WKUP7 = NC,
#endif
#ifdef PWR_WAKEUP_PIN8
SYS_WKUP8 = NC,
#endif
#ifdef PWR_WAKEUP_PIN9
SYS_WKUP9 = PA_0_C,
#endif
#ifdef PWR_WAKEUP_PIN10
SYS_WKUP10 = PA_2,
#endif
#ifdef PWR_WAKEUP_PIN11
SYS_WKUP11 = PC_13,
#endif
#ifdef PWR_WAKEUP_PIN12
SYS_WKUP12 = PC_1,
#endif

/* USB */
#ifdef USBCON
USB_OTG_HS_DM = PA_11,
USB_OTG_HS_DP = PA_12,
USB_OTG_HS_ID = PA_10,
USB_OTG_HS_SOF = PA_8,
USB_OTG_HS_ULPI_CK = PA_5,
USB_OTG_HS_ULPI_D0 = PA_3,
USB_OTG_HS_ULPI_D1 = PB_0,
USB_OTG_HS_ULPI_D2 = PB_1,
USB_OTG_HS_ULPI_D3 = PB_10,
USB_OTG_HS_ULPI_D4 = PB_11,
USB_OTG_HS_ULPI_D5 = PB_12,
USB_OTG_HS_ULPI_D6 = PB_13,
USB_OTG_HS_ULPI_D7 = PB_5,
#ifdef USB_OTG_HS_ULPI_DIR_PC_2
USB_OTG_HS_ULPI_DIR = PC_2,
#endif
#ifdef USB_OTG_HS_ULPI_DIR_PC_2_C
USB_OTG_HS_ULPI_DIR = PC_2_C,
#endif
#ifdef USB_OTG_HS_ULPI_NXT_PC_3
USB_OTG_HS_ULPI_NXT = PC_3,
#endif
#ifdef USB_OTG_HS_ULPI_NXT_PC_3_C
USB_OTG_HS_ULPI_NXT = PC_3_C,
#endif
USB_OTG_HS_ULPI_STP = PC_0,
USB_OTG_HS_VBUS = PA_9,
#endif
29 changes: 29 additions & 0 deletions variants/STM32H7xx/H725A(E-G)I_H735AGI/boards_entry.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# This file help to add generic board entry.
# upload.maximum_size and product_line have to be verified
# and changed if needed.
# See: https://github.com/stm32duino/wiki/wiki/Add-a-new-variant-%28board%29

# Generic H725AEIx
GenH7.menu.pnum.GENERIC_H725AEIX=Generic H725AEIx
GenH7.menu.pnum.GENERIC_H725AEIX.upload.maximum_size=524288
GenH7.menu.pnum.GENERIC_H725AEIX.upload.maximum_data_size=1048576
GenH7.menu.pnum.GENERIC_H725AEIX.build.board=GENERIC_H725AEIX
GenH7.menu.pnum.GENERIC_H725AEIX.build.product_line=STM32H725xx
GenH7.menu.pnum.GENERIC_H725AEIX.build.variant=STM32H7xx/H725A(E-G)I_H735AGI

# Generic H725AGIx
GenH7.menu.pnum.GENERIC_H725AGIX=Generic H725AGIx
GenH7.menu.pnum.GENERIC_H725AGIX.upload.maximum_size=1048576
GenH7.menu.pnum.GENERIC_H725AGIX.upload.maximum_data_size=1048576
GenH7.menu.pnum.GENERIC_H725AGIX.build.board=GENERIC_H725AGIX
GenH7.menu.pnum.GENERIC_H725AGIX.build.product_line=STM32H725xx
GenH7.menu.pnum.GENERIC_H725AGIX.build.variant=STM32H7xx/H725A(E-G)I_H735AGI

# Generic H735AGIx
GenH7.menu.pnum.GENERIC_H735AGIX=Generic H735AGIx
GenH7.menu.pnum.GENERIC_H735AGIX.upload.maximum_size=1048576
GenH7.menu.pnum.GENERIC_H735AGIX.upload.maximum_data_size=1048576
GenH7.menu.pnum.GENERIC_H735AGIX.build.board=GENERIC_H735AGIX
GenH7.menu.pnum.GENERIC_H735AGIX.build.product_line=STM32H735xx
GenH7.menu.pnum.GENERIC_H735AGIX.build.variant=STM32H7xx/H725A(E-G)I_H735AGI

28 changes: 28 additions & 0 deletions variants/STM32H7xx/H725A(E-G)I_H735AGI/generic_clock.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
*******************************************************************************
* Copyright (c) 2020-2021, 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_H725AEIX) || defined(ARDUINO_GENERIC_H725AGIX) ||\
defined(ARDUINO_GENERIC_H735AGIX)
#include "pins_arduino.h"

/**
* @brief System Clock Configuration
* @param None
* @retval None
*/
WEAK void SystemClock_Config(void)
{
/* SystemClock_Config can be generated by STM32CubeMX */
#warning "SystemClock_Config() is empty. Default clock at reset is used."
}

#endif /* ARDUINO_GENERIC_* */
184 changes: 184 additions & 0 deletions variants/STM32H7xx/H725A(E-G)I_H735AGI/variant_generic.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,184 @@
/*
*******************************************************************************
* Copyright (c) 2020-2021, 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_H725AEIX) || defined(ARDUINO_GENERIC_H725AGIX) ||\
defined(ARDUINO_GENERIC_H735AGIX)
#include "pins_arduino.h"

// Digital PinName array
const PinName digitalPin[] = {
PA_0, // D1/A0
PA_1, // D2/A1
PA_2, // D3/A2
PA_3, // D4/A3
PA_4, // D5/A4
PA_5, // D6/A5
PA_6, // D7/A6
PA_7, // D8/A7
PA_8, // D9
PA_9, // D10
PA_10, // D11
PA_11, // D12
PA_12, // D13
PA_13, // D14
PA_14, // D15
PA_15, // D16
PB_0, // D17/A8
PB_1, // D18/A9
PB_2, // D19
PB_3, // D20
PB_4, // D21
PB_5, // D22
PB_6, // D23
PB_7, // D24
PB_8, // D25
PB_9, // D26
PB_10, // D27
PB_11, // D28
PB_12, // D29
PB_13, // D30
PB_14, // D31
PB_15, // D32
PC_0, // D33/A10
PC_1, // D34/A11
PC_2, // D35/A12
PC_3, // D36/A13
PC_4, // D37/A14
PC_5, // D38/A15
PC_6, // D39
PC_7, // D40
PC_8, // D41
PC_9, // D42
PC_10, // D43
PC_11, // D44
PC_12, // D45
PC_13, // D46
PC_14, // D47
PC_15, // D48
PD_0, // D49
PD_1, // D50
PD_2, // D51
PD_3, // D52
PD_4, // D53
PD_5, // D54
PD_6, // D55
PD_7, // D56
PD_8, // D57
PD_9, // D58
PD_10, // D59
PD_11, // D60
PD_12, // D61
PD_13, // D62
PD_14, // D63
PD_15, // D64
PE_0, // D65
PE_1, // D66
PE_2, // D67
PE_3, // D68
PE_4, // D69
PE_5, // D70
PE_6, // D71
PE_7, // D72
PE_8, // D73
PE_9, // D74
PE_10, // D75
PE_11, // D76
PE_12, // D77
PE_13, // D78
PE_14, // D79
PE_15, // D80
PF_0, // D81
PF_1, // D82
PF_2, // D83
PF_3, // D84/A16
PF_4, // D85/A17
PF_5, // D86/A18
PF_6, // D87/A19
PF_7, // D88/A20
PF_8, // D89/A21
PF_9, // D90/A22
PF_10, // D91/A23
PF_11, // D92/A24
PF_12, // D93/A25
PF_13, // D94/A26
PF_14, // D95/A27
PF_15, // D96
PG_0, // D97
PG_1, // D98
PG_2, // D99
PG_3, // D100
PG_4, // D101
PG_5, // D102
PG_6, // D103
PG_7, // D104
PG_8, // D105
PG_9, // D106
PG_10, // D107
PG_11, // D108
PG_12, // D109
PG_13, // D110
PG_14, // D111
PG_15, // D112
PH_0, // D113
PH_1, // D114
PH_2, // D115/A28
PH_3, // D116/A29
PH_10, // D117
PH_11, // D118
PH_12, // D119
PH_13, // D120
PH_14, // D121
PA_0_C, // D122/A30
PA_1_C, // D123/A31
PC_2_C, // D124/A32
PC_3_C // D125/A33
};

// 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
32, // A10, PC0
33, // A11, PC1
34, // A12, PC2
35, // A13, PC3
36, // A14, PC4
37, // A15, PC5
83, // A16, PF3
84, // A17, PF4
85, // A18, PF5
86, // A19, PF6
87, // A20, PF7
88, // A21, PF8
89, // A22, PF9
90, // A23, PF10
91, // A24, PF11
92, // A25, PF12
93, // A26, PF13
94, // A27, PF14
114, // A28, PH2
115, // A29, PH3
121, // A30, PA0_C
122, // A31, PA1_C
123, // A32, PC2_C
124 // A33, PC3_C
};

#endif /* ARDUINO_GENERIC_* */
324 changes: 324 additions & 0 deletions variants/STM32H7xx/H725A(E-G)I_H735AGI/variant_generic.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,324 @@
/*
*******************************************************************************
* Copyright (c) 2020-2021, 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 PC0 PIN_A10
#define PC1 PIN_A11
#define PC2 PIN_A12
#define PC3 PIN_A13
#define PC4 PIN_A14
#define PC5 PIN_A15
#define PC6 38
#define PC7 39
#define PC8 40
#define PC9 41
#define PC10 42
#define PC11 43
#define PC12 44
#define PC13 45
#define PC14 46
#define PC15 47
#define PD0 48
#define PD1 49
#define PD2 50
#define PD3 51
#define PD4 52
#define PD5 53
#define PD6 54
#define PD7 55
#define PD8 56
#define PD9 57
#define PD10 58
#define PD11 59
#define PD12 60
#define PD13 61
#define PD14 62
#define PD15 63
#define PE0 64
#define PE1 65
#define PE2 66
#define PE3 67
#define PE4 68
#define PE5 69
#define PE6 70
#define PE7 71
#define PE8 72
#define PE9 73
#define PE10 74
#define PE11 75
#define PE12 76
#define PE13 77
#define PE14 78
#define PE15 79
#define PF0 80
#define PF1 81
#define PF2 82
#define PF3 PIN_A16
#define PF4 PIN_A17
#define PF5 PIN_A18
#define PF6 PIN_A19
#define PF7 PIN_A20
#define PF8 PIN_A21
#define PF9 PIN_A22
#define PF10 PIN_A23
#define PF11 PIN_A24
#define PF12 PIN_A25
#define PF13 PIN_A26
#define PF14 PIN_A27
#define PF15 95
#define PG0 96
#define PG1 97
#define PG2 98
#define PG3 99
#define PG4 100
#define PG5 101
#define PG6 102
#define PG7 103
#define PG8 104
#define PG9 105
#define PG10 106
#define PG11 107
#define PG12 108
#define PG13 109
#define PG14 110
#define PG15 111
#define PH0 112
#define PH1 113
#define PH2 PIN_A28
#define PH3 PIN_A29
#define PH10 116
#define PH11 117
#define PH12 118
#define PH13 119
#define PH14 120
#define PA0_C PIN_A30
#define PA1_C PIN_A31
#define PC2_C PIN_A32
#define PC3_C PIN_A33

// Alternate pins number
#define PA0_ALT1 (PA0 | ALT1)
#define PA0_C_ALT1 (PA0_C | ALT1)
#define PA1_ALT1 (PA1 | ALT1)
#define PA1_ALT2 (PA1 | ALT2)
#define PA1_C_ALT1 (PA1_C | ALT1)
#define PA1_C_ALT2 (PA1_C | ALT2)
#define PA2_ALT1 (PA2 | ALT1)
#define PA2_ALT2 (PA2 | ALT2)
#define PA3_ALT1 (PA3 | ALT1)
#define PA3_ALT2 (PA3 | ALT2)
#define PA4_ALT1 (PA4 | ALT1)
#define PA4_ALT2 (PA4 | ALT2)
#define PA5_ALT1 (PA5 | ALT1)
#define PA6_ALT1 (PA6 | ALT1)
#define PA7_ALT1 (PA7 | ALT1)
#define PA7_ALT2 (PA7 | ALT2)
#define PA7_ALT3 (PA7 | ALT3)
#define PA8_ALT1 (PA8 | ALT1)
#define PA9_ALT1 (PA9 | ALT1)
#define PA10_ALT1 (PA10 | ALT1)
#define PA11_ALT1 (PA11 | ALT1)
#define PA12_ALT1 (PA12 | ALT1)
#define PA15_ALT1 (PA15 | ALT1)
#define PA15_ALT2 (PA15 | ALT2)
#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 PB3_ALT2 (PB3 | ALT2)
#define PB4_ALT1 (PB4 | ALT1)
#define PB4_ALT2 (PB4 | ALT2)
#define PB5_ALT1 (PB5 | ALT1)
#define PB5_ALT2 (PB5 | ALT2)
#define PB6_ALT1 (PB6 | ALT1)
#define PB6_ALT2 (PB6 | ALT2)
#define PB7_ALT1 (PB7 | ALT1)
#define PB8_ALT1 (PB8 | ALT1)
#define PB8_ALT2 (PB8 | ALT2)
#define PB9_ALT1 (PB9 | ALT1)
#define PB9_ALT2 (PB9 | ALT2)
#define PB14_ALT1 (PB14 | ALT1)
#define PB14_ALT2 (PB14 | ALT2)
#define PB15_ALT1 (PB15 | ALT1)
#define PB15_ALT2 (PB15 | ALT2)
#define PC0_ALT1 (PC0 | ALT1)
#define PC0_ALT2 (PC0 | ALT2)
#define PC1_ALT1 (PC1 | ALT1)
#define PC1_ALT2 (PC1 | ALT2)
#define PC2_ALT1 (PC2 | ALT1)
#define PC2_ALT2 (PC2 | ALT2)
#define PC3_ALT1 (PC3 | ALT1)
#define PC4_ALT1 (PC4 | ALT1)
#define PC5_ALT1 (PC5 | ALT1)
#define PC6_ALT1 (PC6 | ALT1)
#define PC6_ALT2 (PC6 | ALT2)
#define PC7_ALT1 (PC7 | ALT1)
#define PC7_ALT2 (PC7 | ALT2)
#define PC8_ALT1 (PC8 | ALT1)
#define PC9_ALT1 (PC9 | ALT1)
#define PC10_ALT1 (PC10 | ALT1)
#define PC11_ALT1 (PC11 | ALT1)
#define PF0_ALT1 (PF0 | ALT1)
#define PF1_ALT1 (PF1 | ALT1)
#define PF6_ALT1 (PF6 | ALT1)
#define PF7_ALT1 (PF7 | ALT1)
#define PF8_ALT1 (PF8 | ALT1)
#define PF8_ALT2 (PF8 | ALT2)
#define PF9_ALT1 (PF9 | ALT1)
#define PF9_ALT2 (PF9 | ALT2)

#define NUM_DIGITAL_PINS 125
#define NUM_DUALPAD_PINS 4
#define NUM_ANALOG_INPUTS 34

// 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 PG10
#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 TIM6
#endif
#ifndef TIMER_SERVO
#define TIMER_SERVO TIM7
#endif

// UART Definitions
#ifndef SERIAL_UART_INSTANCE
#define SERIAL_UART_INSTANCE 4
#endif

// Default pin used for generic 'Serial' instance
// Mandatory for Firmata
#ifndef PIN_SERIAL_RX
#define PIN_SERIAL_RX PA1
#endif
#ifndef PIN_SERIAL_TX
#define PIN_SERIAL_TX PA0
#endif

// Extra HAL modules
#if !defined(HAL_DAC_MODULE_DISABLED)
#define HAL_DAC_MODULE_ENABLED
#endif
#if !defined(HAL_ETH_MODULE_DISABLED)
#define HAL_ETH_MODULE_ENABLED
#endif
#if !defined(HAL_OSPI_MODULE_DISABLED)
#define HAL_OSPI_MODULE_ENABLED
#endif
#if !defined(HAL_SD_MODULE_DISABLED)
#define HAL_SD_MODULE_ENABLED
#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
709 changes: 709 additions & 0 deletions variants/STM32H7xx/H725I(E-G)K_H735IGK/PeripheralPins.c

Large diffs are not rendered by default.

150 changes: 150 additions & 0 deletions variants/STM32H7xx/H725I(E-G)K_H735IGK/PinNamesVar.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
/* Dual pad pin name */
PA_0_C = PA_0 | PDUAL,
PA_1_C = PA_1 | PDUAL,
PC_2_C = PC_2 | PDUAL,
PC_3_C = PC_3 | PDUAL,

/* Alternate pin name */
PA_0_ALT1 = PA_0 | ALT1,
PA_0_C_ALT1 = PA_0_C | ALT1,
PA_1_ALT1 = PA_1 | ALT1,
PA_1_ALT2 = PA_1 | ALT2,
PA_1_C_ALT1 = PA_1_C | ALT1,
PA_1_C_ALT2 = PA_1_C | ALT2,
PA_2_ALT1 = PA_2 | ALT1,
PA_2_ALT2 = PA_2 | ALT2,
PA_3_ALT1 = PA_3 | ALT1,
PA_3_ALT2 = PA_3 | ALT2,
PA_4_ALT1 = PA_4 | ALT1,
PA_4_ALT2 = PA_4 | ALT2,
PA_5_ALT1 = PA_5 | ALT1,
PA_6_ALT1 = PA_6 | ALT1,
PA_7_ALT1 = PA_7 | ALT1,
PA_7_ALT2 = PA_7 | ALT2,
PA_7_ALT3 = PA_7 | ALT3,
PA_8_ALT1 = PA_8 | ALT1,
PA_9_ALT1 = PA_9 | ALT1,
PA_10_ALT1 = PA_10 | ALT1,
PA_11_ALT1 = PA_11 | ALT1,
PA_12_ALT1 = PA_12 | ALT1,
PA_15_ALT1 = PA_15 | ALT1,
PA_15_ALT2 = PA_15 | ALT2,
PB_0_ALT1 = PB_0 | ALT1,
PB_0_ALT2 = PB_0 | ALT2,
PB_1_ALT1 = PB_1 | ALT1,
PB_1_ALT2 = PB_1 | ALT2,
PB_3_ALT1 = PB_3 | ALT1,
PB_3_ALT2 = PB_3 | ALT2,
PB_4_ALT1 = PB_4 | ALT1,
PB_4_ALT2 = PB_4 | ALT2,
PB_5_ALT1 = PB_5 | ALT1,
PB_5_ALT2 = PB_5 | ALT2,
PB_6_ALT1 = PB_6 | ALT1,
PB_6_ALT2 = PB_6 | ALT2,
PB_7_ALT1 = PB_7 | ALT1,
PB_8_ALT1 = PB_8 | ALT1,
PB_8_ALT2 = PB_8 | ALT2,
PB_9_ALT1 = PB_9 | ALT1,
PB_9_ALT2 = PB_9 | ALT2,
PB_14_ALT1 = PB_14 | ALT1,
PB_14_ALT2 = PB_14 | ALT2,
PB_15_ALT1 = PB_15 | ALT1,
PB_15_ALT2 = PB_15 | ALT2,
PC_0_ALT1 = PC_0 | ALT1,
PC_0_ALT2 = PC_0 | ALT2,
PC_1_ALT1 = PC_1 | ALT1,
PC_1_ALT2 = PC_1 | ALT2,
PC_2_ALT1 = PC_2 | ALT1,
PC_2_ALT2 = PC_2 | ALT2,
PC_3_ALT1 = PC_3 | ALT1,
PC_4_ALT1 = PC_4 | ALT1,
PC_5_ALT1 = PC_5 | ALT1,
PC_6_ALT1 = PC_6 | ALT1,
PC_6_ALT2 = PC_6 | ALT2,
PC_7_ALT1 = PC_7 | ALT1,
PC_7_ALT2 = PC_7 | ALT2,
PC_8_ALT1 = PC_8 | ALT1,
PC_9_ALT1 = PC_9 | ALT1,
PC_10_ALT1 = PC_10 | ALT1,
PC_11_ALT1 = PC_11 | ALT1,
PF_0_ALT1 = PF_0 | ALT1,
PF_1_ALT1 = PF_1 | ALT1,
PF_6_ALT1 = PF_6 | ALT1,
PF_7_ALT1 = PF_7 | ALT1,
PF_8_ALT1 = PF_8 | ALT1,
PF_8_ALT2 = PF_8 | ALT2,
PF_9_ALT1 = PF_9 | ALT1,
PF_9_ALT2 = PF_9 | ALT2,
PG_13_ALT1 = PG_13 | ALT1,

/* SYS_WKUP */
#ifdef PWR_WAKEUP_PIN1
SYS_WKUP1 = PA_0,
#endif
#ifdef PWR_WAKEUP_PIN2
SYS_WKUP2 = NC,
#endif
#ifdef PWR_WAKEUP_PIN3
SYS_WKUP3 = NC,
#endif
#ifdef PWR_WAKEUP_PIN4
SYS_WKUP4 = NC,
#endif
#ifdef PWR_WAKEUP_PIN5
SYS_WKUP5 = NC,
#endif
#ifdef PWR_WAKEUP_PIN6
SYS_WKUP6 = NC,
#endif
#ifdef PWR_WAKEUP_PIN7
SYS_WKUP7 = NC,
#endif
#ifdef PWR_WAKEUP_PIN8
SYS_WKUP8 = NC,
#endif
#ifdef PWR_WAKEUP_PIN9
SYS_WKUP9 = PA_0_C,
#endif
#ifdef PWR_WAKEUP_PIN10
SYS_WKUP10 = PA_2,
#endif
#ifdef PWR_WAKEUP_PIN11
SYS_WKUP11 = PC_13,
#endif
#ifdef PWR_WAKEUP_PIN12
SYS_WKUP12 = PC_1,
#endif

/* USB */
#ifdef USBCON
USB_OTG_HS_DM = PA_11,
USB_OTG_HS_DP = PA_12,
USB_OTG_HS_ID = PA_10,
USB_OTG_HS_SOF = PA_8,
USB_OTG_HS_ULPI_CK = PA_5,
USB_OTG_HS_ULPI_D0 = PA_3,
USB_OTG_HS_ULPI_D1 = PB_0,
USB_OTG_HS_ULPI_D2 = PB_1,
USB_OTG_HS_ULPI_D3 = PB_10,
USB_OTG_HS_ULPI_D4 = PB_11,
USB_OTG_HS_ULPI_D5 = PB_12,
USB_OTG_HS_ULPI_D6 = PB_13,
USB_OTG_HS_ULPI_D7 = PB_5,
#ifdef USB_OTG_HS_ULPI_DIR_PC_2
USB_OTG_HS_ULPI_DIR = PC_2,
#endif
#ifdef USB_OTG_HS_ULPI_DIR_PC_2_C
USB_OTG_HS_ULPI_DIR = PC_2_C,
#endif
#ifdef USB_OTG_HS_ULPI_NXT_PC_3
USB_OTG_HS_ULPI_NXT = PC_3,
#endif
#ifdef USB_OTG_HS_ULPI_NXT_PC_3_C
USB_OTG_HS_ULPI_NXT = PC_3_C,
#endif
#ifdef USB_OTG_HS_ULPI_NXT_PH_4
USB_OTG_HS_ULPI_NXT = PH_4,
#endif
USB_OTG_HS_ULPI_STP = PC_0,
USB_OTG_HS_VBUS = PA_9,
#endif
29 changes: 29 additions & 0 deletions variants/STM32H7xx/H725I(E-G)K_H735IGK/boards_entry.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# This file help to add generic board entry.
# upload.maximum_size and product_line have to be verified
# and changed if needed.
# See: https://github.com/stm32duino/wiki/wiki/Add-a-new-variant-%28board%29

# Generic H725IEKx
GenH7.menu.pnum.GENERIC_H725IEKX=Generic H725IEKx
GenH7.menu.pnum.GENERIC_H725IEKX.upload.maximum_size=524288
GenH7.menu.pnum.GENERIC_H725IEKX.upload.maximum_data_size=1048576
GenH7.menu.pnum.GENERIC_H725IEKX.build.board=GENERIC_H725IEKX
GenH7.menu.pnum.GENERIC_H725IEKX.build.product_line=STM32H725xx
GenH7.menu.pnum.GENERIC_H725IEKX.build.variant=STM32H7xx/H725I(E-G)K_H735IGK

# Generic H725IGKx
GenH7.menu.pnum.GENERIC_H725IGKX=Generic H725IGKx
GenH7.menu.pnum.GENERIC_H725IGKX.upload.maximum_size=1048576
GenH7.menu.pnum.GENERIC_H725IGKX.upload.maximum_data_size=1048576
GenH7.menu.pnum.GENERIC_H725IGKX.build.board=GENERIC_H725IGKX
GenH7.menu.pnum.GENERIC_H725IGKX.build.product_line=STM32H725xx
GenH7.menu.pnum.GENERIC_H725IGKX.build.variant=STM32H7xx/H725I(E-G)K_H735IGK

# Generic H735IGKx
GenH7.menu.pnum.GENERIC_H735IGKX=Generic H735IGKx
GenH7.menu.pnum.GENERIC_H735IGKX.upload.maximum_size=1048576
GenH7.menu.pnum.GENERIC_H735IGKX.upload.maximum_data_size=1048576
GenH7.menu.pnum.GENERIC_H735IGKX.build.board=GENERIC_H735IGKX
GenH7.menu.pnum.GENERIC_H735IGKX.build.product_line=STM32H735xx
GenH7.menu.pnum.GENERIC_H735IGKX.build.variant=STM32H7xx/H725I(E-G)K_H735IGK

28 changes: 28 additions & 0 deletions variants/STM32H7xx/H725I(E-G)K_H735IGK/generic_clock.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
*******************************************************************************
* Copyright (c) 2020-2021, 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_H725IEKX) || defined(ARDUINO_GENERIC_H725IGKX) ||\
defined(ARDUINO_GENERIC_H735IGKX)
#include "pins_arduino.h"

/**
* @brief System Clock Configuration
* @param None
* @retval None
*/
WEAK void SystemClock_Config(void)
{
/* SystemClock_Config can be generated by STM32CubeMX */
#warning "SystemClock_Config() is empty. Default clock at reset is used."
}

#endif /* ARDUINO_GENERIC_* */
193 changes: 193 additions & 0 deletions variants/STM32H7xx/H725I(E-G)K_H735IGK/variant_generic.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,193 @@
/*
*******************************************************************************
* Copyright (c) 2020-2021, 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_H725IEKX) || defined(ARDUINO_GENERIC_H725IGKX) ||\
defined(ARDUINO_GENERIC_H735IGKX)
#include "pins_arduino.h"

// Digital PinName array
const PinName digitalPin[] = {
PA_0, // D1/A0
PA_1, // D2/A1
PA_2, // D3/A2
PA_3, // D4/A3
PA_4, // D5/A4
PA_5, // D6/A5
PA_6, // D7/A6
PA_7, // D8/A7
PA_8, // D9
PA_9, // D10
PA_10, // D11
PA_11, // D12
PA_12, // D13
PA_13, // D14
PA_14, // D15
PA_15, // D16
PB_0, // D17/A8
PB_1, // D18/A9
PB_2, // D19
PB_3, // D20
PB_4, // D21
PB_5, // D22
PB_6, // D23
PB_7, // D24
PB_8, // D25
PB_9, // D26
PB_10, // D27
PB_11, // D28
PB_12, // D29
PB_13, // D30
PB_14, // D31
PB_15, // D32
PC_0, // D33/A10
PC_1, // D34/A11
PC_2, // D35/A12
PC_3, // D36/A13
PC_4, // D37/A14
PC_5, // D38/A15
PC_6, // D39
PC_7, // D40
PC_8, // D41
PC_9, // D42
PC_10, // D43
PC_11, // D44
PC_12, // D45
PC_13, // D46
PC_14, // D47
PC_15, // D48
PD_0, // D49
PD_1, // D50
PD_2, // D51
PD_3, // D52
PD_4, // D53
PD_5, // D54
PD_6, // D55
PD_7, // D56
PD_8, // D57
PD_9, // D58
PD_10, // D59
PD_11, // D60
PD_12, // D61
PD_13, // D62
PD_14, // D63
PD_15, // D64
PE_0, // D65
PE_1, // D66
PE_2, // D67
PE_3, // D68
PE_4, // D69
PE_5, // D70
PE_6, // D71
PE_7, // D72
PE_8, // D73
PE_9, // D74
PE_10, // D75
PE_11, // D76
PE_12, // D77
PE_13, // D78
PE_14, // D79
PE_15, // D80
PF_0, // D81
PF_1, // D82
PF_2, // D83
PF_3, // D84/A16
PF_4, // D85/A17
PF_5, // D86/A18
PF_6, // D87/A19
PF_7, // D88/A20
PF_8, // D89/A21
PF_9, // D90/A22
PF_10, // D91/A23
PF_11, // D92/A24
PF_12, // D93/A25
PF_13, // D94/A26
PF_14, // D95/A27
PF_15, // D96
PG_0, // D97
PG_1, // D98
PG_2, // D99
PG_3, // D100
PG_4, // D101
PG_5, // D102
PG_6, // D103
PG_7, // D104
PG_8, // D105
PG_9, // D106
PG_10, // D107
PG_11, // D108
PG_12, // D109
PG_13, // D110
PG_14, // D111
PG_15, // D112
PH_0, // D113
PH_1, // D114
PH_2, // D115/A28
PH_3, // D116/A29
PH_4, // D117/A30
PH_5, // D118/A31
PH_6, // D119
PH_7, // D120
PH_8, // D121
PH_9, // D122
PH_10, // D123
PH_11, // D124
PH_12, // D125
PH_13, // D126
PH_14, // D127
PH_15, // D128
PA_0_C, // D129/A32
PA_1_C, // D130/A33
PC_2_C, // D131/A34
PC_3_C // D132/A35
};

// 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
32, // A10, PC0
33, // A11, PC1
34, // A12, PC2
35, // A13, PC3
36, // A14, PC4
37, // A15, PC5
83, // A16, PF3
84, // A17, PF4
85, // A18, PF5
86, // A19, PF6
87, // A20, PF7
88, // A21, PF8
89, // A22, PF9
90, // A23, PF10
91, // A24, PF11
92, // A25, PF12
93, // A26, PF13
94, // A27, PF14
114, // A28, PH2
115, // A29, PH3
116, // A30, PH4
117, // A31, PH5
128, // A32, PA0_C
129, // A33, PA1_C
130, // A34, PC2_C
131 // A35, PC3_C
};

#endif /* ARDUINO_GENERIC_* */
Loading

0 comments on commit 2f7d688

Please sign in to comment.