Using STM32CubeMX and Atollic TrueStudio, I created a project with a KSZ8851SNL ethernet controller.
On an STM32H742, I have a driver for the Micrel KSZ8851SNL, and created a micro TCP/IP stack, to test the chip. I got that working very well, but it currentl;y only supports ARP, UDP and ICMP. I can ping in two directions, handle ARP request in both directions, and request NTP time from internet. Now, I would like to let it work together with LwIP. I know it needs to be implemented in a file ethernetif.c. Basically, I used these functions to let the micro setup work:
// Initializes the KSZ8851SNL
uint8_t ksz8851_init(void)
// Send a packet, returns length of received package
// The received length can be checked if we received a packet
uint16_t ksz8851_Receive(uint8_t *pRXData, uint16_t pRXMaxLength)
// Receive a packet
void ksz8851_Send(uint8_t *pTXData, uint16_t pTXLength)
The project is an Atollic TrueStudio project, and I use HAL.
Are above functions sufficient for LwIP? How do I implement this in LwIP? I read lots of documentation, but it seems not detailed to this part.
Sources are on hithub: https://github.com/bkht/STM32H7_HAL_KSZ8851SNL
Thanks a lot for helping me out!