Hello,
in my application I have to implement a bootloader for S12ZVLA64 micro based on UDS.
I started from Unified Bootloader but I have some question related to Flash driver:
1) Why is it compiled separately and flashed into a specific RAM location and it is not directly in Flash?
2) Where can I find the source code? (It is build for S12ZVL128 and I don't know if it is the same also for S12ZVLA64)
Thanks and regards,
Andrea
Hi,
Yes it is the same.
Where it is? Download example, and check.... for example AN4723 S12ZVM example...
Of course, the placement of the functions is defined in the prm file
and then functions are placed into this space in the C code
#pragma CODE_SEG SHADOW_ROM /* The following functions must be placed on the SHADOW section to be moved to RAM */
Best regards,
Ladislav
Hi,
The principle is the same for bot MCUs. What have to be checked and probably adjusted is used memory map in the prm file. The devices are from the same family. The difference between them can be found in the reference manual “1.2.1 MC9S12ZVL-Family Member Comparison”.
Also look at:
https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12ZVL64-Bootloader-problems/m-p/1252806
Flash driver, there is one rule valid for each device. The Flash memory block is not read-while-write. So, the code is not allowed to be executed out of the memory which is currently E/W. Because of this, usually the part of the flash driver which waits for command finished flag is located in another memory. It can be in EEPROM, RAM, …., any memory which is available but not in the same memory block which is currently processed E/W. This MCU, however, do not enables for this action to use EEPROM (older families of S12 devices yes, because of different memory structure)
Simultaneous operation are described in “Table 22-31. Allowed P-Flash and EEPROM Simultaneous Operations on a single hardblock”.
The source code for “AN4723 S12Z MagniV Bootloader” can be found at bellow mentioned page.
You can also look at “AN12086 Simple Serial Bootloader for S12Z”. Can be found at:
Best regards,
Ladislav
Hello Ladislav,
thank you for your reply.
One more question about Flash Driver: in unified bootloader project, it comes already built in a .bin file and the project is for S12ZVL128 MCU.
Is the Flash Driver the same also for S12ZVLA64?
In case modification are needed, where can the flash driver's source code be found?
Thanks and regards,
Andrea