AnsweredAssumed Answered

structure - unaligned memory? hard fault

Question asked by mjg8t on Jun 16, 2017
Latest reply on Jun 21, 2017 by mjg8t

Hi There,


I think I may be having an unalignment memory hard fault occurring.  I am using some code which has run fine on the KL devices, but is giving the K22 a hard fault.  I have narrowed down the issue to writing to a structure variable.  


I have been happily naive about memory alignment and it appears it is time to learn more details about it in fixing my issue here.  I have attached the project which is running on the frdm-k22f board.  The main loop has a write to the structure and which seems to be casuing the issue.  


Can someone explain what is wrong with the structure defenition?  How I can avoid this in the future?  And how to fix it?



Original Attachment has been moved to: