Hi NXP partner
We would like to update firmware by canbus for mm9z1_638. Can we separate the flash to A & B partition ,and MM9Z1_638 can switch A partition or B partion for boot? thanks
Br,
Mike liang
Hi @a852013777
Yes, you can partition the flash into A and B partitions for the MM9Z1_638. The MM9Z1_638 has a feature called 'Flash Swap' which allows you to switch between two different firmware images stored in separate partitions of the flash memory. This can be useful for firmware updates via CAN bus.
To implement this, you would need to configure the Flash Swap Control Register (FSCR) to enable the Flash Swap feature and set the Swap Indicator Address (SIA) to the start address of the B partition. When a reset occurs, the MM9Z1_638 will check the SIA and if it is set, it will boot from the B partition. If the SIA is not set, it will boot from the A partition.
Here is a code snippet that shows how to configure the FSCR and SIA:
// Enable Flash Swap FSCR |= FSCR_FSWPEN_MASK;
// Set Swap Indicator Address to start of B partition SIA = B_PARTITION_START_ADDRESS;
Please refer to the MM9Z1_638 reference manual for more details on the Flash Swap feature and how to configure the FSCR and SIA. You can find the reference manual in the MagniV Microcontrollers section of the community.nxp.com website.
Hope this helps!
Hi prakashram
I cannot get the referece manual from the link. Could you send mail to me or update the link?
My email: mike.yh.liang.foxconn.com
Please refer to the MM9Z1_638 reference manual for more details on the Flash Swap feature and how to configure the FSCR and SIA. You can find the reference manual in the MagniV Microcontrollers section of the community.nxp.com website.
Br,
Mike Liang