AnsweredAssumed Answered

Overflowing flash data issue causing MK22F51212 to hang up in I2C.

Question asked by Brendan Merna on Oct 16, 2017
Latest reply on Oct 17, 2017 by Brendan Merna

I'm working a custom board with the MK22F51212 chip on it. While adding some code to it I noticed the microchip kept malfunctioning. The micro would get stuck in the I2C code in a while loop; waiting for a status flag. Retracing my steps backwards I reached some kind of flash limit. There would be no flag raised by the Kinetis IDE, but if I created 10 bytes to an array the problem would happen, if I took those 10 bytes back out the problem would stop. I also added an include file which caused the problem to happen and removing it causing it to stop.

 

I've made sure to check in the map file and the linker files to confirm flash size and any possible overflow issues. Judging from those files I don't see a problem. But, clearly something has to be either set up wrong or I am actually overflowing.

Does anyone have any ideas on this or other steps to debugging I should start taking?

Environment:
-Kinetis IDE
-KSDK 2.0

-MK22F51212 chip
-Custom board.

Outcomes