mirror of
https://github.com/eddyem/stm32samples.git
synced 2026-08-13 19:49:24 +03:00
fixed some bugs
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
BINARY := blink
|
||||
PREFIX := /usr/bin/arm-none-eabi
|
||||
# MCU code
|
||||
MCU := G431xx
|
||||
# change this linking script depending on particular MCU model,
|
||||
|
||||
Binary file not shown.
@@ -38,6 +38,7 @@ void sys_tick_handler(void){
|
||||
|
||||
static void gpio_setup(void){
|
||||
RCC->AHB2ENR = RCC_AHB2ENR_GPIOCEN; // enable PC
|
||||
__DSB();
|
||||
// set PC6 as push-pull output, PC13 is pulldown input, other as default (AIN)
|
||||
GPIOC->MODER = (0xffffffff & ~(GPIO_MODER_MODE6 | GPIO_MODER_MODE13)) | MODER_O(6) | MODER_I(13);
|
||||
GPIOC->PUPDR = PUPD_PD(13); // pulldown
|
||||
|
||||
Reference in New Issue
Block a user