Application Information - NXP Semiconductors MKL27Z128VFM4 Reference Manual

Table of Contents

Advertisement

Application information

As a result, undecorated GPIO references and decorated AND, OR, XOR, LAC1 and
LAS1 operations can use the standard 0x400F_F000 base address, while decorated BFI
and UBFX operations must use the alternate 0x4000_F000 base address. Another
implementation can simply use 0x400F_F000 as the base address for all undecorated
GPIO accesses and 0x4000_F000 as the base address for all decorated accesses. Both
implementations are supported by the hardware.
Table 42-8. Decorated peripheral and GPIO address details
Peripheral address space
0x4000_0000–0x4007_FFFF
0x4008_0000–0x400F_EFFF
0x400F_F000–0x400F_FFFF
0x4010_0000–0x43FF_FFFF
0x4400_0000–0x4FFF_FFFF
0x5000_0000–0x5FFF_FFFF
42.4 Application information
In this section, GNU assembler macros with C expression operands are presented as
examples of the required instructions to perform decorated operations.
This section specifically presents a partial bme.h file defining the assembly language
expressions for decorated logical stores: AND, OR, and XOR. Comparable functions for
BFI and the decorated loads are more complex and available in the complete BME header
file.
These macros use the same function names presented in
#define IOANDW(ADDR,WDATA)
__asm("ldr
r3, =(1<<26);"
"orr
r3, %[addr];"
"mov
r2, %[wdata];"
"str
r2, [r3];"
:: [addr] "r" (ADDR), [wdata] "r" (WDATA) : "r2", "r3");
#define IOANDH(ADDR,WDATA)
__asm("ldr
r3, =(1<<26);"
"orr
r3, %[addr];"
"mov
r2, %[wdata];"
"strh
r2, [r3];"
:: [addr] "r" (ADDR), [wdata] "r" (WDATA) : "r2", "r3");
#define IOANDB(ADDR,WDATA)
__asm("ldr
r3, =(1<<26);"
"orr
r3, %[addr];"
"mov
r2, %[wdata];"
"strb
r2, [r3];"
:: [addr] "r" (ADDR), [wdata] "r" (WDATA) : "r2", "r3");
848
Undecorated (normal) peripheral accesses
Illegal addresses; attempted references are aborted and error terminated
Undecorated (normal) GPIO accesses using standard address
Illegal addresses; attempted references are aborted and error terminated
Decorated AND, OR, XOR, LAC1, LAS1 references to peripherals and GPIO based at
either 0x4000_F000 or 0x400F_F000
Decorated BFI, UBFX references to peripherals and GPIO only based at 0x4000_F000
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
KL27 Sub-Family Reference Manual , Rev. 5, 01/2016
Description
Functional
description.
Freescale Semiconductor, Inc.

Advertisement

Table of Contents
loading

Table of Contents