Author Topic: ISP bug  (Read 6151 times)

Valenti

  • Jr. Member
  • **
  • Posts: 3
    • View Profile
ISP bug
« on: September 08, 2010, 05:00:48 am »
Hi,

I have seen in ISP code (LPC_ISP_8K_V04.a51) than after calling an IAP function (from bootrom) checks the F0 flag to indicate whether an error has occurred. But the user manual of the 89LPC932A1 (UM10109) specifies the Cy flag to indicate an error when using IAP. To be sure of that, I have read and disassembled the bootrom code and I can confirm that Cy is the flag used. So, due this bug, does this mean that FlashMagic has no control of whether is an erase/program error occurs?

Best Regards,

Valenti

PD: I found another bug in bootrom code. The "Progam User Code Page" can use IDATA (F1=0) or XDATA (F1=1), but after program only checks with IDATA. So, if you use XDATA, even with a succesful programming, always you get a verify error (VE). But this does not affect the ISP as this only uses memory IDATA.

Andy Ayre

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2160
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: ISP bug
« Reply #1 on: September 08, 2010, 03:54:15 pm »
Flash Magic has no control over what the bootloader returns to it.

However, assuming there is a problem erase and program errors can be detected by using the CRC feature in the LPC9xx to make sure what you programmed matches your hex file.

Andy
Embedded Systems Academy, Inc.
support at esacademy dot com

Valenti

  • Jr. Member
  • **
  • Posts: 3
    • View Profile
Re: ISP bug
« Reply #2 on: September 09, 2010, 12:42:08 am »
Hi Andy,

Thanks for your quickly answer. Your workaround is good. Due to the importance of this issue, please let me make a suggestion for Flashmagic: Why not add a checkbox in the 'Options' (Setp 4) to run the "Cyclic Redundancy Check" after programming?

Best regards,

Valenti

Andy Ayre

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2160
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: ISP bug
« Reply #3 on: September 09, 2010, 08:40:44 am »
We have that feature request on our to do list.

Andy
Embedded Systems Academy, Inc.
support at esacademy dot com

Valenti

  • Jr. Member
  • **
  • Posts: 3
    • View Profile
Re: ISP bug
« Reply #4 on: September 10, 2010, 02:21:28 am »
Hi Andy,

That's perfect. Sorry, but let me to add one more suggestion: on the current "Cyclic Redundancy Check" option, usually the ISP file (eg LPC_ISP_8K_V04.HEX) is added to validate the sector 7 CRC or the global CRC. Thus, to avoid having to add it each time, this file name could be stored in the Flashmagic setting file (.fms).

Thanks in advance for your good job.

Best Regards,

Valenti