Skip to content

Commit 42e0262

Browse files
zfieldsfpistm
authored andcommitted
fix: Cygnet USER_BTN mapping
1 parent 822d249 commit 42e0262

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

variants/STM32L4xx/L433C(B-C)(T-U)_L443CC(T-U)/PeripheralPins_CYGNET.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ WEAK const PinMap PinMap_TIM[] = {
105105
// {PA_15, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1 - CHARGE_DETECT
106106
{PB_0, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N - D11
107107
{PB_1, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N - A4
108-
// {PB_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 2, 0)}, // TIM2_CH2 - USER_BTN
108+
// {PB_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 2, 0)}, // TIM2_CH2 - USB_DETECT
109109
// {PB_6, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF14_TIM16, 1, 1)}, // TIM16_CH1N - SCL
110110
{PB_8, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF14_TIM16, 1, 0)}, // TIM16_CH1 - D5
111111
// {PB_10, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 3, 0)}, // TIM2_CH3 - LPUART1_VCP_RX
@@ -156,7 +156,7 @@ WEAK const PinMap PinMap_UART_RTS[] = {
156156
// {PA_15, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, // - CHARGE_DETECT
157157
{PB_1, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_LPUART1)}, // - A4
158158
{PB_1_ALT1, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, // - A4
159-
// {PB_3, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, // - USER_BTN
159+
// {PB_3, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, // - USB_DETECT
160160
// {PB_12, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_LPUART1)}, // - NC
161161
{PB_14, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, // - D9
162162
{NC, NP, 0}
@@ -204,8 +204,8 @@ WEAK const PinMap PinMap_SPI_MISO[] = {
204204
WEAK const PinMap PinMap_SPI_SCLK[] = {
205205
{PA_1, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, // - A1
206206
{PA_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, // - CK
207-
// {PB_3, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, // - USER_BTN
208-
// {PB_3_ALT1, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, // - USER_BTN
207+
// {PB_3, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, // - USB_DETECT
208+
// {PB_3_ALT1, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, // - USB_DETECT
209209
// {PB_10, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, // - LPUART1_VCP_RX
210210
{PB_13, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, // - D10
211211
{NC, NP, 0}

variants/STM32L4xx/L433C(B-C)(T-U)_L443CC(T-U)/variant_CYGNET.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,13 @@ const PinName digitalPin[] = {
4040
PA_13, // 21 - SWDIO
4141
PA_14, // 22 - SWCLK
4242
PA_15, // 23 - CHARGE_DETECT
43-
PB_3, // 24 - USER_BTN
43+
PB_3, // 24 - USB_DETECT
4444
PB_5, // 25 - MO
4545
PB_6, // 26 - SCL
4646
PB_7, // 27 - SDA
4747
PB_10, // 28 - LPUART1_VCP_RX
4848
PB_11, // 29 - LPUART1_VCP_TX
49-
PC_13, // 30 - USB_DETECT
49+
PC_13, // 30 - USER_BTN
5050
PC_14, // 31 - OSC32_IN
5151
PC_15, // 32 - OSC32_OUT
5252
PH_0, // 33 - ENABLE_3V3
@@ -85,8 +85,8 @@ WEAK void initVariant(void)
8585
GPIO_InitStruct.Pull = GPIO_NOPULL;
8686
GPIO_InitStruct.Pin = GPIO_PIN_1;
8787
HAL_GPIO_Init(GPIOH, &GPIO_InitStruct); /* PH1 DISCHARGE_3V3 */
88-
GPIO_InitStruct.Pin = GPIO_PIN_13;
89-
HAL_GPIO_Init(GPIOC, &GPIO_InitStruct); /* PC13 is USB_DETECT */
88+
GPIO_InitStruct.Pin = GPIO_PIN_3;
89+
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); /* PB3 is USB_DETECT */
9090
GPIO_InitStruct.Pin = GPIO_PIN_15;
9191
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); /* PA15 is CHARGE_DETECT */
9292
GPIO_InitStruct.Pin = GPIO_PIN_4;

variants/STM32L4xx/L433C(B-C)(T-U)_L443CC(T-U)/variant_CYGNET.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@
4545
#define PA13 21 // SWDIO
4646
#define PA14 22 // SWCLK
4747
#define PA15 23 // CHARGE_DETECT
48-
#define PB3 24 // USER_BTN
48+
#define PB3 24 // USB_DETECT
4949
#define PB5 25 // MO
5050
#define PB6 26 // SCL
5151
#define PB7 27 // SDA
5252
#define PB10 28 // LPUART1_VCP_RX
5353
#define PB11 29 // LPUART1_VCP_TX
54-
#define PC13 30 // USB_DETECT
54+
#define PC13 30 // USER_BTN
5555
#define PC14 31 // OSC32_IN
5656
#define PC15 32 // OSC32_OUT
5757
#define PH0 33 // ENABLE_3V3
@@ -83,7 +83,7 @@
8383

8484
// On-board user button
8585
#ifndef USER_BTN
86-
#define USER_BTN PB3
86+
#define USER_BTN PC13
8787
#endif
8888

8989
// Power switch ENABLE and DISCHARGE pins

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy