This function performs the self test on Stack.
It can detect stuck-at faults and direct coupling faults. The RAM tests are destructible in nature, so this function copies the stack in use to the provided RAM area. Once the test is completed, the stack is copied back to its original location. Because of the RAM destructible behavior, it is advisable to disable the interrupts before starting the test.
- Parameters
-
| stackBase | The pointer to the Stack Base. |
| stackSize | The size of Stack. |
| altStackBase | The pointer to the start of the RAM area to use as an alternate Stack Base. RAM address from altStackBase to (altStackBase - stackSize) is used to store/restore the Stack under test. The existing content of this area will be destructed and this area must not overlap with the Stack under test. The platform might set stack limit using __set_MSPLIM, ensure that the alternate stack is within the stack limit set by the platform |
- Returns
- OK_STATUS (0) - Test passed
ERROR_STATUS (1) - Test failed