AnsweredAssumed Answered

ezport write_section fails/bugs

Question asked by Alexey Usoltsev on Apr 3, 2018
Latest reply on Apr 8, 2018 by Hui_Ma


I am trying to write firmware from flash of 1 kinnetis device to another. And I had success until my aim firmware size grown up.(20550 bytes by far)

I've made "write section" command followed by read function to check correctness. I got difference at address 0x4001 so having 0x4000 bytes written correct.(need to say that something was written after 0x4000. it is not 0xff bytes)

Ok, I thought it was a fail because of RAM or sector sizes. I've made "write_sector"(with varying sector size) function and "check_sector" functions. It looks like working(it writes and checks at a sectors address with no issues) but when I check the whole firmware I got difference just after first sector at 1st byte.

 Thinking of root of my problem it seems like wrong address been calculated. Am i correct that 32-bit aligned address is a simple address that has 2 LSB's equal to 0?

So to start a write at 0x2000 i need to do:


  ez_transmit(0x02);  //programm sector opcode


 Attached file give a view of a code used.(nonrelevant part is deleted)