LPC55: I/Os usage with TrustZone

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPC55: I/Os usage with TrustZone

678 Views
najoua_hamdi
Contributor I

Hello,

Looking at the LPC556x user manual, I have difficulties to find/undertand the I/Os & peripherals connections access rules in TrustZone i.e

- when an I/O is non-secure, could it be connected to a secure peripheral?

- when an I/O is secure, could it be connected to a non-secure peripheral?

Are there hardware protections preventing for example a non-secure peripheral to be connected to a secure I/O?  or

it is up to the user to decide? Are there some usage recommendations?

I had a look at the AN12326 Secure GPIO and Usage; but it doesn't fully answer my questions.

Thanks & regards,

Labels (1)
0 Kudos
4 Replies

662 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Najoua,

I think the secure GPIO is the GPIO pin, which is multiplexed with serial communication port generally for example UART or SPI, and in general, the secure GPIO is allocated to be used by non-secure world. The secure world can control if the non-secure world is allowed to read the GPIO logic lest the serial data is read by the non-secure world, because the GPIO pin logic can be read even if the GPIO pin is assigned as serial port.

For the secure GPIO, if it's corresponding bit in AHB_SECURE_CTRL->SEC_GPIO_MASK0 register is cleared, in non-secure world, the GPIO pin logic is NOT allowed to be read.  If the secure GPIO corresponding bit in AHB_SECURE_CTRL->SEC_GPIO_MASK0 is set, in non-secure world, the GPIO pin is allowed to read. BTW, the AHB_SECURE_CTRL->SEC_GPIO_MASK0 must be written in secure world.

Hope it can help you

BR

XiangJun Rong

 

0 Kudos

649 Views
najoua_hamdi
Contributor I

Hello XiangJun,

in this sentence:

....and in general, the secure GPIO is allocated to be used by non-secure world....

---> I think you mean  " the secure GPIO is allocated to be used by secure world." Correct?

If I understood well,  it is the responsiblity of the secure firmware to allow non-secure digital/analog peripherals to use secure GPIOs. Correct?

What about non-secure I/Os? Could they be connected to secure digital/analog peripherals?  

Thanks in advance,

 

 

 

 

0 Kudos

641 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

in general, the secure GPIO is allocated to be used by non-secure world....

---> I think you mean " the secure GPIO is allocated to be used by secure world." Correct?

>>>>>Rong write:Yes, you are right, when the secure world communicates via secure GPIO through serial protocol, the secure world can mask the GPIO pin so that the non-secure world is NOT allowed to read the secure GPIO pin logic.

If I understood well, it is the responsiblity of the secure firmware to allow non-secure digital/analog peripherals to use secure GPIOs. Correct?

>>>>Rong write:Yes, it is the responsibility of the secure firmware to allow non-secure digital/analog peripherals to use secure GPIOs.

What about non-secure I/Os? Could they be connected to secure digital/analog peripherals?

>>>>Rong:There is not way that the secure firmware can disable the non-secure world to read the GPIO logic.

This a secure GPIO example in SDK package for LPC55S69, you can check the code:

Hope it can help you

BR

XiangJun Rong

 
 

 

 

0 Kudos

640 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

this is the secure GPIO example code:

Regard

XiangJun Rong

xiangjun_rong_0-1599204077588.png

 

0 Kudos