I have this fix on my source tree added yesterday (on top of the 20 stable code):
https://osdn.net/projects/chibios/scm/svn/commits/13724
I've configured:
#define CH_CFG_USE_HEAP FALSE
and I'm working with lwip 2.1.7 with my suggested change to use memory pools.
These are the MAC & ETH settings I'm using (note that docs suggest I should have multiples of 4 for STM32_MAC_TRANSMIT_BUFFERS and STM32_MAC_BUFFERS_SIZE):
Code: Select all
grep MAC *
halconf.h: * @brief Enables the MAC subsystem.
halconf.h:#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
halconf.h:#define HAL_USE_MAC TRUE
halconf.h:/* MAC driver related settings. */
halconf.h:#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
halconf.h:#define MAC_USE_ZERO_COPY FALSE
halconf.h:#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__)
halconf.h:#define MAC_USE_EVENTS TRUE
mcuconf.h: * MAC driver system settings.
mcuconf.h:#define STM32_MAC_TRANSMIT_BUFFERS 2
mcuconf.h:#define STM32_MAC_RECEIVE_BUFFERS 4
mcuconf.h:#define STM32_MAC_BUFFERS_SIZE 1522
mcuconf.h:#define STM32_MAC_PHY_TIMEOUT 100
mcuconf.h:#define STM32_MAC_ETH1_CHANGE_PHY_STATE TRUE
mcuconf.h:#define STM32_MAC_ETH1_IRQ_PRIORITY 13
mcuconf.h:#define STM32_MAC_IP_CHECKSUM_OFFLOAD 0
grep ETH *
mcuconf.h:#define STM32_MAC_ETH1_CHANGE_PHY_STATE TRUE
mcuconf.h:#define STM32_MAC_ETH1_IRQ_PRIORITY 13
Mike