Getting Started with the S32K144EVB

Last Modified: 2019-05-09 16:43:00Supports S32K144-Q100 Evaluation Board for Automotive General Purpose

Contents of this document

  • 1

    Out of the Box
  • 2

    Get Software
  • 3

    Plug It In
  • 4

    Build, Run
  • 5

    Debug

1. Out of the Box

Applies for the S32K144EVB evaluation board (REV B)

1.1 Get to Know Your Evaluation Board

S32K144-Q100 Callouts

S32K144-Q100 Callouts

1.2 Understanding the Header/Pinout

S32K144-Q100 Pins

S32K144-Q100 Pins

1.3 Understanding the HMI Mapping

Component S32K144
Red LED PTD15 (FTM0 CH0)
Blue LED PTD0 (FTM0 CH2)
Green LED PTD16 (FTM0 CH1)
Potentiometer PTC14 (ADC0_SE12)
SW2 PTC12
SW3 PTC13
OpenSDA UART Tx PTC7 (LPUART1_TX)
OpenSDA UART Rx PTC6 (LPUART1_RX)
CAN Tx PTE5 (CAN0_TX)
CAN Rx PTE4 (CAN0_RX)
LIN Tx PTD7 (LPUART2_TX)
LIN Rx PTD6 (LPUART2_RX)
SBC_SCK PTB14 (LPSPI1_SCK)
SBC_MISO PTB15 (LPSPI1_SIN)
SBC_MOSI PTB16 (LPSPI1_SOUT)
SBC_CS PTB17 (LPSPI1_PCS3)

2. Get Software

2.1 Integrated Development Environment (IDE)

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

DOWNLOAD S32 Design Studio IDE

2.2 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 the example project).

DOWNLOAD FreeMASTER Tool

3. Plug It In

3.1 Set Up Jumpers in S32K144EVB Evaluation Board

Jumper Setting Description
J104 1-2 Reset signal to OpenSDA, use to enter into OpenSDA Bootloader mode.
2-3 (Default) Reset signal direct to the MCU, use to reset S32K144.
J107 1-2 S32K144 powered by 12 V power source.
2-3 (Default) S32K144 powered by USB micro connector.
J109/J108 1-2 (Default) Removes CAN termination resistor.

Watch the video or use the step-by-step guide, below.

3.2 Plug In the 12 V Power Supply

The S32K144EVB evaluation board powers from a USB or external 12 V power supply. By default USB power is enabled with J107 jumper (2-3 closed).

Connect the USB cable to a PC using a USB cable and connect other end of USB cable (microUSB) to mini-B port on to J7 on your S32K144EVB.

Allow the PC to automatically configure the USB drivers if needed. Debug is done using OpenSDA through J7.

Once the board is recognized, it should appear as a mass storage device in your PC with the name EVB-S32K144.

S32K144EVB_GS-3.2a-RECOGNIZED

The S32K144EVB evaluation board is preloaded with a software in which red, blue and green LEDS will toggle at different rates:

LED Toggle

LED Toggle

4. Build, Run

Let’s take it for a test drive.

4.1 Communicate with Run-Time Debugger

Launch FREEMASTER

Launch FREEMASTER
  • Manually = Project → Options → Comm

    S32K144EVB_GS-4.1b-MANUALLY
  • Automatically = Tools → Connection Wizard

    S32K144EVB_GS-4.1c-AUTOMATICALLY

Learn more about OpenSDA at Projects and Tutorials.

4.2 FreeMASTER JumpStart Project Loaded

Jumpstart Loader

Jumpstart Loader

Jumpstart Project

Jumpstart Project

4.3 Import and Debug the Project to IDE

Watch the video to create a new project and load a code example to blink an LDE. The video also covers hoe to build and debug your project. You can also use the step-by-step guide.


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

To create a new project, select File → New → Project

Project IDE

Project IDE

Choose a project name and then select a project type, then click Next.

Project IDE

Project IDE

Select Debugger and Library, then click Finish.

Project IDE

Project IDE

4.4 Set Up Debug Configuration

Select OpenSDA to debug with it.

Select your project, and click on "Debug Configuration".

Debug Configuration

Debug Configuration

Select the debug configuration under "GDB PEMicro" Interface Debugging, click the "Debugger" tab.

Debug Configuration

Debug Configuration

In "Interface", select OpenSDA. If your board is plugged in, it should appear in "Port". To finish, click "Apply" then "Debug".

Debug Configuration

Debug Configuration

5. Debug

5.1 Debug Basics

