Create a new configuration project using the S32CT
1
Table of Contents
• Introduction
• Prerequisites
• Launch the S32 Configuration Tool
• Create a New Configuration Project
• Configure the Peripherals
• Generate the Configuration Code
• Link the Configuration to the Simulink Model
• Debugging and Validation
• References
• Conclusion
2
Introduction
The S32 Configuration Tool (S32CT) is NXP’s graphical configuration environment used to set up low-level MCU features such as pin muxing, clock trees, peripherals, and interrupts. When working with the NXP Model-Based Design Toolbox (MBDT), the configuration produced by S32CT is what allows the Simulink-generated code to correctly access peripherals like GPIO, ADC, CAN, LIN, SPI, or PWM on the target device. This article walks through the process of creating a new S32CT configuration project from scratch, linking it to a Simulink model, and preparing it for use in a Model-Based Design workflow on NXP S32K devices.
3
Prerequisites
Before creating a new S32CT configuration project, make sure the following tools and components are available and properly installed:
MATLAB & Simulink
NXP Model-Based Design Toolbox (MBDT)
S32 Design Studio (S32DS) with the S32 Configuration Tool component installed
NXP RTD (Real-Time Drivers) package matching the target device
Target hardware (e.g. S32K344-Q172, S32K358-Q289)
USB / JTAG debugger (e.g. PEMicro Multilink)
It is important that the S32CT version, the RTD package, and the MBDT release are mutually compatible. Version mismatches between these components are one of the most common causes of missing peripheral drivers, unresolved symbols during code generation, or configuration files that cannot be opened. The compatibility matrix is provided in the release notes shipped with each MBDT installation and should be consulted before starting a new project.
It is also recommended to keep the S32CT project inside the same folder as the associated Simulink model. This makes the workflow easier to maintain, ensures relative paths remain valid when the project is shared or moved to another machine, and simplifies version control.
4
Launch the S32 Configuration Tool
Step 1: Open S32CT from S32 Design Studio
Launch S32 Design Studio
From the top menu, select S32 Configuration Tools → Open S32 Configuration Tool
Step 2: Open S32CT from Simulink (recommended for MBDT)
Open your Simulink model
Open Model Settings ( Ctrl + E )
Go to Hardware Implementation
In the Configuration Project Template section, click the Open button next to the selected template
When launched from Simulink, S32CT is automatically opened in the context of the currently selected hardware board. This ensures that the device family, part number, and package options are already aligned with the target you configured in the model, reducing the risk of manual selection errors.
5
Create a New Configuration Project
Step 3: Start a new project
In S32CT, select File → New → S32 Configuration Project
Enter a meaningful project name, e.g. s32k344_led_blink_cfg
Choose the project location — ideally the same folder as your Simulink model
Step 4: Select the target device
Choose the correct device family (e.g. S32K3)
Select the exact part number (e.g. S32K344)
Choose the correct package variant (e.g. 172 MAPBGA)
Select the SDK / RTD version matching your MBDT installation
The device, package, and SDK selection defines the set of peripherals, pins, and clock sources that will be available in the configuration views. Choosing a device that does not match the target hardware will lead to invalid pin assignments and code that will not run correctly on the board.
Step 5: Confirm project creation
Click Finish to create the project
S32CT generates a .mex file that stores the full configuration
The project opens automatically in the S32CT perspective
6
Configure the Peripherals
S32CT provides several dedicated views, each responsible for a different aspect of the MCU configuration. For a basic LED blink example, the following are the most relevant:
Step 6: Configure the Pins view
Open the Pins tool
Select the pin connected to the on-board LED (refer to the board schematic)
Assign the pin to the SIUL2 / GPIO functionality
Set the direction to Output
Assign a meaningful label, e.g. DioLed0
Step 7: Configure the Clocks view
Open the Clocks tool
Select the desired clock source (FIRC, SIRC, FXOSC, PLL)
Configure the system clock frequency (e.g. 160 MHz for S32K344)
Verify that peripheral clock gates are enabled for the modules you use
Step 8: Configure the Peripherals view
Open the Peripherals tool
Enable the Dio driver and add a Dio channel corresponding to the pin configured earlier
Match the channel name (e.g. DioLed0 ) with the one that will be used in the Simulink Dio block
Enable additional drivers (Port, Mcu, Platform) as required by the RTD stack
The channel names, driver instances, and symbolic identifiers defined here are exactly the ones that will appear in the drop-down menus of the MBDT Simulink blocks. Keeping the naming consistent between S32CT and the Simulink model is essential for a clean, maintainable project.
7
Generate the Configuration Code
Step 9: Update the code
Click the Update Code button in the S32CT toolbar
Review the list of files that will be created or modified
Confirm the update to generate the C source and header files
S32CT generates a set of static configuration files that describe the pin muxing, clock tree, and driver instances. These files are consumed at build time by the MBDT-generated code, which invokes the driver initialization functions ( Port_Init , Mcu_Init , Dio_Init , etc.) during system startup. Any change made in S32CT must be followed by a code update; otherwise the newly configured peripherals will not be visible to the Simulink model.
Step 10: Save the project
Save the .mex file ( Ctrl + S )
Verify that the generated files are located under the project folder
Commit both the .mex file and the generated code to version control
8
Link the Configuration to the Simulink Model
Step 11: Point Simulink to the S32CT project
Open the Simulink model
Open Model Settings ( Ctrl + E ) → Hardware Implementation
In the Configuration Project Template section, browse to the newly created .mex file
Apply and close the dialog
Once linked, the Simulink model uses the S32CT project as its single source of truth for MCU configuration. Peripheral blocks from the MBDT library (Dio, Adc, Pwm, Can, Uart, …) automatically populate their parameter dialogs with the instances, channels, and signals defined in the .mex file.
Step 12: Validate the link
Add a Dio block from the MBDT library
Open the block dialog and verify that DioLed0 appears in the Channel drop-down
If the channel is missing, re-run Update Code in S32CT and refresh the block dialog
9
Debugging and Validation
After the S32CT project is created and linked to Simulink, you can validate the configuration in several ways:
Build the Simulink model ( Ctrl + B ) and confirm that no configuration-related errors are reported
Inspect the generated files under the model build folder for the expected driver initialization calls
Use the S32DS debugger to step through the startup sequence and verify that Port_Init , Mcu_Init , and Dio_Init execute correctly
Use FreeMASTER or a UART console to confirm that the peripherals behave as configured on the target
10
References
Quick Start Guide for S32K3X4EVB Board
Model-Based Design Toolbox (MBDT) – How To
S32 Configuration Tool User Guide
RTD Reference Manual for the target device family
11
Conclusion
Correctly using S32CT guarantees that the low-level MCU configuration and the high-level Simulink model remain aligned throughout the development cycle. This is a key enabler for a robust Model-Based Design flow on NXP S32 devices, especially in automotive projects that need to comply with AUTOSAR and functional safety requirements.
View full article