AnsweredAssumed Answered

Newbie - ST32F407 Discovry board Blue led issue

Question asked by Bhatnagar.Ankit.001 on Nov 2, 2015
Latest reply on Nov 8, 2015 by Bhatnagar.Ankit.001
Hi all,

I have just started learning ARM and have picked up the STM3F4 discovery board.

Below is my first code to light up all the 4 user leds on board (connected to GPIOD 12to 15).

#include "stm32f4xx.h"
 
int main(void)
{
  //enable clock to gpiod
  RCC->AHB1ENR = (1<<3);
   
  //gpiod - led
  GPIOD->MODER = (1<<22) | (1<<24) | (1<<26) | (1<<28);
  //default push pull
  //default low speed @ 2mhz
  //default no PUPD
  //GPIOD->ODR = (1<<12) | (1<<13) | (1<<14) | (1<<15);
  GPIOD->BSRRL = (1<<12) | (1<<13) | (1<<14) | (1<<15);
   
  while(1)
  {
  }
}

When I run this code, all the leds light up except tjhe blue one. Cam someone point out what I am doing wrong?

Outcomes