Getting Started with the S32K148-Q176 Evaluation Board

Last Modified: 2019-03-19 17:10:00Supports S32K148-Q176 Evaluation Board for Automotive General Purpose

1. Out of the Box

1.1 Get to Know the Evaluation Board

Get Started with the S32K148EVB - 1.1

Get Started with the S32K148EVB - 1.1

1.2 Understanding the Header/Pinout

Get Started with the S32K148EVB - 1.2A

Get Started with the S32K148EVB - 1.2A

Get Started with the S32K148EVB - 1.2B

Get Started with the S32K148EVB - 1.2B

Get Started with the S32K148EVB - 1.2C

Get Started with the S32K148EVB - 1.2C

1.3 Understanding the CAN/LIN Connectors

Get Started with the S32K148EVB - 1.3

Get Started with the S32K148EVB - 1.3

1.4 Understanding the USB/OpenSDA

OpenSDA is a serial and debug adapter that is built into several NXP® evaluation boards. It provides a bridge between your computer (or other USB host) and the embedded target processor, which can be used for debugging, flash programming and serial communication, all over a simple USB cable.

The OpenSDA hardware consists of a circuit featuring a Kinetis® K2x microcontroller with an integrated USB controller. On the software side, it implements a mass storage device bootloader, which offers a quick and easy way to load OpenSDA applications such as flash programmers, run-control debug interfaces, serial to USB converters and more.

Jumper Setting Description
J22 1-2 RESET switch is routed RST MCU

PTA29/FTM5_CH4/LPUART2_TX/LPSPI1_SIN_LS and PTA27/FTM5_CH2/LPSPI1_SOUT/LPUART0_TX_LS by external wires

Get Started with the S32K148EVB - 1.4

Get Started with the S32K148EVB - 1.4

1.5 Understanding the JTAG Debug Connector

Get Started with the S32K148EVB - 1.5

Get Started with the S32K148EVB - 1.5

1.6 Understanding the HMI Mapping

Component S32K148
Red LED PTE21
Blue LED PTE23
Green LED PTE22
Potentiometer PTC28
SW3 PTC12
SW4 PTC13
OpenSDA UART TX PTC7 (LPUART1_TX)
OpenSDA UART RX PTC6 (LPUART1_RX)
CAN TX PTE5 (CAN0_TX)
CAN RX PTE4 (CAN0_RX)
LIN1 TX PTA3 (LPUART0_TX)
LIN1 RX PTA2 (LPUART0_RX)
LIN2 TX PTA9 (LPUART2_TX)
LIN2 RX PTA8 (LPUART2_RX)
SBC_SCK PTA28 (LPSPI1_SCK)
SBC_MISO PTA29 (LPSPI1_SIN)
SBC_MOSI PTA27 (LPSPI1_SOUT)
SBC_CS PTA26 (LPSPI1_PCS0)

2. Get Software

2.1 Download the Quick Start Package

Download S32K148EVB QSP

2.2 Download the JumpStart Firmware

Download S32K148EVB JumpStart

2.3 Get the Integrated Development Environment (IDE)

S32K144EVB performs better when using S32 Design Studio for Arm v1.3.

Download S32 DESIGN STUDIO IDE

2.4 Get the Run-Time Debugging Tool

S32K144EVB evaluation board performs better when using the FreeMASTER tool for run-time debugging.
You can also download and install the FreeMASTER Communication Driver (source code already included in example project).

FREEMASTER Tool

3. Plug It In

3.1 Set Up Jumpers

Jumper Setting Description
J7 1-2 MCU VDD domain is connected to 3.3 V
2-3 (Default) MCU VDD domain is connected to 5 V
J8 1-2 (Default) 5 V domain powered by 12 V power source
2-3 5 V domain powered by USB micro connector
J12 1-2 (Default) LIN leader option enabled for LIN1
J18 1-2 (Default) VBAT(+12 V) is routed to the input of the 3V3 switching power supply
2-3 USB power (+5 V) is routed to the input of the 3V3 switching power supply
J19 1-2 (Default) VDD is routed to VDD_MCU domain (remove in order to measure the MCU current)
J21 1-2 (Default) LIN leader option enabled for LIN2
J22 1-2 (Default) Reset switch is routed to MCU reset line
2-3 Reset switch is routed to openSDA reset line

