Minnimum Erase size for PFLASH using C90TFS

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Minnimum Erase size for PFLASH using C90TFS

Jump to solution
1,398 Views
sebasira
Senior Contributor I

Hi all!

I'm using routines from C90TFS and working with TWRK60... I'd like to know what's the smaller size I can erase of the PFlash.... The routine FlashEraseSector has destination and size as parameters. Could I especify a word-aligned destination and size=4 and only erase those 4bytes since the destiantion address and leave all the rest of sector untouched?

Best Regards,

SebaS

Labels (1)
0 Kudos
Reply
1 Solution
984 Views
Kan_Li
NXP TechSupport
NXP TechSupport

The sector size is the minimal size for erase operation, and it depends on the device, as I know, for K20 50MHz part, it is 1Kbytes/sector, for K60 100MHz part, it is 2Kbyte/sector. so there is no smaller size for this api, the size parameter here should be sector aligned, otherwise an error code FTFx_ERR_SIZE would be returned.

Hope that helps,

View solution in original post

6 Replies
985 Views
Kan_Li
NXP TechSupport
NXP TechSupport

The sector size is the minimal size for erase operation, and it depends on the device, as I know, for K20 50MHz part, it is 1Kbytes/sector, for K60 100MHz part, it is 2Kbyte/sector. so there is no smaller size for this api, the size parameter here should be sector aligned, otherwise an error code FTFx_ERR_SIZE would be returned.

Hope that helps,

984 Views
sebasira
Senior Contributor I

Thanks for clarify me.

I assume it was as you said, but the size parameter would be meaningless... Why passing an unnecesary parameter that would not only confuse but also return an error?

SebaS

0 Kudos
Reply
984 Views
Kan_Li
NXP TechSupport
NXP TechSupport

The size parameter is used to specify how many sectors are going be to erased, for example, if the sector size is 2K, and the possible size parameter could be 2K, 4K, 6K and so on. The API would check whether the size parameter is sector aligned, and determine how many sectors to be erased. so this parameter is not needed by FTFL module, but the driver code. Please refer to the following for details.

a1.JPG

Hope that helps,

984 Views
sebasira
Senior Contributor I

Now it make sense!

Thank you Kan Li!

Best Regards,

SebaS

0 Kudos
Reply
984 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi SebaS,

You are welcome!! Please kindly let me know when you have any issue.

Have a nice day!!

Best Regards,

Kan Li

Technical Information & Commercial Support AP (Kinetis/ColdFire)

Freescale Semiconductor (China) Limited Shanghai Branch Office

0 Kudos
Reply
984 Views
GowrishankarChi
NXP Employee
NXP Employee

Seba, send your question to stephenmcginty if he is unable to answer, at least he would know who can....

Message was edited by: Monica Arvizu

0 Kudos
Reply