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.
I've read the 2441 webpage and several other documents regarding bank switching on a SiLabs 8051F120 part, but have not found info specific to my particular need.
I am using the STOP mode in the F120, and comparator0 can wake the uC, which then begins executing code as though a pwr-on-reset had occurred.
Now, I have modified startup.a51 and init.a51 to: determine the cause of the reset, and depending on the cause initialize/re-initialize RAM, global/static variables, or skip this initialization of RAM/variables (and thereby avoid trashing my data written before putting the uC in STOP mode).
The notes on init.a51 say it has to be the last file in the project. But, since I have multiple groups of source files (per the bank they reside in), do I need this file in each group? or only in bank0? The 2441 site says that L51_BANK is modified to bank1-- but I don't really understand why. Does this mean that the common code is in block 1? Also this document says it is important that IFBANK and COBANK have the same values. I modified L51_BANK.A51 per that document, but I'm not clear if there is something else I need to do.
The "no code may be assigned to bank 0" statement in this 2441 document is unclear to me also. I currently have 2 groups of code: the 1st group is assigned to 'common' via the GUI setup in uVision. The 2nd is assigned to bank 2. Since my ISRs are in the first group I assume this is really in bank 0? But if so, I don't understand the mod of L51_BANK.A51 file to the "EXTRN CODE (?B_SWITCH1) CALL ?B_SWITCH1;"
Thanks,
Paul