Sector PFLASH

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
User16900
Level 1
Level 1
Hello,

I use a XMC 47 and want to write data into PFLASH.

The Code I use:
XMC_FLASH_EraseSector(XMC_FLASH_SECTOR_11);
XMC_FLASH_ProgramPage(XMC_FLASH_SECTOR_11, data);


So I can write one page into Sector 11.

What I have to do to write more pages into Sectro 11?


Thanks for your help

S.H.
0 Likes
3 Replies
jferreira
Employee
Employee
10 sign-ins 5 sign-ins First like received
/**
*
* @param address Pointer to the starting address of flash page from where the programming starts.
* @param data Pointer to the source address where targeted data is located.
*
* @return None
*
* \parDescription:

* \if XMC1
* Programs a single flash page associated with the specified \a address.\n\n XMC1000 Flash can be programmed with one
* page (256 bytes) using this API. It calls the Flash Firmware routine \a XMC1000_NvmProgVerify(unsigned long pageAddr)
* to perform the programming. Refer XMC1000 reference manual of for more details on flash firmware routines
* (Section 25.3). Call XMC_FLASH_GetStatus() API after calling this API, to verify the programming operation.
* \endif
* \if XMC4
* Programs a single flash page associated with the specified \a address.\n\n XMC4000 flash can be programmed with a
* granularity of 256 bytes page using this API. Before entering into page write process, it clears the error status
* bits inside status register. It starts the write process by issuing the page mode command followed by the load page
* command which loads the targeted \a data blocks into internal assembly buffer. Finally, it issues the write page
* command which programs the \a data into flash. Call XMC_FLASH_GetStatus() API after calling this API, to verify the
* programming operation.\n
* \endif
*
* \parNote:

* Flash will be busy state during write is ongoing, hence no operations allowed until it completes.
*
* \parRelated APIs:

* None
*
*/
void XMC_FLASH_ProgramPage(uint32_t *address, const uint32_t *data);
0 Likes
User16900
Level 1
Level 1
Hallo jferreira,

thanks for the answer.

How can I erase only one Page? Because it takes a long time to erase the complete sector....

Thanks for your help

S.H.
0 Likes
jferreira
Employee
Employee
10 sign-ins 5 sign-ins First like received
Hi,

The flash can only be erased with sector granularity.

Regards,
Jesus
0 Likes