Question
driving LD3 in STM32L1 discovery kit
Posted on October 28, 2014 at 14:19
Hello,
I am new to STM32 development. I am trying to get familiar with discovery kit.I am using Atollic true studio lite version. I am trying to drive LD3 but it seems not working. Here is my code:&sharpinclude <stddef.h>&sharpinclude ''stm32l1xx.h''static volatile uint32_t TimingDelay;static void GPIO_LED_GREEN_SETUP(void){ GPIO_InitTypeDef GPIO_InitStructure; RCC_DeInit();// GPIO_DeInit(GPIOB); RCC_AHBPeriphClockCmd(RCC_AHBPeriph_GPIOB,ENABLE); GPIO_StructInit(&GPIO_InitStructure); GPIO_InitStructure.GPIO_Pin = GPIO_Pin_7; GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT; GPIO_InitStructure.GPIO_OType = GPIO_OType_PP; GPIO_Init(GPIOB, &GPIO_InitStructure);}int main(void){ GPIO_LED_GREEN_SETUP(); GPIO_SetBits(GPIOB,GPIO_Pin_7); /* LED on/off */ while(1);// } return 0;} #stm32l152rc-discovery-kit