AnsweredAssumed Answered

Nucleo-L152 Blink LED does not work....

Question asked by Jasper298 on Nov 6, 2015
Latest reply on Nov 6, 2015 by Jasper298
Hi all,

For 3 years ago, I've used a Discovery L1 board and used the drivers in the Discovery Firmware package. I have developed a nice automatic chicken coop door. It is calculating Sunrise, Sunset and close/open the door on these times.

Now, I have to create a same system for a friend of mine, and bought a Nucleo board. It has the same processor, so I thought it would be easy to change some GPIO pins, and GO. 

But that was not so easy. Even a blinky LED is not possible. The LED goes on, but never goes OFF. I have used the GPIO_HIGH, GPIO_LOW or GPIO_TOGGLE, but the LED never goes off. I've tried the Pull up/down/nopull options.....

I have removed the Solder bridges: SB16, SB50, SB55.
The Model of the Nucleo is MB1136 C-03

Below my RCC config. Maybe somebody see why it is not working. Many thanks in advance.
void RCC_Configuration(void){ 
  /* Enable HSI Clock */
  RCC_HSICmd(ENABLE);
 
  /*!< Wait till HSI is ready */
  while (RCC_GetFlagStatus(RCC_FLAG_HSIRDY) == RESET);
 
  /* Set HSI as sys clock*/
  RCC_SYSCLKConfig(RCC_SYSCLKSource_HSI);
   
  /* Enable the GPIOs clocks */
  RCC_AHBPeriphClockCmd(RCC_AHBPeriph_GPIOA | RCC_AHBPeriph_GPIOB | RCC_AHBPeriph_GPIOC| RCC_AHBPeriph_GPIOD| RCC_AHBPeriph_GPIOE| RCC_AHBPeriph_GPIOH, ENABLE);    
 
  /* Enable SYSCFG clock */
  RCC_APB2PeriphClockCmd(RCC_APB2Periph_SYSCFG, ENABLE);
   
  /* Allow access to the RTC */
  PWR_RTCAccessCmd(ENABLE);
 
  /* Reset RTC Backup Domain */
  RCC_RTCResetCmd(ENABLE);
  RCC_RTCResetCmd(DISABLE);
 
  /* LSE Enable, 32.786 kHz rtc*/
  RCC_LSEConfig(RCC_LSE_ON);
 
  /* Wait until LSE is ready */
  while (RCC_GetFlagStatus(RCC_FLAG_LSERDY) == RESET);
   
   /* RTC Clock Source Selection */
  RCC_RTCCLKConfig(RCC_RTCCLKSource_LSE);
   
  /* Enable the RTC */
  RCC_RTCCLKCmd(ENABLE);  
   
  /*Disable HSE*/
  RCC_HSEConfig(RCC_HSE_OFF);
  if(RCC_GetFlagStatus(RCC_FLAG_HSERDY) != RESET ){
    /* Stay in infinite loop if HSE is not disabled*/
    while(1);
  }
}

Outcomes