2014-05-20 06:28 PM
In version 1.1.0 of STM32CubeF4, the BSP for the Nucleo boards has an LED control bug - the functions operate in reverse.
That is, BSP_LED_On() turns off the Nucleo LED and BSP_LED_Off() turns on the LED. These functions are located in the file:Drivers\BSP\STM32F4xx-Nucleo\stm32f4xx_nucleo.c #bsp #nucleo #nucleo #stm32cubef4-nucleo #bsp #led
2014-05-21 06:42 AM
Hi,
It seems that you are using a nucleo Rev B board.The developped BSP driver works well with Rev A and Rev C board, the LEDs PCB layout are different (inversed) in nucleo Rev B.You have just to fine tune this driver to make it work with your board.With regards.2014-05-26 03:31 PM
No, I have a Rev C board. LED2 is turned on by driving the PA5 pin high as shown in the schematic.
Below is a copy of the code from: STM32Cube_FW_F4_V1.1.0\Drivers\BSP\STM32F4xx-Nucleo\stm32f4xx_nucleo.c162 void BSP_LED_On(Led_TypeDef Led)
163 { 164 HAL_GPIO_WritePin(GPIO_PORT[Led], GPIO_PIN[Led], GPIO_PIN_RESET); 165 } 174 void BSP_LED_Off(Led_TypeDef Led) 175 { 176 HAL_GPIO_WritePin(GPIO_PORT[Led], GPIO_PIN[Led], GPIO_PIN_SET); 177 } As you can see, BSP_LED_On( ) resets the pin instead of setting it and BSP_LED_Off( ) sets the pin instead of resetting it!2014-05-27 02:41 AM
Hi Dan,
I confirm the bug, since this driver is not 'maybe' validated using a STM32F401RE-Nucleo RevC board... because as I said the LEDs PCB layouts of old Nucleo revisions is inverted..With regards.