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-2023 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 <MCXN947_cm33_core0.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// Define base address of PKC
54#define PKC_SFR_BASE PKC0
55#define PKC_SFR_NAME(sfr) PKC_ ## sfr
56#define PKC_SFR_PREFIX PKC_PKC_
57#define PKC_SFR_SUFFIX_MSK _MASK
58#define PKC_SFR_SUFFIX_POS _SHIFT
59
60// PKC_RAM base address is not defined in any header file
61#define PKC_RAM_ADDR ((uint32_t)0x400B3000u)
62#define PKC_WORD_SIZE 8u
63
64// Define base address of TRNG
65#define TRNG_SFR_BASE TRNG0
66#define TRNG_SFR_NAME(sfr) sfr
67#define TRNG_SFR_PREFIX TRNG_
68#define TRNG_SFR_SUFFIX_MSK _MASK
69#define TRNG_SFR_SUFFIX_POS _SHIFT
70
71// Define base address of SAFO
72#define SAFO_SFR_BASE SM3_0
73#define SAFO_SFR_NAME(sfr) sfr
74#define SAFO_SFR_PREFIX SM3_
75
76// ELS interrupt definitions
77#define CSS_INTERRUPT_ERR_NUMBER ELS_ERR_IRQn
78#define CSS_INTERRUPT_IRQ_NUMBER ELS_IRQn
79#define CSS_INTERRUPT_BUSY_NUMBER ELS_IRQn
80
81
82#define IP_PUF_BASE 0x5002C000UL
83#define PUF_SRAM_CFG *(volatile uint32_t *) (IP_PUF_BASE + 0x300)
84#define PUF_SR *(volatile uint32_t *) (IP_PUF_BASE + 0x8)
85#define PUF_OR *(volatile uint32_t *) (IP_PUF_BASE + 0x4)
86#define PUF_CR *(volatile uint32_t *) (IP_PUF_BASE + 0x0)
87#define PUF_KEY_DEST *(volatile uint32_t *) (IP_PUF_BASE + 0x20)
88#define PUF_DIR *(volatile uint32_t *) (IP_PUF_BASE + 0xA0)
89#define PUF_DOR *(volatile uint32_t *) (IP_PUF_BASE + 0xA8)
90
91// ELS version
92#define ELS_HW_VERSION_REVISION 0
93#define ELS_HW_VERSION_MINOR 4
94#define ELS_HW_VERSION_MAJOR 3
95#define ELS_HW_VERSION_FW_REVISION 0
96#define ELS_HW_VERSION_FW_MINOR 4
97#define ELS_HW_VERSION_FW_MAJOR 2
98
99
100/* If we are supposed to determine the CSSv2 base address at link time, do not use the definitions from the platform header file
101 * Redefine IP_CSS as an extern pointer.
102 */
103#undef ELS_SFR_BASE
104extern void * ip_css_base;
105#define ELS_SFR_BASE ((S50_Type *) ip_css_base)
106
107#endif
CMSIS Peripheral Access Layer for MCXN947_cm33_core0.