Content originally posted in LPCWare by igorsk on Fri Jun 18 11:57:24 MST 2010
Quote: NXP_Europe
Hi Luis,
The GPIOs has a so called direct access mode, which allows you in a single write operation change GPIO bits without affecting other pins.
Masking registers are mapped on the lower addresses of the GPIO memory range (0x000 - 0x3FF8). See table 113 in chapter 8.4 of the user manual.
Chapter 8.5 explains how this works.
Because of the wide masking, more memory space is used then you'd expect.
The issue is that if you divide AHB space by 128, you get [B]0x4000[/B] (0x200000 / 128), while on the memory map diagram (in chapter 2) each GPIO port is shown to occupy a single peripheral "slot" of [B]0x10000[/B]. So you need to either fix the diagram to show each GPIO taking up 4 slots or divide the AHB space into 32 slots instead of 128.