Tuesday, May 5, 2020

STM32F407VET6 bare metel led blink code

#include "stm32f4xx.h"
#include "stm32f4xx_gpio.h"

void Delay()
{
  
for(int i=0;i<500000;i++);
}
int main()
{
RCC->AHB1ENR |= RCC_AHB1ENR_GPIOAEN;
GPIOA -> MODER |= GPIO_MODER_MODER6_0;
// GPIOA -> MODER |= GPIO_MODER_MODER8_0;
while(1)
{
GPIOA -> ODR |= 0x00000040 ;//GPIO_ODR_6;
Delay();
GPIOA -> ODR &= ~0x00000040;
Delay();
}

}

python class topic video