diff --git a/Makefile b/Makefile index 100ef65..52765a4 100644 --- a/Makefile +++ b/Makefile @@ -47,3 +47,5 @@ dump: open DUMP.s tty: flash screen /dev/tty.SLAB_USBtoUART 115200 +dfu: + dfu-util -d 0483:df11 -c 1 -a 0 -s 0x08000000:leave -D main.bin diff --git a/linker.ld b/linker.ld index 79b7bcf..b678b36 100644 --- a/linker.ld +++ b/linker.ld @@ -10,7 +10,7 @@ MEMORY { EXTSRAM (RWX) : ORIGIN = 0x68000000 , LENGTH = 0 /*Adust LENGTH to (FLASHsize - FeePROMsize) of target MCU:*/ /*STM32F103RBT --> 126K*/ - FLASH (RX) : ORIGIN = 0x08000000 , LENGTH = 508K + FLASH (RX) : ORIGIN = 0x08000000 , LENGTH = 256K /*STM32F103RET --> 508K*/ /*FLASH (RX) : ORIGIN = 0x08000000 , LENGTH = 508K*/ /*STM32F103ZET --> 508K*/ diff --git a/src/main.c b/src/main.c index 1af9d8b..b7847f6 100644 --- a/src/main.c +++ b/src/main.c @@ -191,6 +191,15 @@ void drawille_task() { } int main() { + RCC->APB2ENR |= RCC_APB2ENR_IOPBEN; + GPIOB->CRH &= 0xFFFFF0FF; + GPIOB->CRH |= 0x00000300; + while(1) { + GPIOB->ODR &= 0b11111111111111111111101111111111; + delay(1000); + GPIOB->ODR |= 0b00000000000000000000010000000000; + delay(1000); + } #ifdef DEBUG_BLDC //Brushless motor auto init