AnsweredAssumed Answered

GPIO

Question asked by keikhaei.morteza on Sep 15, 2013
Latest reply on Sep 15, 2013 by Clive One
hello 
i wanna build a project in keil that is a blinker actually a wanna set and reset GPIOA pins 
which registers i should adjust ?
my program is:
#define STM32F10X_CL
#include <stm32f10x.h>


int main(){
int i=0;
RCC->APB2ENR=0x1c;
GPIOA->CRL=0x22222222;
GPIOA->CRH=0x22222222; 


 while(1)
 {


  GPIOA->ODR = 0x0000ffff;
  for(i=0;i<500000;i++);
  GPIOA->ODR = 0x00005555;
  for(i=0;i<700000;i++); 
  }
}


thanks 

Attachments

Outcomes