AM263Px MCU+ SDK: HSM Services Example

| AM263Px MCU+ SDK 26.00.00 |

HSM Services Example

# Introduction

This example demonstrates the use of HSM services.

Three services are available.

1. UID is a unique identifier for each device. It can be extracted using get uid service.
2. HSM get version service serves the client with TIFS-MCU version information.
3. HSM set firewall service is used to configure MPU firewall regions.

# Supported Combinations

Parameter | Value
--- | ---
CPU + OS | r5fss0_0 nortos
Toolchain | ti-arm-clang
Boards | am263px-cc
Example folder | /examples/hsm_client/hsm_services/

# Steps to Run the Example

- When using CCS projects to build, import the CCS project for the required combination and build it using the CCS project menu (see Using SDK with CCS Projects).
- When using makefiles to build, note the required combination and build using make command (see Using SDK with Makefiles)
- Launch a CCS debug session and run the executable, see CCS Launch, Load and Run

### Sample output

On successful boot, following message will be seen on terminal.

[HSM_CLIENT] New Client Registered with Client Id = 0
Starting OSPI Bootloader ...
[BOOTLOADER_PROFILE] Boot Media : NOR SPI FLASH
[BOOTLOADER_PROFILE] Boot Media Clock : 133.333 MHz
[BOOTLOADER_PROFILE] Boot Image Size : 0 KB
[BOOTLOADER_PROFILE] Cores present :
r5f0-0
[BOOTLOADER PROFILE] System_init : 259us
[BOOTLOADER PROFILE] Drivers_open : 91us
[BOOTLOADER PROFILE] LoadHsmRtFw : 13409us
[BOOTLOADER PROFILE] Board_driversOpen : 62004us
[BOOTLOADER PROFILE] CPU load : 79us
[BOOTLOADER_PROFILE] SBL Total Time Taken : 75848us
Image loading done, switching to application ...
[HSM_CLIENT] New Client Registered with Client Id = 2
[HSM CLIENT] Sending UID Request to HSM Server..
[HSM CLIENT] Device UID Successfully retrived from the HSM Server.
[HSM CLIENT_PROFILE] Time taken by GetUID Request : 81us
[HSM CLIENT] Device UID is : B045B77BCB5C45087FCF982AD2A67D926775E4FDB2C585CD4307C9F9CEE8C4EFB9EE9949520CD947883A12F28AB8FD8929CC0C5CA66B37A452C6D9BB20E1F9F5[HSM CLIENT] TIFS-MCU 64bit version string = 0x001550200090100
[HSM CLIENT] TIFS-MCU Information
[Soc Type] = AM263p
[Device Type] = HS-FS
[HSM Type] = HSM_V1
[Bin Type] = STANDARD
[TIFS-MCU Version] = 9.1.0
RNG output word -- 0xA647974C
RNG output word -- 0xC36E64BF
RNG output word -- 0x84836E95
RNG output word -- 0x640F84EA
[HSM CLIENT_PROFILE] Time taken by get RNG request : 473us
Firewall request #1 status = 11111111 11111111
Firewall Id = 12
Firewall region number = 3
Start Address = 0x502f0000
End Address = 0x502f0fff
Aid Config = 0x10
Supervisor Read = 1
Supervisor Write = 1
Supervisor Execute = 1
User Read = 1
User Write = 1
User Execute = 1
Non Secure Access = 1
Emulation = 1
Firewall Id = 14
Firewall region number = 3
Start Address = 0x502f0000
End Address = 0x502f0fff
Aid Config = 0x10
Supervisor Read = 1
Supervisor Write = 1
Supervisor Execute = 1
User Read = 1
User Write = 1
User Execute = 1
Non Secure Access = 1
Emulation = 1
Firewall request #2 status = 11111111 11111111
Firewall Id = 8
Firewall region number = 0
Start Address = 0x72000400
End Address = 0x720007ff
Aid Config = 0xe0
Supervisor Read = 0
Supervisor Write = 0
Supervisor Execute = 0
User Read = 0
User Write = 0
User Execute = 0
Non Secure Access = 1
Emulation = 1
HSM_V1
#define HSM_V1
HSM Version flag.
Definition: hsmclient_utils.h:81