AnsweredAssumed Answered

MK12DX128xxx5 flash write problem

Question asked by Martin Zhang on Mar 21, 2018
Latest reply on Mar 21, 2018 by Hui_Ma

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

Outcomes