How to flash MPC56 by Jtag the memory "Data Flash 64K" ?

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

How to flash MPC56 by Jtag the memory "Data Flash 64K" ?

2,483 Views
tommelou
Contributor I

Hello,

does anyone know how to flash with Jlink by Jtag the memory "Data Flash 64K" on MPC5602D (or Family MPC)?

Usually I flash my .elf for debug with IC5000 that works well. But it need some licence with WinIdea.

With the Jtag I just add a pull down on Nrest and GND.

SWD is not allow on the Nexus 1, so I use Jtag conf.

I made some .jlinkscript to flash my µC from my .elf file with 3 parts (converted into .srec with srec_cat.exe):

Flash Code 256KB : 0x00000000 - 0x00003FFFF

Data Code 64KB : 0x00800000 - 0x0080FFFF

SRAM 16 KB : 0x40000000 - 0x40003FFF

I tried to flash the full .srec, but when flashing there is error of writing.

I tried to flash separate 3 parts. Flash Code and SRAM are well flashed, but not Data Code, so my software running, but with bad config data.

In the datasheet I see that to Flash the Data Flash the Code Flash must be powered.

So I try to add the "power on perm" command in my script but it changed nothing.

My µC is already externaly powered, so the option Jlink is up but the ITarget still 0mA (because no consumption on JLink)

I tried too to unlock memory by this option in my script, that's seems to be the only device working.

//unlock flash
unlock LM3Sxxx

Here is one of my script.jlinkscript :

device MPC5602D
//configure JTAG
si jtag
//Autodetect IRPre and DRPre
JTAGConf -1,-1
//1600Khz is the max for MPC5602D, known using command "hwinfo"
speed 1600

erase

//load 3 parts

loadfile ".\BinToFlash\my_file_3parts.srec"

//load part by part, other option to uncomment

//loadfile ".\BinToFlash\my_file_part_ONE.srec"
//loadfile ".\BinToFlash\my_file_part_SRAM.srec"
//loadfile ".\BinToFlash\my_file_part_DATA.srec"

//reset delay 5ms, made in other script call by my .bat
//rx 100

//going out the script to run other script

exit

//g made in other script call by my .bat

If someone have some issue or any idea to search for.

Thank you.

Tags (5)
0 Kudos
Reply
2 Replies

2,382 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

our support team is able to help with debug probes from Pemicro and with CodeWarrior or S32 Design Studio. Then we also use tools from Lauterbach. But no one from our team has experience with Jlink. Hopefully some other community members can help.

Regards,

Lukas

0 Kudos
Reply

2,382 Views
tommelou
Contributor I

Hi, thank you but I can still debug and flash with IC5000 (only 2 parts). The purpose is to use Jlink only to flash during production process (because we have a lot), and so liberate IC5000 only for a developpement debug use.

0 Kudos
Reply