2006-12-13 02:55 AM
Switching between programs in Flash Bank0 and Bank1
2011-05-17 12:34 AM
Is it possible to have two totally independent programs, one in Flash Bank0 and the other in Flash Bank1, and swap between the two. I have used :-
/* Private typedef -----------------*/ typedef void (*pointer)(void ); pointer jump_function; Then jumped to the other bank by :- jump_function =(pointer) 0x80000; jump_function(); Is this the correct way to do this ? Will everything (eg Ram) be re-initialised again for each separate program so that they are truly independent of each other ? Any ideas/comments welcome. I am using IAR Embedded Workbench as the Compiler. Thanks2011-05-17 12:34 AM
Hi DBowden,
in STR9 there is no possibility to map the internal SRAM to address 0x00000000. Best regards mirou2011-05-17 12:34 AM
It is possible, infact this is how most bootloaders work.
The trick is to remap the vectors into ram, that way you can have dynamic vectors depending on what program you want to load. Regards sjo2011-05-17 12:34 AM
Thanks sjo.
Can you give me some details on how to go about doing the ram remapping. I have seen several comments on this and every one seems to be different. Thanks2011-05-17 12:34 AM
oops sorry forgot we are talking str9.
A work around is possible, in one of my applications we just remap the IRQ and FIQ vectors to RAM. We put s junmp vector at address 0x18 that jumps to 0x04000018 in RAM, this gives us a simulated remap. Regards sjo