Skip to content

Commit

Permalink
chore(G4): update variants against CubeMX DB release 6.0.120
Browse files Browse the repository at this point in the history
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
  • Loading branch information
fpistm committed Jul 5, 2024
1 parent 8b69e11 commit 5d41575
Show file tree
Hide file tree
Showing 127 changed files with 8,550 additions and 258 deletions.
109 changes: 66 additions & 43 deletions boards.txt

Large diffs are not rendered by default.

291 changes: 291 additions & 0 deletions variants/STM32G4xx/G411C(6-8-B)T/PeripheralPins.c

Large diffs are not rendered by default.

68 changes: 68 additions & 0 deletions variants/STM32G4xx/G411C(6-8-B)T/PinNamesVar.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
/* Alternate pin name */
PA_0_ALT1 = PA_0 | ALT1,
PA_1_ALT1 = PA_1 | ALT1,
PA_2_ALT1 = PA_2 | ALT1,
PA_3_ALT1 = PA_3 | 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_9_ALT1 = PA_9 | ALT1,
PA_10_ALT1 = PA_10 | ALT1,
PA_11_ALT1 = PA_11 | ALT1,
PA_11_ALT2 = PA_11 | ALT2,
PA_12_ALT1 = PA_12 | ALT1,
PA_12_ALT2 = PA_12 | ALT2,
PA_13_ALT1 = PA_13 | ALT1,
PA_15_ALT1 = PA_15 | ALT1,
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_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_7_ALT2 = PB_7 | ALT2,
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_9_ALT3 = PB_9 | ALT3,
PB_11_ALT1 = PB_11 | ALT1,
PB_14_ALT1 = PB_14 | ALT1,
PB_15_ALT1 = PB_15 | ALT1,
PB_15_ALT2 = PB_15 | ALT2,
PC_13_ALT1 = PC_13 | ALT1,

/* SYS_WKUP */
#ifdef PWR_WAKEUP_PIN1
SYS_WKUP1 = PA_0,
#endif
#ifdef PWR_WAKEUP_PIN2
SYS_WKUP2 = PC_13,
#endif
#ifdef PWR_WAKEUP_PIN3
SYS_WKUP3 = NC,
#endif
#ifdef PWR_WAKEUP_PIN4
SYS_WKUP4 = PA_2,
#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

/* No USB */
29 changes: 29 additions & 0 deletions variants/STM32G4xx/G411C(6-8-B)T/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/Arduino_Core_STM32/wiki/Add-a-new-variant-%28board%29

# Generic G411C6Tx
GenG4.menu.pnum.GENERIC_G411C6TX=Generic G411C6Tx
GenG4.menu.pnum.GENERIC_G411C6TX.upload.maximum_size=32768
GenG4.menu.pnum.GENERIC_G411C6TX.upload.maximum_data_size=32768
GenG4.menu.pnum.GENERIC_G411C6TX.build.board=GENERIC_G411C6TX
GenG4.menu.pnum.GENERIC_G411C6TX.build.product_line=STM32G414xx
GenG4.menu.pnum.GENERIC_G411C6TX.build.variant=STM32G4xx/G411C(6-8-B)T

# Generic G411C8Tx
GenG4.menu.pnum.GENERIC_G411C8TX=Generic G411C8Tx
GenG4.menu.pnum.GENERIC_G411C8TX.upload.maximum_size=65536
GenG4.menu.pnum.GENERIC_G411C8TX.upload.maximum_data_size=32768
GenG4.menu.pnum.GENERIC_G411C8TX.build.board=GENERIC_G411C8TX
GenG4.menu.pnum.GENERIC_G411C8TX.build.product_line=STM32G414xx
GenG4.menu.pnum.GENERIC_G411C8TX.build.variant=STM32G4xx/G411C(6-8-B)T

# Generic G411CBTx
GenG4.menu.pnum.GENERIC_G411CBTX=Generic G411CBTx
GenG4.menu.pnum.GENERIC_G411CBTX.upload.maximum_size=131072
GenG4.menu.pnum.GENERIC_G411CBTX.upload.maximum_data_size=32768
GenG4.menu.pnum.GENERIC_G411CBTX.build.board=GENERIC_G411CBTX
GenG4.menu.pnum.GENERIC_G411CBTX.build.product_line=STM32G414xx
GenG4.menu.pnum.GENERIC_G411CBTX.build.variant=STM32G4xx/G411C(6-8-B)T

28 changes: 28 additions & 0 deletions variants/STM32G4xx/G411C(6-8-B)T/generic_clock.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
*******************************************************************************
* 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_G411C6TX) || defined(ARDUINO_GENERIC_G411C8TX) ||\
defined(ARDUINO_GENERIC_G411CBTX)
#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_* */
80 changes: 80 additions & 0 deletions variants/STM32G4xx/G411C(6-8-B)T/variant_generic.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
/*
*******************************************************************************
* 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_G411C6TX) || defined(ARDUINO_GENERIC_G411C8TX) ||\
defined(ARDUINO_GENERIC_G411CBTX)
#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/A10
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/A11
PB_12, // D28/A12
PB_13, // D29
PB_14, // D30/A13
PB_15, // D31/A14
PC_13, // D32
PC_14, // D33
PC_15, // D34
PF_0, // D35/A15
PF_1, // D36/A16
PG_10 // D37
};

// 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
18, // A10, PB2
27, // A11, PB11
28, // A12, PB12
30, // A13, PB14
31, // A14, PB15
35, // A15, PF0
36 // A16, PF1
};

#endif /* ARDUINO_GENERIC_* */
Loading

0 comments on commit 5d41575

Please sign in to comment.