0% found this document useful (0 votes)
114 views13 pages

Lwip - s32k344 Demo Guide

The LWIP_S32K344 Demo Guide provides an overview of the lwip TCP/IP stack implementation for NXP automotive processors, detailing supported protocols and APIs. It outlines the hardware and software requirements for setting up the demo, including specific configurations for the S32K344 EVB. Additionally, it includes troubleshooting tips for common issues encountered during the demo setup and execution.

Uploaded by

shrey111patel222
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
114 views13 pages

Lwip - s32k344 Demo Guide

The LWIP_S32K344 Demo Guide provides an overview of the lwip TCP/IP stack implementation for NXP automotive processors, detailing supported protocols and APIs. It outlines the hardware and software requirements for setting up the demo, including specific configurations for the S32K344 EVB. Additionally, it includes troubleshooting tips for common issues encountered during the demo setup and execution.

Uploaded by

shrey111patel222
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

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

1 CONFIDENTIAL AND PROPRIETARY


lwip_s32k344 Stack Introduction
The TCP/IP stack is a light-weight implementation of the TCP/IP protocol suite.
It is a port of lwip stack for NXP automotive processors.

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

Support 3 kind of APIs: SSL/TLS Support (WolfSSL)

• 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.

• This stack working rely on S32K3 RTD driver and


FreeRTOS.

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.

All lwip modules corresponding Lwip core source file:


header files. • TCP/IP protocols
• Memory mgt.
Network card porting relevant • Data packages mgt.
files. • Network card mgt.
• Network card interface
SSL/TLS support, wolfssl stack • Basic functions
and relevant files. • APIs
PUBLIC 3
LWIP_S32K344 DEMO SETUP

4 CONFIDENTIAL AND PROPRIETARY


lwip_s32k344 Demo Setup
Up to now, the workable lwip_s32k344 Demo is provided by S32K3
TCP/IP stack v1.0.0(RTD RTM 1.0.0) and v1.0.1(RTD RTM 2.0.0).
Detail HW/SW requirements are listed below:
HW:
- S32K344 Q257 EVB
- ADTJA1101-RMII Adapter Card
- UTP/RJ45 Convertor
SW:
- S32 Design Studio 3.4 with update pack 3.4.3_D2112
- S32K3 SW packs listed in below table:
For RTM 1.0.0 For RTM 2.0.0
S32K3 RTD RTM 1.0.0 with HF02 S32K3 RTD RTM 2.0.0
S32K3 FreeRTOS 10.4.5 UOS 1.0.0 S32K3 FreeRTOS 10.4.6 UOS 2.0.0
S32K3 TCPIP RTM 1.0.0 S32K3 TCPIP RTM 1.0.1

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.

This is because your S32K3 MCU on the board didn’t install


HSE firmware, however, the lwip demo enabled the ssl_echo
app, which will invoke some APIs who need HSE FW supports.

• Try below 2 ways to avoid this issue:

① Install HSE FW for your S32K3 MCU on the board.


② Annotate the secure_socket_init() function temporarily if
you don’t need to test SSL service.

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.

• Try to uninstall the S32 Design Studio, and re-install it with


all relevant packs for RTD RTM 1.0.0 with below order:
1
6
4
3
5
7
2
8

• 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

• When debug and run the demo, it blocked at


the Gmac DMA software reset, and will not
successfully complete the Gmac initialization.

This is because the S32K3 EMAC lack of RMII


reference clock. It should be provided by the
external PHY chip or the on-board crystal Y5
(50MHz) after power up.

Please check the relevant resistors on EVB


board and PHY daughter board, to ensure correct
connection between S32K3 RMII reference clock
pin and the clock source(from PHY chip or Y5).

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.

You might also like