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

Conversation

ldehenni
Copy link

STM32 network interface bug fixes

Description

All modifications are isolated to the STM32 networkinterface.c file.

A documented bug in the STM32 HAL drivers has since been fixed for the F7 port (STMicroelectronics/stm32f7xx-hal-driver@2770385).

I removed warnings and asserts related to said target (F7), but kept enforcing them for F4.

In the network driver traceISR_ENTER() is called but isn't defined anywhere, not in TCP or in FreeRTOS.
I have removed it, but defining an empty macro in the appropriate file would also work.

As it wasn't respecting the iptraceXXX I sepcifically didn't add it to the ip default macros.

Test Steps

Compiling for STM32F7

Checklist:

  • [ X] I have tested my changes. No regression in existing tests.
  • I have modified and/or added unit-tests to cover the code changes in this Pull Request.

Related Issue

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Louis Dehennin added 2 commits May 23, 2025 14:12
It is not defined anywhere in TCP or FreeRTOS.
* The bug has been fixed in the F7 driver: STMicroelectronics/stm32f7xx-hal-driver@2770385
* After verification the drivers shipped with FreeRTOS-Plus-TCP contain the fix already.
* The bug is still present for the F4 drivers.
* Updated the warning accordingly.
* Enforced assert only when compiling for STM32F4.
@ldehenni ldehenni requested a review from a team as a code owner May 23, 2025 12:37
@@ -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.

@tony-josi-aws
Copy link
Member

@ldehenni

Thanks for taking time to contribute to FreeRTOS+TCP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants