Skip to content

Commit 026e42c

Browse files
committed
Keep Ethernet phy reset
1 parent 0108ded commit 026e42c

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

Diff for: variants/OPTA/pins_arduino.h

+2
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,8 @@ void _ontouch1200bps_();
193193

194194
#define USB_MAX_POWER (500)
195195

196+
#define ETHERNET_PHY_RESET (185)
197+
196198
static GPIO_TypeDef * const GPIO_PORT[] = {
197199
GPIOA,
198200
GPIOB,

Diff for: variants/OPTA/variant.cpp

+7-1
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ PinDescription g_APinDescription[] = {
207207
{ PJ_12, NULL, NULL, NULL },
208208
{ PJ_13, NULL, NULL, NULL },
209209
{ PJ_14, NULL, NULL, NULL },
210-
{ PJ_15, NULL, NULL, NULL },
210+
{ PJ_15, NULL, NULL, NULL }, // 185 - RESET ETHERNET PHY ON OPTA
211211
{ PK_0, NULL, NULL, NULL },
212212
{ PK_1, NULL, NULL, NULL },
213213
{ PK_2, NULL, NULL, NULL },
@@ -355,6 +355,11 @@ void initVariant() {
355355
// Disable the FMC bank1 (enabled after reset)
356356
// See https://github.com/STMicroelectronics/STM32CubeH7/blob/beced99ac090fece04d1e0eb6648b8075e156c6c/Projects/STM32H747I-DISCO/Applications/OpenAMP/OpenAMP_RTOS_PingPong/Common/Src/system_stm32h7xx.c#L215
357357
FMC_Bank1_R->BTCR[0] = 0x000030D2;
358+
359+
360+
pinMode(ETHERNET_PHY_RESET,OUTPUT);
361+
// keep ethernet phy reset...
362+
digitalWrite(ETHERNET_PHY_RESET, LOW);
358363
}
359364

360365
#ifdef SERIAL_CDC
@@ -377,6 +382,7 @@ uint8_t getUniqueSerialNumber(uint8_t* name) {
377382
}
378383

379384
void _ontouch1200bps_() {
385+
digitalWrite(ETHERNET_PHY_RESET, LOW);
380386
HAL_RTCEx_BKUPWrite(&RTCHandle, RTC_BKP_DR0, 0xDF59);
381387
NVIC_SystemReset();
382388
}

0 commit comments

Comments
 (0)