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
Solved! Go to Solution.
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,
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,
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
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.
Hope that helps,
Now it make sense!
Thank you Kan Li!
Best Regards,
SebaS
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
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