RTEMS: bsps/arm/atsam/include/libchip/include/samv71/component/component_trng.h Source File

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
component_trng.h
1/* ---------------------------------------------------------------------------- */
2/* Atmel Microcontroller Software Support */
3/* SAM Software Package License */
4/* ---------------------------------------------------------------------------- */
5/* Copyright (c) 2015, Atmel Corporation */
6/* */
7/* All rights reserved. */
8/* */
9/* Redistribution and use in source and binary forms, with or without */
10/* modification, are permitted provided that the following condition is met: */
11/* */
12/* - Redistributions of source code must retain the above copyright notice, */
13/* this list of conditions and the disclaimer below. */
14/* */
15/* Atmel's name may not be used to endorse or promote products derived from */
16/* this software without specific prior written permission. */
17/* */
18/* DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR */
19/* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */
20/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE */
21/* DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, */
22/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT */
23/* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, */
24/* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */
25/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING */
26/* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, */
27/* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
28/* ---------------------------------------------------------------------------- */
29
30#ifndef _SAMV71_TRNG_COMPONENT_
31#define _SAMV71_TRNG_COMPONENT_
32
33/* ============================================================================= */
35/* ============================================================================= */
38
39#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
41typedef struct {
42 __O uint32_t TRNG_CR;
43 __I uint32_t Reserved1[3];
44 __O uint32_t TRNG_IER;
45 __O uint32_t TRNG_IDR;
46 __I uint32_t TRNG_IMR;
47 __I uint32_t TRNG_ISR;
48 __I uint32_t Reserved2[12];
49 __I uint32_t TRNG_ODATA;
50 __I uint32_t Reserved3[42];
51 __I uint32_t TRNG_VERSION;
52} Trng;
53#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
54/* -------- TRNG_CR : (TRNG Offset: 0x00) Control Register -------- */
55#define TRNG_CR_ENABLE (0x1u << 0)
56#define TRNG_CR_KEY_Pos 8
57#define TRNG_CR_KEY_Msk (0xffffffu << TRNG_CR_KEY_Pos)
58#define TRNG_CR_KEY(value) ((TRNG_CR_KEY_Msk & ((value) << TRNG_CR_KEY_Pos)))
59#define TRNG_CR_KEY_PASSWD (0x524E47u << 8)
60/* -------- TRNG_IER : (TRNG Offset: 0x10) Interrupt Enable Register -------- */
61#define TRNG_IER_DATRDY (0x1u << 0)
62/* -------- TRNG_IDR : (TRNG Offset: 0x14) Interrupt Disable Register -------- */
63#define TRNG_IDR_DATRDY (0x1u << 0)
64/* -------- TRNG_IMR : (TRNG Offset: 0x18) Interrupt Mask Register -------- */
65#define TRNG_IMR_DATRDY (0x1u << 0)
66/* -------- TRNG_ISR : (TRNG Offset: 0x1C) Interrupt Status Register -------- */
67#define TRNG_ISR_DATRDY (0x1u << 0)
68/* -------- TRNG_ODATA : (TRNG Offset: 0x50) Output Data Register -------- */
69#define TRNG_ODATA_ODATA_Pos 0
70#define TRNG_ODATA_ODATA_Msk (0xffffffffu << TRNG_ODATA_ODATA_Pos)
71/* -------- TRNG_VERSION : (TRNG Offset: 0xFC) Version Register -------- */
72#define TRNG_VERSION_VERSION_Pos 0
73#define TRNG_VERSION_VERSION_Msk (0xfffu << TRNG_VERSION_VERSION_Pos)
74#define TRNG_VERSION_MFN_Pos 16
75#define TRNG_VERSION_MFN_Msk (0x7u << TRNG_VERSION_MFN_Pos)
78
79
80#endif /* _SAMV71_TRNG_COMPONENT_ */
__O
#define __O
Definition: core_cm7.h:286
__I
#define __I
Definition: core_cm7.h:284
Trng
Trng hardware registers.
Definition: component_trng.h:41
Trng::TRNG_VERSION
__I uint32_t TRNG_VERSION
(Trng Offset: 0xFC) Version Register
Definition: component_trng.h:51