-
Notifications
You must be signed in to change notification settings - Fork 986
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
- Loading branch information
Showing
5 changed files
with
577 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
244 changes: 244 additions & 0 deletions
244
variants/STM32WLxx/WL54JCI_WL55JCI_WLE4J(8-B-C)I_WLE5J(8-B-C)I/PeripheralPins_LORA_E5_MINI.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,244 @@ | ||
/* | ||
******************************************************************************* | ||
* Copyright (c) 2023, 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 | ||
* | ||
******************************************************************************* | ||
*/ | ||
/* | ||
* Automatically generated from STM32WL54JCIx.xml, STM32WL55JCIx.xml | ||
* STM32WLE4J8Ix.xml, STM32WLE4JBIx.xml | ||
* STM32WLE4JCIx.xml, STM32WLE5J8Ix.xml | ||
* STM32WLE5JBIx.xml, STM32WLE5JCIx.xml | ||
* CubeMX DB release 6.0.80 | ||
*/ | ||
#if defined(ARDUINO_LORA_E5_MINI) | ||
#include "Arduino.h" | ||
#include "PeripheralPins.h" | ||
|
||
/* ===== | ||
* Notes: | ||
* - The pins mentioned Px_y_ALTz are alternative possibilities which use other | ||
* HW peripheral instances. You can use them the same way as any other "normal" | ||
* pin (i.e. analogWrite(PA7_ALT1, 128);). | ||
* | ||
* - Commented lines are alternative possibilities which are not used per default. | ||
* If you change them, you will have to know what you do | ||
* ===== | ||
*/ | ||
|
||
//*** ADC *** | ||
|
||
#ifdef HAL_ADC_MODULE_ENABLED | ||
WEAK const PinMap PinMap_ADC[] = { | ||
{PA_10, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC_IN6 | ||
// {PA_11, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC_IN7 | ||
// {PA_12, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC_IN8 | ||
{PA_13, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC_IN9 | ||
{PA_14, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC_IN10 | ||
{PA_15, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC_IN11 | ||
// {PB_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC_IN5 | ||
// {PB_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC_IN4 | ||
{PB_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC_IN2 | ||
{PB_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC_IN3 | ||
{PB_13, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC_IN0 | ||
{PB_14, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC_IN1 | ||
{NC, NP, 0} | ||
}; | ||
#endif | ||
|
||
//*** DAC *** | ||
|
||
#ifdef HAL_DAC_MODULE_ENABLED | ||
WEAK const PinMap PinMap_DAC[] = { | ||
{PA_10, DAC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // DAC_OUT1 | ||
{NC, NP, 0} | ||
}; | ||
#endif | ||
|
||
//*** I2C *** | ||
|
||
#ifdef HAL_I2C_MODULE_ENABLED | ||
WEAK const PinMap PinMap_I2C_SDA[] = { | ||
{PA_10, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, | ||
// {PA_11, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)}, | ||
{PA_15, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)}, | ||
{PB_4, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)}, | ||
{PB_7, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, | ||
{PB_9, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, | ||
// {PB_11, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)}, | ||
{PB_14, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)}, | ||
{PC_1, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)}, | ||
{NC, NP, 0} | ||
}; | ||
#endif | ||
|
||
#ifdef HAL_I2C_MODULE_ENABLED | ||
WEAK const PinMap PinMap_I2C_SCL[] = { | ||
// {PA_7, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)}, | ||
{PA_9, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, | ||
// {PA_12, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)}, | ||
{PB_6, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, | ||
// {PB_8, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, | ||
{PB_10, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)}, | ||
{PB_13, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)}, | ||
{PB_15, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)}, | ||
{PC_0, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)}, | ||
{NC, NP, 0} | ||
}; | ||
#endif | ||
|
||
//*** TIM *** | ||
|
||
#ifdef HAL_TIM_MODULE_ENABLED | ||
WEAK const PinMap PinMap_TIM[] = { | ||
{PA_0, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1 | ||
// {PA_1, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 2, 0)}, // TIM2_CH2 | ||
{PA_2, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 3, 0)}, // TIM2_CH3 | ||
{PA_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 4, 0)}, // TIM2_CH4 | ||
// {PA_5, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1 | ||
// {PA_6, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF14_TIM16, 1, 0)}, // TIM16_CH1 | ||
// {PA_7, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 1)}, // TIM1_CH1N | ||
// {PA_7_ALT1, TIM17, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF14_TIM17, 1, 0)}, // TIM17_CH1 | ||
// {PA_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 0)}, // TIM1_CH1 | ||
{PA_9, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 0)}, // TIM1_CH2 | ||
{PA_10, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 0)}, // TIM1_CH3 | ||
// {PA_11, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 4, 0)}, // TIM1_CH4 | ||
{PA_15, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1 | ||
{PB_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 2, 0)}, // TIM2_CH2 | ||
{PB_6, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF14_TIM16, 1, 1)}, // TIM16_CH1N | ||
{PB_7, TIM17, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF14_TIM17, 1, 1)}, // TIM17_CH1N | ||
// {PB_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N | ||
// {PB_8_ALT1, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF14_TIM16, 1, 0)}, // TIM16_CH1 | ||
{PB_9, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N | ||
{PB_9_ALT1, TIM17, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF14_TIM17, 1, 0)}, // TIM17_CH1 | ||
{PB_10, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 3, 0)}, // TIM2_CH3 | ||
// {PB_11, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 4, 0)}, // TIM2_CH4 | ||
{PB_13, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 1)}, // TIM1_CH1N | ||
{PB_14, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N | ||
{PB_15, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N | ||
{NC, NP, 0} | ||
}; | ||
#endif | ||
|
||
//*** UART *** | ||
|
||
#ifdef HAL_UART_MODULE_ENABLED | ||
WEAK const PinMap PinMap_UART_TX[] = { | ||
{PA_2, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_LPUART1)}, | ||
{PA_2_ALT1, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, | ||
{PA_9, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, | ||
{PB_6, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, | ||
// {PB_11, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_LPUART1)}, | ||
{PC_1, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_LPUART1)}, | ||
{NC, NP, 0} | ||
}; | ||
#endif | ||
|
||
#ifdef HAL_UART_MODULE_ENABLED | ||
WEAK const PinMap PinMap_UART_RX[] = { | ||
{PA_3, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_LPUART1)}, | ||
{PA_3_ALT1, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, | ||
{PA_10, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, | ||
{PB_7, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, | ||
{PB_10, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_LPUART1)}, | ||
{PC_0, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_LPUART1)}, | ||
{NC, NP, 0} | ||
}; | ||
#endif | ||
|
||
#ifdef HAL_UART_MODULE_ENABLED | ||
WEAK const PinMap PinMap_UART_RTS[] = { | ||
// {PA_1, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_LPUART1)}, | ||
// {PA_1_ALT1, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, | ||
// {PA_12, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, | ||
// {PB_1, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_LPUART1)}, | ||
{PB_3, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, | ||
// {PB_12, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_LPUART1)}, | ||
{NC, NP, 0} | ||
}; | ||
#endif | ||
|
||
#ifdef HAL_UART_MODULE_ENABLED | ||
WEAK const PinMap PinMap_UART_CTS[] = { | ||
// {PA_0, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, | ||
// {PA_6, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_LPUART1)}, | ||
// {PA_11, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, | ||
{PB_4, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, | ||
// {PB_13, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_LPUART1)}, | ||
{NC, NP, 0} | ||
}; | ||
#endif | ||
|
||
//*** SPI *** | ||
|
||
#ifdef HAL_SPI_MODULE_ENABLED | ||
WEAK const PinMap PinMap_SPI_MOSI[] = { | ||
// {PA_7, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, | ||
{PA_7, SUBGHZSPI, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF13_DEBUG_SUBGHZSPI)}, | ||
{PA_10, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, | ||
// {PA_12, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, | ||
// {PB_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, | ||
{PB_15, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, | ||
{PC_1, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_SPI2)}, | ||
// {PC_3, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, | ||
{NC, NP, 0} | ||
}; | ||
#endif | ||
|
||
#ifdef HAL_SPI_MODULE_ENABLED | ||
WEAK const PinMap PinMap_SPI_MISO[] = { | ||
// {PA_5, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_SPI2)}, | ||
// {PA_6, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, | ||
{PA_6, SUBGHZSPI, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF13_DEBUG_SUBGHZSPI)}, | ||
// {PA_11, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, | ||
{PB_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, | ||
{PB_14, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, | ||
// {PC_2, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, | ||
{NC, NP, 0} | ||
}; | ||
#endif | ||
|
||
#ifdef HAL_SPI_MODULE_ENABLED | ||
WEAK const PinMap PinMap_SPI_SCLK[] = { | ||
// {PA_1, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, | ||
// {PA_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, | ||
{PA_5, SUBGHZSPI, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF13_DEBUG_SUBGHZSPI)}, | ||
// {PA_8, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, | ||
{PA_9, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, | ||
{PB_3, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, | ||
{PB_10, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, | ||
{PB_13, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, | ||
{NC, NP, 0} | ||
}; | ||
#endif | ||
|
||
#ifdef HAL_SPI_MODULE_ENABLED | ||
WEAK const PinMap PinMap_SPI_SSEL[] = { | ||
// {PA_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, | ||
{PA_4, SUBGHZSPI, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF13_DEBUG_SUBGHZSPI)}, | ||
{PA_9, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_SPI2)}, | ||
{PA_15, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, | ||
// {PB_2, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, | ||
{PB_9, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, | ||
// {PB_12, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, | ||
{NC, NP, 0} | ||
}; | ||
#endif | ||
|
||
//*** No CAN *** | ||
|
||
//*** No ETHERNET *** | ||
|
||
//*** No QUADSPI *** | ||
|
||
//*** No USB *** | ||
|
||
//*** No SD *** | ||
|
||
#endif /* ARDUINO_LORA_E5_MINI */ |
112 changes: 112 additions & 0 deletions
112
variants/STM32WLxx/WL54JCI_WL55JCI_WLE4J(8-B-C)I_WLE5J(8-B-C)I/variant_LORA_E5_MINI.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
/* | ||
******************************************************************************* | ||
* Copyright (c) 2023, 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_LORA_E5_MINI) | ||
#include "pins_arduino.h" | ||
|
||
// Digital PinName array | ||
const PinName digitalPin[] = { | ||
PA_0, // D0 | ||
PA_2, // D1 | ||
PA_3, // D2 | ||
PC_1, // D3 | ||
PC_0, // D4 | ||
PB_6, // D5 | ||
PB_7, // D6 | ||
PA_15, // D7/A0 | ||
PB_15, // D8 | ||
PA_9, // D9 | ||
PB_10, // D10 | ||
PB_13, // D11/A1 | ||
PB_9, // D12 | ||
PB_14, // D13/A2 | ||
PA_10, // D14/A5 | ||
PA_14, // D15/A6 | ||
PA_13, // D16/A7 | ||
PB_3, // D17/A3 | ||
PB_4, // D18/A4 | ||
PB_5, // D19 | ||
PA_4, // D20 | ||
PA_5, // D21 | ||
PB_0, // D22 | ||
PC_15, // D23 | ||
PC_14, // D24 | ||
PA_7, // D25 | ||
PA_6 // D26 | ||
|
||
}; | ||
|
||
// Analog (Ax) pin number array | ||
const uint32_t analogInputPin[] = { | ||
7, // A0, PA15 | ||
11, // A1, PB13 | ||
13, // A2, PB14 | ||
17, // A3, PB3 | ||
18, // A4, PB4 | ||
14, // A5, PA10 | ||
15, // A6, PA14 | ||
16 // A7, PA13 | ||
}; | ||
|
||
// ---------------------------------------------------------------------------- | ||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
/** | ||
* @brief System Clock Configuration | ||
* @param None | ||
* @retval None | ||
*/ | ||
WEAK void SystemClock_Config(void) | ||
{ | ||
RCC_OscInitTypeDef RCC_OscInitStruct = {}; | ||
RCC_ClkInitTypeDef RCC_ClkInitStruct = {}; | ||
|
||
/** Configure LSE Drive Capability | ||
*/ | ||
HAL_PWR_EnableBkUpAccess(); | ||
__HAL_RCC_LSEDRIVE_CONFIG(RCC_LSEDRIVE_LOW); | ||
/** Configure the main internal regulator output voltage | ||
*/ | ||
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1); | ||
/** Initializes the CPU, AHB and APB busses clocks | ||
*/ | ||
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_LSE | RCC_OSCILLATORTYPE_MSI; | ||
RCC_OscInitStruct.LSEState = RCC_LSE_ON; | ||
RCC_OscInitStruct.MSIState = RCC_MSI_ON; | ||
RCC_OscInitStruct.MSICalibrationValue = RCC_MSICALIBRATION_DEFAULT; | ||
RCC_OscInitStruct.MSIClockRange = RCC_MSIRANGE_11; | ||
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_NONE; | ||
if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) { | ||
Error_Handler(); | ||
} | ||
/** Configure the SYSCLKSource, HCLK, PCLK1 and PCLK2 clocks dividers | ||
*/ | ||
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK3 | RCC_CLOCKTYPE_HCLK | ||
| RCC_CLOCKTYPE_SYSCLK | RCC_CLOCKTYPE_PCLK1 | ||
| RCC_CLOCKTYPE_PCLK2; | ||
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_MSI; | ||
RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1; | ||
RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1; | ||
RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1; | ||
RCC_ClkInitStruct.AHBCLK3Divider = RCC_SYSCLK_DIV1; | ||
|
||
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_2) != HAL_OK) { | ||
Error_Handler(); | ||
} | ||
} | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
#endif /* ARDUINO_LORA_E5_MINI */ |
Oops, something went wrong.