SPRUJE7A January 2025 – July 2025 F29H850TU , F29H859TU-Q1
Users can program the BANKMGMT using the Fapi_issueProgBankMode() function. This memory range can also be programmed manually by following the process below:
| Bank Mode | FLC1 BANKMGMT Sector Address | FLC2 BANKMGMT Sector Address |
|---|---|---|
| Mode 0 | 0x10D8 0000 | N/A |
| Mode 1 | 0x10D8 0000 | N/A |
| Mode 2 | 0x10D8 0000 | N/A |
| Mode 3 | 0x10D8 0000 | 0x10D9 0000 |
| Register | Value | Notes |
|---|---|---|
| BANK_STATUS[63:0] | 0x55555555_55555555 | Offset 0 in the data buffer (see the below code snippet). |
| BANK_UPDATE_CTR[63:0] | 0x00000000_00000000 | Offset
8 in the data buffer (see the below code snippet). When programming the BANKMGMT sector, can always be set to 0. Flash API internally reads the counter from the active BANKMGMT sector, decrements it by 1, and program it to the inactive sector |
| BANKMODE[63:0] | Refer to BANKMODE Values | Offset
16 in the data buffer (see the below code snippet). Contains the current BANKMODE value |
| BANKMODE | BANKMODE[63:0] Value | Buffer With Offset |
|---|---|---|
| Mode 0 | 0x03 | Buffer[16] = 0x03 |
| Mode 1 | 0x06 | Buffer[16] = 0x06 |
| Mode 2 | 0x09 | Buffer[16] = 0x09 |
| Mode 3 | 0x0C | Buffer[16] = 0x0C |
An example programming flow, assuming the sector has already been erased:
uint8 Buffer[32] = {
0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, // BANK_STATUS
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // BANK_UPDATE_CTR
0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // BANKMODE
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF // Unused
};
ClearFSMStatus(u32Index, u32UserFlashConfig);
Fapi_setupBankSectorEnable((uint32 *)u32Index, u32UserFlashConfig, FLASH_NOWRAPPER_O_CMDWEPROTNM, 0x00000000);
oReturnCheck = Fapi_issueProgrammingCommand((uint32 *)u32Index,Buffer +i,
16, 0, 0, Fapi_AutoEccGeneration, u32UserFlashConfig);
while(Fapi_checkFsmForReady(u32Index, u32UserFlashConfig) == Fapi_Status_FsmBusy);
if(oReturnCheck != Fapi_Status_Success)
{
//
// Check Flash API documentation for possible errors
//
Example_Error(oReturnCheck);
}
oFlashStatus = Fapi_getFsmStatus(u32Index, u32UserFlashConfig);
if(oFlashStatus != 3)
{
//
//Check FMSTAT and debug accordingly
//
FMSTAT_Fail();
}For more information, see the F29H85x and F29P58x Real-Time Microcontrollers Technical Reference Manual.