Author Topic: P89C60X2: FM fails with exception  (Read 5149 times)

peter schr

  • Guest
P89C60X2: FM fails with exception
« on: April 05, 2005, 05:17:10 am »
hi,

I use a P89C60X2, which I yet programmed parallel via HiLo-Programmer successfully.
Now I try to program the micro via ISP with FlashMagic. I can erase and read a new device but the parallel programmed device does not  respond to FlashMagic, even not, when I set the status byte to FF via HiLo-Programmer.
I did the 'Hardware Activation of the Boot Loader ' as described in the P89C60 datasheet : PSEN low, ALE not connected and VPP = 5V (the datasheet says : 'EA greater than VIH (such as +5C) , must it be greater  to invoke ISP ??), but obviously only the new device in my application is in ISP-mode., the parallel programmed one always starts my application code.

2nd problem I have is, I can erase and read the new micro, but when I start to program it via Flash Magic, it stops with an error message: exception C0000005 at address 00262E42 (fm_program).  
FlashMagic is rev. 2.11, running with Windows 2000 sp4 on a AMD Athlon XP2600+. I tried re-installation of Flashmagic and had it also run on a laptop with Windows ME, it also failed.

Lots of thanks for help and best regards
peter


Andy Ayre

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2190
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: P89C60X2: FM fails with exception
« Reply #1 on: April 05, 2005, 09:57:07 am »
/EA must be greater than VIH. VIH is defined in the datasheet as 0.2 x VCC + 0.9 as the minimum voltage required for a logic 1 at an input. So if VCC is 5V, then VIH is at least 1.9V. As you can see, regardless of what VCC is if /EA is tied to VCC then you are well above VIH.

What does your parallel programmer say the boot vector is? In order to use ISP it must be set to 0xFC. If it is set to that then I would ask your parallel programmer vendor what their programmer might be doing to cause devices to no longer enter ISP mode.

Is the exception error reproduceable? I.e. does it happen every time? If so please save your settings in Flash Magic to a file (File -> Save Settings...) and email me your settings file and your hex file.

Embedded Systems Academy, Inc.
support at esacademy dot com

peter schr

  • Guest
Re: P89C60X2: FM fails with exception
« Reply #2 on: April 06, 2005, 03:15:39 am »
hi andy,

thanks a lot for your real quick help.

While preparing the infos you wanted me to send to you and thinking this and that I wondered wether my hex-file might be worse, cause also the file information of FM failed with an exception and indeed: it was  a INTEL hex file with lots of symbols and stuff at the beginning. Without this it works fine.

Now I'm working on my 2nd problem, I'm in contact with the HiLo-support about the problem. 0xFC for bootvector I tried (HiLo-default is 0x00), but without success, the micro still runs my application. The only way to force it to ISP is to set the status byte to 0xFF via HiLo, only then it will start the bootloader . Another strange thing is, that in this situation it starts my application when having PSEN tied low. (I would need it other way round)  This problem is not very important, because in series state we do not program the devices parallel, we will use new devices and Flash Magic !!.

Best regards
Peter

Andy Ayre

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2190
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: P89C60X2: FM fails with exception
« Reply #3 on: April 06, 2005, 08:43:46 am »
Are you saying there was junk or illegal characters in your hex file? If so I would like to see it so I can ensure Flash Magic can ignore those characters without crashing in the future.

If the status byte is FFH then it doesn't matter what the state of the pins are at reset, the device will always enter ISP mode. If the status byte is 00H, then you can control whether the device enters ISP mode or not by setting the pins as described in the datasheet during reset. In either case, the boot vector must be FCH.

Embedded Systems Academy, Inc.
support at esacademy dot com

Andy Ayre

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2190
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: P89C60X2: FM fails with exception
« Reply #4 on: May 16, 2005, 10:25:07 am »
Version 2.14 of FM is now available that will ignore symbolic information included at the start of a hex file. Although not a valid hex file, FM now does better at making the best of the situation. :)

Embedded Systems Academy, Inc.
support at esacademy dot com