AnsweredAssumed Answered

STM32 gpio help

Question asked by zoep.zack on Jul 28, 2016
Latest reply on Jul 28, 2016 by dembek.radoslaw.001

I'm new to arm programming, I'm teaching myself with the STM32 specifically the STM32F030x6.

To start myself off with any new mcu arch, I write a simple as ever code that would make one of the gpio pins go high to confirm it's working.

Though trying the following code doesn't seem to work, any ideas?

     ldr     r1, RCC
     ldr     r2, AHB
     str     r2, [r1,#0x14]

     ldr     r1, GPIOA
     ldr     r2, MODER
     ldr     r3, ODR
     str     r2, [r1,#0x0]
     str     r3, [r1,#0x14]
stop:     b     stop

RCC: .word 0x40021000
AHB: .word 0x00020000

GPIOA:     .word 0x48000000
MODER:     .word 0x00000005
ODR:     .word 0x00000003

I'm using the stlinkV2 if that helps.
Edit: forgot mention I'm using the gnu assembler