cancel
Showing results for 
Search instead for 
Did you mean: 

How do I turn on or put a logic 1 to GPIOC_ODR PC0 or pin 0 on the STEM32 microprocessor using Assembly language? To elaborate my question, what is the constant in decimal or hex to put logic 1 into the memory address of GPIOC_ODR on Pin 0

TKaew.1
Associate
 
3 REPLIES 3
MM..1
Chief II

Primary need config port pin to output mode ... no one asm

Secondary for bit manipulation is reg BRR (BSRR). ODR need read ... xor ... write

AScha.3
Chief II

0693W00000Uo8WKQAZ.png

If you feel a post has answered your question, please click "Accept as Solution".

What STM32? There's a thousand of them.

GPIOC   EQU 0x40020800 ; STM32F7
 
  ldr r0, =GPIOC
  ldr r1, [r0, #20] ; +0x14 ODR
  orr.w  r1, r1, #1 ; Bit 0
  str  r1, [r0, #20]

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..