cancel
Showing results for 
Search instead for 
Did you mean: 

Ethernetif.c in STM32f4 cube FW_F4 V1.28

######
Senior

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.

1 ACCEPTED SOLUTION

Accepted Solutions
LCE
Principal

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.

View solution in original post

4 REPLIES 4
LCE
Principal

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).

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. 

STea
ST Employee

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

 

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
LCE
Principal

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.