Teensy LC - EEPROM reader

Status
Not open for further replies.
Is there any way I can read/write the EEPROM of a Teensy LC ?

And, when I say any way, I mean any other way than simply flashing the Teensy with a little code to read/write the EEPROM (that's not an option at this moment).
So, is the EEPROM accesible with some sort of software/hardware like on Pic or Atmel microcontrollers ?
 
The Teensy LC has not a real EEPROM, but a small part of the program flash memory is used to emulate a very small 128 byte EEPROM. Normally, this can only be accessed by the code which is currently loaded and running in the program flash memory. Where is the interest to access these 128 byte from "outside"?
 
Yes, I know about the emulated EEPROM.
Long story short, I need the data stored in the EEPROM and I can't acces them. I'm working on a comercial project and when things go wrong, things go wrong. The HDD in my laptop crashed, so .... you can figure it out !
I can write a code in 2 minutes, flash it to Teensy and read the EEPROM right away, but I have to wipe out the existing and running code and I can't put it back, because my HDD died and all my source files with it and I'm kind of desperate !

Another solution that crossed my mind it would be to read the code (hex file) stored in the flash memory, so I can save it and put it back. Is that possible, since the EEPROM reading is such a long shot ?
 
The bootloader automatically erases the first 62K of flash (the part used for program) when it gets the first write request from Teensy Loader. This is done as a security measure to prevent freshly downloaded code from having access to any part of the previously written program. But the last 2K for EEPROM emulation is left as-is, so your freshly loaded program can at least read the EEPROM data.

Even if you could get the binary data from the chip, turning from a HEX file back into usable C++ code isn't very practical. There are programs meant for reverse engineering, like IDA Pro, but using them is quite an art and takes a lot of time to get to anything really usable.

While it won't help now, this might be a time to consider buying a backup service or hardware for your computer.
 
Hmmm, that's not a good news, but thanks for made it clear to me...
Honestly, I didn't want to try any reverse engineering on that code and turn it back to C++. I don't know how to do it and now it is not the right moment to learn that. I'll just write it again, from scratch, as I did it the first time, even it won't be a pleasant or a fast job.
All I wanted was to keep that Teensy LC working, while I rewrite the code, and use those EEPROM data at the same time...
So, all in all, reading the EEPROM it is possible only if I write a code, to do that, in Teensy and that's no way around ! Right ?
I saw some suggestions about some TeensyTransfer but I didn't get to try it. Could that be a way to solve my problem ?
 
Not sure what you mean by crashed, but have you tried to rescue your data from the dead drive by hooking it up to a desktop thru one of the internal SATA connections or getting an external USB drive enclosure? Try to browse to where your files are then copy them to a good drive. In my experience when a drive goes bad there are still plenty of workable data files available. YMMV of course.
 
Oh, believe me, I've tried everything.
When I put it in a desktop via SATA, or in an external USB drive, the system sees it, I can see the folder tree, sometimes I can browse some folders but when I try to copy files, it starts to copy and after a short time I get an error and everything stops :(
And the HDD makes strange noises...
It seems it is ...done...
 
Don't want to get your hopes up but if you can still see some of the data there most of it is probably recoverable unless the head has physically scraped most of the coating off the platter/s. Question is as always money, since step one will be somebody putting your platters into a replacement head and electronics assembly and that means you would need to want that data back enough to be paying 10-100 hours of skilled tech time + parts.

If you are in a pinch and have time it can work to take a 100% identical drive and swap the platters across, with as close to clean room conditions as you can achieve but you are still constrained by when the error checking of the consumer drive controller gives up, and your ability at swaping parts.
 
Status
Not open for further replies.
Back
Top