mk22fn1m0vlh12 erase fails at 0x000e200 even though all bytes read as 0xFF

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

mk22fn1m0vlh12 erase fails at 0x000e200 even though all bytes read as 0xFF

609件の閲覧回数
albertdoe
Contributor I

Address should have been 0x000e2000 (typing missed the final zero)

Using MCUXpresso IDE v10.2.0 (build 759) with SDK v2.3.1.

Tracing the code shows the problem in fsl_flash.c function flash_command_sequence() . After the line callFlashRunCommand() attempting to erase flash sector 0x000e2000 fails with the failure indicated by FSTAT register bit MGSTAT0 being set after callFlashRunCommand().

Reading the sector after the erase indicates all bytes are 0xFF. Writing the sector anyway always works.

Multiple erase then write cycles always shows erase fails at 0x000e2000, but write always succeeds.

No other sectors seem to have a problem.

Similar characteristics using Segger's J-FLASH utility or JLink utility.

Albert@cetci.com

ラベル(1)
タグ(1)
0 件の賞賛
返信
1 返信

540件の閲覧回数
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Albert Doe,

   Do you download the SDK code for MK22FN1M0VLH12?

  pastedImage_1.png

After you download the SDK code, do you modify the chip to MK22FN1M0XXX12? SDK_2.5.0_MK22FN1M0XXX12\devices will have the according files for MK22FN1M0XXX12.

The default project device should used for the MK21 chip, so you need to modify it at first. Change the all the project headfile, startup files, this is very important.

 After you modify it, you may make the erase works.

Please try it at first.

If you still have question, please kindly let me know.


Have a great day,
Kerry

 

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

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 件の賞賛
返信