0
\$\begingroup\$

I'm trying to access data stored in the eeprom of an automotive ECU and I'm short on experience.

My question is how flash and eeprom are mapped and accessed by the micro. I haven't looked at the datasheet for the flash yet, but the eeprom is serial via SPI. Would I be correct in assuming that typically the flash would be mapped in to an address range on the micro, but the eeprom would be accessed by moving blocks in to ram on the micro working with them and then writing them back if needed? In other words, the eeprom doesn't have a address mapping per se, but portions can be read and worked with in ram.

I hope the question is clear.

If it helps the specific ECU is a Bosch Motronic 7.8 it has 2 Infineon C167xx processors (not sure the exact variant yet) and 800BB (1MB) flash and 95320 (32Kbit) eeprom. TIA

\$\endgroup\$
  • \$\begingroup\$ The ways in which devices (particularly SPI) can be mapped have no limit as to purpose and as to what is stored where. The physical mapping of a flash device can also be implemented in many different ways depending on the controller. \$\endgroup\$ – Peter Smith May 13 '18 at 15:47
  • \$\begingroup\$ Thanks for your response @PeterSmith. Are you saying that SPI devices can be mapped directly to an address range so that code can treat it the same (or similarly) to ram and flash? \$\endgroup\$ – sceaj May 13 '18 at 16:02
  • \$\begingroup\$ I don't think SPI devices can be "memory mapped". \$\endgroup\$ – Swanand Oct 30 '18 at 8:44
  • \$\begingroup\$ @Swanand I came to the same conclusion. For the SPI devices you need to execute routines that pull the data (some or all) into RAM and then operate on it from there. So, basically my hypothesis in the original question seems to be correct - not sure why no one has submitted an answer to that effect? \$\endgroup\$ – sceaj Nov 1 '18 at 19:54
  • \$\begingroup\$ @sceaj Done :-) \$\endgroup\$ – Swanand Nov 2 '18 at 9:43
0
\$\begingroup\$

Yes. Your assumption is correct. Flash memory is memory mapped but for SPI, it cannot be memory mapped. You have to write a driver/wrapper which will handle communication with EEPROM. It cannot be memory mapped.

As you said, You have to read information from EEPROM, modify in RAM and write it back.

\$\endgroup\$
  • \$\begingroup\$ Nice @Swanand! I was able to write a driver for MiniMon a small monitor for the ST10/C166 families. Luckily the amount of code I needed to write was small and the evaluation version of uVision was able to tackle the job. :-) \$\endgroup\$ – sceaj Nov 2 '18 at 19:26
0
\$\begingroup\$

i'd rather like to comment on your question, but i don't have enough reputation to do so...

Motronic ECUs i've dealt with mostly stored the maps' data on the eprom. You may want to dump it, since software like WinOLS can identify the various datablocks and return their addresses.

\$\endgroup\$
  • \$\begingroup\$ Thanks for your comment - I'm not looking for the maps, i.e. I'm not trying to do "tuning". I'm looking for some of the other data that is read/write. Specifically, I'm rebuilding the engine and I would like to "reset" the hours and overrev counters. Thanks! \$\endgroup\$ – sceaj Jun 30 '18 at 1:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.