usbdm problem page whit mc9s12dp512

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

usbdm problem page whit mc9s12dp512

Jump to solution
4,960 Views
domenico_petruzzelli
Contributor I
 

 I managed to get USBDM to communicate with MC9S12DP512. now I need to understand which areas I need to insert to read all of flash. I looked at the whole forum but I didn't understand much. in the memory dump I only have 20 lines but the page blocks are 24 in total who helps me?


 

 

0 Kudos
1 Solution
4,842 Views
pgo
Senior Contributor V

Please reply by clicking on the button below the posting you are replying to. This discussion is becoming hard to follow.

The only reason I can think for you to be getting multiple pages containing the same data is if the PPAGE register address is not set correctly on the memory dump program.

According to the data for the mc9s12dp512 the PPAGE address is 30.

I no longer have a mc9s12dp512 for testing but trying with a smaller MC9S12DG128, which has similar paging, it works fine.  I can create an image using memory dump and verify it with the programmer.  I can also program it and read it back and get the same image.  This is using an original image file containing random data fully filling the memory ranges.

Please post the original bin file and the converted file for reference.

Note:  There appears to be a bug in the Memory Dump program where it doesn't load the PPAGE value correctly from a config file if a value has already be set.  Please make sure the PPAGE value is 30.

bye

 

View solution in original post

0 Kudos
9 Replies
4,947 Views
pgo
Senior Contributor V

Hi,

I'm unsure what you are asking.

The mc9s12dp512 has 32 pages.

Memory dump supports up to 32 regions.

What is the problem?

Are you using the current version?

0 Kudos
4,935 Views
domenico_petruzzelli
Contributor I

check if it is ok  my id area on memory dump for mc9s12dp512

it is my first time whit usbdm and mcu whit page

0 Kudos
4,910 Views
pgo
Senior Contributor V

Hi,

Based on the data sheet the I would expect the default memory map to be:

  • EEPROM 0x0000 - 0x0FFF (only visible 0x0400 0x0FFF as hidden by registers) (default location see INITEE)
  • FLASH 0x4000 - 0x7FFF Fixed flash block 3E
  • FLASH 0x8000 - 0xBFFF Flash window pages 0x20-0x3F controlled by PPAGE (assume 0x20-0x3D)
  • FLASH 0xC000 - 0xFFFF Fixed flash block 3F

I do not understand where you got some of your numbers.

I have attached a config file (rename it to .cfg to use) for the memory dump program that will read all of the FLASH memory (32 pages).

If you need the EEPROM you will need to read it separately and you may need to set up INITEE as part of it is hidden by the registers.

bye

PS. It is a long time since I sued HCS12 chips.  You might get a more informed answer on another forum e.g. https://community.nxp.com/t5/S12-MagniV-Microcontrollers/bd-p/16-bit

 

0 Kudos
4,903 Views
domenico_petruzzelli
Contributor I

the last info

usbdm have possibility to write file bin?

because i fave file bin

tnx

0 Kudos
4,892 Views
pgo
Senior Contributor V

I am unclear what you mean by 'file bin'

The HCS12 programmer should be able to write the '.s19 file' produced from MemoryDump.

It would really help if you described what you are doing rather than fragmented questions.  You are more likely to get an informed answer.

It occurs to me that you may be doing two things - I have no idea which:

  • Copying the image from one chip to another.
    • This can be achieved by using Memory Dump to obtain an image which is then written to the other chip using the HCS12 programmer.  There is little risk in doing this providing the "other chip" is not currently useful.  If it is unsuccessful then it may be due to the wrong memory image or missing EEPROM data.  You can then try changing the memory ranges to fix the problem and try again.
  • Replacing the contents of a currently in use chip with a NEW image you have from somewhere else (e.g. read from another chip).
    • The Memory Dump program can be used to back-up the original contents of the target chip BUT this will only be successful if the data saved is complete ie. contains all the useful information currently programmed to the chip.  This will only be the case if the memory ranges are correct and complete.  The chip would have to be unsecured of course to allow this back-up.
    • If you reprogram the chip but are not happy with the result you can restore the original contents but there is the obvious risk of the saved image being incomplete.
    • Programming the new image will only be possible if it is in the correct format.  The HCS12 programmer does not accept 'bin' files i.e. raw memory images, as there is no standard format for paged memory devices such as the HCS12.

If you are trying to make an backup image of a chip it is a good idea to load that image into the HCS12 programmer and do a verify operation.  The programmer has more information about the target chip than the Memory Dump program.  Doing verify will help to detect some incorrect memory mapping problems.  This will not detect information missing from the image.  When doing this verify process select the 'Keep Empty SRECs' option when making the image so that checks on blank segments will also be done.

bye

0 Kudos
4,936 Views
domenico_petruzzelli
Contributor I
hi tnx... i downloading the last version and now is ok...pls u control the id area and tell me if it is ok.. tnx
it is my fiest time whit usbdm and mcu whit page....
0 Kudos
4,850 Views
domenico_petruzzelli
Contributor I

Ok tnx

I have a original firmware but It Is bin.. i want make a backup tò mc9s12.

I use Memory dump With Ur file With area, but i have 1 Page Memory i all area repeat for 32 Page the same information.

I transform With winhex firmware.bin in s19 and i use hcs12 programmer i write a mc9s12 and i dont have errore.. i check with verify and dont have error.

Now i have mc9s12 With original firmware open Memory dump and i read all chip..now i expect the file out side tò Memory dump and my firmware are egualy but It Is not true. In this case file out side tò Memory dum have 1 Page  repeted for all 32.

I use windows 7 and usbdm With 4.12.295 

 

0 Kudos
4,843 Views
pgo
Senior Contributor V

Please reply by clicking on the button below the posting you are replying to. This discussion is becoming hard to follow.

The only reason I can think for you to be getting multiple pages containing the same data is if the PPAGE register address is not set correctly on the memory dump program.

According to the data for the mc9s12dp512 the PPAGE address is 30.

I no longer have a mc9s12dp512 for testing but trying with a smaller MC9S12DG128, which has similar paging, it works fine.  I can create an image using memory dump and verify it with the programmer.  I can also program it and read it back and get the same image.  This is using an original image file containing random data fully filling the memory ranges.

Please post the original bin file and the converted file for reference.

Note:  There appears to be a bug in the Memory Dump program where it doesn't load the PPAGE value correctly from a config file if a value has already be set.  Please make sure the PPAGE value is 30.

bye

 

0 Kudos
4,826 Views
domenico_petruzzelli
Contributor I

tnx PGO

now it is ok

the problem is my pc whit windows 7 italian language..

with windows 7 english the original firmware and clone firmware is egualy

 

0 Kudos