We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
This problem I have I really don't understand. I've got some code which runs fine. Is encorperates an SD-card interface (NXP/Martin Thomas/CHaN). At some point I found out that a certain SD-card was recognized poorly: it took my app 10 extra seconds to initialize the SD-card subsystem. Adding debug info I tried to figure out the cause. It's the MCI_Send_Status() from mci.c which takes so long.
What amazes me is that by just adding 8 bytes of arbitrary code (e.g. by extending a const string with 8 characters), in a seemingly arbitrary module (.o file), makes my app boot quickly again. Add by adding 8 more bytes slow, etc.
So it seems to be some delicate alignment issue in ROM. But what exactly is going on? Has anyone encountered similar issues?
LPC 2386
Thanks, Mark
See chapter 7 of the user manual, about the Memory Acceleration Module (MAM).
It contains 3 128-bit buffers, i.e. 16 bytes each. If flash data is missing, the processor core will stall.
Hi Per,
It seems that my issue is indeed related to the MAM. My application runs with MAMCR=1, MAMTIM=4. When I change MAMCR to 0 or to 2, the specific SD-card is recognized quickly (no 10 secs delay anymore), regardless alignment/padding. I can't see why exactly, but I'll try to figure this out.
Thanks for pointing me to MAM,
Mark