Document API IEC60730 Library
sl_iec60730.h
Go to the documentation of this file.
1 /***************************************************************************/
18 #ifndef SL_IEC60730_H
19 #define SL_IEC60730_H
20 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif /* __cplusplus */
24 
25 #include "sl_iec60730_config.h"
26 #include "sl_iec60730_toolchain.h"
27 #include "em_device.h"
28 #include "em_core.h"
29 #include "em_gpcrc.h"
30 #include SL_IEC60730_BOARD_HEADER
31 
32 #define IE60730_LIBRARY_VERSION { 2, 0, 0 }
33 
34 #ifdef DOXYGEN
35 #define SL_IEC60730_BOARD_HEADER
42 
43 #else
44 #define IEC60370_CM4 0
45 #define IEC60370_CM33 1
46 #if defined(__CM4_REV)
47 #define IEC60370_CPU IEC60370_CM4
48 #elif defined(__CM33_REV)
49 #define IEC60370_CPU IEC60370_CM33
50 #else
51 #error "Unknown Core type!"
52 #endif
53 
54 #endif /* DOXYGEN */
55 
56 /**************************************************************************/
62 typedef struct {
63  uint8_t major;
64  uint8_t minor;
65  uint8_t revision;
67 
70 
72 typedef enum {
77 
79 typedef enum {
109 
112 #ifndef UNUSED_VAR
113 #define UNUSED_VAR(x) (void) (x)
114 #endif /* UNUSED_VAR */
115 
117 #ifndef __CONCAT
118 #define __CONCAT(x, y) x##y
119 #endif
120 
121 #define CONCAT(x, y) __CONCAT(x, y)
122 
124 #define STR(x) #x
125 #define XSTR(x) STR(x)
126 
129 #ifndef LABEL_DEF
130 #define LABEL_DEF(NAME) LB_ASM volatile(LB_XSTR(NAME))
131 #endif /* LABEL_DEF */
132 
133 #ifdef DOXYGEN
134 #define __no_init
137 #else // !DOXYGEN
138 #ifndef __no_init
139 #define __no_init
140 #endif /* __no_init */
141 #endif // DOXYGEN
142 
145 #define DEC_CLASSB_VARS(vartype, name) \
146  __no_init vartype name __CLASSB_RAM; \
147  __no_init vartype CONCAT(name, _inv) __CLASSB_RAM
148 
151 #define EXTERN_DEC_CLASSB_VARS(vartype, name) \
152  extern __no_init vartype name __CLASSB_RAM; \
153  extern __no_init vartype CONCAT(name, _inv) __CLASSB_RAM
154 
157 #define sl_static_dec_classb_vars(vartype, name) \
158  static __no_init vartype name __CLASSB_RAM; \
159  static __no_init vartype CONCAT(name, _inv) __CLASSB_RAM
160 
163 #define INV_CLASSB_VAR(vartype, name) \
164  CONCAT(name, _inv) = (vartype) (~(vartype) name)
165 
168 #define INV_CLASSB_PVAR(vartype, name) \
169  CONCAT(name, _inv) = (vartype *) (~(vartype) name)
170 
171 #if ((defined UNIT_TEST_IEC60730_VARIABLE_MEMORY_ENABLE) || defined (UNIT_TEST_IEC60730_INVARIABLE_MEMORY_ENABLE))
172 #define CHECK_INTEGRITY(vartype, x) unit_test_mock_check_integrity()
173 #else
174 #define CHECK_INTEGRITY(vartype, x) \
177  ((vartype) - 1 == ((vartype) x ^ (vartype) CONCAT(x, _inv)))
178 #endif // (UNIT_TEST_IEC60730_VARIABLE_MEMORY_ENABLE || UNIT_TEST_IEC60730_INVARIABLE_MEMORY_ENABLE)
179 
182 /**************************************************************************/
187 #ifdef DOXYGEN
188 #define sl_iec60730_crc_t
192 
196 #define SL_IEC60730_INVAR_BLOCKS_PER_BIST
197 
198 #else // !DOXYGEN
199 
200 #if (SL_IEC60730_USE_CRC_32_ENABLE == 1)
201 typedef uint32_t sl_iec60730_crc_t;
203 #else /* !SL_IEC60730_USE_CRC_32_ENABLE */
204 typedef uint16_t sl_iec60730_crc_t;
206 #endif /* SL_IEC60730_USE_CRC_32_ENABLE */
207 
208 #endif // DOXYGEN
209 
214 
217 #define SL_IEC60730_ROM_SIZE ((uint32_t) SL_IEC60730_ROM_END - (uint32_t) SL_IEC60730_ROM_START)
218 
221 #define STEPS_NUMBER ((uint32_t) SL_IEC60730_ROM_SIZE / SL_IEC60730_FLASH_BLOCK)
222 
225 #define SL_IEC60730_ROM_SIZE_INWORDS ((uint32_t) SL_IEC60730_ROM_SIZE / 4U)
226 
229 #define SL_IEC60730_FLASH_BLOCK_WORDS ((uint32_t) (SL_IEC60730_ROM_SIZE_INWORDS / STEPS_NUMBER))
230 
234 #define SL_IEC60730_ROM_SIZE_TEST(start, end) \
235  ((uint32_t) end - (uint32_t) start)
236 
239 #define STEPS_NUMBER_TEST(start, end) \
240  ((uint32_t) SL_IEC60730_ROM_SIZE_TEST(start, end) / SL_IEC60730_FLASH_BLOCK)
241 
244 #define SL_IEC60730_ROM_SIZE_INWORDS_TEST(start, end) ((uint32_t) SL_IEC60730_ROM_SIZE_TEST(start, end) / 4U)
245 
248 #define SL_IEC60730_FLASH_BLOCK_WORDS_TEST(start, end) ((uint32_t) (SL_IEC60730_ROM_SIZE_INWORDS_TEST(start, end) / STEPS_NUMBER_TEST(start, end)))
249 
253 #ifndef SL_IEC60730_REF_CRC
254 #define SL_IEC60730_REF_CRC (check_sum)
255 #endif
256 
259 /**************************************************************************/
264 #define BLOCKSIZE (4)
267 
272 #define RT_BLOCK_OVERLAP (1)
273 
276 #define RT_BLOCKSIZE (BLOCKSIZE + (RT_BLOCK_OVERLAP << 1))
277 
283 #ifndef BACKGROUND
284 #define BACKGROUND ((uint32_t) 0x00000000uL)
285 #endif
286 
289 /**************************************************************************/
301 /**************************************************************************/
317 /**************************************************************************/
322 extern uint16_t sl_iec60730_program_counter_check;
330 
332 #define IEC60730_VMC_COMPLETE (1 << 0)
333 #define IEC60730_IMC_COMPLETE (1 << 1)
335 #define IEC60730_CPU_CLOCKS_COMPLETE (1 << 2)
337 #define IEC60730_CPU_REGS_COMPLETE (1 << 3)
339 #define IEC60730_INTERRUPT_COMPLETE (1 << 4)
341 #define IEC60730_GPIO_COMPLETE (1 << 5)
343 #define IEC60730_ANALOG_COMPLETE (1 << 6)
345 #define IEC60730_COMMS_COMPLETE (1 << 7)
347 #define IEC60730_OEM0_COMPLETE (1 << 8)
349 #define IEC60730_OEM1_COMPLETE (1 << 9)
351 #define IEC60730_OEM2_COMPLETE (1 << 10)
353 #define IEC60730_OEM3_COMPLETE (1 << 11)
355 #define IEC60730_OEM4_COMPLETE (1 << 12)
357 #define IEC60730_OEM5_COMPLETE (1 << 13)
359 #define IEC60730_OEM6_COMPLETE (1 << 14)
361 #define IEC60730_OEM7_COMPLETE (1 << 15)
363 #define IEC60730_ALL_COMPLETE_BITS \
365  (IEC60730_VMC_COMPLETE | IEC60730_IMC_COMPLETE \
366  | IEC60730_CPU_CLOCKS_COMPLETE | IEC60730_CPU_REGS_COMPLETE \
367  | IEC60730_INTERRUPT_COMPLETE | IEC60730_GPIO_COMPLETE \
368  | IEC60730_ANALOG_COMPLETE | IEC60730_COMMS_COMPLETE \
369  | IEC60730_OEM0_COMPLETE | IEC60730_OEM1_COMPLETE | IEC60730_OEM2_COMPLETE \
370  | IEC60730_OEM3_COMPLETE | IEC60730_OEM4_COMPLETE | IEC60730_OEM5_COMPLETE \
371  | IEC60730_OEM6_COMPLETE | IEC60730_OEM7_COMPLETE)
372 
375 /**************************************************************************/
386 /**************************************************************************/
394 void sl_iec60730_post(void);
397 /**************************************************************************/
420 typedef struct {
426  uint32_t error;
427  uint8_t number_error;
429 
430 /**************************************************************************/
441 
442 /**************************************************************************/
451 
452 /**************************************************************************/
462 
463 /**************************************************************************/
475 void sl_iec60730_bist(void);
478 /**************************************************************************/
483 /**************************************************************************/
493 
496 /**************************************************************************/
501 typedef enum {
506 
529 
530 /**************************************************************************/
541 
542 /**************************************************************************/
552 void sl_iec60730_test_clock_tick(void);
553 
554 /**************************************************************************/
565 
568 /**************************************************************************/
573 #define IEC60730_MAX_IRQ_CHECK 32
577 
580 typedef struct {
582  min;
584  max;
586 
589 // registered to check.
590 typedef struct {
591  uint32_t irq_fail;
592  uint8_t num_irq_fail;
594 
611 typedef struct {
612  volatile SL_IEC60730_IRQ_TYPE_VARIABLE* irq_count;
613  const sl_iec60730_irq_execution_bounds_t* irq_bounds;
614  uint8_t size;
618 /**************************************************************************/
623 #define SL_IEC60370_ENTER_ATOMIC() CORE_ENTER_ATOMIC()
625 #define SL_IEC60370_EXIT_ATOMIC() CORE_EXIT_ATOMIC()
627 #define SL_IEC60370_DECLARE_IRQ_STATE CORE_DECLARE_IRQ_STATE;
629 
631 #define SL_IEC60730_IMC_POST_ENTER_ATOMIC() \
632  CORE_DECLARE_IRQ_STATE; \
633  CORE_ENTER_ATOMIC()
634 
636 #define SL_IEC60730_IMC_POST_EXIT_ATOMIC() CORE_EXIT_ATOMIC()
637 
639 #define SL_IEC60730_IMC_BIST_ENTER_ATOMIC() \
640  CORE_DECLARE_IRQ_STATE; \
641  CORE_ENTER_ATOMIC()
642 
644 #define SL_IEC60730_IMC_BIST_EXIT_ATOMIC() CORE_EXIT_ATOMIC()
645 
647 #define SL_IEC60730_CRC_INIT(crc, init) GPCRC_Init(crc, init)
648 #define SL_IEC60730_CRC_RESET(crc) GPCRC_Reset(crc)
650 #define SL_IEC60730_CRC_START(crc) GPCRC_Start(crc)
652 #define SL_IEC60730_CRC_INPUTU32(crc, d) GPCRC_InputU32(crc, d)
654 #define SL_IEC60730_CRC_INPUTU16(crc, d) GPCRC_InputU16(crc, d)
656 #define SL_IEC60730_CRC_INPUTU8(crc, d) GPCRC_InputU8(crc, d)
658 #define SL_IEC60730_CRC_DATA_READ(crc) GPCRC_DataRead(crc)
660 #define SL_IEC60730_CRC_DATA_READ_BIT_REVERSED(crc) GPCRC_DataReadBitReversed(crc)
662 #define SL_IEC60730_CRC_DATA_READ_BYTE_REVERSED(crc) GPCRC_DataReadByteReversed(crc)
664 
665 // CRC
667 typedef GPCRC_TypeDef sl_iec60730_crc_typedef;
669 typedef GPCRC_Init_TypeDef sl_iec60730_crc_init_typedef;
670 
672 typedef uint8_t sl_iec60730_read_type_t;
674 enum {
677  1,
679  2,
680 };
681 
683 typedef struct {
686 
690 typedef struct {
691 #if (SL_IEC60730_CRC_USE_SW_ENABLE == 0)
695 #endif /* SL_IEC60730_CRC_USE_SW_ENABLE */
698 
700 typedef struct {
701  uint32_t *start;
702  uint32_t *end;
704 
708 typedef struct {
709  const sl_iec60730_imc_test_region_t *region;
712 
713 #ifdef DOXYGEN
714 #define SL_IEC60730_DEFAULT_GPRC
718 #else
719 #ifndef SL_IEC60730_DEFAULT_GPRC
720 #if (_SILICON_LABS_32B_SERIES == 2)
721 #if ((defined SL_IEC60730_NON_SECURE_ENABLE) || (!defined(SL_TRUSTZONE_SECURE)))
722 #define SL_IEC60730_DEFAULT_GPRC GPCRC_NS
724 #else
725 #define SL_IEC60730_DEFAULT_GPRC GPCRC
727 #endif
728 #else // (_SILICON_LABS_32B_SERIES == 2)
729 #define SL_IEC60730_DEFAULT_GPRC GPCRC
731 #endif // (_SILICON_LABS_32B_SERIES == 2)
732 #endif // !SL_IEC60730_DEFAULT_GPRC
733 #endif // DOXYGEN
734 
737 #define SL_IEC60730_IMC_CRC_BUFFER_SAMPLE_TEST "123456789"
738 
739 #ifdef DOXYGEN
740 #define SL_IEC60730_IMC_CRC_BUFFER_INIT_VALUE
745 
750 #define SL_IEC60730_IMC_CRC_BUFFER_XOR_OUTPUT
751 
756 #define SL_IEC60730_IMC_CRC_BUFFER_SAMPLE_RESULT
757 
760 #define SL_IEC60730_IMC_CRC_BUFFER_UPDATE_DEFAULT
761 
762 #else
763 
764 #if (SL_IEC60730_CRC_USE_SW_ENABLE == 1)
765 #if (SL_IEC60730_USE_CRC_32_ENABLE == 1)
766 #define SL_IEC60730_IMC_CRC_BUFFER_INIT_VALUE SL_IEC60730_IMC_INIT_VALUE
767 #define SL_IEC60730_IMC_CRC_BUFFER_XOR_OUTPUT (0xFFFFFFFFuL)
768 #define SL_IEC60730_IMC_CRC_BUFFER_SAMPLE_RESULT (0xCBF43926)
769 #define SL_IEC60730_IMC_CRC_BUFFER_UPDATE_DEFAULT { SL_IEC60730_IMC_CRC_BUFFER_XOR_OUTPUT }
770 #else /* !SL_IEC60730_USE_CRC_32_ENABLE */
771 #define SL_IEC60730_IMC_CRC_BUFFER_INIT_VALUE SL_IEC60730_IMC_INIT_VALUE
772 #define SL_IEC60730_IMC_CRC_BUFFER_XOR_OUTPUT (0x0000)
773 #define SL_IEC60730_IMC_CRC_BUFFER_SAMPLE_RESULT (0x31C3)
774 #define SL_IEC60730_IMC_CRC_BUFFER_UPDATE_DEFAULT { SL_IEC60730_IMC_CRC_BUFFER_XOR_OUTPUT }
775 #endif /* SL_IEC60730_USE_CRC_32_ENABLE */
776 #else /* !SL_IEC60730_CRC_USE_SW_ENABLE */
777 #if (SL_IEC60730_USE_CRC_32_ENABLE == 1)
778 #define SL_IEC60730_IMC_CRC_BUFFER_INIT_VALUE SL_IEC60730_IMC_INIT_VALUE
779 #define SL_IEC60730_IMC_CRC_BUFFER_XOR_OUTPUT (0xFFFFFFFFuL)
780 #define SL_IEC60730_IMC_CRC_BUFFER_SAMPLE_RESULT (0xCBF43926)
781 #define SL_IEC60730_IMC_CRC_BUFFER_INIT_DEFAULT \
782  { \
783  0x04C11DB7UL, \
784  SL_IEC60730_IMC_CRC_BUFFER_INIT_VALUE, \
785  false, \
786  false, \
787  false, \
788  false, \
789  true, \
790  }
791 
792 #define SL_IEC60730_IMC_CRC_BUFFER_UPDATE_DEFAULT \
793  { { SL_IEC60730_DEFAULT_GPRC }, \
794  SL_IEC60730_IMC_CRC_BUFFER_INIT_DEFAULT, \
795  SL_IEC60730_IMC_DATA_READ, \
796  SL_IEC60730_IMC_CRC_BUFFER_XOR_OUTPUT }
797 #else /* !SL_IEC60730_USE_CRC_32_ENABLE */
798 #define SL_IEC60730_IMC_CRC_BUFFER_INIT_VALUE SL_IEC60730_IMC_INIT_VALUE
799 #define SL_IEC60730_IMC_CRC_BUFFER_XOR_OUTPUT (0x0000)
800 #define SL_IEC60730_IMC_CRC_BUFFER_SAMPLE_RESULT (0x31C3)
801 #define SL_IEC60730_IMC_CRC_BUFFER_INIT_DEFAULT \
802  { \
803  0x1021UL, \
804  SL_IEC60730_IMC_CRC_BUFFER_INIT_VALUE, \
805  false, \
806  true, \
807  false, \
808  false, \
809  true, \
810  }
811 #define SL_IEC60730_IMC_CRC_BUFFER_UPDATE_DEFAULT \
812  { { SL_IEC60730_DEFAULT_GPRC }, \
813  SL_IEC60730_IMC_CRC_BUFFER_INIT_DEFAULT, \
814  SL_IEC60730_IMC_DATA_READ_BIT_REVERSED, \
815  SL_IEC60730_IMC_CRC_BUFFER_XOR_OUTPUT }
816 #endif /* SL_IEC60730_USE_CRC_32_ENABLE */
817 #endif /* SL_IEC60730_CRC_USE_SW_ENABLE */
818 
819 #endif // DOXYGEN
820 
821 /**************************************************************************/
833 
834 /**************************************************************************/
853  sl_iec60730_crc_t *crc,
854  uint8_t *buffer,
855  uint32_t size);
856 
859 /**************************************************************************/
864 #define SL_IEC60730_VMC_POST_ENTER_CRITICAL() \
866  CORE_DECLARE_IRQ_STATE; \
867  CORE_ENTER_CRITICAL()
868 
870 #define SL_IEC60730_VMC_POST_EXIT_CRITICAL() CORE_EXIT_CRITICAL()
871 
873 #define SL_IEC60730_VMC_BIST_ENTER_CRITICAL() \
874  CORE_DECLARE_IRQ_STATE; \
875  CORE_ENTER_CRITICAL()
876 
878 #define SL_IEC60730_VMC_BIST_EXIT_CRITICAL() CORE_EXIT_CRITICAL()
879 
881 typedef struct {
882  uint32_t *start;
883  uint32_t *end;
885 
887 typedef struct {
888  const sl_iec60730_vmc_test_region_t *region;
891 
892 /**************************************************************************/
903 
906 #if (_SILICON_LABS_32B_SERIES == 2)
907 // Write to backup ram module
908 // buram_inst: Pointer to BURAM instance
909 // idx: BURAM Reg index
910 // val: write value
911 #define SL_IEC60730_BURAM_WRITE(buram_inst, idx, val) \
912  do { \
913  buram_inst->RET[idx].REG = val; \
914  } while (0)
915 
916 // Read from backup ram module
917 // buram_inst: Pointer to BURAM instance
918 // idx: BURAM Reg index
919 #define SL_IEC60730_BURAM_READ(buram_inst, idx) (buram_inst->RET[idx].REG)
920 #endif
921 
924 #ifdef __cplusplus
925 }
926 #endif /* __cplusplus */
927 
928 #endif /* SL_IEC60730_H */
SL_IEC60730_NO_FAILURE
@ SL_IEC60730_NO_FAILURE
No failure detected.
Definition: sl_iec60730.h:80
SL_IEC60730_OEM_FAIL_2
@ SL_IEC60730_OEM_FAIL_2
OEM defined failure.
Definition: sl_iec60730.h:104
sl_iec60730_imc_params_t::gpcrc
sl_iec60730_crc_typedef * gpcrc
GPCRC Register.
Definition: sl_iec60730.h:684
SL_IEC60730_INTERRUPT_FAIL
@ SL_IEC60730_INTERRUPT_FAIL
Interrupt Plausibility Check detected a failure.
Definition: sl_iec60730.h:87
sl_iec60730_test_failure_t
sl_iec60730_test_failure_t
Cause of failure passed to Safe State function.
Definition: sl_iec60730.h:79
sl_iec60730_restart_watchdogs
void sl_iec60730_restart_watchdogs(void)
sl_iec60730_update_crc_params_t::readType
sl_iec60730_read_type_t readType
The way to read calculated CRC value.
Definition: sl_iec60730.h:694
check_sum
sl_iec60730_crc_t check_sum
sl_iec60730_imc_test_multiple_regions_t
Definition: sl_iec60730.h:708
sl_iec60730_imc_test_region_t
This structure is used as configuration for IMC testing. The variable contains information about the ...
Definition: sl_iec60730.h:700
SL_IEC60730_USART3_FAIL
@ SL_IEC60730_USART3_FAIL
USART3 comms channel detected a failure.
Definition: sl_iec60730.h:99
sl_iec60730_program_counter_check
uint16_t sl_iec60730_program_counter_check
SL_IEC60730_RADIO_FAIL
@ SL_IEC60730_RADIO_FAIL
Radio comms detected a failure.
Definition: sl_iec60730.h:93
sl_iec60730_irq_execution_bounds_t::max
SL_IEC60730_IRQ_TYPE_VARIABLE max
Maximum executed executions of ISR. Can be 0-255, must be greater than or equal to min.
Definition: sl_iec60730.h:584
SL_IEC60730_EUART0_FAIL
@ SL_IEC60730_EUART0_FAIL
EUART comms channel detected a failure.
Definition: sl_iec60730.h:101
sl_iec60730_update_crc_params_t::init
sl_iec60730_crc_init_typedef init
CRC initialization structure.
Definition: sl_iec60730.h:693
sl_iec60730_safety_check_t
Definition: sl_iec60730.h:425
SL_IEC60730_LESENSE0_FAIL
@ SL_IEC60730_LESENSE0_FAIL
LESENSE0 detected a failure.
Definition: sl_iec60730.h:92
sl_iec60730_timer_test_control_t
sl_iec60730_timer_test_control_t
Enable/disable switch for system timer test.
Definition: sl_iec60730.h:502
sl_iec60730_library_version_t::minor
uint8_t minor
Minor version.
Definition: sl_iec60730.h:64
SL_IEC60730_TIMER_TEST_ENABLE
@ SL_IEC60730_TIMER_TEST_ENABLE
timer tests will execute
Definition: sl_iec60730.h:504
SL_IEC60730_OEM_FAIL_3
@ SL_IEC60730_OEM_FAIL_3
OEM defined failure.
Definition: sl_iec60730.h:105
SL_IEC60730_CS0_FAIL
@ SL_IEC60730_CS0_FAIL
CSEN0 detected a failureLESENSE.
Definition: sl_iec60730.h:91
SL_IEC60730_CLOCK_FAIL
@ SL_IEC60730_CLOCK_FAIL
System Clock Check detected a failure.
Definition: sl_iec60730.h:86
SL_IEC60730_USART0_FAIL
@ SL_IEC60730_USART0_FAIL
USART0 comms channel detected a failure.
Definition: sl_iec60730.h:96
sl_iec60730_crc_init_typedef
GPCRC_Init_TypeDef sl_iec60730_crc_init_typedef
CRC initialization structure.
Definition: sl_iec60730.h:669
sl_iec60730_imc_test_multiple_regions_t::number_of_test_regions
uint8_t number_of_test_regions
Number of test regions.
Definition: sl_iec60730.h:710
sl_iec60730_safety_check_get_error
sl_iec60730_safety_check_t * sl_iec60730_safety_check_get_error(void)
sl_iec60730_vmc_test_multiple_regions_t
This structure is used as multiple test regions for VMC testing.
Definition: sl_iec60730.h:887
SL_IEC60730_TEST_IN_PROGRESS
@ SL_IEC60730_TEST_IN_PROGRESS
test is still in progress
Definition: sl_iec60730.h:75
sl_iec60730_sys_clock_count_reset
void sl_iec60730_sys_clock_count_reset(void)
sl_iec60730_update_crc_params_t
Definition: sl_iec60730.h:690
sl_iec60730_crc_typedef
GPCRC_TypeDef sl_iec60730_crc_typedef
the General Purpose Cyclic Redundancy Check (GPCRC) module
Definition: sl_iec60730.h:667
sl_iec60730_library_version_t
Definition: sl_iec60730.h:62
sl_iec60730_vmc_init
void sl_iec60730_vmc_init(sl_iec60730_vmc_test_multiple_regions_t *test_config)
sl_iec60730_read_type_t
uint8_t sl_iec60730_read_type_t
The way to read CRC value when using function sl_iec60730_update_crc_with_data_buffer.
Definition: sl_iec60730.h:672
sl_iec60730_vmc_test_region_t::start
uint32_t * start
Start address of RAM to check.
Definition: sl_iec60730.h:882
sl_iec60730_vmc_test_region_t::end
uint32_t * end
End address of RAM to check.
Definition: sl_iec60730.h:883
SL_IEC60730_PDM0_FAIL
@ SL_IEC60730_PDM0_FAIL
PDM comms channel detected a failure.
Definition: sl_iec60730.h:102
sl_iec60730_crc_t
#define sl_iec60730_crc_t
Definition: sl_iec60730.h:191
sl_iec60730_library_version_t::major
uint8_t major
Major version.
Definition: sl_iec60730.h:63
SL_IEC60730_I2C1_FAIL
@ SL_IEC60730_I2C1_FAIL
I2C1 comms channel detected a failure.
Definition: sl_iec60730.h:95
sl_iec60730_test_clock_tick
void sl_iec60730_test_clock_tick(void)
SL_IEC60730_IMC_DATA_READ
@ SL_IEC60730_IMC_DATA_READ
use function GPCRC_DataRead to read CRC
Definition: sl_iec60730.h:675
sl_iec60730_irq_execution_bounds_t
Definition: sl_iec60730.h:580
sl_iec60730_sys_clock_count_tick
void sl_iec60730_sys_clock_count_tick(void)
SL_IEC60730_WATCHDOG_POST_FAIL
@ SL_IEC60730_WATCHDOG_POST_FAIL
Watchdog POST test failed.
Definition: sl_iec60730.h:82
sl_iec60730_library_version_t::revision
uint8_t revision
Revision.
Definition: sl_iec60730.h:65
SL_IEC60730_USART1_FAIL
@ SL_IEC60730_USART1_FAIL
USART1 comms channel detected a failure.
Definition: sl_iec60730.h:97
sl_iec60730_bist
void sl_iec60730_bist(void)
SL_IEC60730_VMC_FAIL
@ SL_IEC60730_VMC_FAIL
Variable Memory Check detected a failure.
Definition: sl_iec60730.h:83
SL_IEC60730_OEM_FAIL_1
@ SL_IEC60730_OEM_FAIL_1
OEM defined failure.
Definition: sl_iec60730.h:103
SL_IEC60730_IMC_DATA_READ_BIT_REVERSED
@ SL_IEC60730_IMC_DATA_READ_BIT_REVERSED
use function GPCRC_DataReadBitReversed to read CRC
Definition: sl_iec60730.h:676
SL_IEC60730_TEST_VERIFY
@ SL_IEC60730_TEST_VERIFY
Special case used for automated verification testing.
Definition: sl_iec60730.h:81
sl_iec60730_irq_execution_bounds_t::min
SL_IEC60730_IRQ_TYPE_VARIABLE min
Minimum expected executions of ISR. Can be 0-255, must be less than or equal to max.
Definition: sl_iec60730.h:582
SL_IEC60730_IRQ_TYPE_VARIABLE
#define SL_IEC60730_IRQ_TYPE_VARIABLE
Data type for iec60730_IRQExecCount variables.
Definition: sl_iec60730_config.h:38
SL_IEC60730_TIMER_TEST_DISABLE
@ SL_IEC60730_TIMER_TEST_DISABLE
timer tests will not execute
Definition: sl_iec60730.h:503
SL_IEC60730_TEST_FAILED
@ SL_IEC60730_TEST_FAILED
test result failed
Definition: sl_iec60730.h:73
sl_iec60730_vmc_test_region_t
This structure is used as configuration for VMC testing.
Definition: sl_iec60730.h:881
sl_iec60730_irq_fail_t
Definition: sl_iec60730.h:590
sl_iec60730_irq_cfg_t
Definition: sl_iec60730.h:611
sl_iec60730_post
void sl_iec60730_post(void)
sl_iec60730_vmc_test_multiple_regions_t::number_of_test_regions
uint8_t number_of_test_regions
Number of test regions.
Definition: sl_iec60730.h:889
sl_iec60730_test_result_t
sl_iec60730_test_result_t
The result of a test.
Definition: sl_iec60730.h:72
SL_IEC60730_OEM_FAIL_4
@ SL_IEC60730_OEM_FAIL_4
OEM defined failure.
Definition: sl_iec60730.h:106
sl_iec60730_safety_check_error_occur
void sl_iec60730_safety_check_error_occur(sl_iec60730_test_failure_t failure)
SL_IEC60730_IMC_FAIL
@ SL_IEC60730_IMC_FAIL
Invariable Memory Check detected a failure.
Definition: sl_iec60730.h:84
SL_IEC60730_CPU_REGISTERS_FAIL
@ SL_IEC60730_CPU_REGISTERS_FAIL
CPU Registers Check detected a failure.
Definition: sl_iec60730.h:85
sl_iec60730_update_crc_params_t::hal
sl_iec60730_imc_params_t hal
struct sl_iec60730_imc_params_t that contain GPCRC Register
Definition: sl_iec60730.h:692
sl_iec60730_update_crc_params_t::xorOut
sl_iec60730_crc_t xorOut
XOR with calculated CRC value.
Definition: sl_iec60730.h:696
SL_IEC60730_LIBRARY_VERSION
const sl_iec60730_library_version_t SL_IEC60730_LIBRARY_VERSION
Global variable which holds the IEC60370 library version.
SL_IEC60730_LEUART0_FAIL
@ SL_IEC60730_LEUART0_FAIL
LEUART comms channel detected a failure.
Definition: sl_iec60730.h:100
sl_iec60730_safe_state
void sl_iec60730_safe_state(sl_iec60730_test_failure_t failure)
SL_IEC60730_TEST_PASSED
@ SL_IEC60730_TEST_PASSED
test result passed
Definition: sl_iec60730.h:74
SL_IEC60730_GPIO_FAIL
@ SL_IEC60730_GPIO_FAIL
GPIO Plausibility Check detected a failure.
Definition: sl_iec60730.h:89
sl_iec60730_imc_test_region_t::start
uint32_t * start
Start address of FLASH to check.
Definition: sl_iec60730.h:701
SL_IEC60730_SAFETY_CHECK_FAIL
@ SL_IEC60730_SAFETY_CHECK_FAIL
iec60730_safety_check detected some failure
Definition: sl_iec60730.h:107
SL_IEC60730_IMC_DATA_READ_BYTE_REVERSED
@ SL_IEC60730_IMC_DATA_READ_BYTE_REVERSED
use function GPCRC_DataReadByteReversed to read CRC
Definition: sl_iec60730.h:678
sl_iec60730_imc_test_region_t::end
uint32_t * end
End address of FLASH to check.
Definition: sl_iec60730.h:702
sl_iec60730_toolchain.h
Compiler abstraction.
sl_iec60730_imc_params_t
This structure is used as configuration for IMC testing, that holds GPCRC Register.
Definition: sl_iec60730.h:683
sl_iec60730_imc_init
void sl_iec60730_imc_init(sl_iec60730_imc_params_t *params, sl_iec60730_imc_test_multiple_regions_t *test_config)
sl_iec60730_update_crc_with_data_buffer
sl_iec60730_test_result_t sl_iec60730_update_crc_with_data_buffer(sl_iec60730_update_crc_params_t *params, sl_iec60730_crc_t *crc, uint8_t *buffer, uint32_t size)
SL_IEC60730_ANALOG_FAIL
@ SL_IEC60730_ANALOG_FAIL
Analog Plausibility Check detected a failure.
Definition: sl_iec60730.h:90
SL_IEC60730_USART2_FAIL
@ SL_IEC60730_USART2_FAIL
USART2 comms channel detected a failure.
Definition: sl_iec60730.h:98
sl_iec60730_config.h
Library definitions.
SL_IEC60730_PROGRAM_COUNTER_FAIL
@ SL_IEC60730_PROGRAM_COUNTER_FAIL
Program Counter Check detected a failure.
Definition: sl_iec60730.h:88
sl_iec60730_safety_check_reset_error
void sl_iec60730_safety_check_reset_error(void)
SL_IEC60730_I2C0_FAIL
@ SL_IEC60730_I2C0_FAIL
I2C0 comms channel detected a failure.
Definition: sl_iec60730.h:94