Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Aaron Erhardt
Cheatsheets
Commits
beeb5abe
Commit
beeb5abe
authored
May 11, 2021
by
Aaron Erhardt
Browse files
Fix large code comments
Signed-off-by:
Aaron Erhardt
<
aaron.erhardt@t-online.de
>
parent
d2524393
Pipeline
#546
passed with stage
in 1 minute and 42 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Mikrocomputertechnik/asm.md
View file @
beeb5abe
...
...
@@ -278,17 +278,18 @@ InitOutputPortB
; Enable I/O block for PortB
ldr r3, = RCC ; Load start address of RCC registers into r3
ldr r0, [r3, #AHB1ENR] ; Load current register values
orr r0, r0, #IO
P
BEN
;
Use logical OR to e
nable
the
bit for GPIOB
EN and
leave the rest unchanged
str r0, [r3, #AHB1ENR] ; Store value
into the register to
enable I/O on PortB
orr r0, r0, #
GP
IOBEN ;
E
nable bit for GPIOB
,
leave the rest unchanged
str r0, [r3, #AHB1ENR] ; Store value
and
enable I/O on PortB
; Configure PortB
ldr r3, = GPIOB ; Load start address of GPIOB registers into r3
ldr r0, = 0x00005555 ; Load values for configuring the MODER register, using 0x5 = 01_01 to set all pins as output
str r0, [r3, #MODER] ; Store value into the register to enable configuration
ldr r3, = GPIOB ; Load start address of GPIOB registers
ldr r0, = 0x00005555 ; Load values for configuring the MODER register
; using 0x5 = 01_01 to set all pins as output
str r0, [r3, #MODER] ; Store value to enable configuration
; Turn on LEDs
ldr r0, #3 ; Set first to bits
str r0, [r3, #ODR] ;
Load
value
into ODR register
to enable the first to outputs
(LEDs)
str r0, [r3, #ODR] ;
Store
value to enable the first t
w
o outputs
pop {r0, r3, r4, lr}
```
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment