Question
STM32F411 - common short questions ...
Good Evening Ladies and Gentlemen,
A short introducing purpose of mine:
int main(void)
{
RCC->AHB1ENR |= 0xFC; // ---> Here I would like to open the Port clock
RCC->APB1ENR |= 0xFC; // ---> Here I would like to open the USART2 clock - in this context not relevant
GPIOA->MODER |= 0x55555555; // ---> Here I define Port A as output
GPIOC->MODER |= 0x55555555; // ---> Here I define Port C as output
GPIOA->ODR |= (1<<2); // ---> Here I would like to set PA2 "high"
GPIOC->ODR |= (1<<13); // ---> Here I would like to set the onboard LED (PC13) "high"
while(1) {
GPIOA->ODR |= (1<<0); // Here I would like to "toggle" PA0 and PA6
GPIOA->ODR |= (1<<6);
delayMs(50); // It only is a not relevant "delay" for this purpose
GPIOA->ODR &= ~(1<<0);
GPIOA->ODR &= ~(1<<6);
delayMs(50);
}
}
But something went wrong - it does not work - Do you have any suggestions especially regarding a simple "toggling"?
It should be a pre work for a stepper motor controlling.
Best regards
~TIMBO~
