Unlock R5F524T8ADFP RX24T 128-KB Data Flash and Keep the Counters

The smallest RX24T in the hundred-pin body carries 128 KB of code flash alongside the same 8 KB of data flash as its larger brothers, and that ratio is what makes the part interesting. A drive built on R5F524T8ADFP has half a megabyte less room for code than the top member of the family but exactly as much room for the numbers that keep it calibrated, so the data area carries proportionally far more weight.

Sixty-four blocks of code, eight of data

Code flash is 64 blocks of two kilobytes. The array is erased by an all-block command in roughly 67 milliseconds at a 32 MHz flash clock, and reprogrammed eight bytes at a time with a typical pulse of 52.3 microseconds, so a full image is about 16,384 writes and just under a second of pure flash time. Data flash is separate: eight blocks of one kilobyte, programmed one byte at a time at 40.8 microseconds, with an eight-kilobyte erase taking 12.9 milliseconds. The two regions have different endurance as well, a thousand erase cycles for code and a hundred thousand for data at the minimum rating.

That endurance figure is the practical reason to treat the two areas differently on the bench. Whatever sits in the data area has probably been rewritten many times, and a byte that has been through tens of thousands of cycles may read back with a marginal value. Reading it twice and comparing is cheap insurance.

Counters, offsets and the reason a clone drifts

Current-sense offsets, dead-time trims and the accumulated run-hour counters of an appliance controller all live in those eight blocks. When a replacement board is built from a code image alone, the drive will start but the current loop will sit at a constant error, and the fault is not in the code at all. Pulling the data area and writing it to the new part is what makes the two boards behave identically; regenerating the values from a service manual is a distant second best and often impossible.

Where the board is genuinely dead and the data area is unreadable, say so rather than substituting defaults. A note in the report stating that the offsets were lost, plus the values that were found in a companion unit, is more useful than a silent guess.

The access path on this density

Nothing about protection changes with capacity. The ID code sits at FFFF FFA0h as one control byte and fifteen ID bytes, ROM code protection is the word at FFFF FF9Ch, and the access window is mirrored at 007F C1C8h and 007F C1D0h. What does change is the value of clearing them: on a 512 KB part the erase-on-connect behaviour costs a large array, and on this one it costs 128 KB, which is small enough that some workshops treat erasure as a routine first step. It should not be routine. Once the array is gone, the data area goes with it, and the calibration that made the board worth recovering is the first casualty.

Boot mode on the RX24T family arrives through the mode pin and SCI channel 1 on PD5 and PD3, and the same header serves every density, so a fixture built for a larger part works here unchanged. A network-capable comparison from the same vendor is pulling R5F562N7BDFP firmware, where the boot path carries an extra peripheral but the authentication record is the same width.

A worked sequence

Read the data area first, all eight blocks, and store it before anything else is attempted. Then read the code array in 2 KB blocks, checking each against the controller’s blank check so that an erased region is recorded as erased rather than as a run of FFh bytes that later looks like data. Finally capture the option-setting memory at the top of the span and the unique ID, and only then decide whether the protection records need touching at all.

The order matters because the destructive step, if it happens, should be the last one and should be a decision rather than an accident. Work on a smaller array with a similar two-region split is described in reading R5F562T6AGFK, and the recovery discipline for a part that has already lost its data area is covered in boot-cluster recovery on an R5F100FE.

Deliverables

The handover is a 128 KB code image, an 8 KB data image, a block map distinguishing erased from programmed regions, the protection words as found, and a short statement of endurance evidence if any byte looked marginal. Customers who want production restarted receive both images plus the option bytes, because a code-only build on this part boots into a fault within a second. The same principle, applied to a much larger array, is what binary recovery describes at the top of the range, and harvesting R5F562G7DDXX code shows a G-series image packaged the same way.