S12ZVLA64 UDS bootloader

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

S12ZVLA64 UDS bootloader

335 Views
Abor88
Contributor I

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

0 Kudos
3 Replies

297 Views
lama
NXP TechSupport
NXP TechSupport

Hi,

Yes it is the same.

Where it is? Download example, and check.... for example AN4723 S12ZVM example...

 

 

lama_1-1713957520031.png

 

 

lama_0-1713957502264.png

 

Of course, the placement of the functions is defined in the prm file

lama_2-1713957588647.png

 

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



0 Kudos

311 Views
lama
NXP TechSupport
NXP TechSupport

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:

https://community.nxp.com/t5/S12-MagniV-Microcontrollers/List-of-MagniV-and-S12-X-Application-notes/...

Best regards,

Ladislav

0 Kudos

304 Views
Abor88
Contributor I

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

0 Kudos