Hi,
I need few details for s32k microcontroller. Is the bank switch supported for s32k controller? I couldn't find this info in the controller manual. If Yes, can you please provide the sample code for the bank switch.
Thanks for support in advance.
Thank You for the quick reply. Compiling the code with pic has some restriction with constants and constant pointers. Assuming we are able to successfully compile but how would the bank switch from A to B or vice versa occur during bootup work?
Hi,
if you have S32K1, it's a matter of software, there's no hardware support for this. You can take a look at mentioned AN12323 to see how it is implemented.
Regards,
Lukas
... and I will add that bootloader is always started after reset and the bootloader decides which application will be executed.
Hi,
S32K1xx does not support bank switching (memory mapping). If you want to do AB swap, it's necessary to either compile the projects as position independent or you need to track the versions and put them to correct place. We have this application note for S32K1 which implements AB swap:
https://www.nxp.com/docs/en/application-note/AN12323.pdf
https://www.nxp.com/docs/en/application-note-software/AN12323SW.zip
S32DS does not support PIE (position independent executable), it's necessary to use other compilers (like IAR as mentioned in the app note).
S32K3xx does have support for bank switching. Currently the A/B swap is supported by HSE firmware. You can take a look at the documentation of demo app:
c:\NXP\HSE_DEMOAPP_S32K3XX_0_1_2_0\HSE_DEMOAPP_S32K3XX_0_1_2_0_ReadMe.pdf
The HSE firmware and demo app can be installed from Standard Software:
https://www.nxp.com/webapp/swlicensing/sso/downloadSoftware.sp?catid=SW32K3-STDSW-D
And then there are some online trainings:
https://www.nxp.com/design/training/automotive-security-and-over-the-air-ota-solution-with-s32k3-mcu...
https://www.nxp.com/design/training/automotive-mcu-security-and-ota-solution-with-cost-optimized-s32...
Best Regards,
Ladislav