2024-02-29 03:58 AM - edited 2024-02-29 06:10 AM
Hello,
I've read several forum posts commenting on the STM32 HAL management of LWIP, particularly ethernetif.c and trying to understand the interrupt driven zero copy examples. For reference in my application I do not use RTOS.
After updating cube, and comparing my previous project version (based on FW_F4 V1.26.2) that the ethernetif.c file has changed quite significantly. I assume this is in reaction to feedback from users in forum posts such as this detailed post https://community.st.com/t5/stm32-mcus-embedded-software/how-to-make-ethernet-and-lwip-working-on-stm32/td-p/261456
The above mentions drivers being reworked following V1.27. And comments on problems such as [in reworked drivers].
Could someone comment on whether the ethernetif.c in FW_F4 V1.28 rectifies the problems and criticism's that have been previously discussed across the forum?
Alternatively, if the ethernetif.c is still a poor implementation, is it possible to comment on what has not been addressed (specifically to non-RTOS usage)?
Thanks.
Solved! Go to Solution.
2024-02-29 06:53 AM
> Any links to "good" resources would be appreciated.
These are held quite simple:
https://github.com/lsgunth/lwip_contrib/blob/master/ports/stm32f2x7/netif/stif.c
https://oryx-embedded.com/doc/stm32h7xx__eth__driver_8c_source.html
Basically, I just used some of their basic ideas and tried to keep things as simple and short as possible. Which it is not at all...
My ethernetif.c file holds all IO functions linking to my sources and LWIP, no OS, with about 2000 lines of code, comments excluded.
But no more HAL_ETH.
2024-02-29 04:14 AM
I think the "problematic" parts are the HAL_ETH_* functions.
I started with ethernet on a F7 when HAL_ETH was blocking & copy only, so I wrote my own driver with direct register access, stealing a lot from others who did that before me.
Definitely helps to understand, makes debugging easier.
Anyway, then came the new HAL_ETH, it looked partly too complicated / complex for me (Piranha likes to call it "bloated"), so I kept my own, also porting that to H7 (which was terrible because completely different).
2024-02-29 05:46 AM
Thanks. Writing my own at a lower level is the aim. Mainly to develop my understanding but also for maintenance going forward.
Any links to "good" resources would be appreciated.
2024-02-29 06:03 AM
Hello @###### ,
The new reworked version rectifies the problems and criticism's that have been previously discussed across the forum as well as other problems related to the driver rectified internally .
we will be happy to help you with any problems related to this software release and we are grateful for you continuous feedback helping us fine tune our solution .
BR
2024-02-29 06:53 AM
> Any links to "good" resources would be appreciated.
These are held quite simple:
https://github.com/lsgunth/lwip_contrib/blob/master/ports/stm32f2x7/netif/stif.c
https://oryx-embedded.com/doc/stm32h7xx__eth__driver_8c_source.html
Basically, I just used some of their basic ideas and tried to keep things as simple and short as possible. Which it is not at all...
My ethernetif.c file holds all IO functions linking to my sources and LWIP, no OS, with about 2000 lines of code, comments excluded.
But no more HAL_ETH.