2025-01-06 09:45 PM - last edited on 2025-01-07 03:00 AM by SofLit
Hi everyone,
My requirement is as follows. I must be able to implement Basic DHCP, HTTP, HTTPS, MQTT, FTP, UDP, TCP etc., So I thought of choosing an MCU which has standard working examples and thereby it'll save more time than to adapt a code to a particular MCU. Please suggest me a good MCU or a MCU series in STM32 for ethernet and certain suggestions related to the same.
Thanking You!
2025-01-06 11:14 PM
I would use a Linux SBC for that.
You can get e.g. a Raspberry Pi Zero for a similiar price like a STM32 discovery board.
Cortex M devices quickly run into performance issues with realistic network traffic.
2025-01-07 01:59 AM
STM32H7 is suitable for what you are looking for - we do use as such with all but MQTT -
BUT
Memory (RAM and ROM) will limit number of open sessions !!
AZRTOS (aka ThreadX) is stable but NetXDuo not (as it delivered will crash in many test) and there is lack of ongoing develpment on that.
We had to rework several part to correct and complete implementation to a reasonable level.
How much do you want to invest in your project ? Are your requirements more next to IOT or to PC based ?
Obviously, there are no working examples from STM ...
2025-01-07 03:01 AM
@mbarg.1
We can trade MQTT or any such protocols but I need TCP, UDP, DHCP to work. It is not concerning IoT but it is for a local project where the data transfer is of 30metres to 70metres range. That is the requirement.
2025-01-07 03:12 AM
STM32H7 is by sure a great choice - just have a look at errata and double check.
Eventually, also H5 can be a solution if 10MB Ethernet is ok, I would not use @100MB full duplex speed due to limited processor speed.
2025-01-07 03:22 AM
This is mostly down to the networking stack that you choose - not the MCU itself.
ST has examples for LwIP and NetXDuo:
Other stacks are available.
Why an MCU? As @Ozone said, something like a Raspberry Pi may be better suited ...
2025-01-07 05:53 AM
> This is mostly down to the networking stack that you choose - not the MCU itself.
Which is in my experience not entirely correct.
But basically all of the ethernet peripherals of Cortex A and other application processor devices contain internal buffers to keep at least on jumbo frame, usually several once.
Cortex M devices usually not, which often makes them very vulnerable to overrun issues, even under relatively moderate network traffic loads.
Although I must admit, I switched to Linux SBCs for such applications about 3 years ago, and didn't try Cortex M networking since then.
2025-01-17 02:29 AM
@Ozone Sir, could you please suggest me a middleware for stm32f439. I am not finding enough examples for the same using mongoose middleware and very less examples using LwIP from STM32 Cube IDE.
Thank you!
2025-01-17 03:13 AM
> I am not finding enough examples for the same using mongoose middleware and very less examples using LwIP from STM32 Cube IDE.
I haven't done projects using middleware packages for MCUs lately. Probably for exactly this reasons. Understated limitations and restrictions, few examples, and further dependencies. As said, for such projects I prefer Linux SBCs. In most case I can even build the application on the target.
I think the highlighted text marks the biggest problem. I'm sure there are more LwIP applications around than visible, but in a commercial environment and as closed source.
You could drop the "STM32" and "CubeIDE" labels, which will bring up more examples for other Cortex M devices. But this would require a certain porting effort.
Or, you could evaluate a commercial package like Segger emNet or the Keil TCP/IP networking suite. They certainly don't come for free, but you can expect professional functionality and support.