2024-07-29 11:10 AM
Hi,
It's been a long time since I last programmed an STM32. I've been put on a project that uses the STM32WBA55CGU7, so I've gotten a STM32WBA55G-DK1 development board.
I've loaded up the example program "GPIO_InfiniteLedToggling_Init". I had hoped that it would work out of the box... no such luck.
The program is supposed to blink LD3.
I've got the program compiled and loaded on the board. The debugger appear to be working just fine, stopping at breakpoints etc.
But no love from LD3. I've got all the jumpers in the default locations and I am powering the board via the USB-C connector plugged into my laptop.
There is a green power LED(LD4) that is on. LD1 is solid green and LD2 is blinking green/red. I'm under the impression that this the expected behavior... except that but LD3 shows nothing.
I have been having trouble finding any documentation that would indicate what the trouble is.
I am able to probe the Arduino interface's D8 pin which is shown as connected to LD3 in the schematic, but there is nothing there either.
Interestingly, when I probe the VIN pin on the Arduino connector, I do not see power, but when I probe the 5V_STLK jumper on J4 I see 5V as expected.
Any help would be much appreciated!
Bill
Solved! Go to Solution.
2024-07-29 12:26 PM
Huh. Okay got it.
It seems that by default LD3 is connected to GPIO_0, but on the STM32WBA55CG-U6/7 there is no physical pin available on the SoC that is labelled GPIO_0!!!!!
So, for the STM32WBA55CG-DK1, LD3 is powered by PB15/GPIO_15. The example includes a file called Drivers/BSP/STM32WBA55G-DK1/stm32wba55g_discovery.h . In this file there is the following statement...
#if defined (STM32WBA55G_DK1_LD3_ON_PB15)
#define LD3_GPIO_PORT GPIOB
#define LD3_GPIO_CLK_ENABLE() __HAL_RCC_GPIOB_CLK_ENABLE()
#define LD3_PIN GPIO_PIN_15
#else
#define LD3_GPIO_PORT GPIOA
#define LD3_GPIO_CLK_ENABLE() __HAL_RCC_GPIOA_CLK_ENABLE()
#define LD3_PIN GPIO_PIN_0
#endif
... by adding the line...
#define STM32WBA55G_DK1_LD3_ON_PB15
you can get LD3 to blink properly.
Opinion:
This seems like not a great "hello world" to publish for the STM32WBA55G-DK1, given that it *does not work* out of the box and requires some significant digging to fix.
I guess the result is that I know my way around a bit better?
2024-07-29 11:45 AM
PS. I have confirmed that the VIN is not supposed to show 5v when the STM32WBA55CG-DK1 is powered via 5V_STLK
2024-07-29 12:26 PM
Huh. Okay got it.
It seems that by default LD3 is connected to GPIO_0, but on the STM32WBA55CG-U6/7 there is no physical pin available on the SoC that is labelled GPIO_0!!!!!
So, for the STM32WBA55CG-DK1, LD3 is powered by PB15/GPIO_15. The example includes a file called Drivers/BSP/STM32WBA55G-DK1/stm32wba55g_discovery.h . In this file there is the following statement...
#if defined (STM32WBA55G_DK1_LD3_ON_PB15)
#define LD3_GPIO_PORT GPIOB
#define LD3_GPIO_CLK_ENABLE() __HAL_RCC_GPIOB_CLK_ENABLE()
#define LD3_PIN GPIO_PIN_15
#else
#define LD3_GPIO_PORT GPIOA
#define LD3_GPIO_CLK_ENABLE() __HAL_RCC_GPIOA_CLK_ENABLE()
#define LD3_PIN GPIO_PIN_0
#endif
... by adding the line...
#define STM32WBA55G_DK1_LD3_ON_PB15
you can get LD3 to blink properly.
Opinion:
This seems like not a great "hello world" to publish for the STM32WBA55G-DK1, given that it *does not work* out of the box and requires some significant digging to fix.
I guess the result is that I know my way around a bit better?