@@ -75,16 +75,42 @@ static void portenta_power_init() {
7575 data[0 ]=0x94 ;
7676 data[1 ]=(20 << 3 );
7777 i2c.write (8 << 1 , data, sizeof (data));
78+
79+ // At this point in the start-up sequence, the DC/DC converter output voltages of the PF1550, power management IC (PMIC),
80+ // have been configured with the values found in the one-time programmable registers, themselves written prior to the PMIC, during production.
81+ // On some commercial samples, these values were programmed incorrectly, and the PMIC outputs 3.0V instead of 3.1 or 3.3 on the respective rails.
82+ // Therefore, it is first necessary to turn the SW1 and SW2 rails off, program the correct values in the SWx_VOLT registers,
83+ // and then turn them back on using the SWx_VOLT_CTRL register for the changes to take full effect.
84+
85+ // SW1 turn off before config (SW1_VOLT_CTRL)
86+ data[0 ]=0x35 ;
87+ data[1 ]=0x0 ;
88+ i2c.write (8 << 1 , data, sizeof (data));
7889
79- // SW2 to 3.3V (SW2_VOLT )
90+ // SW2 turn off before config (turned on by OTP settings) (SW2_CTRL )
8091 data[0 ]=0x3B ;
81- data[1 ]=0xF ;
92+ data[1 ]=0x0 ;
8293 i2c.write (8 << 1 , data, sizeof (data));
8394
84- // SW1 to 3.0V (SW1_VOLT)
95+ // SW1 set to 3.0V (SW1_VOLT)
96+ data[0 ]=0x32 ;
97+ data[1 ]=0x6 ;
98+ i2c.write (8 << 1 , data, sizeof (data));
99+
100+ // SW2 set to 3.3V (SW2_VOLT)
101+ data[0 ]=0x38 ;
102+ data[1 ]=0x7 ;
103+ i2c.write (8 << 1 , data, sizeof (data));
104+
105+ // SW1 turn back ON (SW1_CTRL)
85106 data[0 ]=0x35 ;
86107 data[1 ]=0xF ;
87108 i2c.write (8 << 1 , data, sizeof (data));
109+
110+ // SW2 turn back ON (SW2_CTRL)
111+ data[0 ]=0x3B ;
112+ data[1 ]=0xF ;
113+ i2c.write (8 << 1 , data, sizeof (data));
88114}
89115#endif
90116
0 commit comments