diff --git a/variants/STM32L4xx/L433C(B-C)(T-U)_L443CC(T-U)/PeripheralPins_CYGNET.c b/variants/STM32L4xx/L433C(B-C)(T-U)_L443CC(T-U)/PeripheralPins_CYGNET.c index 36f73b9213..f281bba8a5 100644 --- a/variants/STM32L4xx/L433C(B-C)(T-U)_L443CC(T-U)/PeripheralPins_CYGNET.c +++ b/variants/STM32L4xx/L433C(B-C)(T-U)_L443CC(T-U)/PeripheralPins_CYGNET.c @@ -105,7 +105,7 @@ WEAK const PinMap PinMap_TIM[] = { // {PA_15, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1 - CHARGE_DETECT {PB_0, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N - D11 {PB_1, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N - A4 - // {PB_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 2, 0)}, // TIM2_CH2 - USER_BTN + // {PB_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 2, 0)}, // TIM2_CH2 - USB_DETECT // {PB_6, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF14_TIM16, 1, 1)}, // TIM16_CH1N - SCL {PB_8, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF14_TIM16, 1, 0)}, // TIM16_CH1 - D5 // {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[] = { // {PA_15, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, // - CHARGE_DETECT {PB_1, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_LPUART1)}, // - A4 {PB_1_ALT1, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, // - A4 - // {PB_3, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, // - USER_BTN + // {PB_3, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, // - USB_DETECT // {PB_12, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_LPUART1)}, // - NC {PB_14, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, // - D9 {NC, NP, 0} @@ -204,8 +204,8 @@ WEAK const PinMap PinMap_SPI_MISO[] = { WEAK const PinMap PinMap_SPI_SCLK[] = { {PA_1, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, // - A1 {PA_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, // - CK - // {PB_3, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, // - USER_BTN - // {PB_3_ALT1, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, // - USER_BTN + // {PB_3, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, // - USB_DETECT + // {PB_3_ALT1, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, // - USB_DETECT // {PB_10, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, // - LPUART1_VCP_RX {PB_13, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, // - D10 {NC, NP, 0} diff --git a/variants/STM32L4xx/L433C(B-C)(T-U)_L443CC(T-U)/variant_CYGNET.cpp b/variants/STM32L4xx/L433C(B-C)(T-U)_L443CC(T-U)/variant_CYGNET.cpp index 994d61ab0e..00c981a79f 100644 --- a/variants/STM32L4xx/L433C(B-C)(T-U)_L443CC(T-U)/variant_CYGNET.cpp +++ b/variants/STM32L4xx/L433C(B-C)(T-U)_L443CC(T-U)/variant_CYGNET.cpp @@ -40,13 +40,13 @@ const PinName digitalPin[] = { PA_13, // 21 - SWDIO PA_14, // 22 - SWCLK PA_15, // 23 - CHARGE_DETECT - PB_3, // 24 - USER_BTN + PB_3, // 24 - USB_DETECT PB_5, // 25 - MO PB_6, // 26 - SCL PB_7, // 27 - SDA PB_10, // 28 - LPUART1_VCP_RX PB_11, // 29 - LPUART1_VCP_TX - PC_13, // 30 - USB_DETECT + PC_13, // 30 - USER_BTN PC_14, // 31 - OSC32_IN PC_15, // 32 - OSC32_OUT PH_0, // 33 - ENABLE_3V3 @@ -85,8 +85,8 @@ WEAK void initVariant(void) GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Pin = GPIO_PIN_1; HAL_GPIO_Init(GPIOH, &GPIO_InitStruct); /* PH1 DISCHARGE_3V3 */ - GPIO_InitStruct.Pin = GPIO_PIN_13; - HAL_GPIO_Init(GPIOC, &GPIO_InitStruct); /* PC13 is USB_DETECT */ + GPIO_InitStruct.Pin = GPIO_PIN_3; + HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); /* PB3 is USB_DETECT */ GPIO_InitStruct.Pin = GPIO_PIN_15; HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); /* PA15 is CHARGE_DETECT */ GPIO_InitStruct.Pin = GPIO_PIN_4; diff --git a/variants/STM32L4xx/L433C(B-C)(T-U)_L443CC(T-U)/variant_CYGNET.h b/variants/STM32L4xx/L433C(B-C)(T-U)_L443CC(T-U)/variant_CYGNET.h index 901a7bd440..bc4ff379dd 100644 --- a/variants/STM32L4xx/L433C(B-C)(T-U)_L443CC(T-U)/variant_CYGNET.h +++ b/variants/STM32L4xx/L433C(B-C)(T-U)_L443CC(T-U)/variant_CYGNET.h @@ -45,13 +45,13 @@ #define PA13 21 // SWDIO #define PA14 22 // SWCLK #define PA15 23 // CHARGE_DETECT -#define PB3 24 // USER_BTN +#define PB3 24 // USB_DETECT #define PB5 25 // MO #define PB6 26 // SCL #define PB7 27 // SDA #define PB10 28 // LPUART1_VCP_RX #define PB11 29 // LPUART1_VCP_TX -#define PC13 30 // USB_DETECT +#define PC13 30 // USER_BTN #define PC14 31 // OSC32_IN #define PC15 32 // OSC32_OUT #define PH0 33 // ENABLE_3V3 @@ -83,7 +83,7 @@ // On-board user button #ifndef USER_BTN - #define USER_BTN PB3 + #define USER_BTN PC13 #endif // Power switch ENABLE and DISCHARGE pins