![]() |
Energy Micro IEC60355 Library Project 1.037 GCC-Version
IEC60355 Library documentation and API
|
The program counter test checks the functionality of the CPUs PC. More...
|
Functions | |
| testResult_t | IEC60335_ClassB_PCTest_POST (const Exec_t *fTable, const IEC60335_B_PCTest_ReturnValues *rTable) |
| public function referenced by POST test | |
| testResult_t | IEC60335_ClassB_PCTest_BIST (void) |
| BIST test of PC. | |
| IEC60335_B_PCTest_ReturnValues | IEC60335_B_PCTest_A (Data_t *data) |
| private function referenced by POST and BIST tests | |
| IEC60335_B_PCTest_ReturnValues | IEC60335_B_PCTest_B (Data_t *data) |
| private function referenced by POST and BIST tests | |
| IEC60335_B_PCTest_ReturnValues | IEC60335_B_PCTest_C (Data_t *data) |
| private function referenced by POST and BIST tests | |
| IEC60335_B_PCTest_ReturnValues | IEC60335_B_PCTest_D (Data_t *data) |
| private function referenced by POST and BIST tests | |
| IEC60335_B_PCTest_ReturnValues | IEC60335_B_PCTest_E (Data_t *data) |
| private function referenced by POST and BIST tests | |
| IEC60335_B_PCTest_ReturnValues | IEC60335_B_PCTest_F (Data_t *data) |
| private function referenced by POST and BIST tests | |
Variables | |
| const Exec_t | PCTest_funcTable [6] |
| function table to the PC test subroutines, this table is Flash located to prevent RAM usage in POST tests | |
| const IEC60335_B_PCTest_ReturnValues | PCTest_resultTable [6] |
| function table to the PC test subroutines return values, this table is Flash located to prevent RAM usage in POST tests | |
| const Exec_t | PCTest_funcTable [6] |
| function table to the PC test subroutines, this table is Flash located to prevent RAM usage in POST tests | |
| const IEC60335_B_PCTest_ReturnValues | PCTest_resultTable [6] |
| function table to the PC test subroutines return values, this table is Flash located to prevent RAM usage in POST tests | |
The program counter test checks the functionality of the CPUs PC.
POST and BIST tests are available. The PC test is realized in assembler
language to ensure direct access to the CPUs register. This tests are compiler coded specific according to their mnemonics.
Selecting the correct assembler source is necessary for compilation.
| IEC60335_B_PCTest_ReturnValues IEC60335_B_PCTest_A | ( | Data_t * | data | ) |
private function referenced by POST and BIST tests
| data | RAM location to do something with (not relevant) |
Definition at line 51 of file iec60335_class_b_programcounter_test.c.
References _Data::number, and VAL_A.
| IEC60335_B_PCTest_ReturnValues IEC60335_B_PCTest_B | ( | Data_t * | data | ) |
private function referenced by POST and BIST tests
| data | RAM location to do something with (not relevant) |
Definition at line 72 of file iec60335_class_b_programcounter_test.c.
References _Data::number, and VAL_B.
| IEC60335_B_PCTest_ReturnValues IEC60335_B_PCTest_C | ( | Data_t * | data | ) |
private function referenced by POST and BIST tests
| data | RAM location to do something with (not relevant) |
Definition at line 93 of file iec60335_class_b_programcounter_test.c.
References _Data::number, and VAL_C.
| IEC60335_B_PCTest_ReturnValues IEC60335_B_PCTest_D | ( | Data_t * | data | ) |
private function referenced by POST and BIST tests
| data | RAM location to do something with (not relevant) |
Definition at line 114 of file iec60335_class_b_programcounter_test.c.
References _Data::number, and VAL_D.
| IEC60335_B_PCTest_ReturnValues IEC60335_B_PCTest_E | ( | Data_t * | data | ) |
private function referenced by POST and BIST tests
| data | RAM location to do something with (not relevant) |
Definition at line 135 of file iec60335_class_b_programcounter_test.c.
References _Data::number, and VAL_E.
| IEC60335_B_PCTest_ReturnValues IEC60335_B_PCTest_F | ( | Data_t * | data | ) |
private function referenced by POST and BIST tests
| data | RAM location to do something with (not relevant) |
Definition at line 156 of file iec60335_class_b_programcounter_test.c.
References _Data::number, and VAL_F.
| testResult_t IEC60335_ClassB_PCTest_BIST | ( | void | ) |
BIST test of PC.
(DO_NOT_INCLUDE_WITH_DOXYGEN)
testResult_t IEC60335_ClassB_PCTest_POST(const Exec_t *fTable, const IEC60335_B_PCTest_ReturnValues *rTable) { UINT8 loop = 0; testResult_t Result = IEC60335_testFailed;
if ((fTable == 0) ||(rTable == 0)) { // check parameter return (Result); } while (loop < 6) { // march through tests
if (PCTest_resultTable[loop]==PCTest_funcTable[loop]) { loop ++; // good condition } else { loop = 10; // error condition } } if (loop == 6) { Result = IEC60335_testPassed; return (Result); } (DO_NOT_INCLUDE_WITH_DOXYGEN)
Definition at line 394 of file iec60335_class_b_programcounter_test.c.
References IEC60335_testFailed, IEC60335_testPassed, and VAL_G.
{
static uint8_t lastFunction = 0;
testResult_t result = IEC60335_testFailed;
Exec_t pfAction;
Data_t data = { VAL_G, 100 };
if ((PCTest_resultTable[0] == 0) || (PCTest_funcTable[0] == 0))
{
return result;
}
if (lastFunction > 5)
{
lastFunction = 0;
}
pfAction = PCTest_funcTable[lastFunction];
if (PCTest_resultTable[lastFunction] == (uint32_t)(*pfAction)(&data))
{
result = IEC60335_testPassed;
lastFunction > 4 ? lastFunction = 0 : lastFunction++;
}
return result;
}
| testResult_t IEC60335_ClassB_PCTest_POST | ( | const Exec_t * | fTable, |
| const IEC60335_B_PCTest_ReturnValues * | rTable | ||
| ) |
public function referenced by POST test
| fTable | Flash location of subroutine table |
| rTable | Flash location of expected return values |
POST test of PC.
Referenced by IEC60335_ClassB_POST().

| const Exec_t PCTest_funcTable[6] |
function table to the PC test subroutines, this table is Flash located to prevent RAM usage in POST tests
Definition at line 171 of file iec60335_class_b_programcounter_test.c.
Referenced by IEC60335_ClassB_POST().
| const Exec_t PCTest_funcTable[6] |
{
(Exec_t) IEC60335_B_PCTest_A,
(Exec_t) IEC60335_B_PCTest_B,
(Exec_t) IEC60335_B_PCTest_C,
(Exec_t) IEC60335_B_PCTest_D,
(Exec_t) IEC60335_B_PCTest_E,
(Exec_t) IEC60335_B_PCTest_F
}
function table to the PC test subroutines, this table is Flash located to prevent RAM usage in POST tests
Definition at line 171 of file iec60335_class_b_programcounter_test.c.
Referenced by IEC60335_ClassB_POST().
function table to the PC test subroutines return values, this table is Flash located to prevent RAM usage in POST tests
Definition at line 190 of file iec60335_class_b_programcounter_test.c.
Referenced by IEC60335_ClassB_POST().
function table to the PC test subroutines return values, this table is Flash located to prevent RAM usage in POST tests
Definition at line 190 of file iec60335_class_b_programcounter_test.c.
Referenced by IEC60335_ClassB_POST().