SPRUJ27C November 2022 – November 2023 TMS320F280033 , TMS320F280034 , TMS320F280034-Q1 , TMS320F280036-Q1 , TMS320F280036C-Q1 , TMS320F280037 , TMS320F280037-Q1 , TMS320F280037C , TMS320F280037C-Q1 , TMS320F280038-Q1 , TMS320F280038C-Q1 , TMS320F280039 , TMS320F280039-Q1 , TMS320F280039C , TMS320F280039C-Q1
Returns the value of the FMSTAT register
Synopsis
Fapi_FlashStatusType Fapi_getFsmStatus(void)
Parameters
None
Description
This function returns the value of the FMSTAT register. This register allows the user application to determine whether an erase or program operation is successfully completed or in progress or suspended or failed. The user application should check the value of this register to determine if there is any failure after each erase and program operation.
Return Value
Bits 31 |
... | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Rsvd | PGV | Rsvd | EV | Rsvd | Busy | ERS | PGM | INV DAT |
CSTAT |
Rsvd |
ESUSP | PSUSP | Rsvd |
Bit | Field | Description |
---|---|---|
31-13 | RSVD | Reserved |
12 | PGV | Program verify. When set, indicates that a word is not successfully programmed after the maximum allowed number of program pulses are given for program operation. |
11 | RSVD | Reserved |
10 | EV | Erase verify. When set, indicates that a sector is not successfully erased after the maximum allowed number of erase pulses are given for erase operation. During Erase verify command, this flag is set immediately if a bit is found to be 0. |
9 | RSVD | Reserved |
8 | Busy | When set, this bit indicates that a program, erase, or suspend operation is being processed. |
7 | ERS | Erase Active. When set, this bit indicates that the flash module is actively performing an erase operation. This bit is set when erasing starts and is cleared when erasing is complete. It is also cleared when the erase is suspended and set when the erase resumes. |
6 | PGM | Program Active. When set, this bit indicates that the flash module is currently performing a program operation. This bit is set when programming starts and is cleared when programming is complete. It is also cleared when programming is suspended and set when programming is resumes. |
5 | INVDAT | Invalid Data. When set, this bit indicates that the user attempted to program a “1” where a “0” was already present. This bit is cleared by the Clear Status command. |
4 | CSTAT | Command Status. Once the FSM starts any failure will set this bit. When set, this bit informs the host that the program or erase command failed and the command was stopped. This bit is cleared by the Clear Status command. For some errors, this will be the only indication of an FSM error because the cause does not fall within the other error bit types. |
3 |
RSVD |
RSVD |
2 | ESUSP | Erase Suspend. When set, this bit indicates that the flash module has received and processed an erase suspend operation. This bit remains set until the erase resume command has been issued or until the Clear_More command is run. |
1 | PSUSP | Program Suspend. When set, this bit indicates that the flash module has received and processed a program suspend operation. This bit remains set until the program resume command has been issued or until the Clear_More command is run. |
0 | RSVD | RSVD |