Skip to content

Instantly share code, notes, and snippets.

@g7uvw
Created December 20, 2015 13:19
Show Gist options
  • Save g7uvw/8c8627f5ab7b7a367289 to your computer and use it in GitHub Desktop.
Save g7uvw/8c8627f5ab7b7a367289 to your computer and use it in GitHub Desktop.
STMF401RE Nucleo issue
#include "stm32f4xx.h"
int main (void)
{
RCC->AHB1RSTR |= RCC_AHB1RSTR_GPIODRST; // Reset GPIOD
RCC->AHB1RSTR = 0; // Exit reset state
RCC->AHB1ENR |= RCC_AHB1ENR_GPIODEN; // Enable GPIOD clock
GPIOD->MODER |= GPIO_MODER_MODER13_0; // Enable Output on D13
GPIOD->BSRR = GPIO_BSRR_BS_13; // Set D13 High
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment