Lwip - s32k344 Demo Guide
Lwip - s32k344 Demo Guide
SHUAILIN LI – GPIS AE
[email protected]
MAY. 2022
NXP and the NXP logo are trademarks of NXP B.V. All other product or service names are the property
of their respective owners. © 2017 NXP B.V.
PUBLIC
LWIP_S32K3 STACK & DEMO
INTRODUCTION
Support protocols:
• IP (Internet Protocol)
• ICMP (Internet Control Message Protocol)
• IGMP (Internet Group Management Protocol)
• UDP (User Datagram Protocol)
• TCP (Transmission Control Protocol)
• DHCP (Dynamic Host Configuration Protocol)
• ARP (Address Resolution Protocol)
Fig. TCPIP software product architecture
• Raw API: Front/Back-ground structure, best performance, • Lightweight, portable, C-language based SSL/TLS lib.
minimal code size. • Works on top of lwip stack and FreeRTOS. Hardware
• Netconn API: Multi-threaded operations with OS, acceleration for crypto operations via RTD/HSE.
Increased usability, lower performance, higher memory • WolfSSL and wolfCrypt are either licensed for use under
footprint. the GPLv2 or a standard commercial license.
• BSD Socket API: developed on top of the Netconn API,
offers more portability. PUBLIC 2
lwip_s32k344 Demo Introduction
• It is attached with S32K3 TCP/IP stack, which you
can find when create a S32DS project from example.
Stack porting
relevant files:
• HSE driver,
• EMAC driver
• OS interface
• compiler config Internet applications featured by stack.
Lwip original NXP extended
Netconn API and Socket ↓ ↓
API relevant source code.
Will be compiled only in
OS environment.
Important Note:
- Change the S32K344 EVB J30 jumper from 3-4 to 1-2, thus the
VDD_HV_B will be changed to 5V, to enhance the ethernet level-shifter
stability at RMII 50MHz.
- Add TJA1101B PHY_ID1 macro and check it in “device.c” for PHY init.
PUBLIC 5
lwip_s32k344 Demo Setup
• When complete the upon setup, now you can
compile the project and download it for testing,
such as Ping, TCP/UDP echo, LWIPERF, etc.
PUBLIC 6
FAQ & TIPS
PUBLIC 7
S32K3 Lwip Demo FAQ & Tips
• When debug and run the demo, it jumps to the assert as left
picture showing.
PUBLIC 8
S32K3 Lwip Demo FAQ & Tips
• The demo suddenly shutdown after about 20-min normal
running. Attached and found the software jump into hardfault.
This is because the lwip demo limits the test time (default
~1200 sec). The demo will be shutdown when meet the time.
Try to increase the tests_timeout as you well.
PUBLIC 9
S32K3 Lwip Demo FAQ & Tips
• If you updated all the latest packs but found no items in “OS”
or “Middleware”, even you can not find the lwip_s32k344
demo when create a project from example.
• If you installed both RTD RTM 1.0.0 and RTM 2.0.0, to avoid
project RTD version auto conversion which would break up the
old version projects, try to remove the “compatibility.xml”
located at “C:\NXP\S32DS.3.4\eclipse\mcu_data\configuration”
PUBLIC 10
S32K3 Lwip Demo FAQ & Tips
PUBLIC 11
NXP and the NXP logo are trademarks of NXP B.V. All other product or service names are the property of their respective owners. © 2017 NXP B.V.