Hello I am using STM32F407 descovery, I managed to turn on all of its LEDS as shown in the picture bellow.
But when i put the code shown bellow inside the while(1) loop.
I get no LED's ON at all, Its like no code is working at all,but before the WHILE(1) i turned all LEDS on,so why i dont get any LED's on when i do the blinking LED in the while(1)?
Thanks.

But when i put the code shown bellow inside the while(1) loop.
I get no LED's ON at all, Its like no code is working at all,but before the WHILE(1) i turned all LEDS on,so why i dont get any LED's on when i do the blinking LED in the while(1)?
Thanks.
Code:
#include "stm32f407xx.h"
static void delay2(int n)
{
while(n>0) n--;
}
int main()
{
//RCC_AHB1ENR_GPIODEN
RCC->AHB1ENR|=(1uL<<3); //set tirdbit
//GPIOD->MODER&=~(1uL<<31);//reset 0 on 31 01 to gpio_moder 31,30 bits in register
//GPIOD->MODER|=(1uL<<30);//set 1 on 30 output mode for pin 15 port D
GPIOD->MODER=0x55000000;
GPIOD->OTYPER=0; //all register is push pull
GPIOD->OSPEEDR=0;//speed low
//GPIOD->ODR|=(1<<15); //Sets pin 15
GPIOD->ODR=0xF000;
while(1)
{
GPIOD->ODR=0x8000;
delay2(2000000);
GPIOD->ODR=0x4000;
delay2(200000);
GPIOD->ODR=0x2000;
delay2(2000000);
GPIOD->ODR=0x1000;
delay2(200000);
}
}
