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

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

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

ソリューションへジャンプ
2,151件の閲覧回数
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 解決策
1,796件の閲覧回数
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.

元の投稿で解決策を見る

4 返答(返信)
1,796件の閲覧回数
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 件の賞賛
返信
1,797件の閲覧回数
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.

1,796件の閲覧回数
harshpatel
Contributor IV

Hi BOB PADDOCK

Thank you for your input

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

0 件の賞賛
返信
1,796件の閲覧回数
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 件の賞賛
返信