![]() |
Energy Micro IEC60355 Library Project 1.037 GCC-Version
IEC60355 Library documentation and API
|
The POST collects the main test routines for boot up test. More...
|
Functions | |
| void | IEC60335_ClassB_POST (void) |
| This function runs a colletion of POST tests and will suck in error condition. | |
The POST collects the main test routines for boot up test.
POST is designed to be implemented directly after reset vector.
This collection of POST stage test functions will check the complete system before
any RAM or hardware initialization is done.
| void IEC60335_ClassB_POST | ( | void | ) |
This function runs a colletion of POST tests and will suck in error condition.
This function is intended to use as an additional initialization routine The function will stuck at error condition (DO_NOT_INCLUDE_WITH_DOXYGEN)
Definition at line 47 of file iec60335_class_b_post.c.
References IEC60335_ClassB_CPUregTest_POST(), IEC60335_ClassB_FLASHtest_POST(), IEC60335_ClassB_Force_WDT_Reset(), IEC60335_ClassB_PCTest_POST(), IEC60335_ClassB_RAMtest_POST(), IEC60335_testFailed, IEC60335_testInProgress, IEC60335_testPassed, LoopForever, PCTest_funcTable, and PCTest_resultTable.
{
volatile testResult_t result = IEC60335_testFailed; /* variable is located in the stack */
#if ((TEST_POST_WDOG == 1) || (TESSY))
result = IEC60335_ClassB_Force_WDT_Reset(); /* test WDOG with reset */
if (result == IEC60335_testInProgress)
{
/* enable LED0 */
DVK_SPI(0); /* enable SPI */
DVK_SPI(1); /* enable LED0 */
}
if (result != IEC60335_testPassed)
{
LoopForever(); /* remains until WDOG test passes */
}
/* enable LED0 and LED1 */
DVK_SPI(0); /* enable SPI */
DVK_SPI(2); /* enable LED0,1 */
#endif
#if (TEST_POST_FLASH == 1)
result = IEC60335_testFailed;
result = IEC60335_ClassB_FLASHtest_POST(); /* test FLASH content */
/* TODO : insert correct CRC value to line 80 in iec60355_class_b_flash_test.h */
if (result != IEC60335_testPassed)
{
LoopForever(); /* remains if Flash content is not consistent */
}
#endif
#if (TEST_POST_RAM == 1)
result = IEC60335_testFailed;
result = IEC60335_ClassB_RAMtest_POST(); /* stack is not tested here */
if (result != IEC60335_testPassed)
{
LoopForever(); /* remains if RAM test fails */
}
#endif
#if (TEST_POST_CPUREG == 1)
result = IEC60335_testFailed;
result = IEC60335_ClassB_CPUregTest_POST();
if (result != IEC60335_testPassed)
{
LoopForever(); /* remains if registers test fails */
}
#endif
#if (TEST_POST_PC == 1)
result = IEC60335_testFailed;
result = IEC60335_ClassB_PCTest_POST(PCTest_funcTable, PCTest_resultTable);
if (result != IEC60335_testPassed)
{
LoopForever(); /* remains if PC test fails */
}
#endif
}
