Skip to main content

Working with TMPM370

RAM loader

A custom RAM Loader is used for working with TMPM370. What is it?

info

Bootloader, ram loader, flash routine — basic concepts in device programming.

RAM (Random Access Memory) — volatile memory with random access.

Loader, Bootloader — a special program that can overwrite Flash memory. Usually, the controller starts by running the Bootloader (Boot — loading), then switches to user code. To avoid confusion, the loader loaded after startup is called simply Loader.

Flash routine, flash algorithm — a subroutine within the loader responsible for direct Flash memory programming. It is a lower-level component than the loader and is often encapsulated, meaning we only have access to the loader itself.

Why load the Loader into RAM?

RAM allows writing arbitrary code (not limited by size or sectors) and keeps it until power-off or reset. This code can also be executed.

So we write code, load it into MCU RAM, and then it executes it?

Yes, exactly.

Why write your own Loader?

A custom loader provides full control and enables implementing any functionality in a convenient way.
Often the factory bootloader (which is already a Bootloader) is functionally limited, has inconvenient command sets, and some commands may be missing.

What does a custom RAM Loader provide in the context of TMPM?

For example, EEPROM: boards for which the TMPM module was created have onboard 24C04 EEPROM on the I2C bus, and some also have 93C66 EEPROM on the SPI bus.

info

This means there is no need to disassemble the module or change connections — working with each target (TMPM, 24C04, 93C66) goes through a single connector. To select the target in the Target Selector, choose either TMPM370 or TMPM370 + the required EEPROM type.

As an example, for 24C04, the RAM Loader works as follows:

  1. TMPM is under our control — our RAM Loader runs there.
  2. TMPM receives a command from TGSN to read, for example, 24C04.
  3. It accesses the I2C bus and reads or writes 24C04.
  4. If 24C04 is absent on the I2C bus, an error will occur.

With SPI (93C66), it is more complicated.

warning

The factory 93C66 has no feedback on Connect or Read — only on Write/Erase.

93C66:

  1. TMPM receives a command from TGSN to read, for example, 93C66.
  2. It accesses the SPI bus; technically there is no way to detect if 93C66 is present or not.
  3. It reads the SPI bus; if 93C66 is not on the board, anything can be on the bus, but usually zeros are received.
  4. The presence of 93C66 can only be verified by Write/Erase commands.

Is it mandatory to erase EEPROM before writing?

Yes, it is mandatory; otherwise, a Target BlankCheck error will occur.
This is our concept: before writing, the user must erase memory to eliminate risks of accidental overwrite.

Connection

Base connection