Note: I am remaking this post because I made a few edits in rapid succession to the previous one I made on this and I think the site locked me out because of it. I'll delete the other one if it pops up eventually, it's unclear where it went at the moment.
Greetings! I am working in a IAP implementation for the LPC43xx platform and I some doubts about how the IAP works / uses memory. The information readily available on the subject seems somewhat scarce, and sometimes contradicting, so I figured I'd make a new thread with my findings and some doubts I have in hopes someone with experience using it can give me a hand. I am a bit short on time as I need to have this implemented by the end of the month. I haven't begun to perform tests in some of the ideas and directions I present in this thread, but will start working on them as soon as I'm done writing this. I just wanted to get this out in hopes someone can help me save some time, and in the worst case I'll end up answering these questions myself later on for someone else to find. Without further ado, let's get into it.
In the user manual for these devices, I found the following:
IAP Command Command | Code Reference | Stack Usage [B] | Reference |
Init | 49 | 88 | Table 52 |
Prepare sectors for write operation | 50 | 118 | Table 53 |
Copy RAM to Flash | 51 | 208 | Table 54 |
Erase sectors | 52 | 136 | Table 55 |
Blank check sectors | 53 | 120 | Table 56 |
Read part ID | 54 | 8 | Table 57 |
Read Boot Code version | 55 | 8 | Table 58 |
Read device serial number | 58 | 8 | Table 59 |
Compare | 56 | 152 | Table 60 |
Reinvoke ISP | 57 | 192 | Table 61 |
Erase page | 59 | 168 | Table 62 |
Set active boot flash bank | 60 | 2208 | Table 63 |
已解决! 转到解答。
Hello Martin Fernandez,
-> Tell you it need that space available.
-> You needn't reserve it.
-> I think you can reserve the space, also can just make the space available. If you
want to reserve it like thread, should change "__top_RamLoc32 - 2456 " to "__top_RamLoc32 - 307".
-> Needn't told.
In a world , recommend you first to development as by default, if there is error, then check whether the RAM is enough.
Hello mgfernandez,
About Flash IAP, first of all, recommend you refer to the flashiap demo under LPCopen,
If still have question about this, tell us.
Regards,
Alice
Hello! I've followed the example you mentioned from LPCOpen and performed minimal tests with it which turned out to be successful, but some colleges of mine developed a larger library based on it and they encountered reliability issues.
I am rewriting it and looking into the usage of the IAP at the moment, and the memory management topics that are mentioned in the User Manual aren't really touched upon by the example at all. I feel the example might be useful if you are doing something small, but once you have to escalate it you might run into trouble, just like we are at the moment.
I am still developing the library however and developing unit tests for it so I can rule out logic errors in its utilisation, and I'll make another post with more concrete problems if I encounter them when I get to actual testing, but for now I felt these concerns about the memory utilisation of the IAP that arise from reading the existing documentation were enough to warrant me asking about it here.
Thanks.
Hello Martin Fernandez,
-> Tell you it need that space available.
-> You needn't reserve it.
-> I think you can reserve the space, also can just make the space available. If you
want to reserve it like thread, should change "__top_RamLoc32 - 2456 " to "__top_RamLoc32 - 307".
-> Needn't told.
In a world , recommend you first to development as by default, if there is error, then check whether the RAM is enough.