How to read/write "Program Once Filed" segment of flash in Kinetis KL26z256 controller?

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

How to read/write "Program Once Filed" segment of flash in Kinetis KL26z256 controller?

Jump to solution
1,195 Views
harshpatel
Contributor IV

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...

1 Solution
841 Views
bobpaddock
Senior Contributor III

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.

View solution in original post

4 Replies
841 Views
harshpatel
Contributor IV

Hello

By taking your code as reference i can read as well as write "Program once filed".

Also Using KSDK example its also works.

Thank you for your inputs..

Regards,

Harsh

Einfochips

0 Kudos
842 Views
bobpaddock
Senior Contributor III

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.

841 Views
harshpatel
Contributor IV

Hi BOB PADDOCK

Thank you for your input

Well i can not find your attachment can you please reattach it?

0 Kudos
841 Views
bobpaddock
Senior Contributor III

This forum software has issues.

To see the attachments you must be logged in, then the thread must be expanded by clicking on the subject line where the thread starts.

0 Kudos