Skip to content

STM32 network interface bug fixes #1253

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions source/portable/NetworkInterface/STM32/NetworkInterface.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@

#if ipconfigIS_DISABLED( ipconfigPORT_SUPPRESS_WARNING )

#if defined( niEMAC_STM32FX ) && defined( ETH_RX_BUF_SIZE )
#warning "As of F7 V1.17.1 && F4 V1.28.0, a bug exists in the ETH HAL Driver where ETH_RX_BUF_SIZE is used instead of RxBuffLen, so ETH_RX_BUF_SIZE must == niEMAC_DATA_BUFFER_SIZE"
#if defined( niEMAC_STM32FX ) && defined( ETH_RX_BUF_SIZE ) && defined( STM32F4 )
#warning "As of F4 V1.28.0, a bug exists in the ETH HAL Driver where ETH_RX_BUF_SIZE is used instead of RxBuffLen, so ETH_RX_BUF_SIZE must == niEMAC_DATA_BUFFER_SIZE"
#endif

#if ipconfigIS_DISABLED( ipconfigDRIVER_INCLUDED_TX_IP_CHECKSUM )
Expand Down Expand Up @@ -983,7 +983,7 @@ static BaseType_t prvEthConfigInit( ETH_HandleTypeDef * pxEthHandle,
pxEthHandle->Init.RxBuffLen = niEMAC_DATA_BUFFER_SIZE;
/* configASSERT( pxEthHandle->Init.RxBuffLen <= ETH_MAX_PACKET_SIZE ); */
configASSERT( pxEthHandle->Init.RxBuffLen % 4U == 0 );
#if ( defined( niEMAC_STM32FX ) && defined( ETH_RX_BUF_SIZE ) )
#if ( defined( niEMAC_STM32FX ) && defined( ETH_RX_BUF_SIZE ) && defined( STM32F4 ) )
configASSERT( pxEthHandle->Init.RxBuffLen == ETH_RX_BUF_SIZE );
#endif

Expand Down Expand Up @@ -1786,8 +1786,6 @@ static BaseType_t prvAcceptPacket( const NetworkBufferDescriptor_t * const pxDes

void ETH_IRQHandler( void )
{
traceISR_ENTER();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

traceISR_ENTER is part of the trace macros that got added to FreeRTOS kernel with FreeRTOS/FreeRTOS-Kernel#659

The change is part of the Kernel V11.0.0 and above.

I would suggest keeping it.


ETH_HandleTypeDef * pxEthHandle = &xEthHandle;

xSwitchRequired = pdFALSE;
Expand Down