1.5 Class B Library Interface

Constants Summary

NameDescription
CLASSB_RESULT_ADDRAddress of test results.
CLASSB_COMPL_RESULT_ADDRAddress of one's complement test results.
CLASSB_ONGOING_TEST_VAR_ADDRAddress at which the ID of ongoing test is stored.
CLASSB_TEST_IN_PROG_VAR_ADDRAddress of the variable which indicates that a Class B test is in progress.
CLASSB_WDT_TEST_IN_PROG_VAR_ADDRAddress of the variable which indicates that a WDT test is in progress.
CLASSB_FLASH_TEST_VAR_ADDRAddress of the variable which indicates that a flash test is in progress.
CLASSB_INTERRUPT_TEST_VAR_ADDRAddress of the variable which keeps interrupt test internal status.
CLASSB_INTERRUPT_COUNT_VAR_ADDRAddress of the variable which keeps interrupt count.
CLASSB_SRAM_STARTUP_TEST_SIZESize of the SRAM tested during startup.
CLASSB_CLOCK_ERROR_PERCENTClock error percentage selected for startup test.
CLASSB_CLOCK_RTC_CLK_FREQRTC clock frequency.
CLASSB_CLOCK_TEST_RTC_CYCLESDuration of the CPU clock test.
CLASSB_CLOCK_TEST_RTC_RATIO_NSDuration of RTC clock in nano seconds.
CLASSB_CLOCK_TEST_RATIO_NS_MSRatio of mili second to nano second.
CLASSB_CLOCK_DEFAULT_CLOCK_FREQDefault CPU clock speed.
CLASSB_INVALID_TEST_IDInvalid test ID.
CLASSB_CLOCK_MAX_CLOCK_FREQMaximum CPU clock speed.
CLASSB_CLOCK_MAX_SYSTICK_VALUpper limit of SysTick counter.
CLASSB_CLOCK_MAX_TEST_ACCURACYMaximum detectable accuracy for clock self-test.
CLASSB_CLOCK_MUL_FACTORMultiplication factor used in clock test.
CLASSB_FLASH_CRC32_POLYNOMIALCRC-32 polynomial.
CLASSB_SRAM_TEST_BUFFER_SIZEDefines the size of the buffer used for SRAM test.
CLASSB_SRAM_APP_AREA_STARTDefines the start address of the SRAM for the application.
CLASSB_SRAM_FINAL_WORD_ADDRESSFinal word address in the SRAM.
CLASSB_SRAM_BUFF_START_ADDRESSSRAM test buffer start address.
CLASSB_SRAM_TEMP_STACK_ADDRESSAddress of the temporary stack.
CLASSB_SRAM_ALL_32BITS_HIGHDefines name for max 32-bit unsigned value.
CLASSB_INTR_DEVICE_VECT_OFFSETDefines the offset for first device specific interrupt.
CLASSB_INTR_VECTOR_TABLE_SIZEDefines the size of the vector table.
CLASSB_INTR_MAX_INT_COUNTDefines the upper limit for interrupt count.
CLASSB_INTR_TEST_RTC_COUNTDefines the counter value for RTC peripheral.
CLASSB_INTR_TEST_TC_COUNTDefines the counter value for TC0 peripheral.

Data Types Summary

NameDescription
CLASSB_TEST_IDIdentifies Class B library tests.
CLASSB_TEST_STATUSIdentifies result from Class B library test.
CLASSB_TEST_STATEIdentifies Class B library test state.
CLASSB_INIT_STATUSIdentifies Class B initialization status.
CLASSB_STARTUP_STATUSIdentifies startup test status.
CLASSB_TEST_TYPEIdentifies type of the Class B library test.
CLASSB_SST_RESULT_BFPointer to the structure for the Class B library startup self-test result.
CLASSB_RST_RESULT_BFPointer to the structure for the Class B library run-time self-test result.
CLASSB_SRAM_MARCH_ALGOSelects the RAM March algorithm to run.
CLASSB_PORT_INDEXPORT index definitions for Class B library I/O pin test.
CLASSB_PORT_PINPIN definitions for Class B library I/O pin test.
CLASSB_PORT_PIN_STATEPORT pin state.
CLASSB_CPU_PC_TEST_VALUESData type for PC Test input and output values.

Interface Routines Summary

NameDescription
CLASSB_ClearTestResultsClears the results of SSTs or RSTs.
CLASSB_GetTestResultReturns the result of the specified self-test.
CLASSB_TestWDTThis function tests the WatchDog Timer (WDT).
CLASSB_GlobalsInitThis function initializes the global variables for the classb library.
CLASSB_InitThis function is executed on every device reset. This shall be called right after the reset, before any other initialization is performed.
CLASSB_Startup_TestsThis function executes all startup self-tests inserted into classb.c file.
CLASSB_SST_WDT_RecoveryThis function is called if a WDT reset has happened during the execution of an SST.
CLASSB_App_WDT_RecoveryThis function is called if a WDT reset has happened during run-time.
CLASSB_SelfTest_FailSafeThis function is called if any of the non-critical tests detects a failure.
CLASSB_CPU_RegistersTestThis self-test checks the processor core registers.
CLASSB_FPU_RegistersTestThis self-test checks the FPU registers.
CLASSB_CPU_PCTestThis self-test checks the Program Counter register (PC).
CLASSB_FlashCRCGenerateGenerates CRC-32 checksum for a given memory area.
CLASSB_FlashCRCTestThis self-test checks the internal Flash program memory to detect single bit faults.
CLASSB_SRAM_MarchTestInitThis self-test checks the SRAM with the help of RAM March algorithm.
CLASSB_ClockTestThis self-test checks whether the CPU clock frequency is within the permissible limit.
CLASSB_SST_InterruptTestThis self-test checks basic functionality of the interrupt handling mechanism.
CLASSB_RST_IOTestThis self-test can be used to perform plausibility checks on IO pins.
CLASSB_IO_InputSamplingEnableEnable input sampling for an IO pin.