SLVAFV8A July 2024 – July 2025 TPS25751
Upon a cold boot (power cycle or GAID), the PD controller enters PTCH mode and only the Ready for Patch[81] interrupt is enabled automatically. The interrupt registers can be updated while in PTCH mode. This PBM implementation uses the Ready for Patch and CMD1 complete interrupts. The primary reason for using interrupts instead of polling the registers is to reduce the PD controller CPU loading to just the activities associated with the commands.
The Ready for Patch interrupt is used at the beginning of the PBM process to indicate that the PD controller is ready. The CMD1 complete interrupt is used to alert the EC that the PBMs and PBMc commands are complete. Polling of the MODE register, 0x03, is still included in this example to account for the time when the patch is loaded but the PD controller is not yet transitioned to the application mode: APP.
PTCH and APP modes are described in the PD controller TRMs. The EEPROM on the PD controller EVM is disabled (SDA disconnected) and therefore the PD controller transitions to and stays in PTCH mode. The check for the PTCH mode at the beginning of the process is not necessary but included for completeness. The following is the example for the command and the logic analyzer capture is shown in Read PTCH Mode.
[0x21] + ACK (Unique Address/Wr/A)
0x03 + ACK (Register Number/A)
[0x21] + ACK (Unique Address/R/A)
0x04 (Byte Count)
0x50 0x54 0x43 0x48 (PTCH in 4ASCII characters)
The CMD1 complete interrupt is used to alert the EC that the PBMs command is complete. Setting the Interrupt Mask and clearing the interrupts are accomplished with registers 0x16 and 0x18, respectively. See 1 and 2
[0x21] + ACK (Unique Address/Wr/A)
0x16 + ACK (Register Number/A)
0x0B (Byte Count)
0x00 0x00 0x00 0x40 0x00 0x00 0x00 0x00 0x00 0x00 0x01 (MSB)
[0x21] + ACK (Unique Address/Wr/A)
0x18 + ACK (Register Number/A)
0x0B (Byte Count)
0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF (MSB)
The PBMs command is defined in the TRM reference. For this example, the parameters for PBMs are listed in Table 4-1.
| Description | Value | Comment |
|---|---|---|
| Bundle Size | 0x00002C80 | See Section 5 |
| I2C Burst Data Target Address | 0x30 | 0x30, See reference 1. |
| Timeout | 0x31 | 3.1 seconds; see reference 1 |
[0x21] + ACK (Unique Address/Wr/A)
0x09 + ACK (Register Number/A)
0x06 (Byte Count)
0x80 0x2C 0x00 0x00 0x30 0x32 (bundle size, I2C target address, timeout value)
Sending the PBMs command requires writing to the DATA register multiple times. In the example, the values of 0x09 are confirmed before writing the PBMs command in register 0x08. There is a delay of 500us between the writing to and reading from register 0x09.
[0x21] + ACK (Unique Address/Wr/A)
0x09 + ACK (Register Number/A)
[0x21] + ACK (Unique Address/R/A)
0x40 (Byte Count)
0x00 0x00 0x00 0x00 0x00 0x00 (incorrect, rewrite DATA1)
0x80 0x2C 0x00 0x00 0x30 0x32 (correct, proceed to writing CMD1)
After confirming DATA1, then write CMD1 = PBMs. The I2Ct_IRQ asserts low as shown in Figure 4-6.
[0x20] + ACK (Unique Address/Wr/A)
0x08 + ACK (Register Number/A)
0x04 (Byte Count)
0x50 0x42 0x4D 0x73 (PBMs in 4ASCII characters)
The IRQ signal represents when the CMD1 Complete event has occurred and the CMD1 and DATA registers can be read to confirm the outcome of the PBMs command. The expected results are shown in steps 8 and 9.
The command register, 0x08, indicates that the command is successfully completed when the content of the register is cleared. For simplicity the example only checks the first bit to confirm that the contents are not “!CMD” which indicates that the PBMs command was corrupted or the DATA register was loaded with an illegal value(1).
[0x21] + ACK (Unique Address/Wr/A)
0x08 + ACK (Register Number/A)
[0x21] + ACK (Unique Address/R/A)
0x04 (Byte Count)
0x00 0x00 0x00 0x00
The data register, 0x09, indicates a successful patch when the first byte, PatchStartStatus, is cleared. Non-zero values of PatchStartStatue, 0x04, 0x05, and 0x06, indicate invalid bundle size, target address, or timeout value, respectively. See 1.
[0x21] + ACK (Unique Address/Wr/A)
0x09 + ACK (Register Number/A)
[0x21] + ACK (Unique Address/R/A)
0x40 (Byte Count)
0x00 0x00 0x00 0x00 0x30 0x31
In this step the PMBUS format is not used and the contents of the binary image are written directly to the I2C Burst Data Target Address, specified in the PBMs command, table reference. The burst format is impacted by the MCU architecture. In this case, the burst size is limited to 4KB so three successive bursts (4095bytes, 4095bytes, and 3202bytes) are sent to the PD with a 500us delay between each burst. An additional 500us delay is added to delay when the PBMc command is sent relative to the end of the final burst.
[0x30] + ACK (Unique Address/Wr/A)
lowRegion_i2c_array[0], lowRegion_i2c_array[1]..., lowRegion_i2c_array[4094]
[0x30] + ACK (Unique Address/Wr/A)
lowRegion_i2c_array[4095], lowRegion_i2c_array[4096]..., lowRegion_i2c_array[8189]
[0x30] + ACK (Unique Address/Wr/A)
lowRegion_i2c_array[8190], lowRegion_i2c_array[8191]..., lowRegion_i2c_array[11391]
The CMD1 complete interrupt is used to alert the EC that the PBMc command is complete. Setting the Interrupt Mask and clearing the interrupts are accomplished with registers 0x16 and 0x18, respectively. The interrupt mask was already set in step 3. Repeat clearing the interrupt as shown in Figure 4-4 and Figure 4-7.
The PBMc command does not include input data so the command only is sent.
[0x21] + ACK (Unique Address/Wr/A)
0x08 + ACK (Register Number/A)
[0x21] + ACK (Unique Address/R/A)
0x04 (Byte Count)
0x50 0x42 0x4D 0x63 (‘PBMc’ in 4ASCII characters)
The IRQ signal represents when the CMD1 Complete event has occurred and the CMD1 register can be read to confirm the outcome of the PBMc command.
Similar to the PBMs CMD1 clear the CMD1 register is read and confirmed to be cleared of the original command and not equal to !CMD.
The 20ms delay allows the PD controller to load and apply the image. Once the delay elapses, the DATA1 and Mode registers are read to confirm the success.
In this instance, 40 bytes are read from the DATA1 register.
The final step is to verify that the PD has transitioned to the APP mode. Once in APP mode, the PD controller is now operational with the custom configuration applied.
[0x21] + ACK (Unique Address/Wr/A)
0x03 + ACK (Register Number/A)
[0x21] + ACK (Unique Address/R/A)
0x04 (Byte Count)
0x41 0x50 0x50 0x20 ('APP ' in 4 ASCII characters)