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 */
  /*!< Wait till HSI is ready */
  while (RCC_GetFlagStatus(RCC_FLAG_HSIRDY) == RESET);
  /* Set HSI as sys clock*/
  /* Enable the GPIOs clocks */
  /* Enable SYSCFG clock */
  RCC_APB2PeriphClockCmd(RCC_APB2Periph_SYSCFG, ENABLE);
  /* Allow access to the RTC */
  /* Reset RTC Backup Domain */
  /* LSE Enable, 32.786 kHz rtc*/
  /* Wait until LSE is ready */
  while (RCC_GetFlagStatus(RCC_FLAG_LSERDY) == RESET);
   /* RTC Clock Source Selection */
  /* Enable the RTC */
  /*Disable HSE*/
  if(RCC_GetFlagStatus(RCC_FLAG_HSERDY) != RESET ){
    /* Stay in infinite loop if HSE is not disabled*/