AnsweredAssumed Answered

STM32F411RE NUCLEO board doesn't work

Question asked by Ugniues on Jul 17, 2015
Latest reply on Jul 17, 2015 by Ugniues
Good day,
I'm pretty new with stm32 microcontrollers and I have some trouble, so I would like to ask you for help.

Yesterday I downloaded Visual Studio and VisualGDB for programming. Everything worked fine, I uploaded few times test application with blinking LED. After that I tried to test button. I didn't find any tutorials so I tried to write something by myself (Now, I think that was a stupid idea). I wrote something like this:
#include <stm32f4xx_hal.h>
 
#ifdef __cplusplus
extern "C"
#endif
void SysTick_Handler(void)
{
    HAL_IncTick();
    HAL_SYSTICK_IRQHandler();
}
 
int main(void)
{
    HAL_Init();
 
    __GPIOA_CLK_ENABLE();//Clock for LED
    __GPIOC_CLK_ENABLE();//Clock for Button
 
    GPIO_InitTypeDef GPIO_InitStructure;
 
    GPIO_InitStructure.Pin = GPIO_PIN_5;//LED pin
    GPIO_InitStructure.Pin = GPIO_PIN_13;//Button pin
 
    //Led
    GPIO_InitStructure.Mode = GPIO_MODE_OUTPUT_PP;
    GPIO_InitStructure.Speed = GPIO_SPEED_HIGH;
    GPIO_InitStructure.Pull = GPIO_NOPULL;
    HAL_GPIO_Init(GPIOA, &GPIO_InitStructure);
 
    //Button
    GPIO_InitStructure.Mode = GPIO_MODE_INPUT;
    GPIO_InitStructure.Speed = GPIO_SPEED_HIGH;
    GPIO_InitStructure.Pull = GPIO_NOPULL;
    HAL_GPIO_Init(GPIOC, &GPIO_InitStructure);
 
    for (;;)
    {
        if (HAL_GPIO_ReadPin(GPIOC, GPIO_PIN_13)){
            HAL_GPIO_WritePin(GPIOA, GPIO_PIN_5, GPIO_PIN_SET);
        }
        else{
            HAL_GPIO_WritePin(GPIOA, GPIO_PIN_5, GPIO_PIN_RESET);
        }
 
    }
}
 Microcontroller successfully uploaded program, but it didn't work like I expected.
After this I tried to get back to LED blinking but I got this error:

[img]http://i.imgur.com/RGTJPrk.png[/img]

Did I killed STM32F411 or this is something fixable?

Thank you.

Outcomes