Unlock R5F51306BDFK RX130 64-Pin ID Code and Code Flash

The 64-pin RX130 comes in two bodies, and the one that matters here is the 14 by 14 millimetre LQFP with 0.8 mm pitch, coded K at the end of the part number. R5F51306BDFK holds 256 KB of code flash and 32 KB of RAM, offers fifty-three I/O, fourteen converter channels, thirty-two touch channels and both digital-to-analog outputs. The pitch is the reason engineers either love this package or avoid it: legs are far enough apart to land a probe on without a microscope, which is not true of the 0.5 mm sibling.

Authentication before anything else

Conversation starts at FFFF FFA0h. Sixteen bytes, one control byte and fifteen ID bytes, four 32-bit words in total, shared by the boot-mode serial programmer and by the on-chip debugger. The control byte decides the failure policy, and one of the policies is to erase the array on connection rather than to refuse. That behaviour is deliberate: it makes a stolen board worthless rather than merely inconvenient. It also means the first attempt on an unfamiliar unit should be made with a tool that does not auto-connect, or with the array already known to be expendable.

Three attempts is the usual allowance before the device stops answering for the session. A retry cycle costs time and, on the strictest setting, costs the entire array on the first failure, so the sensible order is to read the record’s state before trying to argue with it.

256 KB in 256 blocks

Programming works in four-byte units with a typical 52 microsecond pulse, and erasure works in one-kilobyte blocks with a typical 5.48 millisecond pulse at a 32 MHz flash clock. A complete image is 65,536 write operations and about three and a half seconds of flash time, plus verification. Data flash is a separate 8 KB region rated at a million cycles, and on this family it is used as a working store by the touch library, so it usually contains more state than a code-only read would suggest.

Version B silicon, indicated by the letter after the capacity digit, is the current build and brings the revised touch unit behaviour along with it. Where a customer holds both A and B parts in a production line, the data area is not interchangeable between them and the report should say which revision the image came from.

Why the package helps

A 0.8 mm pitch body is a gift on a populated board. The four signals that matter are the mode pin, reset, and the two serial lines of SCI channel 1, receive on P30 and transmit on P26. With 0.8 mm spacing a spring-pin jig can be built in an afternoon, and a hand-held probe on a long session is survivable. The same operation on the 0.5 mm 48-pin body needs a fixture and a steady hand.

Fourteen converter channels with a 1.4 microsecond conversion time and two analog outputs cover most appliance sensing, and thirty-two touch channels fit a membrane keypad plus a slider. Those counts are worth recording, because a replacement design that uses a smaller body will have to give some of them up.

What the image is good for

At 256 KB the firmware is small enough to be read end to end. The productive next step is to separate the touch library, which is usually a linked object with recognisable tables, from the application logic that maps keys to relays and display segments. Once those are apart, the customer has something maintainable rather than a hex file, and the reconstruction work described in flash-content extraction becomes a week rather than a month.

The same separation discipline appears in restoring an R5F562T6BGFK, where a smaller array makes the boundaries even easier to see, and the protection model that governs access here is summarised in R5F562T6EDFM flash work for a different vendor branch. Where a unit has already been erased by an accidental connection, recovering data from a secured part sets out what can still be said about the original contents.

Closing the job

Handover for this part is a 256 KB verified image, an 8 KB data-flash copy, the ID record quoted as bytes, the revision letter confirmed from the marking and from a register read, and a note on the failure policy that was in force. Where the customer wants to build new boards, the digital-to-analog outputs and the converter channel count travel with the image as a checklist, so the replacement design is not caught out by a peripheral that was present on the old die and absent on the new one. Cases with a similar scope but a different authentication path include the R5F562N7BDBG lock case, which is worth reading for the failure-policy discussion alone.