EasyManuals Logo

NXP Semiconductors LPC1768 User Manual

NXP Semiconductors LPC1768
841 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #672 background imageLoading...
Page #672 background image
UM10360 All information provided in this document is subject to legal disclaimers. © NXP B.V. 2013. All rights reserved.
User manual Rev. 3 — 20 December 2013 672 of 841
NXP Semiconductors
UM10360
Chapter 34: Appendix: Cortex-M3 user guide
34.2.4.6 LDM and STM
Load and Store Multiple registers.
34.2.4.6.1 Syntax
op{addr_mode}{cond} Rn{!}, reglist
where:
op is one of:
LDM
: Load Multiple registers.
STM
: Store Multiple registers.
addr_mode is any one of the following:
IA
: Increment address After each access. This is the default.
DB
: Decrement address Before each access.
cond is an optional condition code, see Section 34.2.3.7 “
Conditional execution.
Rn is the register on which the memory addresses are based.
! is an optional writeback suffix. If ! is present the final address, that is loaded from or
stored to, is written back into Rn.
reglist is a list of one or more registers to be loaded or stored, enclosed in braces. It can
contain register ranges. It must be comma separated if it contains more than one register
or register range, see Section 34.2.4.6.5
.
LDM
and
LDMFD
are synonyms for
LDMIA
.
LDMFD
refers to its use for popping data from Full
Descending stacks.
LDMEA
is a synonym for
LDMDB
, and refers to its use for popping data from Empty Ascending
stacks.
STM
and
STMEA
are synonyms for
STMIA
.
STMEA
refers to its use for pushing data onto Empty
Ascending stacks.
STMFD
is s synonym for
STMDB
, and refers to its use for pushing data onto Full Descending
stacks
34.2.4.6.2 Operation
LDM
instructions load the registers in reglist with word values from memory addresses
based on Rn.
STM
instructions store the word values in the registers in reglist to memory addresses
based on Rn.
For
LDM
,
LDMIA
,
LDMFD
,
STM
,
STMIA
, and
STMEA
the memory addresses used for the accesses
are at 4-byte intervals ranging from Rn to Rn + 4 * (n-1), where n is the number of
registers in reglist. The accesses happens in order of increasing register numbers, with
the lowest numbered register using the lowest memory address and the highest number
register using the highest memory address. If the writeback suffix is specified, the value of
Rn + 4 * (n-1) is written back to Rn.

Table of Contents

Other manuals for NXP Semiconductors LPC1768

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the NXP Semiconductors LPC1768 and is the answer not in the manual?

NXP Semiconductors LPC1768 Specifications

General IconGeneral
BrandNXP Semiconductors
ModelLPC1768
CategoryMicrocontrollers
LanguageEnglish

Related product manuals