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.
Hello, on my two Infineon boards (one equipped with an XC161 and the other with an XC167) I am not able to use the built-in CAN bootstrap loader mechanism, therefore I am writing a C program dedicated to the data transfer over the CAN bus. I will copy 2 KB of code stored in the flash of the XC161 (starting address: 0hC00000) to the PSRAM of the XC167 (starting address: 0hE00000). How can I start the execution of the code stored at the address 0hE00000 after having finished the data transfer? Is there an appropriate C or assembly instruction? Where (or when) do I have to place it? Thank you very much in advance. Best regards, Erika.
You could do this properly and use the SROM features of the tool chain. Here is an example to use the SROM feature:
http://www.keil.com/appnotes/docs/apnt_138.asp
From Infineon you can refer to the application note: XC166 Flash-on-the-Fly: A concept to flash via CAN
However, for something simple you could...
static void (far *myPC)(void) = 0xE00000; void main(void) { /*copy the code from Flash to PSRAM before you jump */ myPC(); /* jump (call) to the address */ for (;;) { } }