Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

boards/nucleo-f429zi: add support for ethernet #17828

Merged
merged 2 commits into from
Mar 19, 2022

Conversation

aabadie
Copy link
Contributor

@aabadie aabadie commented Mar 18, 2022

Contribution description

As the title says. With #17827 which is very similar, I saw that the Ethernet configuration was missing for this board.

Testing procedure

The Ethernet interface pops up in ifconfig when flashing examples/default:

2022-03-18 16:10:12,993 # NETOPT_RX_END_IRQ not implemented by driver
2022-03-18 16:10:12,996 # main(): This is RIOT! (Version: 2022.04-devel-893-g1de68-pr/boards/nucleo-f429zi-eth)
2022-03-18 16:10:12,996 # Welcome to RIOT!
> 2022-03-18 16:10:13,911 # PKTDUMP: data received:
2022-03-18 16:10:13,912 # ~~ SNIP  0 - size:  96 byte, type: NETTYPE_UNDEF (0)
2022-03-18 16:10:13,923 # 00000000  60  00  00  00  00  38  00  01  FE  80  00  00  00  00  00  00
2022-03-18 16:10:13,929 # 00000010  DE  82  33  B9  9A  73  C6  90  FF  02  00  00  00  00  00  00
2022-03-18 16:10:13,935 # 00000020  00  00  00  00  00  00  00  16  3A  00  05  02  00  00  01  00
2022-03-18 16:10:13,947 # 00000030  8F  00  32  B2  00  00  00  02  04  00  00  00  FF  02  00  00
2022-03-18 16:10:13,948 # 00000040  00  00  00  00  00  00  00  00  00  00  00  FB  04  00  00  00
2022-03-18 16:10:13,953 # 00000050  FF  02  00  00  00  00  00  00  00  00  00  01  FF  73  C6  90
2022-03-18 16:10:13,959 # ~~ SNIP  1 - size:  20 byte, type: NETTYPE_NETIF (-1)
2022-03-18 16:10:13,960 # if_pid: 3  rssi: -32768  lqi: 0
2022-03-18 16:10:13,960 # flags: 0x0
2022-03-18 16:10:13,965 # src_l2addr: D8:EB:97:BF:2F:A7
2022-03-18 16:10:13,965 # dst_l2addr: 33:33:00:00:00:16
2022-03-18 16:10:13,971 # ~~ PKT    -  2 snips, total size: 116 byte
2022-03-18 16:10:14,146 # PKTDUMP: data received:
2022-03-18 16:10:14,151 # ~~ SNIP  0 - size:  96 byte, type: NETTYPE_UNDEF (0)
2022-03-18 16:10:14,157 # 00000000  60  00  00  00  00  38  00  01  FE  80  00  00  00  00  00  00
2022-03-18 16:10:14,165 # 00000010  DE  82  33  B9  9A  73  C6  90  FF  02  00  00  00  00  00  00
2022-03-18 16:10:14,170 # 00000020  00  00  00  00  00  00  00  16  3A  00  05  02  00  00  01  00
2022-03-18 16:10:14,176 # 00000030  8F  00  32  B2  00  00  00  02  04  00  00  00  FF  02  00  00
2022-03-18 16:10:14,188 # 00000040  00  00  00  00  00  00  00  00  00  00  00  FB  04  00  00  00
2022-03-18 16:10:14,190 # 00000050  FF  02  00  00  00  00  00  00  00  00  00  01  FF  73  C6  90
2022-03-18 16:10:14,194 # ~~ SNIP  1 - size:  20 byte, type: NETTYPE_NETIF (-1)
2022-03-18 16:10:14,199 # if_pid: 3  rssi: -32768  lqi: 0
2022-03-18 16:10:14,200 # flags: 0x0
2022-03-18 16:10:14,200 # src_l2addr: D8:EB:97:BF:2F:A7
2022-03-18 16:10:14,205 # dst_l2addr: 33:33:00:00:00:16
2022-03-18 16:10:14,212 # ~~ PKT    -  2 snips, total size: 116 byte
ifconfig
2022-03-18 16:10:18,111 # ifconfig
2022-03-18 16:10:18,117 # Iface  3  HWaddr: A6:D7:5E:88:84:3E  Link: up 
2022-03-18 16:10:18,123 #           L2-PDU:1500  Source address length: 6
2022-03-18 16:10:18,123 #           
> 2022-03-18 16:10:19,637 # Exiting Pyterm

Issues/PRs references

Noticed that when working on #17827

@github-actions github-actions bot added Area: boards Area: Board ports Area: Kconfig Area: Kconfig integration Area: tests Area: tests and testing framework labels Mar 18, 2022
@github-actions github-actions bot added the Area: tools Area: Supplementary tools label Mar 18, 2022
@aabadie aabadie added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Mar 18, 2022
Copy link
Member

@maribu maribu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK. Code looks good and testing is provided

@@ -46,10 +47,12 @@ extern "C" {
static const dma_conf_t dma_config[] = {
{ .stream = 11 }, /* DMA2 Stream 3 - SPI1_TX */
{ .stream = 10 }, /* DMA2 Stream 2 - SPI1_RX */
{ .stream = 8 }, /* DMA2 Stream 0 - ETH_TX */
Copy link
Member

@maribu maribu Mar 18, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO for myself: Check if this is actually still used and drop for all boards consistently if not. If I recall correctly, the previous version of the driver used this to speed up memcpy to a TX buffer. But I rewrote the driver to use the ETH DMA to directly collect the data to transmit in a zero-copy fashion. If I recall correctly, the DMA stream can be used for other stuff, as the ETH DMA is a distinct DMA unit.

@maribu maribu merged commit c4c50c5 into RIOT-OS:master Mar 19, 2022
@aabadie aabadie deleted the pr/boards/nucleo-f429zi-eth branch March 19, 2022 14:49
@aabadie
Copy link
Contributor Author

aabadie commented Mar 19, 2022

Thanks !

@OlegHahm OlegHahm added this to the Release 2022.04 milestone Apr 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: boards Area: Board ports Area: Kconfig Area: Kconfig integration Area: tests Area: tests and testing framework Area: tools Area: Supplementary tools CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants