KEAZ128 write flash issue

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

KEAZ128 write flash issue

ソリューションへジャンプ
762件の閲覧回数
jason_zhang
Contributor III

Hi,

 

I am using the PE function below to write flash for bootloader .

LDD_TError FLASH1_Write(LDD_TDeviceData *DeviceDataPtr, LDD_TData *FromPtr, LDD_FLASH_TAddress ToAddress, LDD_FLASH_TDataSize Size)

 

It works well until the start address is 0x5860. But it can't work well when write the data to start address which is 0x586C.

It can work well if I changed start address from 0x586C to 0x5870 (the data also be rearranged).

 

<part of s19 file>

S11358400000000000000000000000000000000054

S11358500000000000000000000000000000000044

S10F586000000000000000000000000038

S113586C586C6C58000000F0FF1F000000000000000056

 

My question:

1. Can function FLASH1_Write work in the CAN Interrupt event?

2. Is there any limit  for FLASH1_Write's param  LDD_FLASH_TAddress ToAddress ?

3. Any advice...

 

Thank you!

 

Jason

Original Attachment has been moved to: KEA128_APP_3.s19.zip

0 件の賞賛
1 解決策
568件の閲覧回数
jason_zhang
Contributor III

Hi

The issue has been solved.

All user state is erased when the bootloader start.

PC GUI sends the  CAN Data with consistent 8 bytes longth,

even though the S19 is not long enough,full with 0x00.

That is the reason why I can't write flash 0x586C,

0x586C - 0x586F flash has been written with 0x00.

From the datasheet below,is not allowed.

Datasheet

---------------------------------------------------------------------------------------

CAUTION

A flash byte or longword must be in the erased state before

being programmed. Cumulative programming of bits within a

flash byte or longword is not allowed.

---------------------------------------------------------------------------------------

Thank you!

Jason

元の投稿で解決策を見る

0 件の賞賛
2 返答(返信)
568件の閲覧回数
jeremyzhou
NXP Employee
NXP Employee

Hi Janson,

Thanks for your sharing.

I think the other bootloader developers also may encounter this kind of mistake.
Have a great day,
Ping

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
569件の閲覧回数
jason_zhang
Contributor III

Hi

The issue has been solved.

All user state is erased when the bootloader start.

PC GUI sends the  CAN Data with consistent 8 bytes longth,

even though the S19 is not long enough,full with 0x00.

That is the reason why I can't write flash 0x586C,

0x586C - 0x586F flash has been written with 0x00.

From the datasheet below,is not allowed.

Datasheet

---------------------------------------------------------------------------------------

CAUTION

A flash byte or longword must be in the erased state before

being programmed. Cumulative programming of bits within a

flash byte or longword is not allowed.

---------------------------------------------------------------------------------------

Thank you!

Jason

0 件の賞賛