Reading the first 64 bytes

Started by Nicola Fontana, March 26, 2012, 05:12:51 AM

Previous topic - Next topic

Nicola Fontana

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

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

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

I have exactly the same problem. Has the topic starter come up with any solution?

Nicola Fontana

Quote from: nick53493 on July 10, 2012, 12:51:54 PM
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