MCUX CLNS
MCUX Crypto Library Normal Secure
Loading...
Searching...
No Matches
ip_platform.h
Go to the documentation of this file.
1/*--------------------------------------------------------------------------*/
2/* Copyright 2020-2022 NXP */
3/* */
4/* SPDX-License-Identifier: BSD-3-Clause */
5/* */
6/* Redistribution and use in source and binary forms, with or without */
7/* modification, are permitted provided that the following conditions are */
8/* met: */
9/* */
10/* 1. Redistributions of source code must retain the above copyright */
11/* notice, this list of conditions and the following disclaimer. */
12/* */
13/* 2. Redistributions in binary form must reproduce the above copyright */
14/* notice, this list of conditions and the following disclaimer in the */
15/* documentation and/or other materials provided with the distribution. */
16/* */
17/* 3. Neither the name of the copyright holder nor the names of its */
18/* contributors may be used to endorse or promote products derived from */
19/* this software without specific prior written permission. */
20/* */
21/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS */
22/* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED */
23/* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A */
24/* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */
25/* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */
26/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */
27/* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR */
28/* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */
29/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING */
30/* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS */
31/* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
32/*--------------------------------------------------------------------------*/
33
38
39#ifndef IP_PLATFORM_H
40#define IP_PLATFORM_H
41
42#include <LPC55S36.h>
43
44/* ================================================================================ */
45/* ================ Peripheral declaration ================ */
46/* ================================================================================ */
47
48// Define base address of ELS
49#define ELS_SFR_BASE ELS
50#define ELS_SFR_NAME(sfr) sfr
51#define ELS_SFR_PREFIX S50_
52
53
54// Define base address of PKC
55#define PKC_SFR_BASE PKC
56#define PKC_SFR_NAME(sfr) PKC_ ## sfr
57#define PKC_SFR_PREFIX PKC_PKC_
58#define PKC_SFR_SUFFIX_MSK _MASK
59#define PKC_SFR_SUFFIX_POS _SHIFT
60
61// PKC_RAM base address is not defined in any header file
62#define PKC_RAM_ADDR ((uint32_t)0x20002000UL)
63#define PKC_WORD_SIZE 8u
64
65#define CSS_INTERRUPT_BUSY_NUMBER 54
66#define CSS_INTERRUPT_ERR_NUMBER 112
67#define CSS_INTERRUPT_IRQ_NUMBER 54
68
69#define SYSCON_CSS_CLK_CTRL_SET *(volatile uint32_t*)0x500009b4
70#define SYSCON_PERIPH_CTRL_RST *(volatile uint32_t*)0x50000108
71#define SYSCON_RAM_INTERLEAVE *(volatile uint32_t*)0x50000470
72
73#define IP_PUF_BASE 0x5003A000UL
74#define PUF_SRAM_CFG *(volatile uint32_t *) (IP_PUF_BASE + 0x300)
75#define PUF_SR *(volatile uint32_t *) (IP_PUF_BASE + 0x8)
76#define PUF_OR *(volatile uint32_t *) (IP_PUF_BASE + 0x4)
77#define PUF_CR *(volatile uint32_t *) (IP_PUF_BASE + 0x0)
78#define PUF_KEY_DEST *(volatile uint32_t *) (IP_PUF_BASE + 0x20)
79#define PUF_DIR *(volatile uint32_t *) (IP_PUF_BASE + 0xA0)
80#define PUF_DOR *(volatile uint32_t *) (IP_PUF_BASE + 0xA8)
81
82// ELS version
83#define ELS_HW_VERSION_REVISION 0
84#define ELS_HW_VERSION_MINOR 13
85#define ELS_HW_VERSION_MAJOR 2
86#define ELS_HW_VERSION_LEVEL 0
87
88/* If we are supposed to determine the CSSv2 base address at link time, do not use the definitions from the platform header file
89 * Redefine IP_CSS as an extern pointer.
90 */
91#undef ELS_SFR_BASE
92extern void * ip_css_base;
93#define ELS_SFR_BASE ((S50_Type *) ip_css_base)
94
95#endif
CMSIS Peripheral Access Layer for LPC55S36.