From b63865cdc560cb00d0ff56cc7a4ce29f667bbc67 Mon Sep 17 00:00:00 2001 From: Aaron Elijah Date: Thu, 27 Jun 2024 18:00:22 +0100 Subject: [PATCH] hwdef: force 100MBit fullduplex for BotBloxSwitch auto-negotiation doesn't work also disable TX/RX swap as not needed on final board --- .../AP_HAL_ChibiOS/hwdef/BotBloxSwitch/defaults.parm | 5 +---- .../AP_HAL_ChibiOS/hwdef/BotBloxSwitch/hwdef-bl.dat | 6 ++++-- libraries/AP_HAL_ChibiOS/hwdef/BotBloxSwitch/hwdef.dat | 10 ++++++++-- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/libraries/AP_HAL_ChibiOS/hwdef/BotBloxSwitch/defaults.parm b/libraries/AP_HAL_ChibiOS/hwdef/BotBloxSwitch/defaults.parm index f508c94865..3233958997 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/BotBloxSwitch/defaults.parm +++ b/libraries/AP_HAL_ChibiOS/hwdef/BotBloxSwitch/defaults.parm @@ -4,12 +4,9 @@ NET_OPTIONS 1 # enable hw flow control UART1_RTSCTS 1 -# swap TX and RX -UART1_OPTIONS 8 - SCR_ENABLE 1 SCR_VM_I_COUNT 1000000 -SCR_HEAP_SIZE 150000 +SCR_HEAP_SIZE 100000 WEB_ENABLE 1 WEB_PORT 80 diff --git a/libraries/AP_HAL_ChibiOS/hwdef/BotBloxSwitch/hwdef-bl.dat b/libraries/AP_HAL_ChibiOS/hwdef/BotBloxSwitch/hwdef-bl.dat index 03960b2247..27643dde68 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/BotBloxSwitch/hwdef-bl.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/BotBloxSwitch/hwdef-bl.dat @@ -66,10 +66,12 @@ PB11 ETH_RMII_TX_EN ETH1 PA7 ETH_RMII_CRS_DV ETH1 PA1 ETH_RMII_REF_CLK ETH1 -define BOARD_PHY_ID MII_LAN8742A_ID -define BOARD_PHY_ADDRESS 0x0005 +define BOARD_PHY_ADDRESS 5 define BOARD_PHY_RMII +# auto-negotiation doesn't work, force 100MBit full duplex +define STM32_MAC_PHY_LINK_TYPE MAC_LINK_100_FULLDUPLEX + include ../include/network_bootloader.inc SERIAL_ORDER OTG1 USART3 diff --git a/libraries/AP_HAL_ChibiOS/hwdef/BotBloxSwitch/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/BotBloxSwitch/hwdef.dat index e00fde56eb..434a87992d 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/BotBloxSwitch/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/BotBloxSwitch/hwdef.dat @@ -79,10 +79,12 @@ PB11 ETH_RMII_TX_EN ETH1 PA7 ETH_RMII_CRS_DV ETH1 PA1 ETH_RMII_REF_CLK ETH1 -define BOARD_PHY_ID MII_LAN8742A_ID -define BOARD_PHY_ADDRESS 0x0005 +define BOARD_PHY_ADDRESS 5 define BOARD_PHY_RMII +# auto-negotiation doesn't work, force 100MBit full duplex +define STM32_MAC_PHY_LINK_TYPE MAC_LINK_100_FULLDUPLEX + define HAL_PERIPH_ENABLE_NETWORKING define AP_NETWORKING_MAX_INSTANCES 4 @@ -98,6 +100,10 @@ define AP_SERIALMANAGER_REGISTER_ENABLED 1 define AP_SCRIPTING_ENABLED 1 define AP_FILESYSTEM_ROMFS_ENABLED 1 +# keep ROMFS uncompressed as we don't have enough RAM +# to uncompress the network enabled bootloader at runtime +env ROMFS_UNCOMPRESSED True + include ../include/network_PPPGW.inc define HAL_MONITOR_THREAD_ENABLED 1