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?
Thanks!
Original Attachment has been moved to: test_sd.zip
已解决! 转到解答。