Output Compare not working for STM32F407 Discovery Board


I am working on STM32F407 Discovery board. I am trying to use output compare mode in stm32 for led toggle. Here is the code I have written

#include "stm32f4xx.h" //Header File for STM32F4 device

int main(void)
    RCC->AHB1ENR |=1;          //Enable GPIOA Port Clock    
    GPIOA->MODER|= 0X800 ;      //Configure I/O direction for PA5 as Alternatefunction   0100 0000 0000
    return 0;    

But, the code is not working. Can any one help me if there is any error in this code.

More questions in this forum