5226BB Rev G.
5.0.21
2/13/2026

Claude was used to generate code that parses Phy register contents and prints them to the debug output in human readable form. The full register contents are printed on reset. The registers are monitored in a new task and only changes are printed from there after.

The Ethernet Phy driver was not written to support anything other than full Ethernet auto-negotiation. While troubleshooting the Ethernet issues on the Rev H hardware, we needed to be able to experiment with forcing different aspects of the ethernet Phy. This involved edits to the Phy KSZ8041 driver and we added some configuration bit options to the MQX enet configuration.

In addition, the Phy driver now configures the default register values rather than relying on boot strapping, good or bad, to do it.

The Rev H board requires two TX_Buffers when sending analog values on the SPI bus. The code that was verifying the transmission was only checking one TX_Buffer, which allowed some untested code for a serial flash part to mistakenly execute and cause a processor fault. The Serial Flash code was commented out for now since we aren't using it and it needs to be fixed and tested.

Changes made for Pathfinder 5226 controllers.

Purpose: Jouanel press brakes with dual-drive clamping beams (separate left and right motors) can drift out of alignment over many bend cycles. This feature periodically triggers the external drive hardware to resynchronize both sides using its own reference sensors. The BlackBox controller does not control the sync motion itself - it signals the external hardware to perform the operation and monitors for completion.

Parameters Setup Parameters (via Foldbus 0x0001/0x0002 - PID system):

PID Name Type Default Description 353 Bends Before Clamping Beam Sync uint16 0 (disabled) Number of clamp operations between syncs. 0 = feature disabled. 354 Maximum Clamping Beam Sync Start Position float 50.0 mm Max clamp height to allow sync. If clamp is above this, sync is skipped silently.

Generic Parameters (via Foldbus 0x0003 - Attribute ID system):

Attribute ID Name Type Default Description 0x205D Sync Clear Timeout uint16 (ms) 5000 Time allowed for I_122 to turn OFF after O_125 is turned ON (handshake clear phase). 0x205E Sync Complete Timeout uint16 (ms) 10000 Time allowed for I_122 to turn ON after it has cleared (actual sync operation). 0x205F Sync Motion Timeout uint16 (ms) 2000 Time allowed for initial upward beam movement to be detected after sync starts.

I/O: Function Type Description O_125_CLAMPING_BEAM_SYNC Output Turned ON to signal external hardware to begin sync operation. Turned OFF when sync completes or on error. I_122_CLAMPING_BEAM_SYNC_COMPLETE Input External hardware signals sync completion by turning this ON. Polled in the sync function (no interrupt processing needed).

Status Reporting: Flag Location Bit Description Clamping_Beam_Sync_Active Status dFlag (0x00000080) Bit 7 Reported to Pathfinder every status poll. TRUE while sync operation is in progress.

Logic Flow

  1. Counter Management (in LoadSheetWithClamp) Two file-level static variables track sync state across function calls:

sClampCountdown (uint16) - starts at 0 on power-up sbSyncNeeded (bool) - starts false After every clamp operation completes (end of LoadSheetWithClamp), if PID 353 > 0 and mode is AUTOMATIC or higher:

If sClampCountdown == 0: sets sbSyncNeeded = true and resets counter to PID 353 value Otherwise: decrements sClampCountdown Since the counter initializes to 0 at power-up, the very first clamp operation will flag a sync.

  1. Sync Execution (in Release_Part_To_Operator) After the part is released and bending beams have moved, the code checks sbSyncNeeded. If true and mode is AUTOMATIC:

Waits for bending beam motion to complete Clears the flag Calls SB_Perform_Clamping_Beam_Sync() with the current operation's clamp open height If sync fails, returns FALSE to abort the cycle 3. The Sync Function (SB_Perform_Clamping_Beam_Sync) Pre-sync validation:

Sets gRun.ClampingBeamSyncActive = TRUE I/O config check - O_125 and I_122 must both be defined (or both undefined). Mismatch triggers E471. Position check - If clamp is above PID 354 (max start position), skips silently and returns TRUE.

Handshake sequence:

STEP 1 - Turn ON output O_125 (tells external hardware to start sync).

STEP 2 - Wait for I_122 to turn OFF (clear previous state). Timeout = Attribute 0x205D (default 5s). If I_122 doesn't clear, turns off O_125 and triggers E470 (input stuck on).

STEP 3 - Wait for I_122 to turn ON (actual sync completion). Timeout = Attribute 0x205E (default 10s). During this wait, a nested motion detection check runs: if no upward beam movement is detected within Attribute 0x205F (default 2s), turns off O_125 and triggers E469 (motion timeout). This catches wiring issues, drive faults, or controller output failures early rather than waiting the full completion timeout.

STEP 4 - Turn OFF output O_125.

STEP 5 - If beam is below the target clamp open height, raise it using SB_Jog_Clamp_Up(). If already at or above target, do nothing (never lowers).

Cleanup - Sets gRun.ClampingBeamSyncActive = FALSE at every exit point (success and all error paths).

Abort conditions - All wait loops also check gRun.eMode >= RMT_AUTOMATIC, so switching out of automatic mode during sync will exit the loops cleanly.

Changes made for Pathfinder 5226 controllers.

The location in memory at 0x400 is used to check for certain protections. One byte is reserved for in this case using a debugger. How this memory got changed to how it was supposed to be stored which made the release build actually use the protection. The previous way it was stored made it get the none protect 0xFE randomly so we could debug. The change was to just make it unprotected so we can debug the release code.

Changes made for Pathfinder 5226 controllers.

The clamp sync feature when used will make the clamp move from an external control. We check for that movement so to be able to test in simulation clamp movement will occur if the clamping beam sync output is on.