Author Topic: Erase Flash Pages works incorrectly...  (Read 8349 times)

Jan Waclawek

  • Full Member
  • ***
  • Posts: 220
    • View Profile
    • EFTON homepage
Erase Flash Pages works incorrectly...
« on: July 06, 2008, 05:05:19 am »
... erasing blocks 0 and/or 1 only (I installed a freshly downloaded version of FM to confirm).

This is most probably the classical pitfall of sending "page number" rather than address of the first byte in page - but I was lazy to verify by sniffing the communication ;-)

While speaking about page erase, could you please add an Erase Pages used by Hex File option? Thanks.

Jan Waclawek

Andy Ayre

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2172
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: Erase Flash Pages works incorrectly...
« Reply #1 on: July 07, 2008, 09:03:19 am »
If I recall, the failure to erase some flash blocks was due to a bug in the bootloader. Are you running the latest version? I know this problem has been posted on here several times in the past.

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

Jan Waclawek

  • Full Member
  • ***
  • Posts: 220
    • View Profile
    • EFTON homepage
Re: Erase Flash Pages works incorrectly...
« Reply #2 on: July 17, 2008, 01:02:16 pm »
If I recall, the failure to erase some flash blocks was due to a bug in the bootloader. Are you running the latest version? I know this problem has been posted on here several times in the past.

Although I am running bootloader v4 (as came with the chip), I am not quite convinced this is the case, sorry. When I will grab some time to get back to my '51 hobby I will make a sniffer cable and post the result...

Jan

Andy Ayre

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2172
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: Erase Flash Pages works incorrectly...
« Reply #3 on: July 17, 2008, 01:18:01 pm »
Although there may be other possible causes, upgrading the bootloader is a quick and easy test. Let us know what you find out.

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

Jan Waclawek

  • Full Member
  • ***
  • Posts: 220
    • View Profile
    • EFTON homepage
Re: Erase Flash Pages works incorrectly...
« Reply #4 on: July 17, 2008, 02:23:21 pm »
Although there may be other possible causes, upgrading the bootloader is a quick and easy test. Let us know what you find out.

Andy
Hummmm....

I tried and it indeed does work; however, I am now quite convinced that it is FM which behaves in a different way for the v4 and v7 bootloader. I will make more experiments and report.

JW



Jan Waclawek

  • Full Member
  • ***
  • Posts: 220
    • View Profile
    • EFTON homepage
Re: Erase Flash Pages works incorrectly...
« Reply #5 on: July 23, 2008, 02:47:57 pm »
OK so I have to apologize, Andy - yes, version 4 of bootloader is flawed as far as page erase is concerned.

Jan Waclawek