Getting to ping on STM32H743 with LWIP
Given that the promise of STM32CubeIDE is that adding functionality should be as easy as clicking in checkboxes, you'd think it would be easy to set up Ethernet on one of STM's own Nucleo boards which is designed for it, and to get it responding to ping on your internal network at a fixed IP address within minutes. If so, you've been misled by the way that simpler interfaces such as UART, SPI, I2C, and GPIO are easily configured with STM32CubeIDE/CubeMX, especially if you don't need to have them working through DMA. Because of the high speed nature of Ethernet, it is essential to use DMA and to get the caching set up right, and until you do, it doesn't work at all. Unlike UART, SPI, I2C or CAN, you can't just start with the simpler case of transmit-only to see if your physical layer is working and the baud rate setting from the clock tree is right because Ethernet essentially requires receive and transmit to work before you'll see anything at the IP layer. If your lowest level test is ping, it's not going to work until your PC can get responses to it's ARP requests. Over the last…
Continue reading...