Skip to content

Commit acfceb1

Browse files
committed
portenta_h7: make sure configuration is only executed by M7
1 parent 28a1997 commit acfceb1

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Diff for: targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H747xI/TARGET_PORTENTA_H7/portenta_power.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
******************************************************************************/
2727
void enableEthPowerSupply(void)
2828
{
29+
#ifndef CORE_CM4
2930
/* Ensure ETH power supply */
3031
mbed::I2C i2c(PB_7, PB_6);
3132

@@ -48,5 +49,5 @@ void enableEthPowerSupply(void)
4849
data[0] = 0x35;
4950
data[1] = 0xF;
5051
i2c.write(8 << 1, data, sizeof(data));
51-
52+
#endif
5253
}

Diff for: targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H747xI/TARGET_PORTENTA_H7/system_clock_override.c

+2
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ uint8_t SetSysClock_PLL_HSE(uint8_t bypass, bool lowspeed)
129129
}
130130
}
131131

132+
#ifndef CORE_CM4
132133
/* Enable oscillator pin */
133134
__HAL_RCC_GPIOH_CLK_ENABLE();
134135
GPIO_InitTypeDef gpio_osc_init_structure;
@@ -139,6 +140,7 @@ uint8_t SetSysClock_PLL_HSE(uint8_t bypass, bool lowspeed)
139140
HAL_GPIO_Init(GPIOH, &gpio_osc_init_structure);
140141
HAL_Delay(10);
141142
HAL_GPIO_WritePin(GPIOH, GPIO_PIN_1, 1);
143+
#endif
142144

143145
/* Supply configuration update enable */
144146
#if HSE_VALUE == 27000000

0 commit comments

Comments
 (0)