Creating A System For A Secure IoT Device - 101892 - 0100 - 01 - en
Creating A System For A Secure IoT Device - 101892 - 0100 - 01 - en
Issue 01
Copyright © 2020 Arm Limited (or its affiliates). All rights reserved.
Release information
Document history
This document is protected by copyright and other related rights and the practice or implementation
of the information contained in this document may be protected by one or more patents or pending
patent applications. No part of this document may be reproduced in any form by any means without
the express prior written permission of Arm. No license, express or implied, by estoppel or otherwise
to any intellectual property rights is granted by this document unless specifically stated.
Your access to the information in this document is conditional upon your acceptance that you will not
use or permit others to use the information for the purposes of determining whether implementations
infringe any third party patents.
TO THE EXTENT NOT PROHIBITED BY LAW, IN NO EVENT WILL ARM BE LIABLE FOR ANY
DAMAGES, INCLUDING WITHOUT LIMITATION ANY DIRECT, INDIRECT, SPECIAL,
INCIDENTAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES, HOWEVER CAUSED AND
REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF ANY USE OF THIS DOCUMENT,
EVEN IF ARM HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
This document consists solely of commercial items. You shall be responsible for ensuring that any use,
duplication or disclosure of this document complies fully with any relevant export laws and regulations
to assure that this document or any portion thereof is not exported, directly or indirectly, in violation
Copyright © 2020 Arm Limited (or its affiliates). All rights reserved.
Non-Confidential
Page 2 of 45
Arm Flexible Access program:
Creating a System for a Secure IoT Device 101892
Issue 01
of such export laws. Use of the word “partner” in reference to Arm's customers is not intended to
create or refer to any partnership relationship with any other company. Arm may make changes to this
document at any time and without notice.
If any of the provisions contained in these terms conflict with any of the provisions of any click through
or signed written agreement covering this document with Arm, then the click through or signed
written agreement prevails over and supersedes the conflicting provisions of these terms. This
document may be translated into other languages for convenience, and you agree that if there is any
conflict between the English version of this document and any translation, the terms of the English
version of the Agreement shall prevail.
The Arm corporate logo and words marked with ® or ™ are registered trademarks or trademarks of
Arm Limited (or its subsidiaries) in the US and/or elsewhere. All rights reserved. Other brands and
names mentioned in this document may be the trademarks of their respective owners. Please follow
Arm's trademark usage guidelines at http://www.arm.com/company/policies/trademarks.
Copyright © 2020 Arm Limited (or its affiliates). All rights reserved.
LES-PRE-20349
Confidentiality Status
This document is Non-Confidential. The right to use, copy and disclose this document may be subject
to license restrictions in accordance with the terms of the agreement entered into by Arm and the
party that Arm delivered this document to.
Product Status
The information in this document is Final, that is relating to developed pieces IP.
Web Address
http://www.arm.com
Copyright © 2020 Arm Limited (or its affiliates). All rights reserved.
Non-Confidential
Page 3 of 45
Arm Flexible Access program:
Creating a System for a Secure IoT Device 101892
Issue 01
Contents
1 Overview .................................................................................................................................................... 6
Issue 01
Copyright © 2020 Arm Limited (or its affiliates). All rights reserved.
Non-Confidential
Page 5 of 45
Arm Flexible Access program:
Creating a System for a Secure IoT Device 101892
Issue 01
1 Overview
This guide is for a system designer, possibly with access to Arm Flexible Access. We assume
that you want to develop a System on Chip (SoC) for a secure IoT device, and that you intend
the SoC to be used in a smart coffee maker. However, the guide could be relevant for any
connected IoT device that provides a basic user interface through a small display. For example,
a connected vending machine could present a touchscreen to the user. This type of vending
machine could also create and send its own stock orders through its online capabilities.
For purposes of this guide, we assume that you want to take practical steps towards building a
system. Taking the coffee machine as an example, the aim is to show you where you can find the
required IP, and its related documentation. The aim is not to repeat information but instead to
guide you to the correct place to find it and show you how to apply it.
This guide uses IP from Arm Flexible Access. The quickest way to create an SoC solution for a
secure IoT device is to use the Corstone-201 foundation IP. Therefore, this guide can also be
used if you are getting started with the Corstone-201.
Copyright © 2020 Arm Limited (or its affiliates). All rights reserved.
Non-Confidential
Page 6 of 45
Arm Flexible Access program:
Creating a System for a Secure IoT Device 101892
Issue 01
Imagine that you have the job of designing an SoC that powers a connected coffee machine. Let
us start with the functionality this coffee machine is expected to achieve. First, the device must
identify itself and communicate securely to both a cloud server and mobile devices.
Communication over the Internet requires the use of cryptography.
• Securely perform firmware updates that are downloaded from the cloud server. During
these updates, the coffee machine must decrypt and authenticate the firmware image.
• Monitor itself. The coffee machine must be able to report any service or refill requirements
to either the service company or the owner
• Send usage data, like coffee selection statistics, to the manufacturers for market research
• Display advertising for new coffee blends on the screen of the coffee machine
Although this guide uses a connected coffee machine as an example, the functionality that the
device requires could apply to many connected devices. For example, most connected devices
are expected to send and receive data over the Internet. They also allow a user to interact with
them through an app and can securely update their firmware. In this sense, there would be
many similarities in the SoC design journey for any secure IoT device.
The final consideration for any secure IoT device is cost. The secure solution that the end user
is going to enjoy must be cost effective for the manufacturer to produce.
Copyright © 2020 Arm Limited (or its affiliates). All rights reserved.
Non-Confidential
Page 7 of 45
Arm Flexible Access program:
Creating a System for a Secure IoT Device 101892
Issue 01
Whether you must consider the last two items in the list depends on the security level that you
require. In the following sections, we explore how each item affects your hardware and
software development.
• An analysis stage where device assets are analyzed and threats are assessed. This process
defines the security requirements.
• An architecture stage where the device is designed based on the security requirements that
are identified in the first stage. The design process includes the SoC, firmware, and
software. This guide helps you to complete this stage by concentrating on the IP that a
secure IoT device needs. This guide also explains how the selected IP are put together.
• An implementation stage that involves the implementation of software that meets the
security requirement. The software must also work with the hardware that is defined
during the architecture stage specifications.
Copyright © 2020 Arm Limited (or its affiliates). All rights reserved.
Non-Confidential
Page 8 of 45
Arm Flexible Access program:
Creating a System for a Secure IoT Device 101892
Issue 01
• A certification stage where checks are made, through a PSA Certified scheme, that the
product adheres to the security requirements.
We recommend learning more about the four stages in the Platform Security Architecture
Overview Whitepaper. The whitepaper describes the Trusted Base System Architecture
(TBSA), which is a set of SoC requirements for Armv6-M, Armv7-M, and Armv8-M processors.
The PSA Trusted Base System Architecture for M (TBSA-M) uses the Trusted Base System
Architecture as a theoretical foundation. Putting together a secure IoT system involves
selecting pieces of Arm IP based on this foundation.
The PSA Whitepaper provides example Threat Models and Security Analyses for three
common IoT use cases:
• Asset tracker
• Network camera
The examples provide some use cases that you can compare against the secure IoT coffee
maker use case. Each example contains a set of security objectives that mitigates one or more
of the identified threats. Security Model (PSA-SM) defines a security architecture that is
designed to address a generic set of threats.
To allow your firmware and software development to start before the hardware platform is
available, use the following specifications and guidelines:
• The requirements for a Trusted Boot and Firmware Update (PSA-TBFU). The Trusted Boot
requirements describe how to validate whether an image is authorized before booting it.
The firmware update requirements describe how to validate an update before storing it to
flash memory.
Copyright © 2020 Arm Limited (or its affiliates). All rights reserved.
Non-Confidential
Page 9 of 45
Arm Flexible Access program:
Creating a System for a Secure IoT Device 101892
Issue 01
On a processor that supports TrustZone, there are two separate processor states: Secure state
and Non-secure state. Code running in the Secure state can execute Secure instructions, and
can also access Secure and Non-secure data. When code is running in a Non-secure state, the
code can only execute Non-secure instructions and access Non-secure data. The processor can
transition from Secure state to Non-secure state and back again. Transitioning from Non-
secure code execution to Secure code execution is a controlled process. It is not possible to
branch from Non-secure code to code at a random Secure address.
Two types of unit are responsible for defining the memory regions:
• A Security Attribution Unit (SAU). Unlike an IDAU, you can define SAU regions at runtime
using registers. This enables a SAU to override IDAU default regions.
For TrustZone to function, either an IDAU, or an IDAU and a SAU, is required in the processor
implementation. Otherwise memory regions cannot be defined.
You can also partition each security world into further subregions using the Memory
Protection Units (MPUs) within each world. One set of MPUs defines the regions within Secure
memory, and the other MPU defines the regions within Non-secure memory. You can use the
Copyright © 2020 Arm Limited (or its affiliates). All rights reserved.
Non-Confidential
Page 10 of 45
Arm Flexible Access program:
Creating a System for a Secure IoT Device 101892
Issue 01
MPUs to create regions where the data is read-only, non-executable. An MPU also allows a
processor in privileged mode to define the memory accessibility when next running in non-
privileged, user application, mode. Effectively, the processor manages user applications by
ensuring that the memory region of each application is protected against access by another
application.
It is the responsibility of the software team to create secure firmware that carries out
initialization tasks. If either the SAU or the MPUs are available, one of these tasks is to partition
memory into suitable regions.
PSA Trusted Base System Architecture for M (TBSA-M) recommends that, where possible, the
system integrator implements a TrustZone-based system. To meet this recommendation, you
must, where applicable, make sure that the IP you choose can utilize TrustZone technology.
This topic is explored further in The processor and The Advanced Microcontroller Bus
Architecture components.
Bus components that are based on AMBA 5 can identify TrustZone transactions and
differentiate between Secure and Non-secure transactions. This feature allows the Security
state of each transaction to be propagated from the CPU to the interconnect. The transactions
then pass on, with their Security state, to other components in the system that require security
awareness. A security flag (NS) on the bus identifies Secure TrustZone transactions.
TrustZone is optional in some IPs. Remember to enable TrustZone when configuring a piece of
IP.
Issue 01
• Secure boot technology with software image validation and decryption available at boot
time
• Secure debugging
• Keys and assets provisioning, management, and isolation in persistent trusted storage
CryptoCell technologies are engines that require a CPU and, sometimes, infrastructure on the
SoC to perform the preceding functionality. CryptoIsland integrates a subsystem around a
CryptoCell-312 and includes its own processor. This design means that a CryptoIsland can
perform more of the preceding functionality on its own.
3.3.1 CryptoCell
There are two families of CryptoCell, the CryptoCell-300 family and the CryptoCell-700
family. The CryptoCell-700 family has a higher performance than the CryptoCell-300 family
and is intended for content intensive applications, for example higher-end smartphones and
set-top boxes.
The CryptoCell-312 is aimed at SoCs that are powered by either Cortex-M series or Cortex-R
series processors. The CryptoCell-312 fits well in a design that is optimized for low-power
usage and a low area.
3.3.2 CryptoIsland
CryptoIsland executes a full software stack inside itself, which allows you to isolate software
from the host system. For example, if a SIM is kept inside the CryptoIsland, the SIM has as much
protection as a detachable SIM card. In terms of functionality, the CryptoIsland includes a
CryptoCell-312. CryptoIsland is also able to mitigate against physical attacks, which is explored
further in Mitigating against physical attacks.
• Side-channel attack protection. These types of attacks include power and electromagnetic
emission analysis by the attacker.
Copyright © 2020 Arm Limited (or its affiliates). All rights reserved.
Non-Confidential
Page 12 of 45
Arm Flexible Access program:
Creating a System for a Secure IoT Device 101892
Issue 01
Whether you use a CryptoIsland to protect your system depends on how sensitive the data that
is held on the system is. You must be realistic about how damaging an attack can be. For an IoT
coffee maker, investing in the security that is provided by the CryptoIsland might be
unnecessary. Arm provides the CryptoIsland for:
Imagine a device that controls entry to a luxury apartment building, with apartments that are
rented out on Airbnb. The owner of the building does not live in the country and, as Airbnb
bookings come in, must remotely control entry to the apartments.
Access to the main door is possible through the mobile of a guest or manually, through a
temporary access code that is issued to a guest. The main door IoT device:
• Provides a touchscreen for user interaction. Guests can enter their access codes here.
• Tracks the check-in and the check-out of guests. If a guest does not show up or if a guest
checks out, the device can alert the user.
• Tracks any unauthorized access to the doors in the building. The device can alert the owner
immediately in response to this situation.
• Tracks any attempt to tamper with the SoC itself. Here, the threat could come from
someone who has legitimate access to the building. Specifically, the anti-tampering alarm
response of a CryptoIsland can mitigate against side-channel attacks on the SoC. These
attacks intend to gain key information or affect SoC operation.
Copyright © 2020 Arm Limited (or its affiliates). All rights reserved.
Non-Confidential
Page 13 of 45
Arm Flexible Access program:
Creating a System for a Secure IoT Device 101892
Issue 01
• Requires a security level to a standard that the CryptoIsland provides. If the main device is
compromised, the result of unauthorized access could be costly.
In cases where CryptoIsland does not cover a security functionality, Trusted Firmware-M
might provide the functionality. For example, CryptoIsland does not offer hardware support for
maintaining an audit trail of security events, but the Trusted Firmware-M (TF-M) provides this
feature.
Copyright © 2020 Arm Limited (or its affiliates). All rights reserved.
Non-Confidential
Page 14 of 45
Arm Flexible Access program:
Creating a System for a Secure IoT Device 101892
Issue 01
Copyright © 2020 Arm Limited (or its affiliates). All rights reserved.
Non-Confidential
Page 15 of 45
Arm Flexible Access program:
Creating a System for a Secure IoT Device 101892
Issue 01
Cortex-A series processors are typically used for high-end devices, for example sophisticated
smartphones. Cortex-A processors host rich Operating Systems and support multiple software
applications.
Cortex-R series processors provide high performance in safety-critical environments and can
meet real-time constraints. This feature means that these processors are typically used in the
automotive industry and in storage devices. In these scenarios, responses to events must be
guaranteed.
The Cortex-M series processors are the focus of the Trusted Base System Architecture.
Microcontrollers are one of the primary markets for Cortex-M series processors.
Microcontrollers are like SoCs but are less sophisticated. However, you can use the more
powerful Cortex-M series processors in more demanding situations. In addition, Cortex-M
series processors that implement the Armv8-M architecture include many features, for
example TrustZone. As mentioned previously, TrustZone is essential to ensuring the device is
secure. You can find a useful comparison of the Cortex-M series processors here.
The Cortex-M23 has enough features for a secure IoT coffee machine or similar device.
Importantly, the Cortex-M23 has a TrustZone option. Depending on the requirements of a
secure IoT device, you might need to use a newer, more expensive fab process to get extra
performance. Getting the extra performance from a Cortex-M23 increases the area and static
power usage of the SoC.
The Cortex-M33 is another candidate that you could consider if you need more compute
performance than the Cortex-M23 offers. The Cortex-M33 has a DMIPS benchmark value of
1.5 compared with a value of 0.98 for the Cortex-M23. In addition to the extra performance
that the Cortex-M33 offers, this processor also offers the following features:
• A coprocessor interface
If the software that is running on the device requires floating-point calculations, upgrading to
the Cortex-M33 is a logical choice.
Copyright © 2020 Arm Limited (or its affiliates). All rights reserved.
Non-Confidential
Page 16 of 45
Arm Flexible Access program:
Creating a System for a Secure IoT Device 101892
Issue 01
Because the Cortex-M23 and Cortex-M33 processors implement the Armv8-M architecture,
including the TrustZone extension, the Trusted Base System Architecture applies to SoC
designs that use either processor.
This guide assumes that you use a single Cortex-M23 processor for your SoC.
The Cortex-M23 processor and the Cortex-M33 processor are supplied with Arm Flexible
Access.
The Cortex-A5 processor offers a possible solution for a secure IoT SoC. For example, if you
need to run a version of the Linux operating system on your device, the Cortex-A5 is a good
choice. The Cortex-A5 processor supports virtual memory. Through use of its L1 and L2 caches,
a Cortex-A5 can achieve zero wait-state memory access for the most regularly used code and
data.
However, it is worth comparing the PPA data of Cortex-M series processors with Cortex-A5
data. When comparing, select PPA data where a similar performance was achieved for both
processors. A Cortex-A5 processor, when physically implemented, might have a higher static
and dynamic power requirement, and have a larger area. However, if you need Cortex-A series
capabilities and options, you might find that any increases in power usage and area are
acceptable. The PPA Analysis Overview provides further information on comparing PPA data.
AMBA bus protocols are used in bus interconnects in an SoC. These interconnects allow
different IP blocks to talk to each other. For example, interconnects with protocols that are
based on AMBA could enable a processor to communicate with a peripheral. Each version of
the AMBA defines new interface signals and protocols. Legacy protocol support is also
sometimes removed.
Copyright © 2020 Arm Limited (or its affiliates). All rights reserved.
Non-Confidential
Page 17 of 45
Arm Flexible Access program:
Creating a System for a Secure IoT Device 101892
Issue 01
The CoreLink SIE-200 contains IP blocks that are compliant with the AMBA 5 Advanced High-
performance Bus (AHB5) protocol. The focus of the SIE-200 is SoCs that are built around
Cortex-M23 and Cortex-M33 processors. Importantly, the SIE-200 provides many different,
highly configurable, AHB5-compliant IP blocks that allow you to build an interconnect that
supports TrustZone.
This guide assumes that you will use the CoreLink SIE-200 to connect and secure the
components in your SoC.
The CoreLink SIE-200 is part of the Corstone-201 Foundation IP that is supplied with Arm
Flexible Access.
• The authentication of loaded firmware images before booting. This feature is based on a
hardware root of trust.
• The authentication of remote servers. This feature is based on secure cryptographic and
RNG support, which is used to support cryptographic protocols for communication.
• Integrity and confidentiality protection for exchanged assets. This feature is based on
secure cryptographic and RNG support.
Software can handle the previous tasks. However, a CryptoCell increases the protection by
hiding key assets and cryptographic processes from software.
In general, the CryptoCell-312 is a good match for an SoC based around a Cortex-M series
processor. If physical attacks are a large concern for a secure IoT device, a CryptoIsland is the
best choice.
This guide assumes that you will use the CryptoCell-312 to augment the security that is
provided by TrustZone.
Copyright © 2020 Arm Limited (or its affiliates). All rights reserved.
Non-Confidential
Page 18 of 45
Arm Flexible Access program:
Creating a System for a Secure IoT Device 101892
Issue 01
This guide assumes that you will use the PCK-600 for your SoC.
The PCK-600 is part of the Corstone-201 Foundation IP that is supplied with Arm Flexible
Access.
This guide assumes that you will use one or more of the CMSDK timers to fulfill the
requirements of your SoC.
The CMSDK is part of the Corstone-201 Foundation IP that is supplied with Arm Flexible
Access.
Copyright © 2020 Arm Limited (or its affiliates). All rights reserved.
Non-Confidential
Page 19 of 45
Arm Flexible Access program:
Creating a System for a Secure IoT Device 101892
Issue 01
Copyright © 2020 Arm Limited (or its affiliates). All rights reserved.
Non-Confidential
Page 20 of 45
Arm Flexible Access program:
Creating a System for a Secure IoT Device 101892
Issue 01
Let’s look at Arm IP components, and explore how to work with them when designing an SoC.
Begin by downloading any of the following Arm IP that you currently have access to:
• CryptoCell-312 Security IP
• PL011 UART
• Corstone-201 Foundation IP, which contains all the other Arm IP mentioned in this section
All the above IP that is listed in the preceding list is supplied with Arm Flexible Access.
Downloading the IP gives you access to the documentation and the RTL. Generally, IP is
supplied with the following documentation:
Copyright © 2020 Arm Limited (or its affiliates). All rights reserved.
Non-Confidential
Page 21 of 45
Arm Flexible Access program:
Creating a System for a Secure IoT Device 101892
Issue 01
Document Description
Release note Covers:
• A list of the components, or products, that are delivered in
the downloaded IP
• The location of the components, including further
component documentation, in the directory tree that is
created for the downloaded IP
• The installation procedure for the components
• Any known issues with the downloaded IP
Technical For subsystems only. Describes the elements that make up a
Overview subsystem and the software that is available to use on it.
Configuration Covers:
and Integration • Installation of a piece of IP that could be a set of
Manual components or a subsystem
• Configuring the IP. For example, you can use Perl scripts,
XML configuration files, and Verilog template files to
generate custom Verilog RTL.
• Performing Out of Box (OoB) testing
• The guidelines for the functional integration of the IP into
an SoC design
• Implementing the IP
Technical Includes low-level functional descriptions of IP components and a
Reference programmer’s guide that provides register descriptions, memory
Manual maps, and interrupt maps.
Use this documentation to expand on the knowledge that is presented in the following sections
of this guide.
The top-level directories in the Corstone-201 package are named according to product code.
The README.txt file contains a key for the product codes to help you navigate the package.
Copyright © 2020 Arm Limited (or its affiliates). All rights reserved.
Non-Confidential
Page 22 of 45
Arm Flexible Access program:
Creating a System for a Secure IoT Device 101892
Issue 01
The timers and power control that are required for the SoC have been added. They are the only
peripherals that the system currently has.
In What pieces of IP do I need to make a secure IoT device?, we decided to use a Cortex-M23
processor, AMBA components, and a CryptoCell-312 for our example design of a coffee maker.
Now we will focus on the individual AMBA components, timers, and power components. The
Copyright © 2020 Arm Limited (or its affiliates). All rights reserved.
Non-Confidential
Page 23 of 45
Arm Flexible Access program:
Creating a System for a Secure IoT Device 101892
Issue 01
following subsections explore the rationale behind the IP choices and their placement in the
overall layout.
Copyright © 2020 Arm Limited (or its affiliates). All rights reserved.
Non-Confidential
Page 24 of 45
Arm Flexible Access program:
Creating a System for a Secure IoT Device 101892
Issue 01
The CoreLink SIE-200 System IP for Embedded Release Note contains a complete list of all
available components.
Copyright © 2020 Arm Limited (or its affiliates). All rights reserved.
Non-Confidential
Page 25 of 45
Arm Flexible Access program:
Creating a System for a Secure IoT Device 101892
Issue 01
The Flash controller and flash memory can operate in a different clock domain to the main
domain. In that case, you must use an AHB5 to AHB5 sync-down bridge to synchronize the two
AHB5 interfaces.
We recommend that you add a cache between the bus interconnect and eFlash controller. This
addition helps to reduce the impact of high eFlash access latency and low bandwidth from the
CPU. You can use the CG092 AHB Flash Cache. Position the Flash Cache after the AHB5 MPC
and before the AHB5 to AHB5 sync-down bridge.
Both the GFC-100 Flash Controller and CG092 AHB Flash Cache have an APB4 interface in
addition to an AHB5 interface. Connections to both the GFC-100 Flash Controller and CG092
AHB Flash Cache APB4 interfaces must be after an APB4 PPC.
You must also implement One Time Programmable (OTP) memory and a persistent state
storage block for the CryptoCell. The CryptoCell stores key state information in the persistent
state storage block. If a cold reset occurs, the CryptoCell repopulates persistent values from
the OTP memory. Implement the OTP memory using on die e-fuses or using private, protected
eFlash locations.
Copyright © 2020 Arm Limited (or its affiliates). All rights reserved.
Non-Confidential
Page 26 of 45
Arm Flexible Access program:
Creating a System for a Secure IoT Device 101892
Issue 01
Component Description
Low-Power Distributes a Q-Channel from one Q-Channel controller to up to 32 Q-
Distributor Channel devices. The LPD-Q allows the Q-Channel interfaces of the
Q-Channel devices under control to be aggregated to a clock controller or a Power
(LPD-Q) Policy Unit. This aggregation allows you to observe the current states
and control the quiescent of the devices in relation to clock or power
state.
Clock Provides high-level clock gating for devices in a clock domain that
Controller support Q-Channel Low-Power Interface (LPI) clock gating.
(CLK-CTRL)
Power A configurable and programmable P-Channel or Q-Channel power
Policy Unit domain controller. For controlling domain power modes in co-
(PPU) ordination with device quiescence, the PPU provides:
• Technology-independent, low-power hardware interfaces
• Software interfaces
The PPU works alongside a Power Control State Machine (PCSM). The
PCSM is a technology-dependent state machine for the sequencing of
power switch chains and retention controls, which can include RAM
and register retention. The PCSM executes power mode changes under
PPU direction. The interface between the PPU and the PCSM is a P-
Channel.
The Arm CoreLink PCK-600 Power Control Kit Release Note contains a complete list of all
available components.
Connect the PPU through its APB interface to the APB4 PPC. Use the LPD-Q connect to other
components whose power state the PPU must control.
Timer Description
Timer A 32-bit down-counter that generates an interrupt when the counter
reaches 0
Copyright © 2020 Arm Limited (or its affiliates). All rights reserved.
Non-Confidential
Page 27 of 45
Arm Flexible Access program:
Creating a System for a Secure IoT Device 101892
Issue 01
The Arm Cortex-M0/M0+ System Design Kit Release Note contains a complete list of all
available components, including other APB components.
You can use all the timers in your system. We strongly recommend that you include at least two
watchdog timers in your system. Map one watchdog to the Secure world and map the other
watchdog to the Non-secure world. The Secure world watchdog timer can reset the system.
However, the Non-secure world watchdog timer must normally not be allowed to reset the
system directly. Instead, on a reset timeout, the Non-secure watchdog requests that the Secure
world performs a system reset on its behalf. We also recommend that you include a dual timer,
or two more individual timers. Use one of the timers as a Secure timer and the other as a Non-
secure timer.
The previous figures assume that the APB peripherals are in a separate clock or power domain.
For this reason, the controller is connected to the AHB5 Bus Matrix through an AHB5 to APB4
Asynchronous Bridge. The bridge is not mandatory for TrustZone and is not part of the filter.
Copyright © 2020 Arm Limited (or its affiliates). All rights reserved.
Non-Confidential
Page 28 of 45
Arm Flexible Access program:
Creating a System for a Secure IoT Device 101892
Issue 01
The previous sections of the guide dealt with combining the components in the SoC. Both the
Wi-Fi and screen component are part of the system but not part of the SoC.
For a Wi-Fi component, we assume that you are using an off-chip Wi-Fi component. The
component has a dedicated processor and its own memory, which contains the whole TCP/IP
stack. These features mean that you do not require as much memory on your SoC. This guide
assumes that the Wi-Fi component supports at least some of the following communication
interfaces:
• UART
• SPI
• I 2C
How to connect these interfaces to the SoC is explained in Attach external components to an
SoC.
The data throughput varies depending on the communication interface that is used. It is
reasonable to expect 4Mbit/s data throughput over UART and 10Mbit/s data throughput over
SPI.
If the SoC will be produced at high volume levels, consider including the Wi-Fi module as part
of the SoC. An on-chip Wi-Fi component can connect to a bus matrix through a compatible bus
matrix interface.
For a screen component, we assume that you are using an LCD touchscreen about 3 inches in
size, with 320x480 pixels. The display connects to the SoC using either an I2C or SPI interface.
We also assume that the display has its own built-in controllers and display buffers.
The previous sections of the guide identify communication interfaces that the third-party Wi-Fi
or display component are likely to support. Other third-party components are also likely to
support these interfaces. To connect these kinds of third-party components to your SoC, you
Copyright © 2020 Arm Limited (or its affiliates). All rights reserved.
Non-Confidential
Page 29 of 45
Arm Flexible Access program:
Creating a System for a Secure IoT Device 101892
Issue 01
must provide the appropriate outward facing communication interfaces on your SoC. The
following table describes how you can provide these interfaces:
Communication Methodology
interface
UART Include an APB-compatible peripheral that provides an
external UART interface. The CMSDK includes a basic UART.
Alternatively, you could use the more advanced PL011 UART.
SPI Include an APB-compatible peripheral that provides an
external SPI interface. Arm supplies the PL022 SSP for this
purpose.
I 2C Include an APB-compatible peripheral that provides an
external I2C interface. Arm does not currently offer any I2C
connector IP. We recommend you investigate IP offered by
third parties.
In the example SoC for this guide, connect APB-compatible peripherals to the APB4 PPC.
• Configuring memory
There are three ways to configure the IPs, as you can see in the following table:
Copyright © 2020 Arm Limited (or its affiliates). All rights reserved.
Non-Confidential
Page 30 of 45
Arm Flexible Access program:
Creating a System for a Secure IoT Device 101892
Issue 01
IP configuration Description
Render-time Set the configuration options in a data file, for example an XML
file. To then produce the RTL from the configuration, you run a
script. This script also configures the testbench for the RTL and
any related software. For example, a testbench for RAM might
need to know the size that the memory was set to. Knowing the
specified options enables the testbench to configure the tests
accordingly.
Instantiation-time When the RTL of a piece of IP has been rendered, the next step is
to instantiate it. During instantiation of the RTL, you can
configure each instance of the IP using Verilog parameters. For
example, an SoC could have two processors. During instantiation,
the FPU could be enabled for one processor and not the other by
changing a Verilog parameter.
Using pin tiles Pin tiles are used to configure features after rendering.
However, if the pin tiles exclude certain options altogether, the
RTL for those options are optimized out.
You can also configure IP at runtime using registers. However, physical implementations of the
options that the registers offer must exist. Therefore, the RTL is always included for any
optional features. In other words, a feature must be developed on the die ready to be switched
on or off by the related registers.
Configuring memory normally just involves setting the size of the memory. You must also
replace the generic Arm memory model with a real memory library macro. Real memory
libraries are fab process-specific. For example, you could use TSCM 28nm physical RAM.
Although the size of the memory is defined within the IP configuration options, for the memory
macro, you must still define:
You must also consider these factors when arranging the floorplans of the die.
Copyright © 2020 Arm Limited (or its affiliates). All rights reserved.
Non-Confidential
Page 31 of 45
Arm Flexible Access program:
Creating a System for a Secure IoT Device 101892
Issue 01
By defining a power or clock domain, you allow different domains to power down or stop their
clock while other domains are still running.
A Power Policy Unit (PPU), which connects to the bus matrix through an APB4 interface,
controls a power domain. The PPU provides a standardized software view for power control of
a domain. The Power Control State Machine (PCSM) is responsible for switching components
on or off. You must implement the PCSM for your system by writing the RTL for it.
• Components on an SoC to communicate their power state and whether they are idle. This
information allows a PPU or a Clock Controller to decide whether to power down a domain
or stop the clock for a domain.
• A PPU to make a request that a component change its power state. In response, a
component can accept or refuse.
Q-Channels can only communicate two possible states. Clock domains only use a Q-Channel
because the clock can only ever be on or off. P-Channels allow you to communicate multiple
states to a component. A component can have more than two power states.
If you have one domain that is communicating through an AHB5 bus interface to another
domain, you require an AHB5 Access Control Gate (ACG). The ACG stops a transaction
entering a domain that is off and can also wake up a sleeping domain. Be aware that
implementing power domains has overheads, in complexity and even performance. You must
consider these overheads against the power-saving gains.
For example, imagine a smart temperature sensor that wakes up every ten seconds to take a
reading. The sensor wakes up when used but spends much of its time asleep. The sensor also
has a CryptoCell-312 for security. When the sensor wakes up, it wakes up everything including
the CryptoCell-312. In some systems, the CryptoCell-312 is a candidate for putting in its own
power domain. However, for the sensor, it does not make sense because the system is only
awake for short periods of time.
The secure IoT coffee machine that we are designing might be simple enough to only include
one clock and power domain. We might expect a coffee machine to be plugged into the wall plug
and not to be running all the time. While the coffee machine is not running, the entire system
can power down.
Copyright © 2020 Arm Limited (or its affiliates). All rights reserved.
Non-Confidential
Page 32 of 45
Arm Flexible Access program:
Creating a System for a Secure IoT Device 101892
Issue 01
If you require multiple clock domains in your SoC, it is important to make sure that the timers
are in the correct clock and power domain. If you do not want a timer to turn off, you must make
sure that they are not in a gated domain.
The AHB5 to APB4 asynchronous bridge can also function as an ACG. However, you can still
use an AHB5 to APB4 asynchronous bridge within a single domain.
When you configure an AHB5 bus matrix, you can define how many slave and master interfaces
it has. Configure each interface to meet the requirements of the IP that is connecting to it. Be
aware that the data width of the bus matrix interfaces is fixed. Therefore, if an interface of a
piece of SoC IP has a different width, you must use a converter block. Sometimes, you might be
able to configure the SoC IP interfaces so that they match the bus matrix interface width.
You must map each slave interface on a bus matrix to an area in the memory map. You must also
decide which masters can access these interfaces.
The IDAU must be implemented for each system. This process involves defining the IDAU
regions in a look-up table for the Cortex-M23. Each entry in a table contains the following
information about a region:
• Region ID
Copyright © 2020 Arm Limited (or its affiliates). All rights reserved.
Non-Confidential
Page 33 of 45
Arm Flexible Access program:
Creating a System for a Secure IoT Device 101892
Issue 01
If you decide that the SSE-123 is a good fit for your SoC, there are time savings to be made.
Alternatively, if you decide to build your own SoC from the start, we recommend exploring how
the SSE-123 is put together at the RTL-level. This is because the SSE-123 provides a working
example to kickstart your knowledge. The SSE-123 shows you how to configure and integrate
the IP that we identified and discussed in the previous sections of this guide. Although it is a
subsystem, it can provide a strong foundation for a secure IoT SoC.
The SSE-123 is part of the Corstone-201 Foundation IP, which also contains the CoreLink SIE-
200 IP that is used by the SSE-123.
Copyright © 2020 Arm Limited (or its affiliates). All rights reserved.
Non-Confidential
Page 34 of 45
Arm Flexible Access program:
Creating a System for a Secure IoT Device 101892
Issue 01
In this section of the guide, we use the term SSE-123 to refer to the entire subsystem.
The IP choices made for the SSE-123 are very similar to the recommendations that we made in
How does the IP fit together? The recommendations and the SSE-123 are both based on
theoretical knowledge from the PSA.
The SSE-123 does not contain a CryptoCell-312. Without this component, a system is not
compliant with the PSA specification. To achieve compliance, you must add a CryptoCell-312
and then implement One Time Programmable (OTP) memory and a persistent state storage
block for the CryptoCell-312. Adding a CryptoCell to the subsystem contains more
information.
• Implement an IDAU
Copyright © 2020 Arm Limited (or its affiliates). All rights reserved.
Non-Confidential
Page 35 of 45
Arm Flexible Access program:
Creating a System for a Secure IoT Device 101892
Issue 01
• eFlash memory
• System control registers and security control registers that are specific to the subsystem
• Interfaces:
Copyright © 2020 Arm Limited (or its affiliates). All rights reserved.
Non-Confidential
Page 36 of 45
Arm Flexible Access program:
Creating a System for a Secure IoT Device 101892
Issue 01
The options are stored in *.yaml, *.conf, and *.xml files, and the IP is rendered using a Perl
script.
The SSE-123 Subsystem also allows you to override some render configuration options using
System Verilog parameters during instantiation of the module.
Chapter 2 of the Arm SSE-123 Example Subsystem Configuration and Integration Manual
contains more detailed information on installing and configuring the SSE-123 product. Figure
2-1: Configuration options block diagram provides a useful visual guide to the components
that are included or excluded depending on main configuration option settings.
Chapter 4 of the Arm SSE-123 Example Subsystem Configuration and Integration Manual
contains information on integrating the SSE-123 Subsystem into a larger system.
• Two system timers. You can map, by software, one timer for Secure mode and one timer
for Non-secure mode.
• Two watchdog timers. You can map, by software, one watchdog for Secure mode and one
watchdog for Non-secure mode.
• A system counter. This unit provides the timestamp that is used by all watchdog timer and
system timers.
Copyright © 2020 Arm Limited (or its affiliates). All rights reserved.
Non-Confidential
Page 37 of 45
Arm Flexible Access program:
Creating a System for a Secure IoT Device 101892
Issue 01
The timestamp-based timers are 64-bit and were developed for the SSE-123 and future IoT
subsystems. The timers from the CMSDK, which were covered in Adding the timers as
peripherals, are 32-bit and can also be added if necessary. The SSE-123 system and watchdog
timers function in the same way as the watchdog that is described in Adding the timers as
peripherals. The only exception is that these timers all need a shared reference timestamp
input from which to derive their time. The system counter is part of the SSE-123 Integration
and provides a 64-bit timestamp value that compatible components across the SoC can share.
More information on the SSE-123 counters is available in Appendix B of the Arm SSE
Example Subsystem Technical Reference Manual.
The SSE-123 Subsystem registers are defined in the SSE-123 Subsystem memory map. The
register blocks that you can see in the following table are available:
Copyright © 2020 Arm Limited (or its affiliates). All rights reserved.
Non-Confidential
Page 38 of 45
Arm Flexible Access program:
Creating a System for a Secure IoT Device 101892
Issue 01
The former two pieces of IP come from the Cortex-M23 IP download. The latter two pieces of
IP come from the CoreSight SoC-400 IP, which is a solution for the debug and trace of complex
SoCs. The following table describes these pieces of IP:
IP Description
Cortex-M23 Supports the JTAG interface and provides access to the core
DAP debug system
Cortex-M23 Integrates with the Cortex-M23 ETM and supports instruction
TPIU tracing
SoC-400 CTI Allows events to be broadcast to other components. Events are
signaled to the CTI through trigger inputs. Trigger outputs are
used to signal events to other components. For example, in the
SSE-123 Integration, the CTI triggers the system counter.
Copyright © 2020 Arm Limited (or its affiliates). All rights reserved.
Non-Confidential
Page 39 of 45
Arm Flexible Access program:
Creating a System for a Secure IoT Device 101892
Issue 01
IP Description
SoC-400 Generates a debug timestamp value that provides a consistent
Timestamp view of time for multiple debug related IP blocks in an SoC. The
Generator Timestamp Generator is a necessary component when the system
has enabled debugging with trace.
If you want to have similar capabilities in your SoC, you can render the SSE-123 with the debug
option enabled. Then you can examine the rendered RTL and integrate the IP into your own
system.
The SoC-400 IP is part of the Corstone-201 Foundation IP, which Arm Flexible Access
supplies.
The SSE-200 Subsystem for Embedded is more advanced than the SSE-123. When making
these extensions, we recommend using the SSE-200 as an example of how you can integrate
the extra IP.
The SSE-200 contains the SSE-123 and is part of the Corstone-201 Foundation IP, which Arm
Flexible Access supplies.
Copyright © 2020 Arm Limited (or its affiliates). All rights reserved.
Non-Confidential
Page 40 of 45
Arm Flexible Access program:
Creating a System for a Secure IoT Device 101892
Issue 01
The SSE-123 uses a Cortex-M23 processor, which mirrors the choice of processor made
previously. However, if you need more performance, or you need an FPU or DSP, you could
upgrade the processor to a Cortex-M33. The SSE-200 contains two Cortex-M33 processors. If
both processors are included, the usual setup is to have one processor running the operating
system. The other processor acts as a coprocessor running occasionally and much faster.
If you choose to replace the Coretx-M23 processor in the SSE-123 with a Cortex-M33
processor, start by rendering the SSE-200 and looking at the RTL produced. When comparing
the SSE-200 RTL with RTL rendered for the SSE-123, look at how the Cortex-M33 and Cortex-
M23 processors integrate with the other components. These RTL examples provide insight into
replacing a Cortex-M23 processor with a Cortex-M33.
Section A2.2 of the Arm CoreLink SSE-200 Subsystem for Embedded Configuration and
Integration Manual describes the render options available for the SSE-200. The information
includes the option for including or excluding either of the Cortex-M33 processors.
The CryptoCell section explores how using a CryptoCell-312 in your SoC complements Arm
TrustZone and fortifies the security of the device. The SSE-123 does not include a CrytoCell-
312. However, the SSE-200 provides an option to include a CryptoCell-312.
Figure 2-1: Top-level element interconnections of the Arm CoreLink SSE-200 Subsystem for
Embedded Technical Overview shows the CryptoCell placed in its own domain. The figure also
shows use of two AHB5 Access Control Gates to form the boundary between the CryptoCell
domain and the main domain. The master interface on the AHB5 bus matrix also connects to
the CryptoCell-312 through an AHB5 to APB4 asynchronous bridge. This bridge has a
secondary function as an ACG.
If you want to add a CryptoCell-312 to the SSE-123, render the SSE-200 with the CryptoCell
option enabled. The example RTL provides insight into adding the CryptoCell.
Copyright © 2020 Arm Limited (or its affiliates). All rights reserved.
Non-Confidential
Page 41 of 45
Arm Flexible Access program:
Creating a System for a Secure IoT Device 101892
Issue 01
If the CryptoCell is positioned in the same clock and power domains of the main bus matrix,
you do not require an ACG between the CryptoCell and the bus matrix.
Figure 2-1: Top-level element interconnections of the Arm CoreLink SSE-200 Subsystem for
Embedded Technical Overview shows a system control element. This element features an
always-on timer and a secure watchdog that run on a slow 32KHz clock. Both components
come from the CMSDK.
SSE-123 timers explores the 64-bit timers that are employed in the SSE-123. If you require
CMSDK timers, you can add them to the system. You might add these timers in a situation
where you require more timers that have different clock inputs. However, be aware that these
timers do not share a timestamp with the system timers already in the system.
Copyright © 2020 Arm Limited (or its affiliates). All rights reserved.
Non-Confidential
Page 42 of 45
Arm Flexible Access program:
Creating a System for a Secure IoT Device 101892
Issue 01
7 Related information
Here are some resources that are related to material in this guide:
• Threat Model and Security Analysis for an asset tracker use case
• Threat Model and Security Analysis for a smart water meter use case
• Threat Model and Security Analysis for a network camera use case
• The following documents are only available with an Arm Flexible Access license:
Copyright © 2020 Arm Limited (or its affiliates). All rights reserved.
Non-Confidential
Page 43 of 45
Arm Flexible Access program:
Creating a System for a Secure IoT Device 101892
Issue 01
Other topics:
Copyright © 2020 Arm Limited (or its affiliates). All rights reserved.
Non-Confidential
Page 44 of 45
Arm Flexible Access program:
Creating a System for a Secure IoT Device 101892
Issue 01
8 Next steps
This guide provides the essential knowledge that you must have to design and build an SoC
for a secure IoT device. The IP discussed in this guide, including the subsystems, is all available
through Arm Flexible Access. You can review the options for Arm Flexible Access here.
After you have familiarized yourself with the PSA, you can carry out a threat and security
analysis for your use case. The analysis will help you decide on the IP you require to meet the
security requirements of your SoC. You might also want to review the software and firmware
requirements of your system at this point.
The next step is to explore the SSE-123 subsystem and decide whether you can use it as the
basis for your SoC. You will find that the SSE-123 is designed using the same IP introduced in
this guide. If the SSE-123 fits your vision, you will gain considerable time savings.
Copyright © 2020 Arm Limited (or its affiliates). All rights reserved.
Non-Confidential
Page 45 of 45