#include #include "stm32h747xx.h" #define LED1_PIN 12 #define LED2_PIN 13 void main() { RCC->AHB4ENR |= (1 << RCC_AHB4ENR_GPIOIEN_Pos); // do two dummy reads after enabling the peripheral clock volatile uint32_t dummy; dummy = RCC->AHB4ENR; dummy = RCC->AHB4ENR; GPIOI->MODER = (1 << GPIO_MODER_MODE12_Pos) | (1 << GPIO_MODER_MODE13_Pos); GPIOI->ODR ^= (1 << LED2_PIN); while(1) { GPIOI->ODR ^= (1 << LED1_PIN); GPIOI->ODR ^= (1 << LED2_PIN); for (uint32_t i = 0; i < 2000000; i++); } }