Author Topic: Reading the first 64 bytes  (Read 8606 times)

Nicola Fontana

  • Jr. Member
  • **
  • Posts: 3
    • View Profile
    • Email
Reading the first 64 bytes
« on: March 26, 2012, 05:12:51 am »
Hi all,

I'm developing an application that needs to read the flash. Actually I can read everything but the first 64 bytes (starting from address 0). After reading docs and googling around I discovered those bytes are remapped when in ISP mode.

Anyway it seems flash magic is perfectly able to read the correct bytes, so I'm wondering if there is an undocumented feature (or a documented one I've still not found ;) that allows to achieve what needed.

Thank you in advance.
--
Nicola

Andy Ayre

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2160
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: Reading the first 64 bytes
« Reply #1 on: March 30, 2012, 01:54:47 am »
No, not really. Flash Magic downloads a small IAP-based program into RAM and executes it to map and unmap those locations.

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

Nicola Fontana

  • Jr. Member
  • **
  • Posts: 3
    • View Profile
    • Email
Re: Reading the first 64 bytes
« Reply #2 on: April 02, 2012, 01:07:30 am »
Any chance to get that binary code and how to use it? Although changing the MEMMAP register is trivial by itself, I guess there are lot of ways to shoot yourself in the foot.
Otherwise my idea would be to implement something that:
  • remaps to flash;
  • moves the first 64 bytes to a fixed RAM position;
  • remaps to ROM;
  • turns back in ISP mode.
All but the last step seems quite straightforward.
--
Nicola

nick53493

  • Jr. Member
  • **
  • Posts: 3
    • View Profile
Re: Reading the first 64 bytes
« Reply #3 on: July 10, 2012, 12:51:54 pm »
I have exactly the same problem. Has the topic starter come up with any solution?

Nicola Fontana

  • Jr. Member
  • **
  • Posts: 3
    • View Profile
    • Email
Re: Reading the first 64 bytes
« Reply #4 on: September 15, 2012, 01:10:41 am »
I have exactly the same problem. Has the topic starter come up with any solution?

Hi Nick,

yes, I exactly developed what described here. Implementation and details can be found in my library repository (the relevant commits are dated between 2012-06-18 and 2012-06-25).

nick94593

  • Jr. Member
  • **
  • Posts: 1
    • View Profile
Re: Reading the first 64 bytes
« Reply #5 on: October 10, 2012, 05:56:53 am »
Thank you,  Nicola.