Recently I have been tuning a Honda car with an EEPROM burner.
This is a cumbersome process as with every change you need to stop the car and update the EEPROM.
To solve this there are quite a few EEPROM emulators which allow live updates to the emulated EEPROM for a PC.
You can buy the Moates Demon/Ostrich or the Hondata S300, but these cost well over 200$.
I was thinking of building my own EEPROM emulator, because I want to refresh my PCB / SW / HW knowledge a bit.
So please do not comment I can just buy something of the shelve: this project is for educational/entertainment purpose.
Technical details:
The Honda ECU uses an OKI 66207 microcontroller running at 10MHz.
The OKI 66207 reads the firmware from a 27C256 EEPROM (32kByte).
The OKI 66207 also uses an UART to send logging information.
For the PC side we need to provide USB. The tuning tool supports a few EEPROM emulators, all of which use a serial protocol.
So what I need to make is a device with a USB plug on one side and a 27C256 EPROM I/F and UART on the other side.
I would like the emulator to be able to change data while the 66207 keeps running.
This would be the biggest challenge I think.
I have already searched and found the following topic:
https://www.eevblog.com/forum/microcontrollers/looking-for-an-romram-emulator/In the past somebody called "Obeny" also developed a similar device, but unfortunately his website is down.
If somebody still has the design files I would appreciate it if somebody can send me the files.
I already looked at the hardware used by Moates and Hondata.
The Moates hardware uses a Xilinx CPLD with an Everspin MRAM. Data is updated by an ATMega and USB is provided by an FTDI chip.
The Hondata hardware uses a Xilinx CPLD together with a SRAM. Data updating and USB is provided by a NXP LPC1768.
Now I am thinking about the following solution:
Using a STM32F0 for the composite USB device and data updating, Lattice MachXO2-256 device and 2x SRAMs like ISSI IS62WV1288DBLL-45QLI.
The SRAM has an access time of 45ns, so I theory it should be possible to write to it between the OKI fetching its instructions.
However, for the first version I can just put two of these chips on board and toggle between them (so update one SRAM while the OKI fetches instructions from the other).
As a later step I can improve the VHDL / Software and ditch one of the two SRAM chips.
Anything against this approach? Any comments on the MCU / CPLD / Memory choice?
Also I was thinking about a simpler / lower cost solution, using a dual-core MCU like the NXP LPC54114.
Then write some assembly code for the Cortex-M0 to emulate the EPROM.
However, I am not sure whether the <90ns access time can be guaranteed by design.
The M0 runs at 100MHz so you can tolerate 9 instructions, but I cannot find how fast the GPIO registers and SRAM are.
Also there might be a chance the M0 gets stalled by activities of the M4 on the shared bus matrix.
So this approach seems a little risky.
Or maybe somebody has an even brighter idea how to solve this?