AnsweredAssumed Answered

Help with PC8 blinking LED - STM32F051

Question asked by miri on Sep 28, 2016
Latest reply on Sep 29, 2016 by FTITI.Walid
I try to run the following program on KEIL MDK 5.0:

#include "stm32f0xx.h"
int main(void){
     volatile unsigned int i=0;
     RCC -> AHBENR |= (i<<19);
     GPIOC ->MODER |= (i<<16); // mode
     GPIOC ->ODR |= (i<<8); // output data is ON
     
  while (1)  {
          for (i=0; i<1000000; i++)
               GPIOC ->ODR |= (i<<8); // output data is ON
          for (i=0; i<1000000; i++)
               GPIOC ->ODR &= (i<<8); // output data is OFF               
       }
  }

From some reason I don't see the BLUE LED blinking.
Anyone know why?

Thanks,
Miri

Outcomes