Download UM1713 User manual - STMicroelectronics
Transcript
Contents UM1713 Contents 1 LwIP TCP/IP stack description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.1 Stack features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.2 License . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.3 LwIP architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.4 LwIP stack folder organization of the 1.5 LwIP API overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 1.6 ............................ 8 1.5.1 Raw API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 1.5.2 Netconn API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 1.5.3 Socket API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 LwIP buffer management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 1.6.1 Packet buffer structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 1.6.2 pbuf management APIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 2 Interfacing LwIP with STM32Cube Ethernet HAL driver . . . . . . . . . . . 14 3 LwIP configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 4 3.1 Modules support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 3.2 Memory configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Developing applications with LwIP stack . . . . . . . . . . . . . . . . . . . . . . . 18 4.1 4.2 5 2/41 Developing in standalone mode using the Raw API . . . . . . . . . . . . . . . . 18 4.1.1 Operation model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 4.1.2 Example of TCP echo server demonstration . . . . . . . . . . . . . . . . . . . . . 19 Developing with an RTOS using Netconn or Socket API . . . . . . . . . . . . . 22 4.2.1 Operation model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 4.2.2 Example of a TCP echoserver demonstration using the Netconn API . 23 LwIP package description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 5.1 LwIP package directories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 5.2 Applications settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 5.2.1 PHY interface configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 5.2.2 MAC and IP address settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 5.2.3 Firmware features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 DocID025731 Rev 4