Getting Started with the DEVKIT-MPC5748G

Last Modified: 2019-03-15 13:25:00Supports MPC5748G Secure Gateway Development Board

Contents of this document

  • 1

    Out of the Box
  • 2

    Get Software
  • 3

    Plug It In
  • 4

    Create, Build and Load

1. Out of the Box

Applies for the DEVKIT-MPC5748G evaluation board REV D.

The DEVKIT-MPC5748G REV D has several improvements:

  • Latest MPC5748G silicon used (mask set 0N78S)
  • Added MicroSD connector for SDHC access
  • MicroUSB connector replaced with full-size connector for easier use with USB devices
  • Alternative placement of JTAG header and power supply jumper for easier access when using shields
  • DS4 changed to red and DS5 changed to orange
  • Added pre-soldered pull resistor on CAN0 interface, which can be added or removed with J16
  • Shorter array of female pin headers, allowing for smaller form factor
  • Fixed issue with USB

1.1 Get to Know Your Evaluation Board

DEVKIT-MPC5748G evaluation board REV D.

Get Started with the DEVKIT-MPC5748G-1.1a

Get Started with the DEVKIT-MPC5748G

DEVKIT-MPC5748G evaluation board REV B.

Get Started with the DEVKIT-MPC5748G-1.1b

Get Started with the DEVKIT-MPC5748G

1.2 Understanding the Header/Pinout

Get Started with the DEVKIT-MPC5748G-1.2a

Get Started with the DEVKIT-MPC5748G

Get Started with the DEVKIT-MPC5748G-1.2b

Get Started with the DEVKIT-MPC5748G

Get Started with the DEVKIT-MPC5748G-1.2c

Get Started with the DEVKIT-MPC5748G

1.3 Understanding Interfaces

The communication interfaces for DEVKIT-MPC5748G evaluation board:

Get Started with the DEVKIT-MPC5748G-1.3a

Get Started with the DEVKIT-MPC5748G

Get Started with the DEVKIT-MPC5748G-1.3b

Get Started with the DEVKIT-MPC5748G

The programming interfaces for DEVKIT-MPC5748G evaluation board:

Get Started with the DEVKIT-MPC5748G-1.3b

Get Started with the DEVKIT-MPC5748G

1.4 Understanding Peripherals

Get Started with the DEVKIT-MPC5748G-1.4

Get Started with the DEVKIT-MPC5748G

1.5 Understanding MPC574xG/C/B/D Family Differences

Get Started with the DEVKIT-MPC5748G-PT1

Get Started with the DEVKIT-MPC5748G

1.6 General Recommendations

  • For high power/current consuming applications (like using external shield boards) use "External 12 V Supply" only
  • External 12 V supply specifications:
    • Fully regulated switching power supply
    • Input voltage: 100-240 V AC 50/60 Hz
    • Output: 12 V 1 A/2 A DC
    • Plug size: 5.5 mm x 2.1 mm, center positive
  • By default, "New Project" in S32 Design Studio IDE makes the application run at 16 MHz internal RC (IRC) oscillator. For faster performance, configure PLL to desired frequency and switch clock source to PLL before executing application code
  • For faster debugging, debug from RAM, because this cuts down the lengthy flash erase operation cycles. Follow the Software Integration Guide (SWIG) for details
  • Keep both S32 Design Studio IDE and OpenSDA firmware up to date for best results

2. Get Software

2.1 Download Software Examples

Download

2.2 Get the Integrated Development Environment (IDE)

S32K144EVB performs better when using S32 Design Studio for Power Architecture®.

Download

  • The installation will requires Microsoft Visual C++ 2013 package. If libraries are already installed, a "Modify Setup" dialog box appears with the requirement "Repair"
  • When asked for "Activation ID", copy and paste it from the "Download" page and select an online activation
  • During the Installation, it may ask you to install P&E device drivers

2.3 Get the PC Configuration Driver

Some example applications output data over the MCU UART, so make sure that the driver for the board's virtual COM port is installed.

Download Config Driver

To view the serial output from the MCU’s UART, run your preferred terminal application once the serial port driver is installed. Configure the terminal to 57,600 baud rate, 8 data bits, no parity and 1 stop bit.

Learn more about Using a Terminal Application at Projects and Tutorials section.

3. Plug It In

Watch the video to set up your evaluation board. You can also use the step-by-step guide.

3.1 Set Up Jumpers in the Evaluation Board

The J11 is the only jumper. It helps select the power source:

  • 1-2: Default external 12 V supply
  • 2-3: USB powered 5 V supply, through OpenSDA interface

Get Started with the DEVKIT-MPC5748G-3.1a

Get Started with the DEVKIT-MPC5748G

Learn more about OpenSDA at Projects and Tutorials section.

3.2 Plug the USB Cable

Connect one end of the USB cable to the PC and the other end to the micro-B connector on the DEVKIT-MPC5748G board. Allow the PC to automatically configure the USB drivers.

Get Started with the DEVKIT-MPC5748G-3.2a

Get Started with the DEVKIT-MPC5748G

The pre-loaded example project utilizes the DEVKIT-MPC5748G user push button (SW2) and the user LEDs. Once the board is plugged in, LEDs will blink in default pattern. Press push button to switch between the two different patterns. Use potentiometer to change blinking speed.

4. Create, Build and Load

Let’s take it for a test drive. Watch the video to create a new project in S32 Design Studio IDE and load example code. You can also use the step-by-step guide.

