background image

1 Background

LPC55S6x has Secure GPIO module whose usage is closely related to normal
GPIO, TrustZone, and Secure AHB Controller. This section briefly introduces
these functions. For more information, refer to LPC55S6x User Manual.

1.1 TrustZone and Secure AHB Controller

1.1.1 TrustZone

TrustZone for Armv8-M are available on all LPC55S6x devices to protect
secure resources from malicious code. Such secure resources may include
secure memory blocks (code/data), and secure peripherals. It is achieved by
segmentation of address space into either Secure (S) or Non-secure (NS).
TrustZone can filter address access from CPU0 based on specific security
attribute (S, NS) assigned to that address space.

As shown in 

Fig 1

, CM33 CPU in Secure state (CPU-S) can execute

instructions from Secure memory (S-memory), but not allowed to execute
instructions directly from Non-secure memory (NS-memory). However, CPU-
S can access data in both S-memory and NS-memory. CPU-NS can execute
instructions only from NS-memory, and not allowed to execute instructions from
S-memory. CPU-NS can access data only in NS-memory, but not allowed to access data from S-memory.

Contents

1 Background..........................................1

1.1 TrustZone and Secure

AHB Controller........................ 1

1.2 Normal GPIO...........................3

2 Secure GPIO, Secure GPIO Mask

and Secure PINT................................4

2.1 Secure GPIO Mask................. 6
2.2 Secure GPIO...........................6
2.3 Secure PINT........................... 6

3 Usage.................................................... 6

3.1 Use Secure GPIO Mask to

protect Secure digital
peripherals which need IO...... 6

3.2 Set one IO to Secure GPIO.... 7
3.3 Usage of Secure PINT............ 8

4 Example................................................ 9

4.1 Environment............................9
4.2 Steps and result...................... 9

5 Conclusion..........................................11

6 Revision history................................. 11

AN12326

LPC55S6x Secure GPIO and Usage

Rev. 0 — 15 January 2019

Application Note

Summary of Contents for LPC55S6 Series

Page 1: ...ecure state CPU S can execute instructions from Secure memory S memory but not allowed to execute instructions directly from Non secure memory NS memory However CPU S can access data in both S memory...

Page 2: ...roller The LPC55S6x implements second layer of protection with Secure AHB Controller to provide secure trusted execution at system level With Secure AHB Controller you can configure security access ru...

Page 3: ...powerful Like SPI UART and so on a normal GPIO is also a digital peripheral in the MCU Following is a simple block diagram of the normal GPIO The normal GPIO can read a pin state regardless of pin fun...

Page 4: ...a Secure peripheral which means that this UART is only allowed to be accessed by the Secure world i e code not by the Non secure world However in this case the UART pin states can still be monitored...

Page 5: ...to generate certain input pattern from external device for secure signaling For the same reason Secure world needs Secure Pin Interrupt Pattern Match Engine PINT so another module named Secure PINT is...

Page 6: ...separate interrupt in the NVIC Edge sensitive interrupt pins can interrupt on rising or falling edges or both Level sensitive interrupt pins can be HIGH active or LOW active 2 3 2 Secure Pattern Matc...

Page 7: ...events Non secure world from accessing the Secure GPIO Configure the IOCON block to Secure through Secure AHB Controller It prevents Non secure world from accessing the IOCON Configure the correspondi...

Page 8: ...T From application perspective the method of using Secure PINT is same as of normal PINT There is one thing that needs extra attention To disable the Non secure world from accessing the Secure PINT re...

Page 9: ...cable between PC and P6 link on the board for loading and running a demo 4 1 2 Software environment Tool chain IAR embedded workbench 8 30 1 Software package AN_SecureGPIO_Demo zip 4 2 Steps and resu...

Page 10: ...Configure secure_gpio_s and secure_gpio_ns projects as shown below Figure 15 Configuration of the projects 2 Compile Download Compile secure_gpio_s project first then compile secure_gpio_ns project N...

Page 11: ...IO and Secure GPIO read all 0 from this pin Press USER button S3 it jumps to Secure world toggle Secure GPIO Mask and then jump back to Non Secure world Press WAKEUP button S2 it will jump to Secure w...

Page 12: ...lement appropriate design and operating safeguards to minimize the risks associated with their applications and products NXP the NXP logo NXP SECURE CONNECTIONS FOR A SMARTER WORLD COOLFLUX EMBRACE GR...

Reviews: