#include <stdint.h>
int main(){
// Enable Clock For GPIO C
RCC_APB2ENR |= (1<< 4); // IPOC EN - Enable the clock of PORTC peripheral in APB2 bus
// Clear the MODER
GPIOC_MODER &= ~(15<<20);
// SET the MODER
GPIOC_MODER |= (2<<20);
while(1){
GPIOC_ODR ^= (1<<13);
for(uint8_t i=0;i<10000;i++);
}
}
Loading
stm32-bluepill
stm32-bluepill