3.2 Plug In the Power Supply

The S32K148-EVB evaluation board powers from a USB or external 12 V power supply.
USB power can be enabled with J8 (2-3) and J18 (2-3).

  1. Connect the USB cable to a PC using supplied USB cable.
  2. Connect other end of USB cable (microUSB) to micro-B port on S32K148EVB at J24.
  3. Allow the PC to automatically configure the USB drivers if needed.

Debug is done using OpenSDA through J24.

When powered using the USB, LED D10 should light green and LEDs DS2 and DS3 light orange.

Get Started with the S32K148EVB - 3.2A

4. Build, Load

4.1 Communicate with Debugger

  1. Launch the FreeMASTER application

    Launch FREEMASTER

    Launch FREEMASTER
  2. Configure the communication port through OpenSDA with a 115200 b/s speed rate:
    • To do this manually, go to Project → Options → Comm S32K144EVB_GS-4.1b-MANUALLY
    • To do this automatically, go to Tools → Connection Wizard S32K144EVB_GS-4.1c-AUTOMATICALLY

4.2 JumpStart Project Download

The FreeMASTER JumpStart project will be automatically downloaded from NXP Semiconductors once the FreeMASTER application detects the web address stored as a TSA active content in the flash.

S32K144EVB_GS-4.2-JUMPSTART-DOWNLOAD

S32K144EVB_GS-4.2-JUMPSTART-DOWNLOAD

4.3 JumpStart Project Loaded

Get Started with the S32K148EVB - 4.3A

Get Started with the S32K148EVB - 4.3A

The FreeMASTER JumpStart project description:

Get Started with the S32K148EVB - 4.3B

Get Started with the S32K148EVB - 4.3B

4.4 Import and Debug the Project to IDE

  1. Launch the S32 Design Studio for Arm® and select a default workspace or specify a new one. Then click OK

    S32K144EVB_GS-4.4a-PROJECT-IDE

    S32K144EVB_GS-4.4a-PROJECT-IDE
  2. Create a new project by selecting File → New → Project.

    Get Started with the S32K148EVB - 4.4B

    Get Started with the S32K148EVB - 4.4B
  3. Create a project name. Select the project type in the executable or library folder. Then click Next.

    You can select for project type from inside executable or library folder.

    Get Started with the S32K148EVB - 4.4C

    Get Started with the S32K148EVB - 4.4C

  4. Select Debugger Support and Library Support. Then click Finish

    Get Started with the S32K148EVB - 4.4D

    Get Started with the S32K148EVB - 4.4D

4.5 Set Up Debug Configuration

To debug your project with OpenSDA, your must first select OpenSDA.

  1. Select your project, and click Debug Configuration

    Get Started with the S32K148EVB - 4.5A

    Get Started with the S32K148EVB - 4.5A
  2. Under GDB PEMicro Interface Debugging, select the debug configuration. Then click the Debugger tab

    Get Started with the S32K148EVB - 4.5B

    Get Started with the S32K148EVB - 4.5B
  3. In Interface, select OpenSDA. If your board is plugged in, it should appear in Port. To finish, click Apply then Debug

    Get Started with the S32K148EVB - 4.5C

    Get Started with the S32K148EVB - 4.5C

4.6 Optional Debugging With P&E

  1. Click Debug Configurations

    Debug

    Debug
  2. To create a new P&E launch configuration, click the icon shown in the upper right. Then click the Debugger tab

    Debug

    Debug
  3. Click Select Device and choose a S32K148 device. Then click Apply and debug your application

    Get Started with the S32K148EVB - 4.6D

    Get Started with the S32K148EVB - 4.6D

RTD Examples

RTD Examples