Step, Run, Suspend, 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

5.2 View Variables

Click the Variables tab. To enter different values, click in the Value field.

S32K144EVB_GS-PT2g-DEBUG-BASIC

5.3 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

View peripheral registers in the EmbSys Registers tab:

Debug Basics

Debug Basics

5.4 View and Alter Memory

Select Add Memory Monitor and then select the base address to: 40000000

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

5.5 View Memory

S32K144EVB_GS-PT2l-DEBUG-BASICS

5.6 Breakpoints

To add break points, point and click in the desired location.

Debug Basics

Debug Basics

5.7 Reset and Terminate the Debug Session

To reset the program counter, select Terminate (Ctrl+F2).

S32K144EVB_GS-PT2n-DEBUG-BASICS

5.8 Debug with FreeMASTER

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

There are three options to start debugging:

  • If the Debug Configuration is still open, click Debug on the bottom right.
  • Select Run → Debug (or hit F11) S32K144EVB_GS-5.1a-DEBUG
  • Select the bug icon and select …_debug.elf target S32K144EVB_GS-5.1b-DEBUG

Learn more about debugging basics at Projects and Tutorials.

5.9 Optional - P&E Debug Configuration

  1. Select Debug Configurations:

    Debug

    Debug
  2. Create a new P&E launch configuration:

    Click to create a new P&E launch and then click Debugger.

    Debug

    Debug
  3. Select a S32K144 device and then click Apply and debug your application.

    Select Potentiometer

    Select Potentiometer

FreeMASTER

FreeMASTER

To display the main project panel, go to: Project → View → Project Tree

S32K144EVB_GS-PT1a-JUMPSTART

To display real-time oscilloscope graph examples, select Potentiometer or Touch Sense Electrodes:

  • Analog values from potentiometer:

    Select Potentiometer

    Select Potentiometer
  • Responses from touch sense electrodes:

    Touch Sense Electrodes Responses

    Touch Sense Electrodes Responses

OpenSDA

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.

The S32K144EVB comes with the MSD Flash Programmer 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 J104 on position 1-2.
  3. Press and hold the 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 S32K144 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 is a composite USB application that provides a virtual serial port and an easy and convenient way to program applications into the KEA MCU. It emulates a FAT16 file system, appearing as a removable drive in the host file system with a volume label of EVB-S32K144. Raw binary and Motorola S-record files that are copied to the drive are programmed directly into the flash of the KEA 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. Locate the .srec file of your project, file is under the Debug folder of the S32DS project.
  2. Copy and paste or drag and drop one of the .srec files to the EVB-S32K144 drive.

The new application should now be running on the S32K144EVB. 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 code for the S32K144 the S32K144EVB board over USB to reprogram the preloaded code example to another example.

  1. Determine the symbolic name assigned to the EVB-S32K144 virtual serial port. In Windows open Device Manager and look for the COM port named PEMicro/Freescale - CDC Serial Port.
  2. Open the serial terminal emulation program of your choice.
  3. Press and release Reset (SW0) at 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 to stop the debug.

Processor Expert

Processor Expert

Watch the video to create a new project and load a code example to make a blinking LED. The video also covers how to build and debug your project. You can also use the step-by-step guide.

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.

Users can copy the path directly into their window once the RTD is downloaded.

RTD Examples

ADC

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

ADC PDB IP

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

CAN

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

FLEX CAN IP

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

CRC

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

CRC IP

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

DIO

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

GPIO DIO IP

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

EEP

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

FTFC EEP IP

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

FEE

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

FLS

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

FTFC IP

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

FTM GPT

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

GPT

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

FPIT GPT

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

I²C

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

I²C IP

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

I²S leader

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

I²S follower

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

I²S IP leader

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

I²S IP follower

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

FTM ICU IP

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

ICU

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

PORT CI ICU IP

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

LIN

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

LIN IP

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

LIN LPUART

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

DMA IP

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

MCL DMA

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

CLOCK IP

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

MCU

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

POWER IP

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

FTM OCU IP

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

OCU

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

MPU IP

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

PLATFORM MPU HLD

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

PORT CI PORT IP

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

PORT

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

FTM PWM IP

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

PWM

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

FTM QDEC IP

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

QDEC

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

RM DMAMUX

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

LPSPI

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

LPSPI half-duplex

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

SPI half-duplex

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

SPI

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

LPUART

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

UART

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

WDOG

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

WDOG EWM IP

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

Support

Forums

Connect with other engineers and get expert advice on designing with the S32K144EVB on one of our community sites.