4.1 Create a New Project in IDE

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

  2. Get Started with the DEVKIT-MPC5748G-4.1a

    Get Started with the DEVKIT-MPC5748G
  3. Create a new project by selecting File → New → Project
  4. Get Started with the DEVKIT-MPC5748G-4.1b

    Get Started with the DEVKIT-MPC5748G
  5. Choose a project name and then select a project type, then click "Next". We recommend using Elf S32DS Project
  6. Get Started with the DEVKIT-MPC5748G-4.1c

    Get Started with the DEVKIT-MPC5748G
  7. Select cores and parameter, then click "Finish". We recommend using the default settings. You can choose flash and RAM size and make selections in "Language", "Library" and "Debugger"
  8. Three projects will be created for three different cores of MPC5748G
  9. Get Started with the DEVKIT-MPC5748G-4.1e

    Get Started with the DEVKIT-MPC5748G

4.2 Build a New Project in IDE

Follow one of these paths to build a new project:

  • Select Project → Build Project
  • Get Started with the DEVKIT-MPC5748G-4.2a

    Get Started with the DEVKIT-MPC5748G
  • To build the project, click the hammer icon
  • To build all projects, click the paper and number icon

Once you have successfully built your project, the following message displays on the console:

4.3 Debug a Project in IDE

  1. Connect a debugger to both the board and the PC

  2. Open "Debug Configuration" options in the top menu
  3. Select a project and interface and then click "Debug"

    (Example: "FirstProject_Z4_0_Debug" and "OpenSDA for DEVKIT-MPC5748G")

  4. Get Started with the DEVKIT-MPC5748G-4.3b

    Get Started with the DEVKIT-MPC5748G

Learn more about Debug Basics at Projects and Tutorials section.

4.4 Debug a Project from RAM

To configure a project to debug from RAM, follow one of these paths:

  1. Go to Project → Build Configurations → Set Active → Debug_RAM

    Get Started with the DEVKIT-MPC5748G-4.4a

    Get Started with the DEVKIT-MPC5748G
  2. To select Debug_RAM, click the arrow near the hammer icon
  3. Finally, to debug from RAM, select the RAM-related session while debugging

  4. Get Started with the DEVKIT-MPC5748G-4.4c

    Get Started with the DEVKIT-MPC5748G

4.5 Make Projects From Built-In Examples

  1. Launch S32 Design Studio for Power Architecture, for example, go to File → New → New S32DS Project
  2. Get Started with the DEVKIT-MPC5748G-4.5a

    Get Started with the DEVKIT-MPC5748G
  3. Select the built-in project of your choice and click "Finish"
  4. Get Started with the DEVKIT-MPC5748G-4.5b

    Get Started with the DEVKIT-MPC5748G
  5. The selected project will be copied to the active workspace
  6. The DEVKIT-MPC5748G example codes also include the projects from AN4830: Qorivva Recipes for MPC574xG

    • Hello
    • Hello + pll
    • Hello + pll + interrupts
    • eDMA + PBridge
    • Semaphores
    • Register Protection
    • Low Power: STOP mode
    • Analog-to-digital converter
    • Timed I/O (eMIOS)
    • CAN
    • CAN + DMA
    • LIN
    • UART
    • SPI
    • SPI + DMA
    • I2C
    • Ethernet
    • Body Cross Trigger Unit (BCTU)
    • System Memory Protection Unit (SMPU)
    • Flash

4.6 Import Projects into IDE

  1. Go to File → Import and click "Existing Projects" into the workspace option. Then click "Next"
  2. Browse and select an example folder
  3. Get Started with the DEVKIT-MPC5748G-4.6a

    Get Started with the DEVKIT-MPC5748G
  4. Select a project. To import it into the workspace, click "Finish"
  5. Get Started with the DEVKIT-MPC5748G-4.6b

    Get Started with the DEVKIT-MPC5748G

Using a Terminal Application

Tera Term Tutorial

Tera Term is a very popular open source terminal emulation application. This program can be used to display information sent from your NXP® development platform's virtual serial port.

  1. Download Tera Term from SourceForge. After the download, run the installer and then return to this webpage to continue
  2. Download

  3. Launch Tera Term and select the Serial option

  4. Using the COM port number identified earlier, configure serial port settings to 57,600 baud rate, 8 data bits, no parity and 1 stop bit. Go to Setup → Serial Port and update the settings
  5. Verify that the connection is open. Once connected, Tera Term will update its title bar:
  6. You are ready to go

PuTTY Tutorial

PuTTY is a popular terminal emulation application. This program can be used to display information sent from your NXP development platform's virtual serial port.

  1. Download PuTTY and run the installer
  2. Download

  3. Launch PuTTY
  4. Configure the Serial radio button and enter the COM port number you determined earlier. Also, enter the baud rate

  5. Open the serial connection

  6. You are ready to go

Debug Basics

Debug Basics

Step, Run, Suspend, Resume and Terminate

  • Step Into (F5)

  • Step Over (F6)

  • Run

  • Suspend

  • Resume (F8)

  • Terminate (Ctrl + F2)

View Variables

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

View and Alter Registers

  • To see CPU registers, click the "Registers" tab. To enter different values, click in the "Value" field
  • To view peripheral registers, go to the "EmbSysReg" tab

View Memory

  • To add a memory monitor, click the plus icon (+) and select a base address

Breakpoints

  • To add breakpoints, place your cursor and double click

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.

The DEVKIT-MPC5748G comes with the 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 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 application to the BOOTLOADER drive
  4. Unplug the USB cable and plug it in again. The new OpenSDA application should now be running. To check the latest version, repeat step 1

Use the same procedure to load other OpenSDA applications.

Using the Virtual Serial Port

  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 OpenSDA-CDC Serial Port

  2. Open the serial terminal emulation program of your choice

  3. Program one of the "code examples" using S32 Design Studio IDE
  4. Configure the terminal emulation program. Most embedded examples use 8 data bits, no parity bits and one stop bit (8-N-1). Match the baud rate to the selected serial test application and open the port
  5. Press and release Reset (SW1) 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

Support

Forums

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