PM0215 The STM32 Cortex-M0 instruction set
Doc ID 022979 Rev 1 45/91
3.4.4 LDR, PC-relative
Load register (literal) from memory.
Syntax
LDR Rt, label
where:
● ‘Rt’ is the register to load or store
● ‘label’ is a PC-relative expression (see PC-relative expressions on page 39)
Operation
Loads the register specified by Rt from the word in memory specified by label.
Restrictions
In these instructions:In these instructions, label must be within 1020 bytes of the current PC
and word aligned.
Condition flags
These instructions do not change the flags.
Examples
LDR R0, LookUpTable ; Load R0 with a word of data from an address
; labelled as LookUpTable.
LDR R3, [PC, #100] ; Load R3 with memory word at (PC + 100).