AnsweredAssumed Answered

Nucleo Board Led I'm not able to activate, but register is showing high

Question asked by uli stone on Aug 16, 2017
Latest reply on Aug 16, 2017 by uli stone

Hi,

I'm not able to activate the led (green, LD2, PA5) in stepping mode. But the corrosponding register shows that it is activated.

 

#include "stm32f4xx_rcc.h"
#include "stm32f4xx_gpio.h"
int main()
{

    RCC->AHB1ENR |= RCC_AHB1Periph_GPIOA;

    GPIOA->MODER |= GPIO_Mode_OUT;
    GPIOA->OSPEEDR |= GPIO_Speed_25MHz;
    GPIOA->OTYPER |= GPIO_OType_PP;
    GPIOA->PUPDR |= GPIO_PuPd_NOPULL;


    while (1)
    {
        GPIOA->BSRRL = GPIO_Pin_5;
        GPIOA->BSRRH = GPIO_Pin_5;
    }
}

 

What is wrong?

 

Thank you

Outcomes