Kickstart your RTD journey with these handy examples. We've rounded up some of the most common use cases to get you inspired and moving forward.

ADC Example

Demonstrates the usage of the ADC driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K1_S32M24\RTD\Adc_TS_T40D2M30I0R0\examples\S32DS\S32K1\Adc_example_S32K148

ADC PDB IP Example

Demonstrates the usage of the ADC PDB IP driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K1_S32M24\RTD\Adc_TS_T40D2M30I0R0\examples\S32DS\S32K1\Adc_Pdb_Ip_example_S32K148

CAN Example

Demonstrates the usage of the CAN driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K1_S32M24\RTD\Can_43_FLEXCAN_TS_T40D2M30I0R0\examples\S32DS\S32K1\Can_example_S32K148

FLEXCAN IP Example

Demonstrates the usage of the FLEXCAN IP driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K1_S32M24\RTD\Can_43_FLEXCAN_TS_T40D2M30I0R0\examples\S32DS\S32K1\FlexCAN_Ip_example_S32K148

CRC Example

Demonstrates the usage of the CRC driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K1_S32M24\RTD\Crc_TS_T40D2M30I0R0\examples\S32DS\S32K1\Crc_Example_S32K148

CRC IP Example

Demonstrates the usage of the CRC IP driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K1_S32M24\RTD\Crc_TS_T40D2M30I0R0\examples\S32DS\S32K1\Crc_Ip_Example_S32K148

DIO Example

Demonstrates the usage of the DIO driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K1_S32M24\RTD\Dio_TS_T40D2M30I0R0\examples\S32DS\S32K1\Dio_Example_S32K148

GPIO DIO IP Example

Demonstrates the usage of the GPIO DIO IP driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K1_S32M24\RTD\Dio_TS_T40D2M30I0R0\examples\S32DS\S32K1\Gpio_Dio_Ip_Example_S32K148

EEP Example

Demonstrates the usage of the EEP driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K1_S32M24\RTD\Eep_TS_T40D2M30I0R0\examples\S32DS\S32K1\Eep_Example_S32K148

FTFC EEP IP Example

Demonstrates the usage of the FTFC EEP IP driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K1_S32M24\RTD\Eep_TS_T40D2M30I0R0\examples\S32DS\S32K1\Ftfc_Eep_Ip_Example_S32K148

ENET IP Example

Demonstrates the usage of the ENET IP driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K1_S32M24\RTD\Eth_43_ENET_TS_T40D2M30I0R0\examples\S32DS\S32K1\Enet_Ip_InternalLoopback_S32K148

ETH Example

Demonstrates the usage of the ETH driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K1_S32M24\RTD\Eth_43_ENET_TS_T40D2M30I0R0\examples\S32DS\S32K1\Eth_InternalLoopback_S32K148

FEE Example

Demonstrates the usage of the FEE driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K1_S32M24\RTD\Fee_TS_T40D2M30I0R0\examples\S32DS\S32K1\Fee_Example_S32K148

FLS Example

Demonstrates the usage of the FLS driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K1_S32M24\RTD\Fls_TS_T40D2M30I0R0\examples\S32DS\S32K1\Fls_Example_S32K148

FTFC IP Example

Demonstrates the usage of the FTFC IP driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K1_S32M24\RTD\Fls_TS_T40D2M30I0R0\examples\S32DS\S32K1\Ftfc_Ip_Example_S32K148

QSPI IP Example

Demonstrates the usage of the QSPI IP driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K1_S32M24\RTD\Fls_TS_T40D2M30I0R0\examples\S32DS\S32K1\Qspi_Ip_Example_S32K148

FTM GPT Example

Demonstrates the usage of the FTM GPT driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K1_S32M24\RTD\Gpt_TS_T40D2M30I0R0\examples\S32DS\S32K1\Ftm_Gpt_Example_S32K148

GPT Example

Demonstrates the usage of the GPT driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K1_S32M24\RTD\Gpt_TS_T40D2M30I0R0\examples\S32DS\S32K1\Gpt_example_S32K148

