iLLD_TC27xC  1.0
CommandSequence Functions
Collaboration diagram for CommandSequence Functions:

Functions

IFX_EXTERN void IfxFlash_clearStatus (uint32 flash)
 Performs the "Clear Status" sequence. More...
 
IFX_EXTERN void IfxFlash_disableWriteProtection (uint32 flash, IfxFlash_UcbType ucb, uint32 *password)
 Performs the "Erase Verify" sequence. More...
 
IFX_EXTERN uint8 IfxFlash_enterPageMode (uint32 pageAddr)
 Performs the sequence for entering program page mode. More...
 
IFX_EXTERN void IfxFlash_eraseMultiplePhysicalSectors (uint32 sectorAddr, uint32 numSector)
 Performs the erase sequence for n sectors in program or data flash. More...
 
IFX_EXTERN void IfxFlash_eraseMultipleSectors (uint32 sectorAddr, uint32 numSector)
 Performs the erase sequence for n sectors in program or data flash. More...
 
IFX_EXTERN void IfxFlash_erasePhysicalSector (uint32 sectorAddr)
 Performs the erase sequence for a physical sector in program or data flash. More...
 
IFX_EXTERN void IfxFlash_eraseSector (uint32 sectorAddr)
 Performs the erase sequence for a sector in program or data flash. More...
 
IFX_EXTERN void IfxFlash_eraseVerifyMultipleSectors (uint32 sectorAddr, uint32 numSector)
 Performs the "Erase Verify" sequence for multiple sectors. More...
 
IFX_EXTERN void IfxFlash_eraseVerifySector (uint32 sectorAddr)
 Performs the "Erase Verify" sequence. More...
 
IFX_EXTERN void IfxFlash_loadPage (uint32 pageAddr, uint32 wordL, uint32 wordU)
 performs a load page sequence with a single 64bit access More...
 
IFX_EXTERN void IfxFlash_loadPage2X32 (uint32 pageAddr, uint32 wordL, uint32 wordU)
 performs a load page sequence with two 32bit accesses More...
 
IFX_EXTERN void IfxFlash_resetToRead (uint32 flash)
 reset to read mode More...
 
IFX_EXTERN void IfxFlash_resumeProtection (uint32 flash)
 Performs the "Resume Protection" sequence. More...
 
IFX_EXTERN void IfxFlash_suspendResumeMultipleSectors (uint32 sectorAddr, uint32 numSector)
 Performs the "Suspend Resume" sequence for multiple sectors. More...
 
IFX_EXTERN void IfxFlash_suspendResumeSector (uint32 sectorAddr)
 Performs the "Suspend Resume" sequence. More...
 
IFX_EXTERN uint8 IfxFlash_waitUnbusy (uint32 flash, IfxFlash_FlashType flashType)
 Polls the selected status flag in flash status register until it turns to 0. More...
 
IFX_EXTERN void IfxFlash_writeBurst (uint32 pageAddr)
 Performs the "Write Burst" sequence, similar to write page but performs a burst transfer instead of page.Make sure the appropriate amount of data is loaded using load page command. More...
 
IFX_EXTERN void IfxFlash_writePage (uint32 pageAddr)
 Performs the "Write Page" sequence. More...
 
IFX_EXTERN void IfxFlash_writePageOnce (uint32 pageAddr)
 Performs the "Write Page Once" sequence, similar to write page but performs a program verify after writing. More...
 

Detailed Description

Function Documentation

IFX_EXTERN void IfxFlash_clearStatus ( uint32  flash)

Performs the "Clear Status" sequence.

Parameters
flashselects the flash (PMU) module
Returns
None

Definition at line 43 of file IfxFlash.c.

IFX_EXTERN void IfxFlash_disableWriteProtection ( uint32  flash,
IfxFlash_UcbType  ucb,
uint32 password 
)

Performs the "Erase Verify" sequence.

Parameters
flashselects the flash (PMU) module
ucbselects the user configuration block (0 for UCB0, 1 for UCB1, 5 for UCB_HSMC)
passwordpassword pointer to an array of 8 words
Returns
None

Definition at line 69 of file IfxFlash.c.

IFX_EXTERN uint8 IfxFlash_enterPageMode ( uint32  pageAddr)

Performs the sequence for entering program page mode.

Parameters
pageAddrpageAddr specifies the page being written - the command sequence will be varied accordingly
Returns
0 on success, != 0 if invalid or not available page is selected

Usage Example:

unsigned int pageAddr = IFXFLASH_DFLASH_START + page*IFXFLASH_DFLASH_PAGE_LENGTH;
// enter page mode

Definition at line 83 of file IfxFlash.c.

IFX_EXTERN void IfxFlash_eraseMultiplePhysicalSectors ( uint32  sectorAddr,
uint32  numSector 
)

Performs the erase sequence for n sectors in program or data flash.

Parameters
sectorAddrsector address
numSectorthe no.of sectors to be erased
Returns
None

Usage Example:

// erase the first and second data flash

Definition at line 102 of file IfxFlash.c.

IFX_EXTERN void IfxFlash_eraseMultipleSectors ( uint32  sectorAddr,
uint32  numSector 
)

Performs the erase sequence for n sectors in program or data flash.

Parameters
sectorAddrsector address
numSectorthe no.of sectors to be erased
Returns
None

Usage Example:

// erase logical sectors of program flash
IfxFlash_eraseMultipleSectors(pFlashTableLog[sector].start,2);

Definition at line 116 of file IfxFlash.c.

IFX_EXTERN void IfxFlash_erasePhysicalSector ( uint32  sectorAddr)

