Question
Problems blinking blue LED
Posted on May 31, 2013 at 14:53
Hi all!
I'm a newbie and I have problems with my STM32L-Discovery. I'm trying to do the simplest possible program: make the blue LED in PB6 output blink. This is the code I've made: #include <stdio.h> /* standard I/O .h-file */ #include <stm32f10x.h> /* STM32F10x definitions */ int main() { RCC->APB2ENR |= (1UL << 3); GPIOB->ODR &= 0x00000000; /* switch off LEDs */ GPIOB->ODR |= 0x00000040; /* switch on LEDs */ GPIOB->CRL |= 0x05000000; while (1){} } I compile it, and no errors are shown, but nothing happens in the board. I'm using Keil uVision.