cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeMx + STM32L476 Discovery Board Generating Codes With Error (Not recognizing PB3)

jeremy23
Associate II
Posted on November 05, 2015 at 18:00

Hello,

I put together a new project using STM32CubeMx for the STM32L476 discovery board and generated some code for both Keil and IAR. Both had issues with the following lines:

#define 3V3_REG_ON_Pin GPIO_PIN_3
#define 3V3_REG_ON_GPIO_Port GPIOB

If it was just one compiler, I would just assume it's related to a software update but since it affects multiple compilers, I assume the issue is with STM32CubeMX's code generator specifically. I'm just getting started with evaluating STMicroelectronic's microcontrollers after having issues with ATmel's and this is a bit of a concerning first experience. The tools look really good so if they're functional as well, that would be very helpful. I had initially tried commenting out those lines (as well as the declarations) but had read somewhere that PB3 is used for SWD communication. Not sure if that's what I'll be using (as I'm still fairly new to this) but I figure at the very least, I should report this and find out what the best common practice is before moving forward. Anyway, I figured I'd report it here. I'm including a screenshot of PB3 on the pinout. #stm32cube #bug #stm32l476
3 REPLIES 3
Nesrine M_O
Lead II
Posted on November 06, 2015 at 11:24

Hi J B,

Unfortunately the issue exists, it seems to be related to the pin user label starting by a number. So as solution you can change the user pin label under CUBEMX.

Configuration -> GPIO ->PB3 Configuration-> change User Label (REG-ON)

I will report this bug to our CUBEMX team, thank you for highlighting it, and Sorry for the inconvenience it may bring.

-Syrine –

stm32cube-t
Senior III
Posted on November 09, 2015 at 15:41

Dear user,

The issue will be fixed in next release CubeMX 4.12.

Thank you
jeremy23
Associate II
Posted on November 10, 2015 at 00:42

Thanks!