22.4.3.1 Get Flash Descriptor Command
This command provides the system with information on the Flash organization. The system can take full advantage of this information, for example, a device could be replaced by one with more Flash capacity, and therefore the software is able to adapt itself to the new configuration.
To get the embedded Flash descriptor, the application writes the GETD command in EEFC_FCR. The first word of the descriptor can be read by the software application in EEFC_FRR as soon as the FRDY flag in EEFC_FSR rises. The next reads of EEFC_FRR provide the following word of the descriptor. The Flash Descriptor has only 7 words (refer to the following table). Reading beyond that may not be a valid data. The lock region size is same for all regions. Just reading word 7 is enough to get the lock region size.
| Symbol | Word Index | Description |
|---|---|---|
| FL_ID | 0 | Flash interface description |
| FL_SIZE | 1 | Flash size in bytes |
| FL_PAGE_SIZE | 2 | Page size in bytes |
| FL_NB_PLANE | 3 | Number of planes |
| FL_PLANE[0] | 4 | Number of bytes in the plane |
| FL_NB_LOCK | 4 + FL_NB_PLANE | Number of lock bits. A bit is associated with a lock region. A lock bit is used to prevent write or erase operations in the lock region. |
| FL_LOCK[0] | 4 + FL_NB_PLANE + 1 | Number of bytes in the first lock region |
