Hello Everyone
I want to read 64 byte "Program Once field" segment of flash in kl26z256xxx4 controller. I have taken reference of demo example in KSDK library (\KSDK_1.3.0\examples\frdmkl26z\driver_examples\flash\kds). In this demo code there is a function :
uint32_t FlashReadOnce(PFLASH_SSD_CONFIG pSSDConfig,uint8_t recordIndex, uint8_t* pDataArray, uint32_t size, pFLASHCOMMANDSEQUENCE pFlashCommandSequence) in SSD_FTFx.h.
I want to know more about last parameter pFLASHCOMMANDSEQUENCE pFlashCommandSequence.
In demo code this parameter is caculated as follows:
pFlashCommandSequence= (pFLASHCOMMANDSEQUENCE)RelocateFunction((uint32_t)ramFunc , LAUNCH_CMD_SIZE ,(uint32_t)FlashCommandSequence);
So can i use it directly in flashReadOnce function as a last parameter?
Thank you
waiting for your valuable inputs...
已解决! 转到解答。
The attached code is what I use, you should be able to extract what you need from it.
There are some bits missing here like moving the flash command section to RAM that happens at boot.