MK12DX128xxx5 flash write problem

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

MK12DX128xxx5 flash write problem

638 次查看
martinzhang
Contributor III

Hello,

I am working with MK12DX128xxx5 flash programming, I have no MK12DX128xxx5 flash driver in hand so I use the flash drive which works well in MK10DX128xxx5. The complier is IAR Embedded Workbench for ARM 7.40.2.8570. The C/C++ Compiler Optimizations setting is High (Size). If I set some function optimize=none then the flash write data function works well, but it cannot work correctly if I remove one or two optimize=none. I checked running status of write flash function, it can write correct 1 byte and return the error of flash read collision.

My question is:

  • Why the problem is related to the optimize setting?
  • The MK10DX128xxx5 flash driver can be used for MK12DX128xxx5?

Somebody can post MK12DX128xxx5 flash write code?

 

Thank you very much!

Martin

标记 (1)
0 项奖励
回复
1 回复

558 次查看
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi,

Have you tried the MCUXpresso SDK software Flash driver for MK12DX128xxx5 chip?

I would recommend customer try with MCUXpresso SDK software package for MK12DX128xxx5 chip.

Please check if that Flash driver demo also has the same issue about IAR compiler optimize setting.

The flash driver difference between MK10DX128xxx5 and  MK12DX128xxx5 is very tiny. The most Flash commands are same. While, I still recommend customer use MCUXpresso SDK flash driver for MK12DX128xxx5  chip.

Wish it helps.


Have a great day,
Mike

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

0 项奖励
回复