Table 25. Immediate, Pre-Indexed And Post-Indexed Offset Ranges - ST STM32F4 Series Programming Manual

Cortex-m4
Hide thumbs Also See for STM32F4 Series:
Table of Contents

Advertisement

PM0214
The value to load or store can be a byte, halfword, word, or two words. Bytes and halfwords
can either be signed or unsigned (see
Table 25
Instruction type
Word, halfword, signed
halfword, byte, or signed byte
Two words
Restrictions
For load instructions:
When Rt is PC in a word load instruction.
For store instructions:
Condition flags
These instructions do not change the flags.
Examples
LDR R8, [R10]
LDRNE R2, [R5, #960]!; loads (conditionally) R2 from a word
STR R2, [R9,#const-struc]; const-struc is an expression evaluating
STRH R3, [R4], #4; Store R3 as halfword data into address in
LDRD R8, R9, [R3, #0x20]; Load R8 from a word 32 bytes above the
STRD R0, R1, [R8], #-16; Store R0 to address in R8, and store R1 to
shows the range of offsets for immediate, pre-indexed and post-indexed forms.

Table 25. Immediate, pre-indexed and post-indexed offset ranges

-255 to 4095
Multiple of 4 in the
range -1020 to 1020
Rt can be SP or PC for word loads only.
Rt must be different from Rt2 for two-word loads.
Rn must be different from Rt and Rt2 in the pre-indexed or post-indexed forms.
bit[0] of the loaded value must be 1 for correct execution.
A branch occurs to the address created by changing bit[0] of the loaded value to 0.
If the instruction is conditional, it must be the last instruction in the IT block.
Rt can be SP for word stores only.
Rt must not be PC.
Rn must not be PC.
Rn must be different from Rt and Rt2 in the pre-indexed or post-indexed forms
; loads R8 from the address in R10.
; 960 bytes above the address in R5, and
; increments R5 by 960.
; to a constant in the range 0-4095.
; R4, then increment R4 by 4
; address in R3, and load R9 from a word 36
; bytes above the address in R3
; a word 4 bytes above the address in R8,
; and then decrement R8 by 16.
DocID022708 Rev 6
The STM32 Cortex-M4 instruction set
Address alignment on page
Immediate offset
-255 to 255
Multiple of 4 in the
range -1020 to 1020
64).
Pre-indexed
Post-indexed
-255 to 255
Multiple of 4 in the
range -1020 to 1020
71/260
259

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the STM32F4 Series and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Stm32l4+ seriesStm32f3 series

Table of Contents

Save PDF