LPIT GPT Example

Demonstrates the usage of the LPIT GPT driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K1_S32M24\RTD\Gpt_TS_T40D2M30I0R0\examples\S32DS\S32K1\Lpit_Gpt_Example_S32K148

I²C Example

Demonstrates the usage of the I²C driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K1_S32M24\RTD\I2c_TS_T40D2M30I0R0\examples\S32DS\S32K1\I2c_Example_S32K148

I²C IP Example

Demonstrates the usage of the I²C IP driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K1_S32M24\RTD\I2c_TS_T40D2M30I0R0\examples\S32DS\S32K1\I2c_Ip_Example_S32K148

FLEXIO SAI IP Example

Demonstrates the usage of the FLEXIO SAI IP driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K1_S32M24\RTD\I2s_TS_T40D2M30I0R0\examples\S32DS\S32K1\Flexio_to_Sai_Ip_example_S32K148

I²S FLEXIO to SAI Example

Demonstrates the usage of the I²S FLEXIO to SAI driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K1_S32M24\RTD\I2s_TS_T40D2M30I0R0\examples\S32DS\S32K1\I2s_Flexio_to_Sai_example_S32K148

I²S SAI to FLEXIO Example

Demonstrates the usage of the I²S SAI to FLEXIO driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K1_S32M24\RTD\I2s_TS_T40D2M30I0R0\examples\S32DS\S32K1\I2s_Sai_to_Flexio_example_S32K148

SAI to FLEXIO IP Example

Demonstrates the usage of the SAI to FLEXIO IP driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K1_S32M24\RTD\I2s_TS_T40D2M30I0R0\examples\S32DS\S32K1\Sai_to_Flexio_Ip_example_S32K148

FTM LCU IP Example

Demonstrates the usage of the FTM LCU IP driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K1_S32M24\RTD\Icu_TS_T40D2M30I0R0\examples\S32DS\S32K1\Ftm_Icu_Ip_BlinkLed_S32K148

LCU Example

Demonstrates the usage of the LCU driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K1_S32M24\RTD\Icu_TS_T40D2M30I0R0\examples\S32DS\S32K1\Icu_BlinkLed_S32K148

PORT CI LCU IP Example

Demonstrates the usage of the PORT CI LCU IP driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K1_S32M24\RTD\Icu_TS_T40D2M30I0R0\examples\S32DS\S32K1\Port_Ci_Icu_Ip_BlinkLed_S32K148

LIN Leader Example

Demonstrates the usage of the LIN Leader driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K1_S32M24\RTD\Lin_43_LPUART_FLEXIO_TS_T40D2M30I0R0\examples\S32DS\S32K1\Lin_Flexio_MasterFrameTransfer_S32K148

LIN IP Example

Demonstrates the usage of the LIN IP driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K1_S32M24\RTD\Lin_43_LPUART_FLEXIO_TS_T40D2M30I0R0\examples\S32DS\S32K1\Lin_Ip_FrameTransfer_S32K148

LIN LPUART Example

Demonstrates the usage of the LIN LPUART driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K1_S32M24\RTD\Lin_43_LPUART_FLEXIO_TS_T40D2M30I0R0\examples\S32DS\S32K1\Lin_Lpuart_MasterFrameTransfer_S32K148

DMA IP Example

Demonstrates the usage of the DMA IP driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K1_S32M24\RTD\Mcl_TS_T40D2M30I0R0\examples\S32DS\S32K1\Dma_Ip_DmaTransfer_S32K148

MCL DMA Example

Demonstrates the usage of the MCL DMA driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K1_S32M24\RTD\Mcl_TS_T40D2M30I0R0\examples\S32DS\S32K1\Mcl_DmaTransfer_S32K148

CLOCK IP Example

Demonstrates the usage of the CLOCK IP driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K1_S32M24\RTD\Mcu_TS_T40D2M30I0R0\examples\S32DS\S32K1\Clock_Ip_Example_S32K148

