#include "stm32l0xx.c"
#include <stdio.h>
// Where is the led is connected
// Port:A
// Pin:PA5
#define GPIOAEN (1U<<0)
#define PIN5 (1UL<<5)
#define LED_PIN PIN5
void setup()
{
RCC->IOPENR=GPIOAEN ;
GPIOA->MODER |=(1<<10);
GPIOA->MODER &=~(1<<11);
while(1)
{
GPIOA->ODR ^=LED_PIN;
for(long i=0;i<1000000;i++);
}
}
void loop()
{
}
Loading
st-nucleo-l031k6
st-nucleo-l031k6