ModusToolbox Safety Test Library
Loading...
Searching...
No Matches

General Description

Functions

uint8_t SelfTest_APSR (void)
 This function tests the APSR bits that are implemented and writable on the core, with a pattern and its complement.

Function Documentation

◆ SelfTest_APSR()

uint8_t SelfTest_APSR ( void )

This function tests the APSR bits that are implemented and writable on the core, with a pattern and its complement.

The function restores the original APSR value and checks it. On return, Q and GE (where implemented) hold their original values. N, Z, C, and V aren't preserved, as the Procedure Call Standard for the Arm Architecture doesn't require a called function to preserve them.

Note
The function doesn't need privileged access and doesn't mask interrupts: the APSR value is saved and restored on every exception entry and return.
This test runs only in blocking mode.
Returns
OK_STATUS (0) - Test passed
ERROR_STATUS (1) - Test failed, or the original APSR value wasn't restored