MCU Example

Demonstrates the usage of the MCU driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K1_S32M24\RTD\Mcu_TS_T40D2M30I0R0\examples\S32DS\S32K1\Mcu_Example_S32K148

POWER IP Example

Demonstrates the usage of the POWER IP driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K1_S32M24\RTD\Mcu_TS_T40D2M30I0R0\examples\S32DS\S32K1\Power_Ip_Example_S32K148

FTM OCU IP Example

Demonstrates the usage of the FTM OCU IP driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K1_S32M24\RTD\Ocu_TS_T40D2M30I0R0\examples\S32DS\S32K1\Ftm_Ocu_Ip_Example_S32K148

OCU Example

Demonstrates the usage of the OCU driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K1_S32M24\RTD\Ocu_TS_T40D2M30I0R0\examples\S32DS\S32K1\Ocu_Example_S32K148

MPU IP Example

Demonstrates the usage of the MPU IP driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K1_S32M24\RTD\Platform_TS_T40D2M30I0R0\examples\S32DS\S32K1\Mpu_Ip_Example_S32K148

PLATFORM MPU HDL Example

Demonstrates the usage of the PLATFORM MPU HDL driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K1_S32M24\RTD\Platform_TS_T40D2M30I0R0\examples\S32DS\S32K1\Platform_Mpu_Hld_Example_S32K148

PORT CI PORT IP Example

Demonstrates the usage of the PORT CI PORT IP driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K1_S32M24\RTD\Port_TS_T40D2M30I0R0\examples\S32DS\S32K1\Port_Ci_Port_Ip_Example_S32K148

PORT Example

Demonstrates the usage of the PORT driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K1_S32M24\RTD\Port_TS_T40D2M30I0R0\examples\S32DS\S32K1\Port_Example_S32K148

FTM PWM IP Example

Demonstrates the usage of the FTM PWM IP driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K1_S32M24\RTD\Pwm_TS_T40D2M30I0R0\examples\S32DS\S32K1\Ftm_Pwm_Ip_Example_S32K148

PWM Example

Demonstrates the usage of the PWM driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K1_S32M24\RTD\Pwm_TS_T40D2M30I0R0\examples\S32DS\S32K1\Pwm_example_S32K148

FTM QDEC IP Example

Demonstrates the usage of the FTM QDEC IP driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K1_S32M24\RTD\Qdec_TS_T40D2M30I0R0\examples\S32DS\S32K1\Ftm_Qdec_Ip_Example_S32K148

QDEC Example

Demonstrates the usage of the QDEC driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K1_S32M24\RTD\Qdec_TS_T40D2M30I0R0\examples\S32DS\S32K1\Qdec_Example_S32K148

RM DMAMUX Example

Demonstrates the usage of the RM DMAMUX driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K1_S32M24\RTD\Rm_TS_T40D2M30I0R0\examples\S32DS\S32K1\Rm_DMAMUX_Example_S32K148

LPSPI IP Example

Demonstrates the usage of the LPSPI IP driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K1_S32M24\RTD\Spi_TS_T40D2M30I0R0\examples\S32DS\S32K1\Lpspi_Flexio_Ip_Transfer_S32K148

FLSPI HALF DUPLEX Example

Demonstrates the usage of the FLSPI HALF DUPLEX driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K1_S32M24\RTD\Spi_TS_T40D2M30I0R0\examples\S32DS\S32K1\Lpspi_Ip_HalfDuplexTransfer_S32K148

SPI HALF DUPLEX Example

Demonstrates the usage of the SPI HALF DUPLEX driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K1_S32M24\RTD\Spi_TS_T40D2M30I0R0\examples\S32DS\S32K1\Spi_HalfDuplexTransfer_S32K148

SPI Example

Demonstrates the usage of the SPI driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K1_S32M24\RTD\Spi_TS_T40D2M30I0R0\examples\S32DS\S32K1\Spi_Transfer_S32K148

