I am creating a bootloader code. here my bootloader code is in d-flash (0x10000000). Here the VTOR is in p-flash only (0x00000000 - 0x00000410). I'm writing my application via bootloader on 0x00002000 location where VTOR for application is at 0x00002000 - 0x00002410 & actual text starts after 0x00002410. After jumping from bootloader to application, I'm waiting for certain commands there, and when I get that command, I'll jump back to the bootloader code with a software reset. Please explain to me a way to do a software reset. Currently, I'm using SystemSoftwareReset() given in system_S32K144.c, but after resetting and jumping back to bootloader code, it directly goes to default ISR instead of running the main code there. If I keep the entire bootloader code at 0x00000000, including text which previously I was keeping at 0x10000000 location, then it will work; otherwise, this software reset is not working for me.
Please help me to figure out how to handle this software reset. I appreciate any help you can provide.
Hello
I suggest you refer to AN12218 https://www.nxp.com/docs/en/application-note/AN12218.pdf. Also, you can find an example of this application at AN12218SW.
Let me know if this is helpful, if you have more questions do not hesitate to ask me.