MQX-K60 Program Memory Corruption

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MQX-K60 Program Memory Corruption

360 Views
robertryan
Contributor I

Hi All,,

I am running into an issue where my program memory is being corrupted.  The corruption manifests itself as 16 bytes of 0xff at address 0xf660.  Right in the middle of my LLWU wakeup interrupt...  The problem is only seen in release mode code, not with debug.  After the code gets corrupted I get an unexpected interrupt with a Hard Fault as a cause.  This makes perfect sense.

From the memory before corruption (starting at 0xf650):

01 20 fb f7 ee bb 00 00 00 b5 83 b0 f2 f7 fa f8 00 bf 00 bf 00 bf 43 48 00 bf 81 78 41 f0 20 01 81 70 01 78 01 f0 3f 01 01 70 3f 48 01 68 09 06

From the memory after corruption:

01 20 fb f7 ee bb 00 00 00 b5 83 b0 f2 f7 fa f8 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 81 70 01 78 01 f0 3f 01 01 70 3f 48 01 68 09 06

I shouldn't be able to write to program memory (by definition) as I am not doing any boot loader activity.  Not sure what might be causing this.  I am not seeing any bus errors so I don't think that I have a pointer going wonky.

Any ideas on what to look for?

Rob

0 Kudos
1 Reply

228 Views
DavidS
NXP Employee
NXP Employee

Hi Robert,

Did you find issue?

If not, you could try to use the FRPRT0-3 fields to protect from program/erase operations.

In Reference Manual look for following:

Program Flash Protection Registers (FTFL_FPROTn)

in the Flash Memory Module chapter.

Regards,

David

0 Kudos