RTEMS  5.0.0
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 
33 
34 typedef void tms570_selftest_par_fnc_t( const tms570_selftest_par_desc_t *desc );
35 
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 
64 extern const tms570_selftest_par_desc_t
65  tms570_selftest_par_het1_desc;
66 extern const tms570_selftest_par_desc_t
67  tms570_selftest_par_htu1_desc;
68 extern const tms570_selftest_par_desc_t
69  tms570_selftest_par_het2_desc;
70 extern const tms570_selftest_par_desc_t
71  tms570_selftest_par_htu2_desc;
72 extern const tms570_selftest_par_desc_t
73  tms570_selftest_par_adc1_desc;
74 extern const tms570_selftest_par_desc_t
75  tms570_selftest_par_adc2_desc;
76 extern const tms570_selftest_par_desc_t
77  tms570_selftest_par_can1_desc;
78 extern const tms570_selftest_par_desc_t
79  tms570_selftest_par_can2_desc;
80 extern const tms570_selftest_par_desc_t
81  tms570_selftest_par_can3_desc;
82 extern const tms570_selftest_par_desc_t
83  tms570_selftest_par_vim_desc;
85  tms570_selftest_par_dma_desc;
87  tms570_selftest_par_spi1_desc;
89  tms570_selftest_par_spi3_desc;
91  tms570_selftest_par_spi5_desc;
92 
93 extern const tms570_selftest_par_desc_t *const
94 tms570_selftest_par_list[];
95 
96 extern const int tms570_selftest_par_list_size;
97 
99 
101 
103 
106  const *desc_arr,
107  int desc_cnt
108 );
109 
110 #endif /* LIBBSP_ARM_TMS570_SELFTEST_PARITY_H */
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
volatile uint32_t * par_loc
Definition: tms570_selftest_parity.h:49
uint32_t par_xor
Definition: tms570_selftest_parity.h:51
Definition: tms570_selftest_parity.h:41
unsigned char esm_prim_chan
Definition: tms570_selftest_parity.h:43
int fail_code
Definition: tms570_selftest_parity.h:46
unsigned char esm_prim_grp
Definition: tms570_selftest_parity.h:42
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
uint32_t par_cr_test
Definition: tms570_selftest_parity.h:54
tms570_selftest_par_fnc_t * partest_fnc
Definition: tms570_selftest_parity.h:58
uint32_t par_st_clear
Definition: tms570_selftest_parity.h:56
volatile uint32_t * par_st_reg
Definition: tms570_selftest_parity.h:55
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
volatile uint32_t * ram_loc
Definition: tms570_selftest_parity.h:48
unsigned char esm_sec_chan
Definition: tms570_selftest_parity.h:45
volatile void * fnc_data
Definition: tms570_selftest_parity.h:60
volatile uint32_t * par_cr_reg
Definition: tms570_selftest_parity.h:53
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
unsigned char esm_sec_grp
Definition: tms570_selftest_parity.h:44