STM32F4 LWIP per-interface checksum calculation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-07-29 5:54 AM
Hello!
I created a project for NUCLEO-F429ZI with two ethernet interfaces.
- The first interface is the card's own ethernet connection.
- The second is a USB-RNDIS virtual ethernet port.
The two ethernet interfaces work, but only if I enable software checksum generation on both interfaces.
Is there a way for the physical ethernet interface to use hardware checksum generation and the virtual one to use software checksum?
Solved! Go to Solution.
- Labels:
-
Ethernet
-
STM32F4 Series
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-08-01 9:43 AM
It's exactly the thing you required, therefore it is the right solution. :)
Also be warned:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-07-29 6:46 AM
Maybe solved:
On CubeMX/Checksum tab:
- CHECKSUM_BY_HARDWARE: Disabled
- LWIP_CHECKSUM_CTRL_PER_NETIF: Enabled
All other CHECKSUM_GEN_* options are enabled.
Then in lwip.c:
//For on-board ethernet:
NETIF_SET_CHECKSUM_CTRL(&gnetif, NETIF_CHECKSUM_DISABLE_ALL);
//For RNDIS:
NETIF_SET_CHECKSUM_CTRL(tu_netif_ptr, NETIF_CHECKSUM_ENABLE_ALL);
Now it seems to work, but is it the right solution?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-08-01 9:43 AM
It's exactly the thing you required, therefore it is the right solution. :)
Also be warned:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-08-02 11:25 AM
Thanks! :)
