cancel
Showing results for 
Search instead for 
Did you mean: 

Ethernet with Nucleo-144 STM32F746GZ did not work with STM32CubeIDE 1.10.1 and STM32F7 library 1.70.1. The CubeMX is 6.6.1.2.

Riscy
Senior

The Nucleo-144 F746GZ board worked fine with legacy Ethernet FW from System Workspace (as well as demo FW from System Workspace). I have added PG12 for Phy Reset however I am unable to get ethernet up via a twisted ethernet connection to the laptop. I was able to ping via legacy FW but not the Cube FW which I'm working on. I have Wireshark which APR broadcast did not occur with IP:192.168.41.7 / SN: 255.255.255.0 / DA:192.168.41.2. I have tried for many days and could not get it working.

I currently using STM32CubeIDE 1.10.1 and STM32F7 library 1.70.1. The CubeMX is 6.6.1.2. I'm familiar with Ethernet HAL Driver upgrade.

Attached.

Please help.

16 REPLIES 16
Piranha
Chief II

> STM32Cube 1.10.1 and STM32F7 library 1.70.1. The CubeMX is 6.6.1.2

STM32Cube what? You mean CubeIDE! And then those version numbers for the other two products... You should check your vision.

Anyway, ST's Ethernet/lwIP code has never worked fine:

https://community.st.com/s/question/0D50X0000BOtfhnSQB/how-to-make-ethernet-and-lwip-working-on-stm32

And with the driver rework for F4 and F7 they managed to make it somewhat worse:

https://community.st.com/s/question/0D53W00001VYkb5SAD/stm32f417-lwip-udp-packets-are-being-truncated

Riscy
Senior

Thank you for the reply Piranha, but I already read them all and it looks like there are still many issues to resolve despite reworks on the ETH driver. Out of frustration, I forget to add IDE after STMCube, my deepest apologies. .It seems to be lacking ethernet build guideline documentation and UM1713 seems to be out of date. What bothers me there is no actual demo/example code package coming within Library STM32F7 and alike, generated by actual CubeMX files (and work around if any) as a reference base to get confidence. I like to stress CubeMX is a good ecosystem for simple peripherals, but unsure about the Ethernet side.

Riscy
Senior

I'm considering ordering Nucleo-144 H723 to give it a try, is this worth a venture?

Last week I managed to get LwIP 2.1.3 running on an STM32F767. There are a bunch of issues with the ST sample code for the F7, actually for anything other than the H7s.

The setup of the MPU in the examples is just plain wrong. The proper start address should be 0x2007C000 for 16k and 0x2007C000 for 512 bytes, get rid of the setup for 4G at 0x0. The descriptors should be placed at 0x2007C000 and 0x2007C0A0. The RX buffer should be placed at 0x2007C200.

The RX buffer needs to be between 4 and 8 structs long, according to the comments, it is 12 and will not fit in any 16kB region (since it is 19kB in the examples). By reducing the size to 8, it comes out to 12kB and will fit into the non-cached, non-buffered region set up with the MPU.

The top of stack should be relocated BELOW 0x2007C000 or else stack growth will smash into the buffers and descriptors. They are descriptors, not decryptors.

LwIP is...LwIP. The documentation is hard to read because the code was hard to write. There are few to no examples, well there are the unit tests, and the same 2 ST examples (HTTP and echo). If you have problems with LwIP, the various forums will give you a timeout before an answer. Perhaps nobody, even in the developer group, actually uses LwIP. The only sample code you'll find is reposts of the older distributions. The LwIP people seem to not like RTOS', so unless you're banging chunks of silicon together, you're on your own.

So, it does work, but it's going to be a rough ride.

> So, it does work, but it's going to be a rough ride.

Perfect summary!

The linker file...

exactly my latest problem with F7 ethernet.

Although I edited that file a lot, changing areas / space for the descriptors, I always forgot about the stack.

So, the problems are more on the STM32 HAL side.

Forget the ethernet driver.

For what?

In my opinion the Nucleo boards are very good for getting to know the controller, for starting developments.

Here in Europe these boards are around 25€ ... couldn't be any lower.

Pavel A.
Evangelist III

The MPU setup is a headache. Requirements for alignment vs size are hard to manage and link script does not help with this. They say, it gets much better in the new CM85.

CM85 ?

Can you share the code to take a look at how it is down?, thanks.