Non-Secure Flash Client Interface for CC26X4 devices.
The defined APIs are identical to the function calls in flash.c. This client interface allows the access to the Secure Flash Service.
Initialization
Users will need to call FlashOpen() once prior to any other function calls. FlashOpen() will only need to be called again if FlashClose() is called.
Error Codes
Typically the Flash Driver (flash.c) returns either a FAPI_STATUS code or a valid value greater than the FAPI_STATUS code range. FAPI_STATUS codes are positive and are defined below in FlashCC26X4_ns.h. The Non-Secure Flash Client Interface is responsible for interfacing with the Secure Partition Manager (SPM). Requests to the SPM may result in Platform Security Architecture (PSA) error codes. These error codes are referred to as PSA_ERROR codes. PSA_ERROR codes are negative values and are defined in "error.h". Due to the FAPI_STATUS and PSA_ERROR codes not overlapping, API's of the Non-Secure Flash Client Interface can dynamically return either value type. PSA_ERROR codes are considered higher priority and will take precedence. Therefore, if a PSA_ERROR occurs, a PSA_ERROR is returned. Otherwise, a valid Flash driver value will be returned. Each API will follow this guideline but please reference each API individually for specific return characteristics.
PSA_ERROR_PROGRAMMER_ERROR
A PSA_ERROR_PROGRAMMER_ERROR is a strict error code returned by the SPM. Once this error code is returned, the SPM will terminate the connection to the service. All subsequent requests to the service from the same client will not be processed and will continue to return a PSA_ERROR_PROGRAMMER_ERROR. The client must close the connection to the SPM and then re-establish the connection to continue. This can be accomplished in the Non-Secure Flash Client Interface by calling FlashClose() followed by FlashOpen(). In the Non-Secure Flash Client Interface, PSA_ERROR_PROGRAMMER_ERROR codes will primarily be returned due to requests trying to read from or write to secure memory regions. Please reference the PSA Firmware Framework specification for more details regarding the PSA_ERROR_PROGRAMMER_ERROR code.
|
int_fast16_t | FlashOpen (void) |
| Initialize a PSA connection to the Secure Flash Service. More...
|
|
void | FlashClose (void) |
| End the PSA connection to the Secure Flash Service. More...
|
|
uint32_t | FlashProtectionGet (uint32_t ui32SectorAddress) |
| Call FlashProtectionGet API using Secure Flash Service. More...
|
|
uint32_t | FlashSectorErase (uint32_t ui32SectorAddress) |
| Call FlashSectorErase API using Secure Flash Service. More...
|
|
uint32_t | FlashProgram (uint8_t *pui8DataBuffer, uint32_t ui32Address, uint32_t ui32Count) |
| Call FlashProgram API using Secure Flash Service. More...
|
|
uint32_t | FlashProgram4X (uint8_t *pui8DataBuffer, uint32_t ui32Address, uint32_t ui32Count) |
| Call FlashProgram4X API using Secure Flash Service. More...
|
|
uint32_t | FlashSectorSizeGet (void) |
| Call FlashSectorSizeGet API using Secure Flash Service. More...
|
|
uint32_t | FlashSizeGet (void) |
| Call FlashSizeGet API using Secure Flash Service. More...
|
|