Closed aleuarore closed 2 years ago
STM32H743 has GPIO port mode register set to Analog mode = 11. To set the mode register to 01 we have to clean the first bit.
...
int main(void)
{
ENABLE_GPIO_CLOCK; // enable the clock to GPIO
LEDPORT->_MODER &= ~GPIO_MODER_MODE0; // Add this line!!!!!!!
LEDPORT->_MODER |= GPIOMODER; // set pins to be general purpose output
for (;;) {
ms_delay(500);
LEDPORT->ODR ^= (1<<LED1); // toggle diodes
}
return 0;
}
I'm trying to set up the example cmsis-blink on NUCLEO-H743ZI2 but I don't get success. When I debug, the loop runs well but the LED doesn't blink. Any idea?