RTEMS 6.1-rc4
Loading...
Searching...
No Matches
reg_stc.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-2-Clause */
2
11/* The header file is generated by make_header.py from STC.json */
12/* Current script's version can be found at: */
13/* https://github.com/AoLaD/rtems-tms570-utils/tree/headers/headers/python */
14
15/*
16 * Copyright (c) 2014-2015, Premysl Houdek <kom541000@gmail.com>
17 *
18 * Czech Technical University in Prague
19 * Zikova 1903/4
20 * 166 36 Praha 6
21 * Czech Republic
22 *
23 * All rights reserved.
24 *
25 * Redistribution and use in source and binary forms, with or without
26 * modification, are permitted provided that the following conditions are met:
27 *
28 * 1. Redistributions of source code must retain the above copyright notice, this
29 * list of conditions and the following disclaimer.
30 * 2. Redistributions in binary form must reproduce the above copyright notice,
31 * this list of conditions and the following disclaimer in the documentation
32 * and/or other materials provided with the distribution.
33 *
34 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
35 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
36 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
37 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
38 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
39 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
40 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
41 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
42 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
43 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
44 *
45 * The views and conclusions contained in the software and documentation are those
46 * of the authors and should not be interpreted as representing official policies,
47 * either expressed or implied, of the FreeBSD Project.
48*/
49#ifndef LIBBSP_ARM_TMS570_STC
50#define LIBBSP_ARM_TMS570_STC
51
52#include <bsp/utility.h>
53
54typedef struct{
55 uint32_t STCGCR0; /*STC Global Control Register 0*/
56 uint32_t STCGCR1; /*STCGlobal Control Register 1*/
57 uint32_t STCTPR; /*Self-Test Run Timeout Counter Preload Register*/
58 uint32_t STC_CADDR; /*STC Current ROM Address Register*/
59 uint32_t STCCICR; /*STC Current Interval Count Register*/
60 uint32_t STCGSTAT; /*Self-Test Global Status Register*/
61 uint32_t STCFSTAT; /*Self-Test Fail Status Register*/
62 uint32_t CPU1_CURMISR3; /*CPU1 Current MISR Register 3*/
63 uint32_t CPU1_CURMISR2; /*CPU1 Current MISR Register 2*/
64 uint32_t CPU1_CURMISR1; /*CPU1 Current MISR Register 1*/
65 uint32_t CPU1_CURMISR0; /*CPU1 Current MISR Register 0*/
66 uint32_t CPU2_CURMISR3; /*CPU2 Current MISR Register 3*/
67 uint32_t CPU2_CURMISR2; /*CPU2 Current MISR Register 2*/
68 uint32_t CPU2_CURMISR1; /*CPU2 Current MISR Register 1*/
69 uint32_t CPU2_CURMISR0; /*CPU2 Current MISR Register 0*/
70 uint32_t STCSCSCR; /*Signature Compare Self-Check Register*/
72
73
74/*---------------------TMS570_STC_STCGCR0---------------------*/
75/* field: INTCOUNT - Number of intervals of self-test run */
76#define TMS570_STC_STCGCR0_INTCOUNT(val) BSP_FLD32(val,16, 31)
77#define TMS570_STC_STCGCR0_INTCOUNT_GET(reg) BSP_FLD32GET(reg,16, 31)
78#define TMS570_STC_STCGCR0_INTCOUNT_SET(reg,val) BSP_FLD32SET(reg, val,16, 31)
79
80/* field: RS_CNT - Restart or Continue */
81#define TMS570_STC_STCGCR0_RS_CNT BSP_BIT32(0)
82
83
84/*---------------------TMS570_STC_STCGCR1---------------------*/
85/* field: STC_ENA - Self-test run enable key */
86#define TMS570_STC_STCGCR1_STC_ENA(val) BSP_FLD32(val,0, 3)
87#define TMS570_STC_STCGCR1_STC_ENA_GET(reg) BSP_FLD32GET(reg,0, 3)
88#define TMS570_STC_STCGCR1_STC_ENA_SET(reg,val) BSP_FLD32SET(reg, val,0, 3)
89
90
91/*---------------------TMS570_STC_STCTPR---------------------*/
92/* field: RTOD - Self-test timeout count preload */
93/* Whole 32 bits */
94
95/*--------------------TMS570_STC_STC_CADDR--------------------*/
96/* field: ADDR - Current ROM Address */
97/* Whole 32 bits */
98
99/*---------------------TMS570_STC_STCCICR---------------------*/
100/* field: N - Interval Number */
101#define TMS570_STC_STCCICR_N(val) BSP_FLD32(val,0, 15)
102#define TMS570_STC_STCCICR_N_GET(reg) BSP_FLD32GET(reg,0, 15)
103#define TMS570_STC_STCCICR_N_SET(reg,val) BSP_FLD32SET(reg, val,0, 15)
104
105
106/*--------------------TMS570_STC_STCGSTAT--------------------*/
107/* field: TEST_FAIL - Test Fail */
108#define TMS570_STC_STCGSTAT_TEST_FAIL BSP_BIT32(1)
109
110/* field: TEST_DONE - Test Done */
111#define TMS570_STC_STCGSTAT_TEST_DONE BSP_BIT32(0)
112
113
114/*--------------------TMS570_STC_STCFSTAT--------------------*/
115/* field: TO_ERR - Timeout Error */
116#define TMS570_STC_STCFSTAT_TO_ERR BSP_BIT32(2)
117
118/* field: CPU2_FAIL - CPU2 failure info */
119#define TMS570_STC_STCFSTAT_CPU2_FAIL BSP_BIT32(1)
120
121/* field: CPU1_FAIL - CPU1 failure info */
122#define TMS570_STC_STCFSTAT_CPU1_FAIL BSP_BIT32(0)
123
124
125/*------------------TMS570_STC_CPU1_CURMISR3------------------*/
126/* field: MISR - MISR data from CPU1 */
127/* Whole 32 bits */
128
129/*------------------TMS570_STC_CPU1_CURMISR2------------------*/
130/* field: MISR - MISR data from CPU1 */
131/* Whole 32 bits */
132
133/*------------------TMS570_STC_CPU1_CURMISR1------------------*/
134/* field: MISR - MISR data from CPU1 */
135/* Whole 32 bits */
136
137/*------------------TMS570_STC_CPU1_CURMISR0------------------*/
138/* field: MISR - MISR data from CPU1 */
139/* Whole 32 bits */
140
141/*------------------TMS570_STC_CPU2_CURMISR3------------------*/
142/* field: MISR - MISR data from CPU2 */
143/* Whole 32 bits */
144
145/*------------------TMS570_STC_CPU2_CURMISR2------------------*/
146/* field: MISR - MISR data from CPU2 */
147/* Whole 32 bits */
148
149/*------------------TMS570_STC_CPU2_CURMISR1------------------*/
150/* field: MISR - MISR data from CPU2 */
151/* Whole 32 bits */
152
153/*------------------TMS570_STC_CPU2_CURMISR0------------------*/
154/* field: MISR - MISR data from CPU2 */
155/* Whole 32 bits */
156
157/*--------------------TMS570_STC_STCSCSCR--------------------*/
158/* field: FAULT_INS - Enable / Disable fault insertion. */
159#define TMS570_STC_STCSCSCR_FAULT_INS BSP_BIT32(4)
160
161/* field: SELF_CHECK_KEY - Signature compare logic self-check enable key */
162#define TMS570_STC_STCSCSCR_SELF_CHECK_KEY(val) BSP_FLD32(val,0, 3)
163#define TMS570_STC_STCSCSCR_SELF_CHECK_KEY_GET(reg) BSP_FLD32GET(reg,0, 3)
164#define TMS570_STC_STCSCSCR_SELF_CHECK_KEY_SET(reg,val) BSP_FLD32SET(reg, val,0, 3)
165
166
167
168#endif /* LIBBSP_ARM_TMS570_STC */
This header file provides utility macros for BSPs.
Definition: reg_stc.h:54