RTEMS: bsps/arm/tms570/include/bsp/tms570_selftest_parity.h Source File

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
tms570_selftest_parity.h
Go to the documentation of this file.
1
8/*
9 * Copyright (c) 2016 Pavel Pisa <pisa@cmp.felk.cvut.cz>
10 *
11 * Czech Technical University in Prague
12 * Zikova 1903/4
13 * 166 36 Praha 6
14 * Czech Republic
15 *
16 * The license and distribution terms for this file may be
17 * found in the file LICENSE in this distribution or at
18 * http://www.rtems.org/license/LICENSE.
19 */
20
21#ifndef LIBBSP_ARM_TMS570_SELFTEST_PARITY_H
22#define LIBBSP_ARM_TMS570_SELFTEST_PARITY_H
23
24#include <stdint.h>
25
30#define TMS570_SELFTEST_PAR_CR_KEY 0xA
31
32typedef struct tms570_selftest_par_desc tms570_selftest_par_desc_t;
33
34typedef void tms570_selftest_par_fnc_t( const tms570_selftest_par_desc_t *desc );
35
41 struct tms570_selftest_par_desc {
42 unsigned char esm_prim_grp;
43 unsigned char esm_prim_chan;
44 unsigned char esm_sec_grp;
45 unsigned char esm_sec_chan;
46 int fail_code;
48 volatile uint32_t *ram_loc;
49 volatile uint32_t *par_loc;
51 uint32_t par_xor;
53 volatile uint32_t *par_cr_reg;
54 uint32_t par_cr_test;
55 volatile uint32_t *par_st_reg;
56 uint32_t par_st_clear;
58 tms570_selftest_par_fnc_t *partest_fnc;
60 volatile void *fnc_data;
62};
63
64extern const tms570_selftest_par_desc_t
65 tms570_selftest_par_het1_desc;
66extern const tms570_selftest_par_desc_t
67 tms570_selftest_par_htu1_desc;
68extern const tms570_selftest_par_desc_t
69 tms570_selftest_par_het2_desc;
70extern const tms570_selftest_par_desc_t
71 tms570_selftest_par_htu2_desc;
72extern const tms570_selftest_par_desc_t
73 tms570_selftest_par_adc1_desc;
74extern const tms570_selftest_par_desc_t
75 tms570_selftest_par_adc2_desc;
76extern const tms570_selftest_par_desc_t
77 tms570_selftest_par_can1_desc;
78extern const tms570_selftest_par_desc_t
79 tms570_selftest_par_can2_desc;
80extern const tms570_selftest_par_desc_t
81 tms570_selftest_par_can3_desc;
82extern const tms570_selftest_par_desc_t
83 tms570_selftest_par_vim_desc;
84const tms570_selftest_par_desc_t
85 tms570_selftest_par_dma_desc;
86const tms570_selftest_par_desc_t
87 tms570_selftest_par_spi1_desc;
88const tms570_selftest_par_desc_t
89 tms570_selftest_par_spi3_desc;
90const tms570_selftest_par_desc_t
91 tms570_selftest_par_spi5_desc;
92
93extern const tms570_selftest_par_desc_t *const
94tms570_selftest_par_list[];
95
96extern const int tms570_selftest_par_list_size;
97
98void tms570_selftest_par_check_std( const tms570_selftest_par_desc_t *desc );
99
100void tms570_selftest_par_check_can( const tms570_selftest_par_desc_t *desc );
101
102void tms570_selftest_par_check_mibspi( const tms570_selftest_par_desc_t *desc );
103
104void tms570_selftest_par_run(
105 const tms570_selftest_par_desc_t *
106 const *desc_arr,
107 int desc_cnt
108);
109
110#endif /* LIBBSP_ARM_TMS570_SELFTEST_PARITY_H */
tms570_selftest_par_desc
Definition: tms570_selftest_parity.h:41
tms570_selftest_par_desc::esm_prim_grp
unsigned char esm_prim_grp
Definition: tms570_selftest_parity.h:42
tms570_selftest_par_desc::esm_sec_chan
unsigned char esm_sec_chan
Definition: tms570_selftest_parity.h:45
tms570_selftest_par_desc::fail_code
int fail_code
Definition: tms570_selftest_parity.h:46
tms570_selftest_par_desc::ram_loc
volatile uint32_t * ram_loc
Definition: tms570_selftest_parity.h:48
tms570_selftest_par_desc::par_cr_reg
volatile uint32_t * par_cr_reg
Definition: tms570_selftest_parity.h:53
tms570_selftest_par_desc::par_xor
uint32_t par_xor
Definition: tms570_selftest_parity.h:51
tms570_selftest_par_desc::par_cr_test
uint32_t par_cr_test
Definition: tms570_selftest_parity.h:54
tms570_selftest_par_desc::par_st_clear
uint32_t par_st_clear
Definition: tms570_selftest_parity.h:56
tms570_selftest_par_desc::fnc_data
volatile void * fnc_data
Definition: tms570_selftest_parity.h:60
tms570_selftest_par_desc::esm_sec_grp
unsigned char esm_sec_grp
Definition: tms570_selftest_parity.h:44
tms570_selftest_par_desc::par_st_reg
volatile uint32_t * par_st_reg
Definition: tms570_selftest_parity.h:55
tms570_selftest_par_desc::esm_prim_chan
unsigned char esm_prim_chan
Definition: tms570_selftest_parity.h:43
tms570_selftest_par_desc::par_loc
volatile uint32_t * par_loc
Definition: tms570_selftest_parity.h:49
tms570_selftest_par_desc::partest_fnc
tms570_selftest_par_fnc_t * partest_fnc
Definition: tms570_selftest_parity.h:58
tms570_selftest_par_check_std
void tms570_selftest_par_check_std(const tms570_selftest_par_desc_t *desc)
run test to check that parity protection works for modules with common setup structure.
Definition: tms570_selftest_par_std.c:42
tms570_selftest_par_run
void tms570_selftest_par_run(const tms570_selftest_par_desc_t *const *desc_arr, int desc_cnt)
run parity protection mechanism check for set of modules described by list.
Definition: tms570_selftest_parity.c:303
tms570_selftest_par_check_can
void tms570_selftest_par_check_can(const tms570_selftest_par_desc_t *desc)
run test to check that parity protection works for CAN modules RAM
Definition: tms570_selftest_par_can.c:40
tms570_selftest_par_check_mibspi
void tms570_selftest_par_check_mibspi(const tms570_selftest_par_desc_t *desc)
run test to check that parity protection works for MibSPI modules RAM
Definition: tms570_selftest_par_mibspi.c:40