LPUART Example

Demonstrates the usage of the LPUART driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K1_S32M24\RTD\Uart_TS_T40D2M30I0R0\examples\S32DS\S32K1\LpuartFlexio_Uart_Ip_Example_S32K148

UART Example

Demonstrates the usage of the UART driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K1_S32M24\RTD\Uart_TS_T40D2M30I0R0\examples\S32DS\S32K1\Uart_Example_S32K148

WDOG Example

Demonstrates the usage of the WDOG driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K1_S32M24\RTD\Wdg_TS_T40D2M30I0R0\examples\S32DS\S32K1\Wdg_Example_S32K148

WDOG IP Example

Demonstrates the usage of the WDOG IP driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K1_S32M24\RTD\Wdg_TS_T40D2M30I0R0\examples\S32DS\S32K1\Wdog_Ewm_Ip_Example_S32K148

FreeMASTER JumpStart Oscilloscope Feature

FreeMASTER JumpStart Oscilloscope Feature

  1. To display the main project panel, go to: Project → View → Project Tree S32K144EVB_GS-PT1a-JUMPSTART
  2. Display real-time oscilloscope graph examples such as Potentiometer or Touch Sense Electrodes:
    • Analog values from potentiometer:

      S32K144EVB_GS-PT1b-JUMPSTART

      S32K144EVB_GS-PT1b-JUMPSTART
    • Responses from touch sense electrodes:

      Touch Sense Electrodes Responses

      Touch Sense Electrodes Responses

Create an Example from the SDK

Create an Example from the SDK

The S32 Design Studio IDE includes a software development kit (SDK) for quickly developing applications on S32K1xx devices.

  1. To get started, go to File → New → S32DS Project from Example

    Get Started with the S32K148EVB - PT1A

    Get Started with the S32K148EVB - PT1A
  2. Go to the S32K14x EAR SDK v0.8.6 Example Projects section and select the example you want to use. (in this case, the “hello_world” example is selected). Then click Finish

    Get Started with the S32K148EVB - PT1B

    Get Started with the S32K148EVB - PT1B
  3. The new project is created in the workspace. Click the generate code icon and then click the debug icon

    Get Started with the S32K148EVB - PT1C

    Get Started with the S32K148EVB - PT1C

The complete documentation of the SDK can be found in:

C:\NXP\S32DS_ARM_v2018.R1\S32DS\S32SDK_S32K14x_EAR_0.8.6\doc\Start_here.html

Check Enabling Technologies: Hands-On Workshop: S32 SDK for S32K  for more information about the use of the SDK.

Debug Basics

Debug Basics

Debug configuration is only required once. Subsequent starting of debugger does not require these steps.

There are three options for starting the debugger:

  • If the debug configuration is still open, click Debug on the bottom right.
  • Select Run → Debug
  • Press (F11) Get Started with the S32K148EVB - PT2A

Recommended: Cpck the down arrow on the bug icon and select _debug.elf target

Get Started with the S32K148EVB - PT2B

Step, Run, Suspend and Resume

  • Step Into (F5)

    S32K144EVB_GS-PT2a-DEBUG-BASICS
  • Step Over (F6)

    S32K144EVB_GS-PT2b-DEBUG-BASICS
  • Step Return (F7)

    S32K144EVB_GS-PT2c-DEBUG-BASICS
  • Run

    S32K144EVB_GS-PT2d-DEBUG-BASICS
  • Suspend

    S32K144EVB_GS-PT2e-DEBUG-BASICS
  • Resume (F8)

    S32K144EVB_GS-PT2f-DEBUG-BASICS

View Variables

Click the Variables tab.

To enter different values, click in the Value field.

S32K144EVB_GS-PT2g-DEBUG-BASIC

View and Alter Registers

To see CPU registers, click the Registers tab. To enter different values, click in the Value field.

S32K144EVB_GS-PT2h-DEBUG-BASICS

"Click on a value to allow typing in a different value."

To see peripheral registers, click the EmbSys Registers tab.

