Fail to program FXTH87xx11 using USBDM

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

Fail to program FXTH87xx11 using USBDM

Jump to solution
11,030 Views
sunrme
Contributor III

Hi all,


I tried to use USBDM to program the FXTH87xx . But in the list of chips in Flash Programmer this MCU is absent. So, I insert this in the hcs08_devices.xml:

     <!ENTITY HCS08-alt-load-flash SYSTEM "HCS08/FXTH87xx11_Starter_Project_CW10.abs.s19">

     <flashProgram id="HCS08-alt-load-flash">

          &HCS08-alt-load-flash;

     </flashProgram>

     <device family="HCS08" name="FXTH87xx11">

          <memory type="ram">

               <memoryRange start="0x000090" end="0x00028F" />

          </memory>

          <memory registerAddress="0x1820" type="flash" securityAddress="0xFFB0">

               <securityEntryRef ref="HCS08-fnored-security"/>

               <memoryRange start="0x00C000" end="0x00DFBF" />

          </memory>

          <sdid value="0x002C" />

          <flashProgramRef ref="HCS08-alt-load-flash" />

     </device>

I'm not sure thay I use right values especially securityEntryRef section. But now flash Programmer detect my chip. But when I click Program Flash, on EraseMass status pop up error:

17375_17375.pngnew error 2.png

Hope someone can help me.

Regards

Labels (1)
Tags (3)
1 Solution
6,957 Views
pgo
Senior Contributor V

Hi Sunrme,

Could you change the end address in the XML file to 0xDFFF as it appears that there is a pseudo-vector table to be programmed as well.  Also remove the references to security - in other words use the following:

  <device family="HCS08" name="FXTH87xx11-Partial-Erase">
     <memory type="ram">
        <memoryRange start="0x000090" end="0x28F" />
     </memory>
        <memory registerAddress="0x1820" type="flash">
           <memoryRange start="0x00C000" end="0xDFFF" />
     </memory>
     <sdid value="0x002C" />
     <flashProgramRef ref="HCS08-alt-load-flash-program" />
     <note>Untested</note>
  </device>

Make sure you select EraseSelective when programming.

pastedImage_0.png

bye

View solution in original post

0 Kudos
47 Replies
350 Views
razvanmorariu
Contributor I

Hi George,

Yes, I am running on the CW10.6 version and did all the necessary updates. so I get the FXTH870000.xml already set up.

I am able to flash it and also the debug runs smoothly up to this point:

last working line of code.PNG.png

I am not very good with code but from what I understand it tries to jump to a subroutine at this address (0xE003). Checking the data sheet for the memory map that is the firmware jump table which looks empty or not accessible:

jumps to subroutine.PNG.png

Could it be that the firmware was not properly flashed or a step in the programming that I am missing?

I have just flashed the existing .s19 file from the starter project and ran the debug with this configuration:

config.PNG.png

0 Kudos
346 Views
georgepeterson
Contributor II

It looks like you corrupted the firmware jump tables in your flash; these, along with user vectors, are stored in unprotected areas. When you do flash programming I suggest restricting write access so that these areas are not overwritten.

You can restore user vectors and firmware jump tables... if you know how to do it. If not, try programming a new chip.

0 Kudos
346 Views
razvanmorariu
Contributor I

This is pretty much all I am able to set up before flashing the device.

flash.PNG.png

What settings should I be using not to interfere with the existing firmware?

0 Kudos
350 Views
georgepeterson
Contributor II

Good stuff Pgo; I hope that will get Sunrme sorted.

Btw nice sample; looks like you need to clean the solder flux with isopropyl alcohol though. Sometimes leftover flux can get to a state where it shorts pins.

0 Kudos
350 Views
pgo
Senior Contributor V

Hi George,

Yes it was a recycled board and was the victim of using solder-wick to remove move the connector.

I've changed the picture to post cleaning - still not a work of art but it's been a long time since I did aerial wiring.

bye

0 Kudos
350 Views
georgepeterson
Contributor II

There does not seem to be much support for this device on the forum.

0 Kudos