Performs the erase sequence for a physical sector in program or data flash.

Parameters
sectorAddrsector address
Returns
None

Usage Example:

// erase the first data flash

Definition at line 130 of file IfxFlash.c.

IFX_EXTERN void IfxFlash_eraseSector ( uint32  sectorAddr)

Performs the erase sequence for a sector in program or data flash.

Parameters
sectorAddrsector address
Returns
None

Usage Example:

// erase all sectors of program flash
for(sector=0; sector<IFXFLASH_PFLASH_NO_OF_LOG_SECTORS; ++sector) {
// get address from predefined table
unsigned int sector_addr = pFlashTableLog[sector].start;
// erase sector
IfxFlash_eraseSector(sector_addr);
}

Definition at line 144 of file IfxFlash.c.

IFX_EXTERN void IfxFlash_eraseVerifyMultipleSectors ( uint32  sectorAddr,
uint32  numSector 
)

Performs the "Erase Verify" sequence for multiple sectors.

Parameters
sectorAddrsector address which should be verified
numSectorno.of sectors to be operated on
Returns
None

Definition at line 158 of file IfxFlash.c.

IFX_EXTERN void IfxFlash_eraseVerifySector ( uint32  sectorAddr)

Performs the "Erase Verify" sequence.

Parameters
sectorAddrsector address which should be verified
Returns
None

Definition at line 172 of file IfxFlash.c.

IFX_EXTERN void IfxFlash_loadPage ( uint32  pageAddr,
uint32  wordL,
uint32  wordU 
)

performs a load page sequence with a single 64bit access

Parameters
pageAddrpageAddr start address of page which should be programmed
wordLLower Address word
wordUUpper address word
Returns
None

Usage Example:

// load 64bit into assembly buffer of program flash
IfxFlash_loadPage(IFXFLASH_PFLASH_START, 0x55555555, 0xaaaaaaaa);
// load 64bit into assembly buffer of data flash
IfxFlash_loadPage(0XAF000000, 0x55555555, 0xaaaaaaaa);

Definition at line 246 of file IfxFlash.c.

IFX_EXTERN void IfxFlash_loadPage2X32 ( uint32  pageAddr,
uint32  wordL,
uint32  wordU 
)

performs a load page sequence with two 32bit accesses

Parameters
pageAddrpageAddr start address of page which should be programmed
wordLLower Address word
wordUUpper Address word
Returns
None

Usage Example:

// load 2*32bit into assembly buffer of program flash
IfxFlash_loadPage2X32(IFXFLASH_PFLASH_START, 0x55555555, 0xaaaaaaaa);
// load 2*32bit into assembly buffer of data flash
IfxFlash_loadPage2X32(0XAF000000, 0x55555555, 0xaaaaaaaa);

Definition at line 254 of file IfxFlash.c.

IFX_EXTERN void IfxFlash_resetToRead ( uint32  flash)

reset to read mode

Parameters
flashflash selects the flash (PMU) module
Returns
None

Usage Example:

// reset to read mode

Definition at line 264 of file IfxFlash.c.

IFX_EXTERN void IfxFlash_resumeProtection ( uint32  flash)

Performs the "Resume Protection" sequence.

Parameters
flashselects the flash (PMU) module
Returns
None

Definition at line 271 of file IfxFlash.c.

IFX_EXTERN void IfxFlash_suspendResumeMultipleSectors ( uint32  sectorAddr,
uint32  numSector 
)

Performs the "Suspend Resume" sequence for multiple sectors.

Parameters
sectorAddrsector address
numSectorthe no.of sectors to be operated on
Returns
None

Definition at line 301 of file IfxFlash.c.

IFX_EXTERN void IfxFlash_suspendResumeSector ( uint32  sectorAddr)

Performs the "Suspend Resume" sequence.

Parameters
sectorAddrsector address which should be resumed
Returns
None

Definition at line 315 of file IfxFlash.c.

IFX_EXTERN uint8 IfxFlash_waitUnbusy ( uint32  flash,
IfxFlash_FlashType  flashType 
)

Polls the selected status flag in flash status register until it turns to 0.

Parameters
flashselects the flash (PMU) module
flashTypeselects the flash type
Returns
0 on success, != 0 if invalid or not available page is selected

Usage Example:

// wait until data flash 0 is unbusy

Definition at line 329 of file IfxFlash.c.

IFX_EXTERN void IfxFlash_writeBurst ( uint32  pageAddr)

Performs the "Write Burst" sequence, similar to write page but performs a burst transfer instead of page.Make sure the appropriate amount of data is loaded using load page command.

Parameters
pageAddrstart address of page which should be programmed
Returns
None

Usage Example:

// program the second page of the first sector of the Program Flash
IfxFlash_writeBurst(0xa0000100);

Definition at line 353 of file IfxFlash.c.

IFX_EXTERN void IfxFlash_writePage ( uint32  pageAddr)

Performs the "Write Page" sequence.

Parameters
pageAddrstart address of page which should be programmed
Returns
None

Usage Example:

// program the second page of the first sector of the Program Flash
IfxFlash_writePage(0xa0000100);

Definition at line 367 of file IfxFlash.c.

IFX_EXTERN void IfxFlash_writePageOnce ( uint32  pageAddr)

Performs the "Write Page Once" sequence, similar to write page but performs a program verify after writing.

Parameters
pageAddrstart address of page which should be programmed
Returns
None

Usage Example:

// program the second page of the first sector of the Program Flash

Definition at line 381 of file IfxFlash.c.