Debug Basics

Debug Basics

View and Alter Memory

Click the plus icon + for Add Memory Monitor then select the base address to start at 40000000

S32K144EVB_GS-PT2j-DEBUG-BASICS S32K144EVB_GS-PT2k-DEBUG-BASICS

Click the Memory tab.

S32K144EVB_GS-PT2l-DEBUG-BASICS

Breakpoints

Add Breakpoint by pointing and clicking.

Get Started with the S32K148EVB - PT2C

Get Started with the S32K148EVB - PT2C

Reset and Terminate Debug Session

To reset the program counter, click the red icon for Terminate (Ctrl+F2).

S32K144EVB_GS-PT2n-DEBUG-BASICS

Introduction to OpenSDA

Introduction to OpenSDA

OpenSDA is an open-standard serial and debug adapter. It bridges serial and debug communications between a USB host and an embedded target processor. OpenSDA software includes a flash-resident USB mass-storage device (MSD) bootloader and a collection of OpenSDA applications.

S32K148 EVB comes with the MSD Flash Programmer + Debug OpenSDA application preinstalled.

Follow these instructions to run the OpenSDA Bootloader and update or change the installed OpenSDA application.

Enter OpenSDA Bootloader Mode Load an OpenSDA Application
  1. Unplug the USB cable if attached
  2. Set J22 on position 2-3
  3. Press and hold Reset (SW5)
  4. Plug in a USB cable (not included) between a USB host and the OpenSDA USB connector (labeled “SDA”)
  5. Release Reset

A removable drive should now be visible in the host file system with a volume label of BOOTLOADER.

You are now in OpenSDA bootloader mode.

  1. While in OpenSDA bootloader mode, double click SDA_INFO.HTML in the BOOTLOADER drive. A web browser will open the OpenSDA homepage containing the name and version of the installed application. This information can also be read as text directly from SDA_INFO.HTML
  2. Locate the OpenSDA Applications.
  3. Copy and Paste or drag and drop the MSD Flash Programmer Application to the BOOTLOADER drive
  4. Unplug the USB cable and plug it in again. The new OpenSDA application should now be running and a S32K148 EVB drive should be visible in the host file system

You are now running the latest version of the MSD flash programmer. Use this same procedure to load other OpenSDA applications.

The MSD flash programmer + Debug is a composite USB application that provides a virtual serial port, a debug interface and an easy and convenient way to program applications into the S32K MCU. It emulates a FAT16 file system, appearing as a removable drive in the host file system with a volume label of S32K148EVB.

Raw binary and Motorola S-record files that are copied to the drive are programmed directly into the flash of the S32K148 and executed automatically. The virtual serial port enumerates as a standard serial port device that can be opened with standard serial terminal applications.

Using the MSD Flash Programmer Using the Virtual Serial Port
  1. In the Debug folder of the S32DS project, locate the .srec file for your project
  2. Copy and Paste or drag and drop one of the .srec files to the S32K148EVB drive

The new application should now be running on the S32K148EVB. Starting with v1.03 of the MSD Flash Programmer, you can program repeatedly without the need to unplug and reattach the USB cable before reprogramming.

Drag one of the .srec files for the S32K148 to the S32K148EVB board drive over USB to reprogram the preloaded code example to another example.

  1. Determine the symbolic name assigned to the S32K148EVB virtual serial port. In Windows, open Device Manager and look for the COM port named OpenSDA - CDC Serial Port
  2. Open the serial terminal emulation program of your choice.
    For Windows you can use Tera Term, PuTTY or HyperTerminal
  3. Press and release Reset (SW5) to any time to restart the example application. Resetting the embedded application will not affect the connection of the virtual serial port to the terminal program
  4. It is possible to debug and communicate with the serial port at the same time. There is no need

Using Ethernet

The S32K148 evaluation board is the only member of its family able to use Ethernet and QuadSPI. However, these interfaces are mutually exclusive so only one of them can be used at a time. In order to use either Ethernet or QuadSPI, you must follow a specific resistor configuration. The default configuration of the board is to be used for Ethernet communication.

