2025-01-08 11:24 PM
Hi,
I was learning how to work with STM32WB55RG, using the following wiki page: https://wiki.st.com/stm32mcu/wiki/Connectivity:STM32WB_BLE_STM32CubeMX
The tutorial here is top notch, great explanation and examples, easy to follow. Only error is that there is no note to redefine CubeMX generated define in main.h for blue led and user switch, which causes faults when trying to compile and flash code.
So there should be a picture and note, to replace cubeMX generated private defines in main.h with the ones from provided functions:
file name: main.h
void Error_Handler(void);
void MX_USART1_UART_Init(void);
/* USER CODE BEGIN EFP */
/* USER CODE END EFP */
/* Private defines -----------------------------------------------------------*/
#define BUTTON_SW1_PIN GPIO_PIN_4
#define BUTTON_SW1_GPIO_PORT GPIOC
#define BUTTON_SW1_EXTI_IRQn EXTI4_IRQn
#define LED_BLUE GPIO_PIN_5
#define LED_BLUE_GPIO_PORT GPIOB
/* USER CODE BEGIN Private defines */
2025-01-09 02:16 AM
Hello @KlemenPfce
Thank you for rising this up.
I passed your feedback along to the team in charge of the wiki page (via internal ticket number: 200032).
2025-01-09 02:22 AM
@KlemenPfce wrote:Only error is that there is no note to redefine CubeMX generated define in main.h for blue led and user switch
This part: https://wiki.st.com/stm32mcu/wiki/Connectivity:STM32WB_BLE_STM32CubeMX#User_button_and_LED_pinout ?