Using Ethernet on the S32K148EVB

Different from the rest of the devices on the S32K1xx family, the S32K148 has the ENET module, which offers the possibility to use Ethernet communication protocol. This enables this device for applications such as small Gateway (LIN-CAN-ETHERNET) or Audio Amplifier.

The software development kit (SDK) for the S32K1xx devices offers a middleware Ethernet stack (LwIP), that allows the user to develop applications faster.

Default Configuration

Get Started with the S32K148EVB - PT3A

Get Started with the S32K148EVB - PT3A

There is no Ethernet PHY on the board. In order to use ENET, you must get S32K148EVB-KIT, including both S32K148EVB-Q176 with ADTJA1101-RMII Ethernet Adapter in order to use ENET, as there is no Ethernet PHY on the board.

S32K148EVB-Q176 with ADTJA1101-RMII Ethernet Adapter

S32K148EVB with ADTJA1101-RMII

Running ENET

The TCP/IP ENET example is available in the S32K1xx SDK only in version EAR 0.8.6 and higher.

In order to get the example working, you need:

  • S32K148EVB-KIT = S32K148EVB + ADTJA1101-RMII
  • Media converter: automotive Ethernet to 10/100 Base-TX
  • SDK version "S32K_SDK_EAR_0.8.6" or higher
  • Any program able to set up a TCP client, like SocketTest

Before trying the example, change the IP of your computer to a static IP address. To do this, go to the network adapter settings of the computer, right click the local area network and select Properties.

Get Started with the S32K148EVB - PT3B

Get Started with the S32K148EVB - PT3B

Select the option Internet Protocol Version 4 (TCP/IPv4) and click Properties.

Get Started with the S32K148EVB - PT3C

The SDK example assigns an IP value of 192.168.0.200 to the S32K148.

The computer must have an IP in the same network. Fill out the values and click OK.

Get Started with the S32K148EVB - PT3D

Get Started with the S32K148EVB - PT3D

Once the PC setup is done, import the SDK example into the S32DS.

Go to File → Create new project from example option:

Get Started with the S32K148EVB - PT3E

Get Started with the S32K148EVB - PT3E

Compile the example and download it to the S32K148 EVB with the ADTJA1101-RMII connected.

The media converter should also be connected between the board and the computer:

Get Started with the S32K148EVB - PT3F

Get Started with the S32K148EVB - PT3F

Once you have everything connected, run the example. It should not have any issue. There are two ways to verify that the example is correctly running:

  • Ping the board. using the windows command of the windows console

    Use the command ping 192.168.0.200 and the board should answer:

Get Started with the S32K148EVB - PT3G

Get Started with the S32K148EVB - PT3G
  • Use the SocketTest program to echo the board at a TCP level

    Open the SocketTest (or the TCP client program you are using), using IP address: 192.168.0.200 and Port: 7.

Get Started with the S32K148EVB - PT3H

The connection should be established without any issue.

Once the computer is connected with the S32K148, you can send any message and the S32K148 will make an echo of anything you send.

Get Started with the S32K148EVB - PT3I

Get Started with the S32K148EVB - PT3I

Using SPI

The S32K148 evaluation board is the only member it's family able to use Ethernet and QuadSPI.

However, these interfaces are mutually exclusive so only one of them can be used at a time. In order to use either Ethernet or QuadSPI, you must follow a specific resistor configuration.

The default configuration of the board is for Ethernet.

Using SPI on the S32K148EVB

Different from the rest of the devices on the S32K1xx family, the S32K148 has the QuadSPI module, which offers the possibility to communicate with external devices (mostly memories) that allow QuadSPI protocol.

The S32K148 EVB has a MX25L6433F external memory mounted on the board.

The software development kit (SDK) for the S32K1xx devices offers an example for communicating with the external memory mounted on the board. Just run it and start testing the module.

Get Started with the S32K148EVB - PT4A

Get Started with the S32K148EVB - PT4A