Upload
others
View
13
Download
0
Embed Size (px)
Citation preview
CONTENTS
Get to know the S32K148 T-BOX Reference Design Board (RDB)
S32K148 T-BOX RDB out-of-the-box setup
Creating a new S32DS project for the S32K1xx MCU
S32DS debugging basics
Create a PampE debug configuration
S32K148 Telematics Box Reference Design Board
GET TO KNOW THE S32K148-T-BOX REFERENCE DESIGN BOARD (RBD)
P1Mic input
SW4 User bottom
SW2 amp SW3 Touch Pad
J25ampJ27 4G module connector
Audio Codec STGL5000
Potentiometer SW5 User bottom
TJA1101 MCU S32K148
SBC UJA113x
J16 Audio OUT
J15 Line OUT J15
Line OUT
RGB LED SBC HVIO
SW1 Reset bottom
J26 BLE module
connectorJ5 CAN0 interface
J28 GPS module
connector
J3123-pin ECU connectorRoute signals withbull 3x CAN busbull 2x LIN busbull 1x Ethernetbull 2x Analog inputbull 2x HS outputbull 2x Input Capturebull 12 V Power Supply
Figure 1 S32K148-T-BOX Reference Design Board (RBD)
2
S32K148-T-BOX RDB BLOCK DIAGRAM
To achieve the maximum flexibility to be T-BOXGP-ECU Ref-DesignS32K148 EVB
BLE GPS and 3G4G select independent Module and connect with S32K148 via UART
Add QSPI Nor-Flash standalone RTC and 3-aix Accelerator for T-Box functions
Extend a 100M-base TX1 automotive ethernet via TJA1101 for both T-Box connection and AVB evaluation (plus a I2S audio Codec )
SBC provides 533V power supply for S32K148 and other onboard modules and also expends 1 CAN and 2 LIN bus
Select TJA1044 with SO-8 and TJA1043 with HVSON14 package to compatible with Stinger
Use a 23-pin ECU connector to route all CANLINENET bus and extend 2x HS output 2x PWM input capture and 2x Analog Input enable it to work as a GP-ECU
S32K148-T-BOX RDB FEATURES
Support S32K148 with LQFP-144 or LQFP-176 pin package(default mounted with LQFP-144 package)
SBC UJA1132 with 2 LIN physical layers and 1 CAN physical layer
Integrate communication interfaces
ndash 3x CAN with CAN-FD
ndash 3x UART(2 reused as LIN via SBC-UJA113x)
ndash 1x 100M-base TX1 automotive ethernet via TJA1101
ndash 1x I2S audio codec extend with SGTL500 and support AVB evaluation
Integrate 8MB QSPI NOR Flash memory(MX25L6433F )
Provide T-BOX function module plugin interfaces
1 UART BLE module
1 UART GPS module
1 UART 4G communication module
2x user bottoms input
2x touch sensor input
1x RGB LED
1x Potentiometer
1x 3-axi accelerator(MMA8452Q) via I2C
1x stand-alone RTC chip(PCA85063)
A 23-pin ECU connector routing external IO signals including
ndash 2x ADC input channels
ndash 2x HS PWM output channels
ndash 2x PWM input capture channels
ndash 3x CAN bus
ndash 2x LIN bus
ndash 1x 100M-base TX1 automotive ethernet
Compatible with S32K148EVB
ndash Arduinotrade UNO footprint-compatible with expansion ldquoshieldrdquo support
ndash Can run all demo projects of SDK
Voltage supply options for 33V or 5V
S32K148-T-BOX RDB BLOCK DIAGRAM
S32K148 T-BOX_GP-ECU RDB WITH ALL MODULES PLUGIN
S32K148-T-BOX REFERENCE DESIGN BLOCK DIAGRAM
GPS ModuleMCU
S32K148LQFP-144176
3G4GCommunication
Module
UART
I2C8 MB QSPI FlashExternal Memory
QSPI
TJA1101
ENET MIICANCAN-FD
StandaloneRTC Chip
I2C
VB
AT
IGN
+12
V
SBCUJA1132
2x 5 V LDO1x CAN PHY2 x LIN PHY8 x HVIO
3-axiAccelerator
TJA1044TJA1043
CANCAN-FD
SPI UART
CAN
LIN
LIN
I2S
Audio CodecSGTL5000
UART
BLE Module
2x PWM
5 V 500 mA
23-pin ECU connector
HS Driver
2x HS
Signal Conditional Circuit
2x Analog Input 2x PWM Input
2x ADC
2x Input Capture
3
DOCUMENTATION FOR MAIN CHIPS AND MODULES
Main MCU S32K148z S32K1xx MCU Family Data Sheet (REV 9) S32K1xx MCU Family Reference Manual (REV 9)
SBC UJA1132 UJA113x_SER Buckboost HS-CANdual LIN system basis chip (REV 22)
100M-base TX1 automotive Ethernet Transceiver TJA1101 TJA1101 Full Data Sheet (NDA Required) (REV 10)
CAN Transceiver TJA1043 and TJA1044 TJA1043High-speed CAN transceiver (REV 61) TJA1044 High-speed CAN transceiver with Standby mode - Data sheet (REV 6)
Audio Codec SGTL5000 SGTL5000 Low Power Stereo Codec with Headphone Amp - Data Sheet (REV 60)
3-axi Accelerator MMA8452Q MMA8452Q 3-Axis 12-bit8-bit Digital Accelerometer - Data Sheet (REV 10)
Standalone RTC Chip PCA85063 Automotive tiny Real-Time Clockcalendar with alarm function and I2C-bus (REV 40)
GPS Module NEO-6M7M UART GPS module
3G4G Communication Module USR-LTE-7S4 UART 4G LTE DTU module
BLE Bluetooth 40 Module HC-08 UART BLE module The links are also the purchase link for these modules
S32K148-T-BOX RBD SOFTWARE PACKAGE
The S32K148 T-BOX_GP-ECU RDB SW package is based on S32K SDK and is developed to accelerate customerrsquos application prototype verification code development
With the BSP layer the SW package provides a set of easy-use API for application layer use
The SW package includes
ndash S32K148 T-BOX_GP-ECU RDB SDK processor expert configuration
ndash The GPSBLE4G communicationaudio Codec modules driver API and test codes
ndash CANLINUARTI2C communication driver API and test codes
ndash FreeRTOS and LwIP based ENET TCPIP stack and demo project
ndash The BSP test project
ndash The T-BOX reference design demo project
ndash Detailed user manual
S32K148 T-BOX_GP-ECU RDB SW ARCHITECTURES32K148-T-BOX REFERENCE DESIGN SOFTWARE ARCHITECTURE
ApplicationSoftware
BSP Layer
T_BOX APP
GPSModule
BLEModule
4G WirelessCOM Module 8 MB
QSPIFlashAudio
Codec Standalone RTC
S32K148 MCU
3-axi accelerator
1x ENET interface
2x LIN interface
3x CAN interface
GP_ECU APP BSP_TestPrj
BSP API
S32K SDK
HardwareS32K148-T-BOX Reference Design
Board
ProcessorExpert UI
Config files
Start-upCompilerlinker files
USB
SDHC
ZipWire
FRComms Safety
Motor Control
Misc
Analog
LIN
NFC
CAN
TCPIP
AMMCLib
sCST
sPTLib
Audio
Touch Sensing
Security
AVB
Comms Safety ampSecurity
Timers External SoC ampBoards
Middleware
Low-level Drivers
Headers
OS
OS
IF
PAL
PD
PAL
PD
PAL
PD
PAL
PD
PAL
PD
PD
4
PINOUT MAPPING OF ARDUINOtrade UNO HEADER
PIN PORT
J20-3 VBAT
J20-6 VBAT
J20-9 LIN1
J20-12 GND
J20-15 LIN2
J20-18 GND
J20-21 CANH
J20-24 CANL
PIN PORT
J21-3 PTB17
J21-6 PTA27
J21-9 PTA28
J21-12 PTA29
J21-15 PTA0
J21-18 PTA1
J21-21 PTA15
J21-24 PTA16
PIN PORT
J22-2 PTC15
J22-4 PTB8
J22-6 PTA11
J22-8 PTA12
J22-10 VDD
J22-12 GND
J22-14 PTE1
J22-16 PTE0
J22-18 PTD1
J22-20 PTD13
PIN PORT
J17-28 PTE15
J17-25 PTE16
J17-22 VREFH
J17-19 GDN
J17-16 PTB2
J17-13 PTB3
J17-10 PTB1
J17-7 PTB0
J17-4 PTA30
J17-1 PTA31
PIN PORT
J19-28 PTD3
J19-25 PTD2
J19-22 PTD19
J19-19 PTD18
J19-16 PTA18
J19-13 PTA19
J19-10 PTB9
J19-7 PTB10
J19-4 PTB21
J19-1 PTB20
PIN PORT
J22-1 PTE21
J22-3 PTE22
J22-5 PTE23
J22-7 PTE24
J22-9 PTE25
J22-11 PTC19
J22-13 PTC14
J22-15 PTB14
J22-17 PTB15
J22-19 PTB16
PIN PORT
J17-29 PTB12
J17-26 PTB13
J17-23 PTE11
J17-20 PTE10
J17-17 PTB11
J17-14 PTB17
J17-11 PTB18
J17-8 PTA6
J17-5 PTA7
J17-2 PTA25
PIN PORT
J19-29 PTD0
J19-26 PTE14
J19-23 PTE13
J19-20 PTE12
J19-17 GND
J19-14 VDD
J19-11 PTC6
J19-8 PTC7
J19-5 PTC12
J19-2 PTC13
PIN PORT
J17-30 PTD31
J17-27 PTD26
J17-24 PTD25
J17-21 PTC26
J17-18 PTC25
J17-15 PTC24
J17-12 PTC22
J17-9 PTC21
J17-6 PTC20
J17-3 PTC18
PIN PORT
J19-30 PTE17
J19-27 PTE18
J19-24 PTB19
J19-21 PTE27
J19-18 PTE26
J19-15 PTA20
J19-12 PTA21
J19-9 PTA22
J19-6 PTA23
J19-3 PTA24
PIN PORT
J18-22 PTD14
J18-19 PTD15
J18-16 PTD16
J18-13 PTD17
J18-10 PTC10
J18-7 PTC11
J18-4 PTA3
J18-1 PTA2
PIN PORT
J20-2 PTB23
J20-5 PTB22
J20-8 PTB29
J20-11 PTB27
J20-14 PTB28
J20-17 PTB25
J20-20 PTA8
J20-23 PTA9
PIN PORT
J21-2 PTD4
J21-5 PTD22
J21-8 PTD23
J21-11 PTD24
J21-14 PTD27
J21-17 PTD28
J21-20 PTD29
J21-23 PTD30
PIN PORT
J18-23 PTA13
J18-20 PTA14
J18-17 PTE2
J18-14 PTE3
J18-11 PTE6
J18-8 PTB7
J18-5 PTE8
J18-2 PTE9
PIN PORT
J20-1 VBAT
J20-4 VDD
J20-7 PTA5
J20-10 V3_3
J20-13 V5_0
J20-16 GND
J20-19 GDN
J20-22 VBAT
PIN PORT
J21-1 PTC23
J21-4 PTC27
J21-7 PTC28
J21-10 PTC29
J21-13 PTC30
J21-16 PTC31
J21-19 PTE19
J21-22 PTE20
PIN PORT
TOUCH0_0 PTA0
TOUCH0_1 PTA15
PIN PORT
TOUCH1_0 PTA1
TOUCH1_1 PTA16
PIN PORT
J18-24 PTD20
J18-21 PTD21
J18-18 PTB24
J18-15 PTB26
J18-12 GND
J18-9 GND
J18-6 PTB30
J18-3 PTB31
J20J17
J18
J19
J21
J22
Electrode A (SW2)
Electrode B (SW3)
J21
J22ELECTRODE A (SW2)
ELECTRODE B (SW3)
J17
J19
J20
J18
5
HEADERPINOUT MAPPING FOR S32K148
External Modules
Function Pin S32K148 MCU PinsOn-board Connector
Used MCU Peripherals
BLE moduleUART-TX PTB0LPUART0_RX J26-1
LPUART0UART-RX PTB1LPUART0_TX J26-2
GPS module
UART-TX PTC8LPUART1_RX J28-3
LPUART1UART-RX PTC9LPUART1_TX J28-2
PPS PTC10FTM3_CH4TRGMUX_IN11 J28-1
4G module
UTXD1 PTD17FTM0_FLT2LPUART2_RXFTM5_FLT1 J25-6
LPUART2
URXD1 PTE12FTM0_FLT3LPUART2_TXFTM5_FLT0 J25-7
POWER_KEY_N PTD4FTM0_FLT3ADC1_SE6 J25-10
M_RELOAD_N PTD2FTM3_CH4LPSPI1_SOUTFXIO_D4FXIO_D6ADC1_SE2 J27-6
M_RESET_N PTD3FTM3_CH5LPSPI1_PCS0FXIO_D5FXIO_D7ADC1_SE3 J27-7
TJA1044Stinger (SO8)
TXD PTC7LPUART1_TXCAN1_TXFTM3_CH3 NC
CAN1
RXD PTC6LPUART1_RXCAN1_RXFTM3_CH2 NC
STB PTC11FTM3_CH5FTM4_CH2TRGMUX_IN10 NC
CANH NC J31-2
CANL NC J31-17
TJA1043Stinger (HVON-14)
TXD PTB13FTM0_CH1FTM3_FLT1CAN2_TX NC
CAN2
RXD PTB12FTM0_CH0FTM3_FLT2CAN2_RX NC
EN PTB11FTM3_CH3LPI2C0_HREQ NC
STB_N PTB15FTM0_CH3LPSPI1_SINADC1_SE14 NC
INH SBC_HVIO3 NC
CANH NC J31-3
CANL NC J31-18
TJA1101 (10100Mbits Ethernet PHY)
MDC PTB5ENET_MII_RMII_MDC NC
ENET
MDIO PTB4MII_RMII_MDIO NC
INT_N PTB20FTM6_CH0ENET_INT NC
RXDVCONFIG2 PTC17MII_RMII_RX_DV NC
RXERCONFIG3 PTC16MII_RMII_RX_ER NC
RXCREF_CLK PTD10MII_RX_CLK NC
RXD0PHYAD0 PTC1MII_RMII_RXD0 NC
RXD1PHYAD1 PTC0MII_RMII_RXD1 NC
RXD2CONFIG0 PTD9MII_RXD2 NC
RXD3CONFIG1 PTD8MII_RXD3 NC
TXER PTC3MII_TX_ER NC
TXEN PTD12MII_RMII_TX_EN NC
TXD0 PTC2MII_RMII_TXD0 NC
TXD1 PTD7MII_RMII_TXD1 NC
TXD2 PTD6MII_TXD2 NC
TXD3 PTD5MII_TXD3 NC
INH SBC_HVIO4 NC
TRX_P NC J31-5
TRX_N NC J31-20
6
External Modules
Function Pin S32K148 MCU PinsOn-board Connector
Used MCU Peripherals
SBC(UJA113X)
SBC_SPI_CS PTA26FTM5_CH1LPSPI1_PCS0 NC
LPSPI1SBC_SPI_SCLK PTA28FTM5_CH3LPSPI1_SCKLPUART0_RX NC
SBC_SPI_MOSI PTA29FTM5_CH4LPUART2_TXLPSPI1_SIN NC
SBC_SPI_MISO PTA27FTM5_CH2LPSPI1_SOUTLPUART0_TX NC
SBC_CAN_TXD PTE5TCLK2FTM2_CH3CAN0_TXFXIO_D7 NCCAN0
SBC_CAN_RXD PTE4TRACE_D1FTM2_CH2CAN0_RXFXIO_D6 NC
SBC_LIN1_TXD PTA3LPUART0_TXFXIO_D5 NC LPUART0FlexIO4_5SBC_LIN1_RXD PTA2LPUART0_RXFXIO_D4 NC
SBC_LIN2_TXD PTA9LPUART2_TXLPSPI2_PCS0FXIO_D7FTM3_FLT2 NC LPUART2FlexIO6_7SBC_LIN2_RXD PTA8LPUART2_RXLPSPI2_SOUTFXIO_D6FTM3_FLT3 NC
SBC_CANH NC J5-1
SBC_CANL NC J5-2
SBC_LIN1 NC J31-10
SBC_LIN2 NC J31-11
INTN1 PTE19FTM7_CH7FTM7_CH7ADC1_SE25 NC
INTN2 PTE20FTM4_CH0FTM4_CH0ADC1_SE26 NC
External RTC amp ACCELERATOR
I2C_SCL PTD19FTM6_CH0FXIO_D3LPI2C1_SCLADC1_SE17 NC
LPI2C1I2C_SDA PTC31FTM5_CH6FXIO_D1LPI2C1_SDAFXIO_D1ADC0_SE31 NC
ACC_INT1 PTD22FTM6_CH3FTM6_CH3ADC1_SE18 NC
ACC_INT2RTC_INT PTD23FTM6_CH4FTM6_CH4ADC1_SE19 NC
Internal RTCRTC_CLKIN PTA7FTM0_FLT2FTM5_CH3RTC_CLKINLPUART1_RTSADC0_SE3 NC
RTCRTC_CLK_EN PTA6FTM0_FLT1LPSPI1_PCS1FTM5_CH5LPUART1_CTSADC0_SE2 NC
SAI(I2S) AUDIO-SGTL5000
SYS_MCLK PTD1FTM0_CH3LPSPI1_SINFTM2_CH1SAI0_MCLK NC
SAI0
I2S_SCLK PTA12FTM1_CH6CAN1_RXLPI2C1_SDASSAI0_BCLK NC
I2S_LRCLK PTA11FTM1_CH5FXIO_D1CMP0_RRTSAI0_SYNC NC
I2S_DIN PTA13FTM1_CH7FTM2_QD_PHASAI0_D0 NC
I2S_DOUT PTE1LPSPI0_SINLPI2C0_HREQLPI2C1_SCLSAI0_D1 NC
CTRL_CLK PTA3LPUART0_TXLPI2C0_SCLFXIO_D5 NC LPI2C0FLEXIOCTRL_DATA PTA2LPUART0_RXLPI2C0_SDAFXIO_D4 NC
QSPI-FLASH(64Bit)
SCLK PTD10QSPI_A_SCK NC
QSPI_A
CS_N PTC3QSPI_A_CS NC
SISIO0 PTD11QSPI_A_IO0 NC
SOSIO1 PTD7QSPI_A_IO1 NC
WP_NSIO2 PTD12QSPI_A_IO2 NC
HOLD_NSIO3 PTC2QSPI_A_IO3 NC
Touch PAD
TOUCH_ADC0_A PTA0FTM2_CH1LPI2C0_SCLSFXIO_D2FTM2_QD_PHALPUART0_CTSTRGMUX_OUT3ADC0_SE0CMP0_IN NC ADC0_SE0
TOUCH_ADC1_A PTA15FTM1_CH2LPSPI0_PCS3LPSPI2_PCS3FTM7_FLT0ADC1_SE12 NC ADC1_SE12
TOUCH_ADC0_B PTA1FTM1_CH1LPI2C0_SDASFXIO_D3FTM1_QD_PHALPUART0_RTSTRGMUX_OUT0ADC0_SE1CMP0_IN1 NC ADC0_SE1
TOUCH_ADC1_B PTA16FTM1_CH3LPSPI1_PCS2ADC1_SE13 NC ADC1_SE13
RGB LED
LED_RED PTE21FTM4_CH1ADC1_SE27 NCPTE work as
outputLED_GREEN PTE22FTM4_CH2ADC1_SE28 NC
LED_BLUE PTE23FTM4_CH3ADC1_SE29 NC
user BUTTOMBTN0 PTC12FTM3_CH6FTM2_CH6LPUART2_CTS NC PTC work as
inputEIRQBTN1 PTC13FTM3_CH7FTM2_CH7LPUART2_RTS NC
Potentiometer ADC test input PTC28FTM4_CH7ADC0_SE28 NC ADC0_SE28
HEADERPINOUT MAPPING FOR S32K148 CONT
7
23-PIN ECU CONNECTOR SIGNAL ROUTING AND WIRING HARNESS
The 23-pin ECU connector routing communication and external IO signals including
ndash 2x ADC input channels
ndash 2x HS PWM output channels
ndash 2x PWM input capture channels
ndash 3x CAN bus
ndash 2x LIN bus
ndash 1x 100M-base TX1 automotive ethernet
ndash +12V VBAT power supply input
ndash +5V power supply output for external devices
The 23-pin ECU connector enables the board to work as GP-ECU easily
The 23-pin ECU connector matched wiring harness with signal labels as below photo
It is not included in S32K148 T-BOX RDB please contact NXP sales for purchase
PIN Signal Wire colorWire gauge
(conductor CSAmm2)description
1 VBAT red 125 12V max 5A
2 CAN1H yellow 05 CAN bus 1 differential signal+
3 CAN2H yellow 05 CAN bus 2 differential signal+
4 ECU_EXT_HS1 green 05 ECU High Side driver output 1
5 CAN0H yellow 05 CAN bus 0 differential signal+
6 ECU_EXT_ADC1 blue 05 ECU external analog input 1
7 ECU_EXT_ADC2 blue 05 ECU external analog input 2
8 GND black 125 Powersignal ground
9 VBAT red 125 12V max 5A
10 ECU_EXT_LIN1 white 05 LIN bus 1
11 ECU_EXT_LIN2 white 05 LIN bus 2
12 SBC_HVIO5 orange 05 SBC HVIO5
13 ECU_EXT_PWM2 purple 05 PWM input channel 2
14 ECU_EXT_PWM1 purple 05 PWM input channel 1
15 ECU_EXT_5V red 075 5V power supply for ECU external devicemax100mA
16 GND black 125 Powersignal ground
17 CANL1 pink 05 CAN bus 1 differential signal-
18 CANL2 pink 05 CAN bus 2 differential signal-
19 ECU_EXT_HS2 green 05 ECU High Side driver output 2
20 CANL0 pink 05 CAN bus 0 differential signal-
21 GND black 125 Signal ground
22 ENET_TRX_P green 05100M-base TX1 automotive ethernet differential signal+
UTP
23 ENET_TRX_N orange 05100M-base TX1 automotive ethernet differential signal -
UTP
8
JUMPER SETTINGS (POWER SUPPLY)
JUMPER SETTINGS (LIN AND RTC CLOCK CONFIGURATION)
Jumper Configuration Description
J21-2 (Default) The 33V supply powered from VBAT(+12V)
2-3 The 33V supply powered from P5V0(5V)
J81-2 (Default) The P5V0 supply powered from SBC output
2-3 Not use no power source(NC on J8-3)
J91-2 (Default) The VDD supply powered from P3V3_SW(33V)
2-3 The VDD supply powered from P5V0(5V)
J291-2 (Default) VCAN_SBC supply powered from P5V0_V1SBC
2-3 VCAN_SBC supply powered from PVEXT_SBC
J11 1-2 (Default)Itrsquos connected between VDD and VDD_MCU and is designed for
S32K148 MCU low-power static current measurement for this case R77 needs to be unmounted
The jumper connection schematic is as below details can be found in the board schematic
Jumper Configuration Description
J32short (Default) Enable the LIN bus 1 pullup to work as a master node
open The LIN bus 1 is working as a slave node
J33short (Default) Enable the LIN bus 2 pullup to work as a master node
open The LIN bus 2 is working as a slave node
J34
1-2 (Default) External active 32768KHz oscillator for RTC is powered by VDD_MCU
2-3 External active 32768KHz oscillator for RTC is powered by VDD_MCU_PERH
External active 32768 KHz oscillator for RTC schematic is as right details can be found in the board schematic and HW UG
9
USING ETHERNET AND QSPI
IMPORTANT OBSERVATION
The S32K148 is the only member of the 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 user must follow an specific resistor configuration The default configuration of the board is to be used for ethernet communication
CHANGE 0Ω CONFIGURATION RESISTORS TO REUSE BETWEEN ENET AND QUADSPI
For S32K148 T-BOX RDB some ENET and QuadSPI data lines are shared from the MCU each interface is separated by two 0 Ω resistors
By default the ENET data lines are enabled
User can change the 0Ω configuration resistors to enable and use QuadSPI
S32K148 shared PIN Configuration resistor Description
PTD7 R161 (Default) ENET MII_RMII_TXD1
R162 QuadSPI QSPI_A_IO1
PTC2 R177(Default) ENET MII_RMII_TXD0
R178 QuadSPI QSPI_A_IO3
PTC3 R196 (Default) ENET MII_TX_ER
R203 QuadSPI QSPI_A_CS
PTD10 R178 (Default) ENET MII_RX_CLK
R179 QuadSPI QSPI_A_SCK
PTD11 R194 (Default) ENET MII_RMII_TX_CLK
R195 QuadSPI QSPI_A_IO0
PTD12 R190 (Default) ENET MII_RMII_TX_EN
R192 QuadSPI QSPI_A_IO2
10
S32K148-T-BOX RDB Out-of-the-Box SetupPOWER UP THE BOARD AND DEBUGGER CONNECTION
The S32K148 T-BOX RDB powers from external +12V power supply via the 23-pin ECU connector with the wiring harness If no 23-pin ECU connector wiring harness available the board be powered by J31-8 (GND) and J31-1 (+12V)
Note There is no embedded debugger (eg OpenSDA) on the RDB so debug is done using PEMicro U-MultilinkFX through J12 with a mini-20 pin cable on debuggerrsquos port F
After power on the D10 D11 and D12 on the left up corner of the board will light on
With Connecting the U-Multilink debugger to PC its USB and TGTPWR LED will be lighted on
USB Cable to PC
DC - 12 Vpower supply
S32K148 T-BOX RDB SETUP CONNECTION
11
Use the BSP test project
STEP 1 DOWNLOAD amp INSTALL S32DS FOR ARM V2018R1 AND S32K SDK RTM 200
Download S32DS for ARM v2018R1 from the following link
httpwwwnxpcomS32DS
ndash The download will require a NXP account login user can register the account with any e-mail and after download you can install S32DS IDE with a 32-bit active code received by the e-mail when download
Download and install the S32K SDK RTM 200
ndash S32 Design Studio for Armreg 2018R1 Update 6 SDK S32K14x RTM v200 (REV UP6)
Any questions please refer to the following NXP technical community for help
httpscommunitynxpcomdocsDOC-335302
STEP 2 IMPORT AND COMPILE THE BSP TEST PROJECT (1)
Open S32DS for ARM v2018R1 IDE select File gt Import Select General gt Existing Projects into Workspace gt Next
12
STEP 2 IMPORT AND COMPILE THE BSP TEST PROJECT (2)
Select archive file gt Browse browse and choose S32K148_Based_T_BOX_BSP_TestPrj_SDK_RTM2_0zip select the project gt Finish
After importing the project clean it at first select the project in Project Explorer then right-click choose Clean Project
13
STEP 2 IMPORT AND COMPILE THE BSP TEST PROJECT (3)
Select the project in Project Explorer then right-click choose Build Project
The compile result is as below if no errors are found
14
STEP 3 DOWNLOAD AND DEBUG THE BSP TEST PROJECT
Select the project in Project Explorer then right-click choose Debug As gt Debug Configuration
In the Debug Configuration window select the GDB PEMicro Interface Debugging gt S32K148_Based_T_BOX_BSP_TestPrj_SDK_RTM2_0_DebuggtDebuggergtunder Interface select right debugger and ensure Port has the right part number then in Additional Options check Emergency Kinetis Device Recovery by Full Chip Erase and Use SWD protocol (if not check this option it will use JTAG debug protocol) at last click Debug to launch the debug(it will download the compile resultmdashelf file in to the target MCU at first)
15
STEP 4 CONNECT THE UART CONSOLE FOR TEST RESULT OUTPUT DISPLAY
The BSP test project use S32K148 LPUART2 to output the test result
Use a USB-to-UART adapter to connect the board with PC via J25-6(TXD) J25-7(RXD) and J25-12(GND)
For more details on the test results description and demo projects please refer to the Software User Guide
Open a UART console(eg Serial Port Utility) on PC configure its serial communication format as the following
ndash Data rate 115200 bauds
ndash Data Bits 8
ndash Parity None
ndash Stop Bits 1
ndash Flow Control OFF
Then you can see the test result output as below
16
RDB Software package overview
OTHER DEMO PROJECTS
Besides of the BSP test project which includes the SDK API based LLD of GPS module BLE module MMA8452Q PCA85063ATT 3x FlexCAN 3x LPUART communication 2x HS(PWM) 2x user bottom GPIO IRQ interrupt RGB LED 2x input capture 2x external analog input 2x Touch Sense PAD and etc
The SW package also provides the following demo projects
ndash QSPI Flash test project
ndash LwIP based ENET and TJA1101 TCPIP severclient communication demo project
ndash LIN stack based Single board LIN master and slave communication demo project
ndash I2S audio codecmdashSGTL500 demo project
ndash T-BOX reference design project
For more details please refer to the S32K148 T-BOX_GP-ECU RDB SW user guide and download the SW package
17
Create a New Project in S32 Design StudioCREATE NEW PROJECT FIRST TIME ndash SELECT A WORKSPACE
Start program Click on ldquoS32 Design Studio for ARM v10rdquo icon
Select workspace
ndash Choose default (see below example) or specify new one
ndash Suggestion Uncheck the box ldquoUse this as the default and do not ask againrdquo
ndash Click OK
CREATE NEW PROJECT TOP MENU SELECTION
File ndash New ndashProject
18
CREATE NEW PROJECT S32DS PROJECT
Project Name
ndash Example FirstProject
Project Type
ndash Select from inside executable or library folder
Next
Select Debugger Support and Library Support
Click Finish
19
OPENSDA CONFIGURATION
To Debug your project with OpenSDA it is necessary to select the OpenSDA in the Debug Configuration
Select your project and click on debug configuration
Select the Debug configuration under GDB PEMicro Interface Debugging
Click on Debugger tab
Select OpenSDA as the interface if your board is plugged should appear in the Port field
Click Apply and debug to finish
20
Debug Basics
DEBUG BASICS STARTING THE DEBUGGER
Debug configuration is only required once Subsequent starting of debugger does not require those steps
Three options to start debugger
ndash If the ldquoDebug Configurationrdquo has not been closed click on ldquoDebugrdquo button on bottom right
ndash Select Run ndash Debug (or hit F11)
Note This method currently selects the desktop target (projectelf) and gives an error Do not use until this is changed
Recommended Method Click on pull down arrow for bug icon and select hellip_debugelf target
DEBUG BASICS STEP RUN SUSPEND RESUME
Step Into (F5)
Step Over (F6)
Step Return (F7)
Run
Suspend
Resume (F8)
21
DEBUG BASICS VIEW amp ALTER VARIABLES
View variables in ldquoVariablesrdquo tab
Click on a value to allow typing in a different value
DEBUG BASICS VIEW AND ALTER REGISTERS
View CPU registers in the ldquoRegistersrdquo tab
Click on a value to allow typing in a different value
View peripheral registers in the EmbSys Registers tab
DEBUG BASICS VIEW AND ALTER MEMORY
Add Memory Monitor
Select Base Address to Start at 40000000
View Memory
22
DEBUG BASICS BREAKPOINTS
Add Breakpoint Point and Click
Light blue dot represents debugger breakpoint
DEBUG BASICS RESET amp TERMINATE DEBUG SESSION
Reset program counter
Terminate Ctl+F2()
23
Create a PampE Debug Configuration (Optional)
NEW PampE DEBUG CONFIGURATION
Click in debug configurations
Create a new PampE launch configuration
Select S32K144 device
Click Apply and debug your application
wwwnxpcomS32K148-T-BOX
NXP and the NXP logo are trademarks of NXP BV All other product or service names are the property of their respective owners copy 2019 NXP BV
Document Number S32K148TBOXEFS REV 0
2
S32K148-T-BOX RDB BLOCK DIAGRAM
To achieve the maximum flexibility to be T-BOXGP-ECU Ref-DesignS32K148 EVB
BLE GPS and 3G4G select independent Module and connect with S32K148 via UART
Add QSPI Nor-Flash standalone RTC and 3-aix Accelerator for T-Box functions
Extend a 100M-base TX1 automotive ethernet via TJA1101 for both T-Box connection and AVB evaluation (plus a I2S audio Codec )
SBC provides 533V power supply for S32K148 and other onboard modules and also expends 1 CAN and 2 LIN bus
Select TJA1044 with SO-8 and TJA1043 with HVSON14 package to compatible with Stinger
Use a 23-pin ECU connector to route all CANLINENET bus and extend 2x HS output 2x PWM input capture and 2x Analog Input enable it to work as a GP-ECU
S32K148-T-BOX RDB FEATURES
Support S32K148 with LQFP-144 or LQFP-176 pin package(default mounted with LQFP-144 package)
SBC UJA1132 with 2 LIN physical layers and 1 CAN physical layer
Integrate communication interfaces
ndash 3x CAN with CAN-FD
ndash 3x UART(2 reused as LIN via SBC-UJA113x)
ndash 1x 100M-base TX1 automotive ethernet via TJA1101
ndash 1x I2S audio codec extend with SGTL500 and support AVB evaluation
Integrate 8MB QSPI NOR Flash memory(MX25L6433F )
Provide T-BOX function module plugin interfaces
1 UART BLE module
1 UART GPS module
1 UART 4G communication module
2x user bottoms input
2x touch sensor input
1x RGB LED
1x Potentiometer
1x 3-axi accelerator(MMA8452Q) via I2C
1x stand-alone RTC chip(PCA85063)
A 23-pin ECU connector routing external IO signals including
ndash 2x ADC input channels
ndash 2x HS PWM output channels
ndash 2x PWM input capture channels
ndash 3x CAN bus
ndash 2x LIN bus
ndash 1x 100M-base TX1 automotive ethernet
Compatible with S32K148EVB
ndash Arduinotrade UNO footprint-compatible with expansion ldquoshieldrdquo support
ndash Can run all demo projects of SDK
Voltage supply options for 33V or 5V
S32K148-T-BOX RDB BLOCK DIAGRAM
S32K148 T-BOX_GP-ECU RDB WITH ALL MODULES PLUGIN
S32K148-T-BOX REFERENCE DESIGN BLOCK DIAGRAM
GPS ModuleMCU
S32K148LQFP-144176
3G4GCommunication
Module
UART
I2C8 MB QSPI FlashExternal Memory
QSPI
TJA1101
ENET MIICANCAN-FD
StandaloneRTC Chip
I2C
VB
AT
IGN
+12
V
SBCUJA1132
2x 5 V LDO1x CAN PHY2 x LIN PHY8 x HVIO
3-axiAccelerator
TJA1044TJA1043
CANCAN-FD
SPI UART
CAN
LIN
LIN
I2S
Audio CodecSGTL5000
UART
BLE Module
2x PWM
5 V 500 mA
23-pin ECU connector
HS Driver
2x HS
Signal Conditional Circuit
2x Analog Input 2x PWM Input
2x ADC
2x Input Capture
3
DOCUMENTATION FOR MAIN CHIPS AND MODULES
Main MCU S32K148z S32K1xx MCU Family Data Sheet (REV 9) S32K1xx MCU Family Reference Manual (REV 9)
SBC UJA1132 UJA113x_SER Buckboost HS-CANdual LIN system basis chip (REV 22)
100M-base TX1 automotive Ethernet Transceiver TJA1101 TJA1101 Full Data Sheet (NDA Required) (REV 10)
CAN Transceiver TJA1043 and TJA1044 TJA1043High-speed CAN transceiver (REV 61) TJA1044 High-speed CAN transceiver with Standby mode - Data sheet (REV 6)
Audio Codec SGTL5000 SGTL5000 Low Power Stereo Codec with Headphone Amp - Data Sheet (REV 60)
3-axi Accelerator MMA8452Q MMA8452Q 3-Axis 12-bit8-bit Digital Accelerometer - Data Sheet (REV 10)
Standalone RTC Chip PCA85063 Automotive tiny Real-Time Clockcalendar with alarm function and I2C-bus (REV 40)
GPS Module NEO-6M7M UART GPS module
3G4G Communication Module USR-LTE-7S4 UART 4G LTE DTU module
BLE Bluetooth 40 Module HC-08 UART BLE module The links are also the purchase link for these modules
S32K148-T-BOX RBD SOFTWARE PACKAGE
The S32K148 T-BOX_GP-ECU RDB SW package is based on S32K SDK and is developed to accelerate customerrsquos application prototype verification code development
With the BSP layer the SW package provides a set of easy-use API for application layer use
The SW package includes
ndash S32K148 T-BOX_GP-ECU RDB SDK processor expert configuration
ndash The GPSBLE4G communicationaudio Codec modules driver API and test codes
ndash CANLINUARTI2C communication driver API and test codes
ndash FreeRTOS and LwIP based ENET TCPIP stack and demo project
ndash The BSP test project
ndash The T-BOX reference design demo project
ndash Detailed user manual
S32K148 T-BOX_GP-ECU RDB SW ARCHITECTURES32K148-T-BOX REFERENCE DESIGN SOFTWARE ARCHITECTURE
ApplicationSoftware
BSP Layer
T_BOX APP
GPSModule
BLEModule
4G WirelessCOM Module 8 MB
QSPIFlashAudio
Codec Standalone RTC
S32K148 MCU
3-axi accelerator
1x ENET interface
2x LIN interface
3x CAN interface
GP_ECU APP BSP_TestPrj
BSP API
S32K SDK
HardwareS32K148-T-BOX Reference Design
Board
ProcessorExpert UI
Config files
Start-upCompilerlinker files
USB
SDHC
ZipWire
FRComms Safety
Motor Control
Misc
Analog
LIN
NFC
CAN
TCPIP
AMMCLib
sCST
sPTLib
Audio
Touch Sensing
Security
AVB
Comms Safety ampSecurity
Timers External SoC ampBoards
Middleware
Low-level Drivers
Headers
OS
OS
IF
PAL
PD
PAL
PD
PAL
PD
PAL
PD
PAL
PD
PD
4
PINOUT MAPPING OF ARDUINOtrade UNO HEADER
PIN PORT
J20-3 VBAT
J20-6 VBAT
J20-9 LIN1
J20-12 GND
J20-15 LIN2
J20-18 GND
J20-21 CANH
J20-24 CANL
PIN PORT
J21-3 PTB17
J21-6 PTA27
J21-9 PTA28
J21-12 PTA29
J21-15 PTA0
J21-18 PTA1
J21-21 PTA15
J21-24 PTA16
PIN PORT
J22-2 PTC15
J22-4 PTB8
J22-6 PTA11
J22-8 PTA12
J22-10 VDD
J22-12 GND
J22-14 PTE1
J22-16 PTE0
J22-18 PTD1
J22-20 PTD13
PIN PORT
J17-28 PTE15
J17-25 PTE16
J17-22 VREFH
J17-19 GDN
J17-16 PTB2
J17-13 PTB3
J17-10 PTB1
J17-7 PTB0
J17-4 PTA30
J17-1 PTA31
PIN PORT
J19-28 PTD3
J19-25 PTD2
J19-22 PTD19
J19-19 PTD18
J19-16 PTA18
J19-13 PTA19
J19-10 PTB9
J19-7 PTB10
J19-4 PTB21
J19-1 PTB20
PIN PORT
J22-1 PTE21
J22-3 PTE22
J22-5 PTE23
J22-7 PTE24
J22-9 PTE25
J22-11 PTC19
J22-13 PTC14
J22-15 PTB14
J22-17 PTB15
J22-19 PTB16
PIN PORT
J17-29 PTB12
J17-26 PTB13
J17-23 PTE11
J17-20 PTE10
J17-17 PTB11
J17-14 PTB17
J17-11 PTB18
J17-8 PTA6
J17-5 PTA7
J17-2 PTA25
PIN PORT
J19-29 PTD0
J19-26 PTE14
J19-23 PTE13
J19-20 PTE12
J19-17 GND
J19-14 VDD
J19-11 PTC6
J19-8 PTC7
J19-5 PTC12
J19-2 PTC13
PIN PORT
J17-30 PTD31
J17-27 PTD26
J17-24 PTD25
J17-21 PTC26
J17-18 PTC25
J17-15 PTC24
J17-12 PTC22
J17-9 PTC21
J17-6 PTC20
J17-3 PTC18
PIN PORT
J19-30 PTE17
J19-27 PTE18
J19-24 PTB19
J19-21 PTE27
J19-18 PTE26
J19-15 PTA20
J19-12 PTA21
J19-9 PTA22
J19-6 PTA23
J19-3 PTA24
PIN PORT
J18-22 PTD14
J18-19 PTD15
J18-16 PTD16
J18-13 PTD17
J18-10 PTC10
J18-7 PTC11
J18-4 PTA3
J18-1 PTA2
PIN PORT
J20-2 PTB23
J20-5 PTB22
J20-8 PTB29
J20-11 PTB27
J20-14 PTB28
J20-17 PTB25
J20-20 PTA8
J20-23 PTA9
PIN PORT
J21-2 PTD4
J21-5 PTD22
J21-8 PTD23
J21-11 PTD24
J21-14 PTD27
J21-17 PTD28
J21-20 PTD29
J21-23 PTD30
PIN PORT
J18-23 PTA13
J18-20 PTA14
J18-17 PTE2
J18-14 PTE3
J18-11 PTE6
J18-8 PTB7
J18-5 PTE8
J18-2 PTE9
PIN PORT
J20-1 VBAT
J20-4 VDD
J20-7 PTA5
J20-10 V3_3
J20-13 V5_0
J20-16 GND
J20-19 GDN
J20-22 VBAT
PIN PORT
J21-1 PTC23
J21-4 PTC27
J21-7 PTC28
J21-10 PTC29
J21-13 PTC30
J21-16 PTC31
J21-19 PTE19
J21-22 PTE20
PIN PORT
TOUCH0_0 PTA0
TOUCH0_1 PTA15
PIN PORT
TOUCH1_0 PTA1
TOUCH1_1 PTA16
PIN PORT
J18-24 PTD20
J18-21 PTD21
J18-18 PTB24
J18-15 PTB26
J18-12 GND
J18-9 GND
J18-6 PTB30
J18-3 PTB31
J20J17
J18
J19
J21
J22
Electrode A (SW2)
Electrode B (SW3)
J21
J22ELECTRODE A (SW2)
ELECTRODE B (SW3)
J17
J19
J20
J18
5
HEADERPINOUT MAPPING FOR S32K148
External Modules
Function Pin S32K148 MCU PinsOn-board Connector
Used MCU Peripherals
BLE moduleUART-TX PTB0LPUART0_RX J26-1
LPUART0UART-RX PTB1LPUART0_TX J26-2
GPS module
UART-TX PTC8LPUART1_RX J28-3
LPUART1UART-RX PTC9LPUART1_TX J28-2
PPS PTC10FTM3_CH4TRGMUX_IN11 J28-1
4G module
UTXD1 PTD17FTM0_FLT2LPUART2_RXFTM5_FLT1 J25-6
LPUART2
URXD1 PTE12FTM0_FLT3LPUART2_TXFTM5_FLT0 J25-7
POWER_KEY_N PTD4FTM0_FLT3ADC1_SE6 J25-10
M_RELOAD_N PTD2FTM3_CH4LPSPI1_SOUTFXIO_D4FXIO_D6ADC1_SE2 J27-6
M_RESET_N PTD3FTM3_CH5LPSPI1_PCS0FXIO_D5FXIO_D7ADC1_SE3 J27-7
TJA1044Stinger (SO8)
TXD PTC7LPUART1_TXCAN1_TXFTM3_CH3 NC
CAN1
RXD PTC6LPUART1_RXCAN1_RXFTM3_CH2 NC
STB PTC11FTM3_CH5FTM4_CH2TRGMUX_IN10 NC
CANH NC J31-2
CANL NC J31-17
TJA1043Stinger (HVON-14)
TXD PTB13FTM0_CH1FTM3_FLT1CAN2_TX NC
CAN2
RXD PTB12FTM0_CH0FTM3_FLT2CAN2_RX NC
EN PTB11FTM3_CH3LPI2C0_HREQ NC
STB_N PTB15FTM0_CH3LPSPI1_SINADC1_SE14 NC
INH SBC_HVIO3 NC
CANH NC J31-3
CANL NC J31-18
TJA1101 (10100Mbits Ethernet PHY)
MDC PTB5ENET_MII_RMII_MDC NC
ENET
MDIO PTB4MII_RMII_MDIO NC
INT_N PTB20FTM6_CH0ENET_INT NC
RXDVCONFIG2 PTC17MII_RMII_RX_DV NC
RXERCONFIG3 PTC16MII_RMII_RX_ER NC
RXCREF_CLK PTD10MII_RX_CLK NC
RXD0PHYAD0 PTC1MII_RMII_RXD0 NC
RXD1PHYAD1 PTC0MII_RMII_RXD1 NC
RXD2CONFIG0 PTD9MII_RXD2 NC
RXD3CONFIG1 PTD8MII_RXD3 NC
TXER PTC3MII_TX_ER NC
TXEN PTD12MII_RMII_TX_EN NC
TXD0 PTC2MII_RMII_TXD0 NC
TXD1 PTD7MII_RMII_TXD1 NC
TXD2 PTD6MII_TXD2 NC
TXD3 PTD5MII_TXD3 NC
INH SBC_HVIO4 NC
TRX_P NC J31-5
TRX_N NC J31-20
6
External Modules
Function Pin S32K148 MCU PinsOn-board Connector
Used MCU Peripherals
SBC(UJA113X)
SBC_SPI_CS PTA26FTM5_CH1LPSPI1_PCS0 NC
LPSPI1SBC_SPI_SCLK PTA28FTM5_CH3LPSPI1_SCKLPUART0_RX NC
SBC_SPI_MOSI PTA29FTM5_CH4LPUART2_TXLPSPI1_SIN NC
SBC_SPI_MISO PTA27FTM5_CH2LPSPI1_SOUTLPUART0_TX NC
SBC_CAN_TXD PTE5TCLK2FTM2_CH3CAN0_TXFXIO_D7 NCCAN0
SBC_CAN_RXD PTE4TRACE_D1FTM2_CH2CAN0_RXFXIO_D6 NC
SBC_LIN1_TXD PTA3LPUART0_TXFXIO_D5 NC LPUART0FlexIO4_5SBC_LIN1_RXD PTA2LPUART0_RXFXIO_D4 NC
SBC_LIN2_TXD PTA9LPUART2_TXLPSPI2_PCS0FXIO_D7FTM3_FLT2 NC LPUART2FlexIO6_7SBC_LIN2_RXD PTA8LPUART2_RXLPSPI2_SOUTFXIO_D6FTM3_FLT3 NC
SBC_CANH NC J5-1
SBC_CANL NC J5-2
SBC_LIN1 NC J31-10
SBC_LIN2 NC J31-11
INTN1 PTE19FTM7_CH7FTM7_CH7ADC1_SE25 NC
INTN2 PTE20FTM4_CH0FTM4_CH0ADC1_SE26 NC
External RTC amp ACCELERATOR
I2C_SCL PTD19FTM6_CH0FXIO_D3LPI2C1_SCLADC1_SE17 NC
LPI2C1I2C_SDA PTC31FTM5_CH6FXIO_D1LPI2C1_SDAFXIO_D1ADC0_SE31 NC
ACC_INT1 PTD22FTM6_CH3FTM6_CH3ADC1_SE18 NC
ACC_INT2RTC_INT PTD23FTM6_CH4FTM6_CH4ADC1_SE19 NC
Internal RTCRTC_CLKIN PTA7FTM0_FLT2FTM5_CH3RTC_CLKINLPUART1_RTSADC0_SE3 NC
RTCRTC_CLK_EN PTA6FTM0_FLT1LPSPI1_PCS1FTM5_CH5LPUART1_CTSADC0_SE2 NC
SAI(I2S) AUDIO-SGTL5000
SYS_MCLK PTD1FTM0_CH3LPSPI1_SINFTM2_CH1SAI0_MCLK NC
SAI0
I2S_SCLK PTA12FTM1_CH6CAN1_RXLPI2C1_SDASSAI0_BCLK NC
I2S_LRCLK PTA11FTM1_CH5FXIO_D1CMP0_RRTSAI0_SYNC NC
I2S_DIN PTA13FTM1_CH7FTM2_QD_PHASAI0_D0 NC
I2S_DOUT PTE1LPSPI0_SINLPI2C0_HREQLPI2C1_SCLSAI0_D1 NC
CTRL_CLK PTA3LPUART0_TXLPI2C0_SCLFXIO_D5 NC LPI2C0FLEXIOCTRL_DATA PTA2LPUART0_RXLPI2C0_SDAFXIO_D4 NC
QSPI-FLASH(64Bit)
SCLK PTD10QSPI_A_SCK NC
QSPI_A
CS_N PTC3QSPI_A_CS NC
SISIO0 PTD11QSPI_A_IO0 NC
SOSIO1 PTD7QSPI_A_IO1 NC
WP_NSIO2 PTD12QSPI_A_IO2 NC
HOLD_NSIO3 PTC2QSPI_A_IO3 NC
Touch PAD
TOUCH_ADC0_A PTA0FTM2_CH1LPI2C0_SCLSFXIO_D2FTM2_QD_PHALPUART0_CTSTRGMUX_OUT3ADC0_SE0CMP0_IN NC ADC0_SE0
TOUCH_ADC1_A PTA15FTM1_CH2LPSPI0_PCS3LPSPI2_PCS3FTM7_FLT0ADC1_SE12 NC ADC1_SE12
TOUCH_ADC0_B PTA1FTM1_CH1LPI2C0_SDASFXIO_D3FTM1_QD_PHALPUART0_RTSTRGMUX_OUT0ADC0_SE1CMP0_IN1 NC ADC0_SE1
TOUCH_ADC1_B PTA16FTM1_CH3LPSPI1_PCS2ADC1_SE13 NC ADC1_SE13
RGB LED
LED_RED PTE21FTM4_CH1ADC1_SE27 NCPTE work as
outputLED_GREEN PTE22FTM4_CH2ADC1_SE28 NC
LED_BLUE PTE23FTM4_CH3ADC1_SE29 NC
user BUTTOMBTN0 PTC12FTM3_CH6FTM2_CH6LPUART2_CTS NC PTC work as
inputEIRQBTN1 PTC13FTM3_CH7FTM2_CH7LPUART2_RTS NC
Potentiometer ADC test input PTC28FTM4_CH7ADC0_SE28 NC ADC0_SE28
HEADERPINOUT MAPPING FOR S32K148 CONT
7
23-PIN ECU CONNECTOR SIGNAL ROUTING AND WIRING HARNESS
The 23-pin ECU connector routing communication and external IO signals including
ndash 2x ADC input channels
ndash 2x HS PWM output channels
ndash 2x PWM input capture channels
ndash 3x CAN bus
ndash 2x LIN bus
ndash 1x 100M-base TX1 automotive ethernet
ndash +12V VBAT power supply input
ndash +5V power supply output for external devices
The 23-pin ECU connector enables the board to work as GP-ECU easily
The 23-pin ECU connector matched wiring harness with signal labels as below photo
It is not included in S32K148 T-BOX RDB please contact NXP sales for purchase
PIN Signal Wire colorWire gauge
(conductor CSAmm2)description
1 VBAT red 125 12V max 5A
2 CAN1H yellow 05 CAN bus 1 differential signal+
3 CAN2H yellow 05 CAN bus 2 differential signal+
4 ECU_EXT_HS1 green 05 ECU High Side driver output 1
5 CAN0H yellow 05 CAN bus 0 differential signal+
6 ECU_EXT_ADC1 blue 05 ECU external analog input 1
7 ECU_EXT_ADC2 blue 05 ECU external analog input 2
8 GND black 125 Powersignal ground
9 VBAT red 125 12V max 5A
10 ECU_EXT_LIN1 white 05 LIN bus 1
11 ECU_EXT_LIN2 white 05 LIN bus 2
12 SBC_HVIO5 orange 05 SBC HVIO5
13 ECU_EXT_PWM2 purple 05 PWM input channel 2
14 ECU_EXT_PWM1 purple 05 PWM input channel 1
15 ECU_EXT_5V red 075 5V power supply for ECU external devicemax100mA
16 GND black 125 Powersignal ground
17 CANL1 pink 05 CAN bus 1 differential signal-
18 CANL2 pink 05 CAN bus 2 differential signal-
19 ECU_EXT_HS2 green 05 ECU High Side driver output 2
20 CANL0 pink 05 CAN bus 0 differential signal-
21 GND black 125 Signal ground
22 ENET_TRX_P green 05100M-base TX1 automotive ethernet differential signal+
UTP
23 ENET_TRX_N orange 05100M-base TX1 automotive ethernet differential signal -
UTP
8
JUMPER SETTINGS (POWER SUPPLY)
JUMPER SETTINGS (LIN AND RTC CLOCK CONFIGURATION)
Jumper Configuration Description
J21-2 (Default) The 33V supply powered from VBAT(+12V)
2-3 The 33V supply powered from P5V0(5V)
J81-2 (Default) The P5V0 supply powered from SBC output
2-3 Not use no power source(NC on J8-3)
J91-2 (Default) The VDD supply powered from P3V3_SW(33V)
2-3 The VDD supply powered from P5V0(5V)
J291-2 (Default) VCAN_SBC supply powered from P5V0_V1SBC
2-3 VCAN_SBC supply powered from PVEXT_SBC
J11 1-2 (Default)Itrsquos connected between VDD and VDD_MCU and is designed for
S32K148 MCU low-power static current measurement for this case R77 needs to be unmounted
The jumper connection schematic is as below details can be found in the board schematic
Jumper Configuration Description
J32short (Default) Enable the LIN bus 1 pullup to work as a master node
open The LIN bus 1 is working as a slave node
J33short (Default) Enable the LIN bus 2 pullup to work as a master node
open The LIN bus 2 is working as a slave node
J34
1-2 (Default) External active 32768KHz oscillator for RTC is powered by VDD_MCU
2-3 External active 32768KHz oscillator for RTC is powered by VDD_MCU_PERH
External active 32768 KHz oscillator for RTC schematic is as right details can be found in the board schematic and HW UG
9
USING ETHERNET AND QSPI
IMPORTANT OBSERVATION
The S32K148 is the only member of the 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 user must follow an specific resistor configuration The default configuration of the board is to be used for ethernet communication
CHANGE 0Ω CONFIGURATION RESISTORS TO REUSE BETWEEN ENET AND QUADSPI
For S32K148 T-BOX RDB some ENET and QuadSPI data lines are shared from the MCU each interface is separated by two 0 Ω resistors
By default the ENET data lines are enabled
User can change the 0Ω configuration resistors to enable and use QuadSPI
S32K148 shared PIN Configuration resistor Description
PTD7 R161 (Default) ENET MII_RMII_TXD1
R162 QuadSPI QSPI_A_IO1
PTC2 R177(Default) ENET MII_RMII_TXD0
R178 QuadSPI QSPI_A_IO3
PTC3 R196 (Default) ENET MII_TX_ER
R203 QuadSPI QSPI_A_CS
PTD10 R178 (Default) ENET MII_RX_CLK
R179 QuadSPI QSPI_A_SCK
PTD11 R194 (Default) ENET MII_RMII_TX_CLK
R195 QuadSPI QSPI_A_IO0
PTD12 R190 (Default) ENET MII_RMII_TX_EN
R192 QuadSPI QSPI_A_IO2
10
S32K148-T-BOX RDB Out-of-the-Box SetupPOWER UP THE BOARD AND DEBUGGER CONNECTION
The S32K148 T-BOX RDB powers from external +12V power supply via the 23-pin ECU connector with the wiring harness If no 23-pin ECU connector wiring harness available the board be powered by J31-8 (GND) and J31-1 (+12V)
Note There is no embedded debugger (eg OpenSDA) on the RDB so debug is done using PEMicro U-MultilinkFX through J12 with a mini-20 pin cable on debuggerrsquos port F
After power on the D10 D11 and D12 on the left up corner of the board will light on
With Connecting the U-Multilink debugger to PC its USB and TGTPWR LED will be lighted on
USB Cable to PC
DC - 12 Vpower supply
S32K148 T-BOX RDB SETUP CONNECTION
11
Use the BSP test project
STEP 1 DOWNLOAD amp INSTALL S32DS FOR ARM V2018R1 AND S32K SDK RTM 200
Download S32DS for ARM v2018R1 from the following link
httpwwwnxpcomS32DS
ndash The download will require a NXP account login user can register the account with any e-mail and after download you can install S32DS IDE with a 32-bit active code received by the e-mail when download
Download and install the S32K SDK RTM 200
ndash S32 Design Studio for Armreg 2018R1 Update 6 SDK S32K14x RTM v200 (REV UP6)
Any questions please refer to the following NXP technical community for help
httpscommunitynxpcomdocsDOC-335302
STEP 2 IMPORT AND COMPILE THE BSP TEST PROJECT (1)
Open S32DS for ARM v2018R1 IDE select File gt Import Select General gt Existing Projects into Workspace gt Next
12
STEP 2 IMPORT AND COMPILE THE BSP TEST PROJECT (2)
Select archive file gt Browse browse and choose S32K148_Based_T_BOX_BSP_TestPrj_SDK_RTM2_0zip select the project gt Finish
After importing the project clean it at first select the project in Project Explorer then right-click choose Clean Project
13
STEP 2 IMPORT AND COMPILE THE BSP TEST PROJECT (3)
Select the project in Project Explorer then right-click choose Build Project
The compile result is as below if no errors are found
14
STEP 3 DOWNLOAD AND DEBUG THE BSP TEST PROJECT
Select the project in Project Explorer then right-click choose Debug As gt Debug Configuration
In the Debug Configuration window select the GDB PEMicro Interface Debugging gt S32K148_Based_T_BOX_BSP_TestPrj_SDK_RTM2_0_DebuggtDebuggergtunder Interface select right debugger and ensure Port has the right part number then in Additional Options check Emergency Kinetis Device Recovery by Full Chip Erase and Use SWD protocol (if not check this option it will use JTAG debug protocol) at last click Debug to launch the debug(it will download the compile resultmdashelf file in to the target MCU at first)
15
STEP 4 CONNECT THE UART CONSOLE FOR TEST RESULT OUTPUT DISPLAY
The BSP test project use S32K148 LPUART2 to output the test result
Use a USB-to-UART adapter to connect the board with PC via J25-6(TXD) J25-7(RXD) and J25-12(GND)
For more details on the test results description and demo projects please refer to the Software User Guide
Open a UART console(eg Serial Port Utility) on PC configure its serial communication format as the following
ndash Data rate 115200 bauds
ndash Data Bits 8
ndash Parity None
ndash Stop Bits 1
ndash Flow Control OFF
Then you can see the test result output as below
16
RDB Software package overview
OTHER DEMO PROJECTS
Besides of the BSP test project which includes the SDK API based LLD of GPS module BLE module MMA8452Q PCA85063ATT 3x FlexCAN 3x LPUART communication 2x HS(PWM) 2x user bottom GPIO IRQ interrupt RGB LED 2x input capture 2x external analog input 2x Touch Sense PAD and etc
The SW package also provides the following demo projects
ndash QSPI Flash test project
ndash LwIP based ENET and TJA1101 TCPIP severclient communication demo project
ndash LIN stack based Single board LIN master and slave communication demo project
ndash I2S audio codecmdashSGTL500 demo project
ndash T-BOX reference design project
For more details please refer to the S32K148 T-BOX_GP-ECU RDB SW user guide and download the SW package
17
Create a New Project in S32 Design StudioCREATE NEW PROJECT FIRST TIME ndash SELECT A WORKSPACE
Start program Click on ldquoS32 Design Studio for ARM v10rdquo icon
Select workspace
ndash Choose default (see below example) or specify new one
ndash Suggestion Uncheck the box ldquoUse this as the default and do not ask againrdquo
ndash Click OK
CREATE NEW PROJECT TOP MENU SELECTION
File ndash New ndashProject
18
CREATE NEW PROJECT S32DS PROJECT
Project Name
ndash Example FirstProject
Project Type
ndash Select from inside executable or library folder
Next
Select Debugger Support and Library Support
Click Finish
19
OPENSDA CONFIGURATION
To Debug your project with OpenSDA it is necessary to select the OpenSDA in the Debug Configuration
Select your project and click on debug configuration
Select the Debug configuration under GDB PEMicro Interface Debugging
Click on Debugger tab
Select OpenSDA as the interface if your board is plugged should appear in the Port field
Click Apply and debug to finish
20
Debug Basics
DEBUG BASICS STARTING THE DEBUGGER
Debug configuration is only required once Subsequent starting of debugger does not require those steps
Three options to start debugger
ndash If the ldquoDebug Configurationrdquo has not been closed click on ldquoDebugrdquo button on bottom right
ndash Select Run ndash Debug (or hit F11)
Note This method currently selects the desktop target (projectelf) and gives an error Do not use until this is changed
Recommended Method Click on pull down arrow for bug icon and select hellip_debugelf target
DEBUG BASICS STEP RUN SUSPEND RESUME
Step Into (F5)
Step Over (F6)
Step Return (F7)
Run
Suspend
Resume (F8)
21
DEBUG BASICS VIEW amp ALTER VARIABLES
View variables in ldquoVariablesrdquo tab
Click on a value to allow typing in a different value
DEBUG BASICS VIEW AND ALTER REGISTERS
View CPU registers in the ldquoRegistersrdquo tab
Click on a value to allow typing in a different value
View peripheral registers in the EmbSys Registers tab
DEBUG BASICS VIEW AND ALTER MEMORY
Add Memory Monitor
Select Base Address to Start at 40000000
View Memory
22
DEBUG BASICS BREAKPOINTS
Add Breakpoint Point and Click
Light blue dot represents debugger breakpoint
DEBUG BASICS RESET amp TERMINATE DEBUG SESSION
Reset program counter
Terminate Ctl+F2()
23
Create a PampE Debug Configuration (Optional)
NEW PampE DEBUG CONFIGURATION
Click in debug configurations
Create a new PampE launch configuration
Select S32K144 device
Click Apply and debug your application
wwwnxpcomS32K148-T-BOX
NXP and the NXP logo are trademarks of NXP BV All other product or service names are the property of their respective owners copy 2019 NXP BV
Document Number S32K148TBOXEFS REV 0
3
DOCUMENTATION FOR MAIN CHIPS AND MODULES
Main MCU S32K148z S32K1xx MCU Family Data Sheet (REV 9) S32K1xx MCU Family Reference Manual (REV 9)
SBC UJA1132 UJA113x_SER Buckboost HS-CANdual LIN system basis chip (REV 22)
100M-base TX1 automotive Ethernet Transceiver TJA1101 TJA1101 Full Data Sheet (NDA Required) (REV 10)
CAN Transceiver TJA1043 and TJA1044 TJA1043High-speed CAN transceiver (REV 61) TJA1044 High-speed CAN transceiver with Standby mode - Data sheet (REV 6)
Audio Codec SGTL5000 SGTL5000 Low Power Stereo Codec with Headphone Amp - Data Sheet (REV 60)
3-axi Accelerator MMA8452Q MMA8452Q 3-Axis 12-bit8-bit Digital Accelerometer - Data Sheet (REV 10)
Standalone RTC Chip PCA85063 Automotive tiny Real-Time Clockcalendar with alarm function and I2C-bus (REV 40)
GPS Module NEO-6M7M UART GPS module
3G4G Communication Module USR-LTE-7S4 UART 4G LTE DTU module
BLE Bluetooth 40 Module HC-08 UART BLE module The links are also the purchase link for these modules
S32K148-T-BOX RBD SOFTWARE PACKAGE
The S32K148 T-BOX_GP-ECU RDB SW package is based on S32K SDK and is developed to accelerate customerrsquos application prototype verification code development
With the BSP layer the SW package provides a set of easy-use API for application layer use
The SW package includes
ndash S32K148 T-BOX_GP-ECU RDB SDK processor expert configuration
ndash The GPSBLE4G communicationaudio Codec modules driver API and test codes
ndash CANLINUARTI2C communication driver API and test codes
ndash FreeRTOS and LwIP based ENET TCPIP stack and demo project
ndash The BSP test project
ndash The T-BOX reference design demo project
ndash Detailed user manual
S32K148 T-BOX_GP-ECU RDB SW ARCHITECTURES32K148-T-BOX REFERENCE DESIGN SOFTWARE ARCHITECTURE
ApplicationSoftware
BSP Layer
T_BOX APP
GPSModule
BLEModule
4G WirelessCOM Module 8 MB
QSPIFlashAudio
Codec Standalone RTC
S32K148 MCU
3-axi accelerator
1x ENET interface
2x LIN interface
3x CAN interface
GP_ECU APP BSP_TestPrj
BSP API
S32K SDK
HardwareS32K148-T-BOX Reference Design
Board
ProcessorExpert UI
Config files
Start-upCompilerlinker files
USB
SDHC
ZipWire
FRComms Safety
Motor Control
Misc
Analog
LIN
NFC
CAN
TCPIP
AMMCLib
sCST
sPTLib
Audio
Touch Sensing
Security
AVB
Comms Safety ampSecurity
Timers External SoC ampBoards
Middleware
Low-level Drivers
Headers
OS
OS
IF
PAL
PD
PAL
PD
PAL
PD
PAL
PD
PAL
PD
PD
4
PINOUT MAPPING OF ARDUINOtrade UNO HEADER
PIN PORT
J20-3 VBAT
J20-6 VBAT
J20-9 LIN1
J20-12 GND
J20-15 LIN2
J20-18 GND
J20-21 CANH
J20-24 CANL
PIN PORT
J21-3 PTB17
J21-6 PTA27
J21-9 PTA28
J21-12 PTA29
J21-15 PTA0
J21-18 PTA1
J21-21 PTA15
J21-24 PTA16
PIN PORT
J22-2 PTC15
J22-4 PTB8
J22-6 PTA11
J22-8 PTA12
J22-10 VDD
J22-12 GND
J22-14 PTE1
J22-16 PTE0
J22-18 PTD1
J22-20 PTD13
PIN PORT
J17-28 PTE15
J17-25 PTE16
J17-22 VREFH
J17-19 GDN
J17-16 PTB2
J17-13 PTB3
J17-10 PTB1
J17-7 PTB0
J17-4 PTA30
J17-1 PTA31
PIN PORT
J19-28 PTD3
J19-25 PTD2
J19-22 PTD19
J19-19 PTD18
J19-16 PTA18
J19-13 PTA19
J19-10 PTB9
J19-7 PTB10
J19-4 PTB21
J19-1 PTB20
PIN PORT
J22-1 PTE21
J22-3 PTE22
J22-5 PTE23
J22-7 PTE24
J22-9 PTE25
J22-11 PTC19
J22-13 PTC14
J22-15 PTB14
J22-17 PTB15
J22-19 PTB16
PIN PORT
J17-29 PTB12
J17-26 PTB13
J17-23 PTE11
J17-20 PTE10
J17-17 PTB11
J17-14 PTB17
J17-11 PTB18
J17-8 PTA6
J17-5 PTA7
J17-2 PTA25
PIN PORT
J19-29 PTD0
J19-26 PTE14
J19-23 PTE13
J19-20 PTE12
J19-17 GND
J19-14 VDD
J19-11 PTC6
J19-8 PTC7
J19-5 PTC12
J19-2 PTC13
PIN PORT
J17-30 PTD31
J17-27 PTD26
J17-24 PTD25
J17-21 PTC26
J17-18 PTC25
J17-15 PTC24
J17-12 PTC22
J17-9 PTC21
J17-6 PTC20
J17-3 PTC18
PIN PORT
J19-30 PTE17
J19-27 PTE18
J19-24 PTB19
J19-21 PTE27
J19-18 PTE26
J19-15 PTA20
J19-12 PTA21
J19-9 PTA22
J19-6 PTA23
J19-3 PTA24
PIN PORT
J18-22 PTD14
J18-19 PTD15
J18-16 PTD16
J18-13 PTD17
J18-10 PTC10
J18-7 PTC11
J18-4 PTA3
J18-1 PTA2
PIN PORT
J20-2 PTB23
J20-5 PTB22
J20-8 PTB29
J20-11 PTB27
J20-14 PTB28
J20-17 PTB25
J20-20 PTA8
J20-23 PTA9
PIN PORT
J21-2 PTD4
J21-5 PTD22
J21-8 PTD23
J21-11 PTD24
J21-14 PTD27
J21-17 PTD28
J21-20 PTD29
J21-23 PTD30
PIN PORT
J18-23 PTA13
J18-20 PTA14
J18-17 PTE2
J18-14 PTE3
J18-11 PTE6
J18-8 PTB7
J18-5 PTE8
J18-2 PTE9
PIN PORT
J20-1 VBAT
J20-4 VDD
J20-7 PTA5
J20-10 V3_3
J20-13 V5_0
J20-16 GND
J20-19 GDN
J20-22 VBAT
PIN PORT
J21-1 PTC23
J21-4 PTC27
J21-7 PTC28
J21-10 PTC29
J21-13 PTC30
J21-16 PTC31
J21-19 PTE19
J21-22 PTE20
PIN PORT
TOUCH0_0 PTA0
TOUCH0_1 PTA15
PIN PORT
TOUCH1_0 PTA1
TOUCH1_1 PTA16
PIN PORT
J18-24 PTD20
J18-21 PTD21
J18-18 PTB24
J18-15 PTB26
J18-12 GND
J18-9 GND
J18-6 PTB30
J18-3 PTB31
J20J17
J18
J19
J21
J22
Electrode A (SW2)
Electrode B (SW3)
J21
J22ELECTRODE A (SW2)
ELECTRODE B (SW3)
J17
J19
J20
J18
5
HEADERPINOUT MAPPING FOR S32K148
External Modules
Function Pin S32K148 MCU PinsOn-board Connector
Used MCU Peripherals
BLE moduleUART-TX PTB0LPUART0_RX J26-1
LPUART0UART-RX PTB1LPUART0_TX J26-2
GPS module
UART-TX PTC8LPUART1_RX J28-3
LPUART1UART-RX PTC9LPUART1_TX J28-2
PPS PTC10FTM3_CH4TRGMUX_IN11 J28-1
4G module
UTXD1 PTD17FTM0_FLT2LPUART2_RXFTM5_FLT1 J25-6
LPUART2
URXD1 PTE12FTM0_FLT3LPUART2_TXFTM5_FLT0 J25-7
POWER_KEY_N PTD4FTM0_FLT3ADC1_SE6 J25-10
M_RELOAD_N PTD2FTM3_CH4LPSPI1_SOUTFXIO_D4FXIO_D6ADC1_SE2 J27-6
M_RESET_N PTD3FTM3_CH5LPSPI1_PCS0FXIO_D5FXIO_D7ADC1_SE3 J27-7
TJA1044Stinger (SO8)
TXD PTC7LPUART1_TXCAN1_TXFTM3_CH3 NC
CAN1
RXD PTC6LPUART1_RXCAN1_RXFTM3_CH2 NC
STB PTC11FTM3_CH5FTM4_CH2TRGMUX_IN10 NC
CANH NC J31-2
CANL NC J31-17
TJA1043Stinger (HVON-14)
TXD PTB13FTM0_CH1FTM3_FLT1CAN2_TX NC
CAN2
RXD PTB12FTM0_CH0FTM3_FLT2CAN2_RX NC
EN PTB11FTM3_CH3LPI2C0_HREQ NC
STB_N PTB15FTM0_CH3LPSPI1_SINADC1_SE14 NC
INH SBC_HVIO3 NC
CANH NC J31-3
CANL NC J31-18
TJA1101 (10100Mbits Ethernet PHY)
MDC PTB5ENET_MII_RMII_MDC NC
ENET
MDIO PTB4MII_RMII_MDIO NC
INT_N PTB20FTM6_CH0ENET_INT NC
RXDVCONFIG2 PTC17MII_RMII_RX_DV NC
RXERCONFIG3 PTC16MII_RMII_RX_ER NC
RXCREF_CLK PTD10MII_RX_CLK NC
RXD0PHYAD0 PTC1MII_RMII_RXD0 NC
RXD1PHYAD1 PTC0MII_RMII_RXD1 NC
RXD2CONFIG0 PTD9MII_RXD2 NC
RXD3CONFIG1 PTD8MII_RXD3 NC
TXER PTC3MII_TX_ER NC
TXEN PTD12MII_RMII_TX_EN NC
TXD0 PTC2MII_RMII_TXD0 NC
TXD1 PTD7MII_RMII_TXD1 NC
TXD2 PTD6MII_TXD2 NC
TXD3 PTD5MII_TXD3 NC
INH SBC_HVIO4 NC
TRX_P NC J31-5
TRX_N NC J31-20
6
External Modules
Function Pin S32K148 MCU PinsOn-board Connector
Used MCU Peripherals
SBC(UJA113X)
SBC_SPI_CS PTA26FTM5_CH1LPSPI1_PCS0 NC
LPSPI1SBC_SPI_SCLK PTA28FTM5_CH3LPSPI1_SCKLPUART0_RX NC
SBC_SPI_MOSI PTA29FTM5_CH4LPUART2_TXLPSPI1_SIN NC
SBC_SPI_MISO PTA27FTM5_CH2LPSPI1_SOUTLPUART0_TX NC
SBC_CAN_TXD PTE5TCLK2FTM2_CH3CAN0_TXFXIO_D7 NCCAN0
SBC_CAN_RXD PTE4TRACE_D1FTM2_CH2CAN0_RXFXIO_D6 NC
SBC_LIN1_TXD PTA3LPUART0_TXFXIO_D5 NC LPUART0FlexIO4_5SBC_LIN1_RXD PTA2LPUART0_RXFXIO_D4 NC
SBC_LIN2_TXD PTA9LPUART2_TXLPSPI2_PCS0FXIO_D7FTM3_FLT2 NC LPUART2FlexIO6_7SBC_LIN2_RXD PTA8LPUART2_RXLPSPI2_SOUTFXIO_D6FTM3_FLT3 NC
SBC_CANH NC J5-1
SBC_CANL NC J5-2
SBC_LIN1 NC J31-10
SBC_LIN2 NC J31-11
INTN1 PTE19FTM7_CH7FTM7_CH7ADC1_SE25 NC
INTN2 PTE20FTM4_CH0FTM4_CH0ADC1_SE26 NC
External RTC amp ACCELERATOR
I2C_SCL PTD19FTM6_CH0FXIO_D3LPI2C1_SCLADC1_SE17 NC
LPI2C1I2C_SDA PTC31FTM5_CH6FXIO_D1LPI2C1_SDAFXIO_D1ADC0_SE31 NC
ACC_INT1 PTD22FTM6_CH3FTM6_CH3ADC1_SE18 NC
ACC_INT2RTC_INT PTD23FTM6_CH4FTM6_CH4ADC1_SE19 NC
Internal RTCRTC_CLKIN PTA7FTM0_FLT2FTM5_CH3RTC_CLKINLPUART1_RTSADC0_SE3 NC
RTCRTC_CLK_EN PTA6FTM0_FLT1LPSPI1_PCS1FTM5_CH5LPUART1_CTSADC0_SE2 NC
SAI(I2S) AUDIO-SGTL5000
SYS_MCLK PTD1FTM0_CH3LPSPI1_SINFTM2_CH1SAI0_MCLK NC
SAI0
I2S_SCLK PTA12FTM1_CH6CAN1_RXLPI2C1_SDASSAI0_BCLK NC
I2S_LRCLK PTA11FTM1_CH5FXIO_D1CMP0_RRTSAI0_SYNC NC
I2S_DIN PTA13FTM1_CH7FTM2_QD_PHASAI0_D0 NC
I2S_DOUT PTE1LPSPI0_SINLPI2C0_HREQLPI2C1_SCLSAI0_D1 NC
CTRL_CLK PTA3LPUART0_TXLPI2C0_SCLFXIO_D5 NC LPI2C0FLEXIOCTRL_DATA PTA2LPUART0_RXLPI2C0_SDAFXIO_D4 NC
QSPI-FLASH(64Bit)
SCLK PTD10QSPI_A_SCK NC
QSPI_A
CS_N PTC3QSPI_A_CS NC
SISIO0 PTD11QSPI_A_IO0 NC
SOSIO1 PTD7QSPI_A_IO1 NC
WP_NSIO2 PTD12QSPI_A_IO2 NC
HOLD_NSIO3 PTC2QSPI_A_IO3 NC
Touch PAD
TOUCH_ADC0_A PTA0FTM2_CH1LPI2C0_SCLSFXIO_D2FTM2_QD_PHALPUART0_CTSTRGMUX_OUT3ADC0_SE0CMP0_IN NC ADC0_SE0
TOUCH_ADC1_A PTA15FTM1_CH2LPSPI0_PCS3LPSPI2_PCS3FTM7_FLT0ADC1_SE12 NC ADC1_SE12
TOUCH_ADC0_B PTA1FTM1_CH1LPI2C0_SDASFXIO_D3FTM1_QD_PHALPUART0_RTSTRGMUX_OUT0ADC0_SE1CMP0_IN1 NC ADC0_SE1
TOUCH_ADC1_B PTA16FTM1_CH3LPSPI1_PCS2ADC1_SE13 NC ADC1_SE13
RGB LED
LED_RED PTE21FTM4_CH1ADC1_SE27 NCPTE work as
outputLED_GREEN PTE22FTM4_CH2ADC1_SE28 NC
LED_BLUE PTE23FTM4_CH3ADC1_SE29 NC
user BUTTOMBTN0 PTC12FTM3_CH6FTM2_CH6LPUART2_CTS NC PTC work as
inputEIRQBTN1 PTC13FTM3_CH7FTM2_CH7LPUART2_RTS NC
Potentiometer ADC test input PTC28FTM4_CH7ADC0_SE28 NC ADC0_SE28
HEADERPINOUT MAPPING FOR S32K148 CONT
7
23-PIN ECU CONNECTOR SIGNAL ROUTING AND WIRING HARNESS
The 23-pin ECU connector routing communication and external IO signals including
ndash 2x ADC input channels
ndash 2x HS PWM output channels
ndash 2x PWM input capture channels
ndash 3x CAN bus
ndash 2x LIN bus
ndash 1x 100M-base TX1 automotive ethernet
ndash +12V VBAT power supply input
ndash +5V power supply output for external devices
The 23-pin ECU connector enables the board to work as GP-ECU easily
The 23-pin ECU connector matched wiring harness with signal labels as below photo
It is not included in S32K148 T-BOX RDB please contact NXP sales for purchase
PIN Signal Wire colorWire gauge
(conductor CSAmm2)description
1 VBAT red 125 12V max 5A
2 CAN1H yellow 05 CAN bus 1 differential signal+
3 CAN2H yellow 05 CAN bus 2 differential signal+
4 ECU_EXT_HS1 green 05 ECU High Side driver output 1
5 CAN0H yellow 05 CAN bus 0 differential signal+
6 ECU_EXT_ADC1 blue 05 ECU external analog input 1
7 ECU_EXT_ADC2 blue 05 ECU external analog input 2
8 GND black 125 Powersignal ground
9 VBAT red 125 12V max 5A
10 ECU_EXT_LIN1 white 05 LIN bus 1
11 ECU_EXT_LIN2 white 05 LIN bus 2
12 SBC_HVIO5 orange 05 SBC HVIO5
13 ECU_EXT_PWM2 purple 05 PWM input channel 2
14 ECU_EXT_PWM1 purple 05 PWM input channel 1
15 ECU_EXT_5V red 075 5V power supply for ECU external devicemax100mA
16 GND black 125 Powersignal ground
17 CANL1 pink 05 CAN bus 1 differential signal-
18 CANL2 pink 05 CAN bus 2 differential signal-
19 ECU_EXT_HS2 green 05 ECU High Side driver output 2
20 CANL0 pink 05 CAN bus 0 differential signal-
21 GND black 125 Signal ground
22 ENET_TRX_P green 05100M-base TX1 automotive ethernet differential signal+
UTP
23 ENET_TRX_N orange 05100M-base TX1 automotive ethernet differential signal -
UTP
8
JUMPER SETTINGS (POWER SUPPLY)
JUMPER SETTINGS (LIN AND RTC CLOCK CONFIGURATION)
Jumper Configuration Description
J21-2 (Default) The 33V supply powered from VBAT(+12V)
2-3 The 33V supply powered from P5V0(5V)
J81-2 (Default) The P5V0 supply powered from SBC output
2-3 Not use no power source(NC on J8-3)
J91-2 (Default) The VDD supply powered from P3V3_SW(33V)
2-3 The VDD supply powered from P5V0(5V)
J291-2 (Default) VCAN_SBC supply powered from P5V0_V1SBC
2-3 VCAN_SBC supply powered from PVEXT_SBC
J11 1-2 (Default)Itrsquos connected between VDD and VDD_MCU and is designed for
S32K148 MCU low-power static current measurement for this case R77 needs to be unmounted
The jumper connection schematic is as below details can be found in the board schematic
Jumper Configuration Description
J32short (Default) Enable the LIN bus 1 pullup to work as a master node
open The LIN bus 1 is working as a slave node
J33short (Default) Enable the LIN bus 2 pullup to work as a master node
open The LIN bus 2 is working as a slave node
J34
1-2 (Default) External active 32768KHz oscillator for RTC is powered by VDD_MCU
2-3 External active 32768KHz oscillator for RTC is powered by VDD_MCU_PERH
External active 32768 KHz oscillator for RTC schematic is as right details can be found in the board schematic and HW UG
9
USING ETHERNET AND QSPI
IMPORTANT OBSERVATION
The S32K148 is the only member of the 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 user must follow an specific resistor configuration The default configuration of the board is to be used for ethernet communication
CHANGE 0Ω CONFIGURATION RESISTORS TO REUSE BETWEEN ENET AND QUADSPI
For S32K148 T-BOX RDB some ENET and QuadSPI data lines are shared from the MCU each interface is separated by two 0 Ω resistors
By default the ENET data lines are enabled
User can change the 0Ω configuration resistors to enable and use QuadSPI
S32K148 shared PIN Configuration resistor Description
PTD7 R161 (Default) ENET MII_RMII_TXD1
R162 QuadSPI QSPI_A_IO1
PTC2 R177(Default) ENET MII_RMII_TXD0
R178 QuadSPI QSPI_A_IO3
PTC3 R196 (Default) ENET MII_TX_ER
R203 QuadSPI QSPI_A_CS
PTD10 R178 (Default) ENET MII_RX_CLK
R179 QuadSPI QSPI_A_SCK
PTD11 R194 (Default) ENET MII_RMII_TX_CLK
R195 QuadSPI QSPI_A_IO0
PTD12 R190 (Default) ENET MII_RMII_TX_EN
R192 QuadSPI QSPI_A_IO2
10
S32K148-T-BOX RDB Out-of-the-Box SetupPOWER UP THE BOARD AND DEBUGGER CONNECTION
The S32K148 T-BOX RDB powers from external +12V power supply via the 23-pin ECU connector with the wiring harness If no 23-pin ECU connector wiring harness available the board be powered by J31-8 (GND) and J31-1 (+12V)
Note There is no embedded debugger (eg OpenSDA) on the RDB so debug is done using PEMicro U-MultilinkFX through J12 with a mini-20 pin cable on debuggerrsquos port F
After power on the D10 D11 and D12 on the left up corner of the board will light on
With Connecting the U-Multilink debugger to PC its USB and TGTPWR LED will be lighted on
USB Cable to PC
DC - 12 Vpower supply
S32K148 T-BOX RDB SETUP CONNECTION
11
Use the BSP test project
STEP 1 DOWNLOAD amp INSTALL S32DS FOR ARM V2018R1 AND S32K SDK RTM 200
Download S32DS for ARM v2018R1 from the following link
httpwwwnxpcomS32DS
ndash The download will require a NXP account login user can register the account with any e-mail and after download you can install S32DS IDE with a 32-bit active code received by the e-mail when download
Download and install the S32K SDK RTM 200
ndash S32 Design Studio for Armreg 2018R1 Update 6 SDK S32K14x RTM v200 (REV UP6)
Any questions please refer to the following NXP technical community for help
httpscommunitynxpcomdocsDOC-335302
STEP 2 IMPORT AND COMPILE THE BSP TEST PROJECT (1)
Open S32DS for ARM v2018R1 IDE select File gt Import Select General gt Existing Projects into Workspace gt Next
12
STEP 2 IMPORT AND COMPILE THE BSP TEST PROJECT (2)
Select archive file gt Browse browse and choose S32K148_Based_T_BOX_BSP_TestPrj_SDK_RTM2_0zip select the project gt Finish
After importing the project clean it at first select the project in Project Explorer then right-click choose Clean Project
13
STEP 2 IMPORT AND COMPILE THE BSP TEST PROJECT (3)
Select the project in Project Explorer then right-click choose Build Project
The compile result is as below if no errors are found
14
STEP 3 DOWNLOAD AND DEBUG THE BSP TEST PROJECT
Select the project in Project Explorer then right-click choose Debug As gt Debug Configuration
In the Debug Configuration window select the GDB PEMicro Interface Debugging gt S32K148_Based_T_BOX_BSP_TestPrj_SDK_RTM2_0_DebuggtDebuggergtunder Interface select right debugger and ensure Port has the right part number then in Additional Options check Emergency Kinetis Device Recovery by Full Chip Erase and Use SWD protocol (if not check this option it will use JTAG debug protocol) at last click Debug to launch the debug(it will download the compile resultmdashelf file in to the target MCU at first)
15
STEP 4 CONNECT THE UART CONSOLE FOR TEST RESULT OUTPUT DISPLAY
The BSP test project use S32K148 LPUART2 to output the test result
Use a USB-to-UART adapter to connect the board with PC via J25-6(TXD) J25-7(RXD) and J25-12(GND)
For more details on the test results description and demo projects please refer to the Software User Guide
Open a UART console(eg Serial Port Utility) on PC configure its serial communication format as the following
ndash Data rate 115200 bauds
ndash Data Bits 8
ndash Parity None
ndash Stop Bits 1
ndash Flow Control OFF
Then you can see the test result output as below
16
RDB Software package overview
OTHER DEMO PROJECTS
Besides of the BSP test project which includes the SDK API based LLD of GPS module BLE module MMA8452Q PCA85063ATT 3x FlexCAN 3x LPUART communication 2x HS(PWM) 2x user bottom GPIO IRQ interrupt RGB LED 2x input capture 2x external analog input 2x Touch Sense PAD and etc
The SW package also provides the following demo projects
ndash QSPI Flash test project
ndash LwIP based ENET and TJA1101 TCPIP severclient communication demo project
ndash LIN stack based Single board LIN master and slave communication demo project
ndash I2S audio codecmdashSGTL500 demo project
ndash T-BOX reference design project
For more details please refer to the S32K148 T-BOX_GP-ECU RDB SW user guide and download the SW package
17
Create a New Project in S32 Design StudioCREATE NEW PROJECT FIRST TIME ndash SELECT A WORKSPACE
Start program Click on ldquoS32 Design Studio for ARM v10rdquo icon
Select workspace
ndash Choose default (see below example) or specify new one
ndash Suggestion Uncheck the box ldquoUse this as the default and do not ask againrdquo
ndash Click OK
CREATE NEW PROJECT TOP MENU SELECTION
File ndash New ndashProject
18
CREATE NEW PROJECT S32DS PROJECT
Project Name
ndash Example FirstProject
Project Type
ndash Select from inside executable or library folder
Next
Select Debugger Support and Library Support
Click Finish
19
OPENSDA CONFIGURATION
To Debug your project with OpenSDA it is necessary to select the OpenSDA in the Debug Configuration
Select your project and click on debug configuration
Select the Debug configuration under GDB PEMicro Interface Debugging
Click on Debugger tab
Select OpenSDA as the interface if your board is plugged should appear in the Port field
Click Apply and debug to finish
20
Debug Basics
DEBUG BASICS STARTING THE DEBUGGER
Debug configuration is only required once Subsequent starting of debugger does not require those steps
Three options to start debugger
ndash If the ldquoDebug Configurationrdquo has not been closed click on ldquoDebugrdquo button on bottom right
ndash Select Run ndash Debug (or hit F11)
Note This method currently selects the desktop target (projectelf) and gives an error Do not use until this is changed
Recommended Method Click on pull down arrow for bug icon and select hellip_debugelf target
DEBUG BASICS STEP RUN SUSPEND RESUME
Step Into (F5)
Step Over (F6)
Step Return (F7)
Run
Suspend
Resume (F8)
21
DEBUG BASICS VIEW amp ALTER VARIABLES
View variables in ldquoVariablesrdquo tab
Click on a value to allow typing in a different value
DEBUG BASICS VIEW AND ALTER REGISTERS
View CPU registers in the ldquoRegistersrdquo tab
Click on a value to allow typing in a different value
View peripheral registers in the EmbSys Registers tab
DEBUG BASICS VIEW AND ALTER MEMORY
Add Memory Monitor
Select Base Address to Start at 40000000
View Memory
22
DEBUG BASICS BREAKPOINTS
Add Breakpoint Point and Click
Light blue dot represents debugger breakpoint
DEBUG BASICS RESET amp TERMINATE DEBUG SESSION
Reset program counter
Terminate Ctl+F2()
23
Create a PampE Debug Configuration (Optional)
NEW PampE DEBUG CONFIGURATION
Click in debug configurations
Create a new PampE launch configuration
Select S32K144 device
Click Apply and debug your application
wwwnxpcomS32K148-T-BOX
NXP and the NXP logo are trademarks of NXP BV All other product or service names are the property of their respective owners copy 2019 NXP BV
Document Number S32K148TBOXEFS REV 0
4
PINOUT MAPPING OF ARDUINOtrade UNO HEADER
PIN PORT
J20-3 VBAT
J20-6 VBAT
J20-9 LIN1
J20-12 GND
J20-15 LIN2
J20-18 GND
J20-21 CANH
J20-24 CANL
PIN PORT
J21-3 PTB17
J21-6 PTA27
J21-9 PTA28
J21-12 PTA29
J21-15 PTA0
J21-18 PTA1
J21-21 PTA15
J21-24 PTA16
PIN PORT
J22-2 PTC15
J22-4 PTB8
J22-6 PTA11
J22-8 PTA12
J22-10 VDD
J22-12 GND
J22-14 PTE1
J22-16 PTE0
J22-18 PTD1
J22-20 PTD13
PIN PORT
J17-28 PTE15
J17-25 PTE16
J17-22 VREFH
J17-19 GDN
J17-16 PTB2
J17-13 PTB3
J17-10 PTB1
J17-7 PTB0
J17-4 PTA30
J17-1 PTA31
PIN PORT
J19-28 PTD3
J19-25 PTD2
J19-22 PTD19
J19-19 PTD18
J19-16 PTA18
J19-13 PTA19
J19-10 PTB9
J19-7 PTB10
J19-4 PTB21
J19-1 PTB20
PIN PORT
J22-1 PTE21
J22-3 PTE22
J22-5 PTE23
J22-7 PTE24
J22-9 PTE25
J22-11 PTC19
J22-13 PTC14
J22-15 PTB14
J22-17 PTB15
J22-19 PTB16
PIN PORT
J17-29 PTB12
J17-26 PTB13
J17-23 PTE11
J17-20 PTE10
J17-17 PTB11
J17-14 PTB17
J17-11 PTB18
J17-8 PTA6
J17-5 PTA7
J17-2 PTA25
PIN PORT
J19-29 PTD0
J19-26 PTE14
J19-23 PTE13
J19-20 PTE12
J19-17 GND
J19-14 VDD
J19-11 PTC6
J19-8 PTC7
J19-5 PTC12
J19-2 PTC13
PIN PORT
J17-30 PTD31
J17-27 PTD26
J17-24 PTD25
J17-21 PTC26
J17-18 PTC25
J17-15 PTC24
J17-12 PTC22
J17-9 PTC21
J17-6 PTC20
J17-3 PTC18
PIN PORT
J19-30 PTE17
J19-27 PTE18
J19-24 PTB19
J19-21 PTE27
J19-18 PTE26
J19-15 PTA20
J19-12 PTA21
J19-9 PTA22
J19-6 PTA23
J19-3 PTA24
PIN PORT
J18-22 PTD14
J18-19 PTD15
J18-16 PTD16
J18-13 PTD17
J18-10 PTC10
J18-7 PTC11
J18-4 PTA3
J18-1 PTA2
PIN PORT
J20-2 PTB23
J20-5 PTB22
J20-8 PTB29
J20-11 PTB27
J20-14 PTB28
J20-17 PTB25
J20-20 PTA8
J20-23 PTA9
PIN PORT
J21-2 PTD4
J21-5 PTD22
J21-8 PTD23
J21-11 PTD24
J21-14 PTD27
J21-17 PTD28
J21-20 PTD29
J21-23 PTD30
PIN PORT
J18-23 PTA13
J18-20 PTA14
J18-17 PTE2
J18-14 PTE3
J18-11 PTE6
J18-8 PTB7
J18-5 PTE8
J18-2 PTE9
PIN PORT
J20-1 VBAT
J20-4 VDD
J20-7 PTA5
J20-10 V3_3
J20-13 V5_0
J20-16 GND
J20-19 GDN
J20-22 VBAT
PIN PORT
J21-1 PTC23
J21-4 PTC27
J21-7 PTC28
J21-10 PTC29
J21-13 PTC30
J21-16 PTC31
J21-19 PTE19
J21-22 PTE20
PIN PORT
TOUCH0_0 PTA0
TOUCH0_1 PTA15
PIN PORT
TOUCH1_0 PTA1
TOUCH1_1 PTA16
PIN PORT
J18-24 PTD20
J18-21 PTD21
J18-18 PTB24
J18-15 PTB26
J18-12 GND
J18-9 GND
J18-6 PTB30
J18-3 PTB31
J20J17
J18
J19
J21
J22
Electrode A (SW2)
Electrode B (SW3)
J21
J22ELECTRODE A (SW2)
ELECTRODE B (SW3)
J17
J19
J20
J18
5
HEADERPINOUT MAPPING FOR S32K148
External Modules
Function Pin S32K148 MCU PinsOn-board Connector
Used MCU Peripherals
BLE moduleUART-TX PTB0LPUART0_RX J26-1
LPUART0UART-RX PTB1LPUART0_TX J26-2
GPS module
UART-TX PTC8LPUART1_RX J28-3
LPUART1UART-RX PTC9LPUART1_TX J28-2
PPS PTC10FTM3_CH4TRGMUX_IN11 J28-1
4G module
UTXD1 PTD17FTM0_FLT2LPUART2_RXFTM5_FLT1 J25-6
LPUART2
URXD1 PTE12FTM0_FLT3LPUART2_TXFTM5_FLT0 J25-7
POWER_KEY_N PTD4FTM0_FLT3ADC1_SE6 J25-10
M_RELOAD_N PTD2FTM3_CH4LPSPI1_SOUTFXIO_D4FXIO_D6ADC1_SE2 J27-6
M_RESET_N PTD3FTM3_CH5LPSPI1_PCS0FXIO_D5FXIO_D7ADC1_SE3 J27-7
TJA1044Stinger (SO8)
TXD PTC7LPUART1_TXCAN1_TXFTM3_CH3 NC
CAN1
RXD PTC6LPUART1_RXCAN1_RXFTM3_CH2 NC
STB PTC11FTM3_CH5FTM4_CH2TRGMUX_IN10 NC
CANH NC J31-2
CANL NC J31-17
TJA1043Stinger (HVON-14)
TXD PTB13FTM0_CH1FTM3_FLT1CAN2_TX NC
CAN2
RXD PTB12FTM0_CH0FTM3_FLT2CAN2_RX NC
EN PTB11FTM3_CH3LPI2C0_HREQ NC
STB_N PTB15FTM0_CH3LPSPI1_SINADC1_SE14 NC
INH SBC_HVIO3 NC
CANH NC J31-3
CANL NC J31-18
TJA1101 (10100Mbits Ethernet PHY)
MDC PTB5ENET_MII_RMII_MDC NC
ENET
MDIO PTB4MII_RMII_MDIO NC
INT_N PTB20FTM6_CH0ENET_INT NC
RXDVCONFIG2 PTC17MII_RMII_RX_DV NC
RXERCONFIG3 PTC16MII_RMII_RX_ER NC
RXCREF_CLK PTD10MII_RX_CLK NC
RXD0PHYAD0 PTC1MII_RMII_RXD0 NC
RXD1PHYAD1 PTC0MII_RMII_RXD1 NC
RXD2CONFIG0 PTD9MII_RXD2 NC
RXD3CONFIG1 PTD8MII_RXD3 NC
TXER PTC3MII_TX_ER NC
TXEN PTD12MII_RMII_TX_EN NC
TXD0 PTC2MII_RMII_TXD0 NC
TXD1 PTD7MII_RMII_TXD1 NC
TXD2 PTD6MII_TXD2 NC
TXD3 PTD5MII_TXD3 NC
INH SBC_HVIO4 NC
TRX_P NC J31-5
TRX_N NC J31-20
6
External Modules
Function Pin S32K148 MCU PinsOn-board Connector
Used MCU Peripherals
SBC(UJA113X)
SBC_SPI_CS PTA26FTM5_CH1LPSPI1_PCS0 NC
LPSPI1SBC_SPI_SCLK PTA28FTM5_CH3LPSPI1_SCKLPUART0_RX NC
SBC_SPI_MOSI PTA29FTM5_CH4LPUART2_TXLPSPI1_SIN NC
SBC_SPI_MISO PTA27FTM5_CH2LPSPI1_SOUTLPUART0_TX NC
SBC_CAN_TXD PTE5TCLK2FTM2_CH3CAN0_TXFXIO_D7 NCCAN0
SBC_CAN_RXD PTE4TRACE_D1FTM2_CH2CAN0_RXFXIO_D6 NC
SBC_LIN1_TXD PTA3LPUART0_TXFXIO_D5 NC LPUART0FlexIO4_5SBC_LIN1_RXD PTA2LPUART0_RXFXIO_D4 NC
SBC_LIN2_TXD PTA9LPUART2_TXLPSPI2_PCS0FXIO_D7FTM3_FLT2 NC LPUART2FlexIO6_7SBC_LIN2_RXD PTA8LPUART2_RXLPSPI2_SOUTFXIO_D6FTM3_FLT3 NC
SBC_CANH NC J5-1
SBC_CANL NC J5-2
SBC_LIN1 NC J31-10
SBC_LIN2 NC J31-11
INTN1 PTE19FTM7_CH7FTM7_CH7ADC1_SE25 NC
INTN2 PTE20FTM4_CH0FTM4_CH0ADC1_SE26 NC
External RTC amp ACCELERATOR
I2C_SCL PTD19FTM6_CH0FXIO_D3LPI2C1_SCLADC1_SE17 NC
LPI2C1I2C_SDA PTC31FTM5_CH6FXIO_D1LPI2C1_SDAFXIO_D1ADC0_SE31 NC
ACC_INT1 PTD22FTM6_CH3FTM6_CH3ADC1_SE18 NC
ACC_INT2RTC_INT PTD23FTM6_CH4FTM6_CH4ADC1_SE19 NC
Internal RTCRTC_CLKIN PTA7FTM0_FLT2FTM5_CH3RTC_CLKINLPUART1_RTSADC0_SE3 NC
RTCRTC_CLK_EN PTA6FTM0_FLT1LPSPI1_PCS1FTM5_CH5LPUART1_CTSADC0_SE2 NC
SAI(I2S) AUDIO-SGTL5000
SYS_MCLK PTD1FTM0_CH3LPSPI1_SINFTM2_CH1SAI0_MCLK NC
SAI0
I2S_SCLK PTA12FTM1_CH6CAN1_RXLPI2C1_SDASSAI0_BCLK NC
I2S_LRCLK PTA11FTM1_CH5FXIO_D1CMP0_RRTSAI0_SYNC NC
I2S_DIN PTA13FTM1_CH7FTM2_QD_PHASAI0_D0 NC
I2S_DOUT PTE1LPSPI0_SINLPI2C0_HREQLPI2C1_SCLSAI0_D1 NC
CTRL_CLK PTA3LPUART0_TXLPI2C0_SCLFXIO_D5 NC LPI2C0FLEXIOCTRL_DATA PTA2LPUART0_RXLPI2C0_SDAFXIO_D4 NC
QSPI-FLASH(64Bit)
SCLK PTD10QSPI_A_SCK NC
QSPI_A
CS_N PTC3QSPI_A_CS NC
SISIO0 PTD11QSPI_A_IO0 NC
SOSIO1 PTD7QSPI_A_IO1 NC
WP_NSIO2 PTD12QSPI_A_IO2 NC
HOLD_NSIO3 PTC2QSPI_A_IO3 NC
Touch PAD
TOUCH_ADC0_A PTA0FTM2_CH1LPI2C0_SCLSFXIO_D2FTM2_QD_PHALPUART0_CTSTRGMUX_OUT3ADC0_SE0CMP0_IN NC ADC0_SE0
TOUCH_ADC1_A PTA15FTM1_CH2LPSPI0_PCS3LPSPI2_PCS3FTM7_FLT0ADC1_SE12 NC ADC1_SE12
TOUCH_ADC0_B PTA1FTM1_CH1LPI2C0_SDASFXIO_D3FTM1_QD_PHALPUART0_RTSTRGMUX_OUT0ADC0_SE1CMP0_IN1 NC ADC0_SE1
TOUCH_ADC1_B PTA16FTM1_CH3LPSPI1_PCS2ADC1_SE13 NC ADC1_SE13
RGB LED
LED_RED PTE21FTM4_CH1ADC1_SE27 NCPTE work as
outputLED_GREEN PTE22FTM4_CH2ADC1_SE28 NC
LED_BLUE PTE23FTM4_CH3ADC1_SE29 NC
user BUTTOMBTN0 PTC12FTM3_CH6FTM2_CH6LPUART2_CTS NC PTC work as
inputEIRQBTN1 PTC13FTM3_CH7FTM2_CH7LPUART2_RTS NC
Potentiometer ADC test input PTC28FTM4_CH7ADC0_SE28 NC ADC0_SE28
HEADERPINOUT MAPPING FOR S32K148 CONT
7
23-PIN ECU CONNECTOR SIGNAL ROUTING AND WIRING HARNESS
The 23-pin ECU connector routing communication and external IO signals including
ndash 2x ADC input channels
ndash 2x HS PWM output channels
ndash 2x PWM input capture channels
ndash 3x CAN bus
ndash 2x LIN bus
ndash 1x 100M-base TX1 automotive ethernet
ndash +12V VBAT power supply input
ndash +5V power supply output for external devices
The 23-pin ECU connector enables the board to work as GP-ECU easily
The 23-pin ECU connector matched wiring harness with signal labels as below photo
It is not included in S32K148 T-BOX RDB please contact NXP sales for purchase
PIN Signal Wire colorWire gauge
(conductor CSAmm2)description
1 VBAT red 125 12V max 5A
2 CAN1H yellow 05 CAN bus 1 differential signal+
3 CAN2H yellow 05 CAN bus 2 differential signal+
4 ECU_EXT_HS1 green 05 ECU High Side driver output 1
5 CAN0H yellow 05 CAN bus 0 differential signal+
6 ECU_EXT_ADC1 blue 05 ECU external analog input 1
7 ECU_EXT_ADC2 blue 05 ECU external analog input 2
8 GND black 125 Powersignal ground
9 VBAT red 125 12V max 5A
10 ECU_EXT_LIN1 white 05 LIN bus 1
11 ECU_EXT_LIN2 white 05 LIN bus 2
12 SBC_HVIO5 orange 05 SBC HVIO5
13 ECU_EXT_PWM2 purple 05 PWM input channel 2
14 ECU_EXT_PWM1 purple 05 PWM input channel 1
15 ECU_EXT_5V red 075 5V power supply for ECU external devicemax100mA
16 GND black 125 Powersignal ground
17 CANL1 pink 05 CAN bus 1 differential signal-
18 CANL2 pink 05 CAN bus 2 differential signal-
19 ECU_EXT_HS2 green 05 ECU High Side driver output 2
20 CANL0 pink 05 CAN bus 0 differential signal-
21 GND black 125 Signal ground
22 ENET_TRX_P green 05100M-base TX1 automotive ethernet differential signal+
UTP
23 ENET_TRX_N orange 05100M-base TX1 automotive ethernet differential signal -
UTP
8
JUMPER SETTINGS (POWER SUPPLY)
JUMPER SETTINGS (LIN AND RTC CLOCK CONFIGURATION)
Jumper Configuration Description
J21-2 (Default) The 33V supply powered from VBAT(+12V)
2-3 The 33V supply powered from P5V0(5V)
J81-2 (Default) The P5V0 supply powered from SBC output
2-3 Not use no power source(NC on J8-3)
J91-2 (Default) The VDD supply powered from P3V3_SW(33V)
2-3 The VDD supply powered from P5V0(5V)
J291-2 (Default) VCAN_SBC supply powered from P5V0_V1SBC
2-3 VCAN_SBC supply powered from PVEXT_SBC
J11 1-2 (Default)Itrsquos connected between VDD and VDD_MCU and is designed for
S32K148 MCU low-power static current measurement for this case R77 needs to be unmounted
The jumper connection schematic is as below details can be found in the board schematic
Jumper Configuration Description
J32short (Default) Enable the LIN bus 1 pullup to work as a master node
open The LIN bus 1 is working as a slave node
J33short (Default) Enable the LIN bus 2 pullup to work as a master node
open The LIN bus 2 is working as a slave node
J34
1-2 (Default) External active 32768KHz oscillator for RTC is powered by VDD_MCU
2-3 External active 32768KHz oscillator for RTC is powered by VDD_MCU_PERH
External active 32768 KHz oscillator for RTC schematic is as right details can be found in the board schematic and HW UG
9
USING ETHERNET AND QSPI
IMPORTANT OBSERVATION
The S32K148 is the only member of the 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 user must follow an specific resistor configuration The default configuration of the board is to be used for ethernet communication
CHANGE 0Ω CONFIGURATION RESISTORS TO REUSE BETWEEN ENET AND QUADSPI
For S32K148 T-BOX RDB some ENET and QuadSPI data lines are shared from the MCU each interface is separated by two 0 Ω resistors
By default the ENET data lines are enabled
User can change the 0Ω configuration resistors to enable and use QuadSPI
S32K148 shared PIN Configuration resistor Description
PTD7 R161 (Default) ENET MII_RMII_TXD1
R162 QuadSPI QSPI_A_IO1
PTC2 R177(Default) ENET MII_RMII_TXD0
R178 QuadSPI QSPI_A_IO3
PTC3 R196 (Default) ENET MII_TX_ER
R203 QuadSPI QSPI_A_CS
PTD10 R178 (Default) ENET MII_RX_CLK
R179 QuadSPI QSPI_A_SCK
PTD11 R194 (Default) ENET MII_RMII_TX_CLK
R195 QuadSPI QSPI_A_IO0
PTD12 R190 (Default) ENET MII_RMII_TX_EN
R192 QuadSPI QSPI_A_IO2
10
S32K148-T-BOX RDB Out-of-the-Box SetupPOWER UP THE BOARD AND DEBUGGER CONNECTION
The S32K148 T-BOX RDB powers from external +12V power supply via the 23-pin ECU connector with the wiring harness If no 23-pin ECU connector wiring harness available the board be powered by J31-8 (GND) and J31-1 (+12V)
Note There is no embedded debugger (eg OpenSDA) on the RDB so debug is done using PEMicro U-MultilinkFX through J12 with a mini-20 pin cable on debuggerrsquos port F
After power on the D10 D11 and D12 on the left up corner of the board will light on
With Connecting the U-Multilink debugger to PC its USB and TGTPWR LED will be lighted on
USB Cable to PC
DC - 12 Vpower supply
S32K148 T-BOX RDB SETUP CONNECTION
11
Use the BSP test project
STEP 1 DOWNLOAD amp INSTALL S32DS FOR ARM V2018R1 AND S32K SDK RTM 200
Download S32DS for ARM v2018R1 from the following link
httpwwwnxpcomS32DS
ndash The download will require a NXP account login user can register the account with any e-mail and after download you can install S32DS IDE with a 32-bit active code received by the e-mail when download
Download and install the S32K SDK RTM 200
ndash S32 Design Studio for Armreg 2018R1 Update 6 SDK S32K14x RTM v200 (REV UP6)
Any questions please refer to the following NXP technical community for help
httpscommunitynxpcomdocsDOC-335302
STEP 2 IMPORT AND COMPILE THE BSP TEST PROJECT (1)
Open S32DS for ARM v2018R1 IDE select File gt Import Select General gt Existing Projects into Workspace gt Next
12
STEP 2 IMPORT AND COMPILE THE BSP TEST PROJECT (2)
Select archive file gt Browse browse and choose S32K148_Based_T_BOX_BSP_TestPrj_SDK_RTM2_0zip select the project gt Finish
After importing the project clean it at first select the project in Project Explorer then right-click choose Clean Project
13
STEP 2 IMPORT AND COMPILE THE BSP TEST PROJECT (3)
Select the project in Project Explorer then right-click choose Build Project
The compile result is as below if no errors are found
14
STEP 3 DOWNLOAD AND DEBUG THE BSP TEST PROJECT
Select the project in Project Explorer then right-click choose Debug As gt Debug Configuration
In the Debug Configuration window select the GDB PEMicro Interface Debugging gt S32K148_Based_T_BOX_BSP_TestPrj_SDK_RTM2_0_DebuggtDebuggergtunder Interface select right debugger and ensure Port has the right part number then in Additional Options check Emergency Kinetis Device Recovery by Full Chip Erase and Use SWD protocol (if not check this option it will use JTAG debug protocol) at last click Debug to launch the debug(it will download the compile resultmdashelf file in to the target MCU at first)
15
STEP 4 CONNECT THE UART CONSOLE FOR TEST RESULT OUTPUT DISPLAY
The BSP test project use S32K148 LPUART2 to output the test result
Use a USB-to-UART adapter to connect the board with PC via J25-6(TXD) J25-7(RXD) and J25-12(GND)
For more details on the test results description and demo projects please refer to the Software User Guide
Open a UART console(eg Serial Port Utility) on PC configure its serial communication format as the following
ndash Data rate 115200 bauds
ndash Data Bits 8
ndash Parity None
ndash Stop Bits 1
ndash Flow Control OFF
Then you can see the test result output as below
16
RDB Software package overview
OTHER DEMO PROJECTS
Besides of the BSP test project which includes the SDK API based LLD of GPS module BLE module MMA8452Q PCA85063ATT 3x FlexCAN 3x LPUART communication 2x HS(PWM) 2x user bottom GPIO IRQ interrupt RGB LED 2x input capture 2x external analog input 2x Touch Sense PAD and etc
The SW package also provides the following demo projects
ndash QSPI Flash test project
ndash LwIP based ENET and TJA1101 TCPIP severclient communication demo project
ndash LIN stack based Single board LIN master and slave communication demo project
ndash I2S audio codecmdashSGTL500 demo project
ndash T-BOX reference design project
For more details please refer to the S32K148 T-BOX_GP-ECU RDB SW user guide and download the SW package
17
Create a New Project in S32 Design StudioCREATE NEW PROJECT FIRST TIME ndash SELECT A WORKSPACE
Start program Click on ldquoS32 Design Studio for ARM v10rdquo icon
Select workspace
ndash Choose default (see below example) or specify new one
ndash Suggestion Uncheck the box ldquoUse this as the default and do not ask againrdquo
ndash Click OK
CREATE NEW PROJECT TOP MENU SELECTION
File ndash New ndashProject
18
CREATE NEW PROJECT S32DS PROJECT
Project Name
ndash Example FirstProject
Project Type
ndash Select from inside executable or library folder
Next
Select Debugger Support and Library Support
Click Finish
19
OPENSDA CONFIGURATION
To Debug your project with OpenSDA it is necessary to select the OpenSDA in the Debug Configuration
Select your project and click on debug configuration
Select the Debug configuration under GDB PEMicro Interface Debugging
Click on Debugger tab
Select OpenSDA as the interface if your board is plugged should appear in the Port field
Click Apply and debug to finish
20
Debug Basics
DEBUG BASICS STARTING THE DEBUGGER
Debug configuration is only required once Subsequent starting of debugger does not require those steps
Three options to start debugger
ndash If the ldquoDebug Configurationrdquo has not been closed click on ldquoDebugrdquo button on bottom right
ndash Select Run ndash Debug (or hit F11)
Note This method currently selects the desktop target (projectelf) and gives an error Do not use until this is changed
Recommended Method Click on pull down arrow for bug icon and select hellip_debugelf target
DEBUG BASICS STEP RUN SUSPEND RESUME
Step Into (F5)
Step Over (F6)
Step Return (F7)
Run
Suspend
Resume (F8)
21
DEBUG BASICS VIEW amp ALTER VARIABLES
View variables in ldquoVariablesrdquo tab
Click on a value to allow typing in a different value
DEBUG BASICS VIEW AND ALTER REGISTERS
View CPU registers in the ldquoRegistersrdquo tab
Click on a value to allow typing in a different value
View peripheral registers in the EmbSys Registers tab
DEBUG BASICS VIEW AND ALTER MEMORY
Add Memory Monitor
Select Base Address to Start at 40000000
View Memory
22
DEBUG BASICS BREAKPOINTS
Add Breakpoint Point and Click
Light blue dot represents debugger breakpoint
DEBUG BASICS RESET amp TERMINATE DEBUG SESSION
Reset program counter
Terminate Ctl+F2()
23
Create a PampE Debug Configuration (Optional)
NEW PampE DEBUG CONFIGURATION
Click in debug configurations
Create a new PampE launch configuration
Select S32K144 device
Click Apply and debug your application
wwwnxpcomS32K148-T-BOX
NXP and the NXP logo are trademarks of NXP BV All other product or service names are the property of their respective owners copy 2019 NXP BV
Document Number S32K148TBOXEFS REV 0
5
HEADERPINOUT MAPPING FOR S32K148
External Modules
Function Pin S32K148 MCU PinsOn-board Connector
Used MCU Peripherals
BLE moduleUART-TX PTB0LPUART0_RX J26-1
LPUART0UART-RX PTB1LPUART0_TX J26-2
GPS module
UART-TX PTC8LPUART1_RX J28-3
LPUART1UART-RX PTC9LPUART1_TX J28-2
PPS PTC10FTM3_CH4TRGMUX_IN11 J28-1
4G module
UTXD1 PTD17FTM0_FLT2LPUART2_RXFTM5_FLT1 J25-6
LPUART2
URXD1 PTE12FTM0_FLT3LPUART2_TXFTM5_FLT0 J25-7
POWER_KEY_N PTD4FTM0_FLT3ADC1_SE6 J25-10
M_RELOAD_N PTD2FTM3_CH4LPSPI1_SOUTFXIO_D4FXIO_D6ADC1_SE2 J27-6
M_RESET_N PTD3FTM3_CH5LPSPI1_PCS0FXIO_D5FXIO_D7ADC1_SE3 J27-7
TJA1044Stinger (SO8)
TXD PTC7LPUART1_TXCAN1_TXFTM3_CH3 NC
CAN1
RXD PTC6LPUART1_RXCAN1_RXFTM3_CH2 NC
STB PTC11FTM3_CH5FTM4_CH2TRGMUX_IN10 NC
CANH NC J31-2
CANL NC J31-17
TJA1043Stinger (HVON-14)
TXD PTB13FTM0_CH1FTM3_FLT1CAN2_TX NC
CAN2
RXD PTB12FTM0_CH0FTM3_FLT2CAN2_RX NC
EN PTB11FTM3_CH3LPI2C0_HREQ NC
STB_N PTB15FTM0_CH3LPSPI1_SINADC1_SE14 NC
INH SBC_HVIO3 NC
CANH NC J31-3
CANL NC J31-18
TJA1101 (10100Mbits Ethernet PHY)
MDC PTB5ENET_MII_RMII_MDC NC
ENET
MDIO PTB4MII_RMII_MDIO NC
INT_N PTB20FTM6_CH0ENET_INT NC
RXDVCONFIG2 PTC17MII_RMII_RX_DV NC
RXERCONFIG3 PTC16MII_RMII_RX_ER NC
RXCREF_CLK PTD10MII_RX_CLK NC
RXD0PHYAD0 PTC1MII_RMII_RXD0 NC
RXD1PHYAD1 PTC0MII_RMII_RXD1 NC
RXD2CONFIG0 PTD9MII_RXD2 NC
RXD3CONFIG1 PTD8MII_RXD3 NC
TXER PTC3MII_TX_ER NC
TXEN PTD12MII_RMII_TX_EN NC
TXD0 PTC2MII_RMII_TXD0 NC
TXD1 PTD7MII_RMII_TXD1 NC
TXD2 PTD6MII_TXD2 NC
TXD3 PTD5MII_TXD3 NC
INH SBC_HVIO4 NC
TRX_P NC J31-5
TRX_N NC J31-20
6
External Modules
Function Pin S32K148 MCU PinsOn-board Connector
Used MCU Peripherals
SBC(UJA113X)
SBC_SPI_CS PTA26FTM5_CH1LPSPI1_PCS0 NC
LPSPI1SBC_SPI_SCLK PTA28FTM5_CH3LPSPI1_SCKLPUART0_RX NC
SBC_SPI_MOSI PTA29FTM5_CH4LPUART2_TXLPSPI1_SIN NC
SBC_SPI_MISO PTA27FTM5_CH2LPSPI1_SOUTLPUART0_TX NC
SBC_CAN_TXD PTE5TCLK2FTM2_CH3CAN0_TXFXIO_D7 NCCAN0
SBC_CAN_RXD PTE4TRACE_D1FTM2_CH2CAN0_RXFXIO_D6 NC
SBC_LIN1_TXD PTA3LPUART0_TXFXIO_D5 NC LPUART0FlexIO4_5SBC_LIN1_RXD PTA2LPUART0_RXFXIO_D4 NC
SBC_LIN2_TXD PTA9LPUART2_TXLPSPI2_PCS0FXIO_D7FTM3_FLT2 NC LPUART2FlexIO6_7SBC_LIN2_RXD PTA8LPUART2_RXLPSPI2_SOUTFXIO_D6FTM3_FLT3 NC
SBC_CANH NC J5-1
SBC_CANL NC J5-2
SBC_LIN1 NC J31-10
SBC_LIN2 NC J31-11
INTN1 PTE19FTM7_CH7FTM7_CH7ADC1_SE25 NC
INTN2 PTE20FTM4_CH0FTM4_CH0ADC1_SE26 NC
External RTC amp ACCELERATOR
I2C_SCL PTD19FTM6_CH0FXIO_D3LPI2C1_SCLADC1_SE17 NC
LPI2C1I2C_SDA PTC31FTM5_CH6FXIO_D1LPI2C1_SDAFXIO_D1ADC0_SE31 NC
ACC_INT1 PTD22FTM6_CH3FTM6_CH3ADC1_SE18 NC
ACC_INT2RTC_INT PTD23FTM6_CH4FTM6_CH4ADC1_SE19 NC
Internal RTCRTC_CLKIN PTA7FTM0_FLT2FTM5_CH3RTC_CLKINLPUART1_RTSADC0_SE3 NC
RTCRTC_CLK_EN PTA6FTM0_FLT1LPSPI1_PCS1FTM5_CH5LPUART1_CTSADC0_SE2 NC
SAI(I2S) AUDIO-SGTL5000
SYS_MCLK PTD1FTM0_CH3LPSPI1_SINFTM2_CH1SAI0_MCLK NC
SAI0
I2S_SCLK PTA12FTM1_CH6CAN1_RXLPI2C1_SDASSAI0_BCLK NC
I2S_LRCLK PTA11FTM1_CH5FXIO_D1CMP0_RRTSAI0_SYNC NC
I2S_DIN PTA13FTM1_CH7FTM2_QD_PHASAI0_D0 NC
I2S_DOUT PTE1LPSPI0_SINLPI2C0_HREQLPI2C1_SCLSAI0_D1 NC
CTRL_CLK PTA3LPUART0_TXLPI2C0_SCLFXIO_D5 NC LPI2C0FLEXIOCTRL_DATA PTA2LPUART0_RXLPI2C0_SDAFXIO_D4 NC
QSPI-FLASH(64Bit)
SCLK PTD10QSPI_A_SCK NC
QSPI_A
CS_N PTC3QSPI_A_CS NC
SISIO0 PTD11QSPI_A_IO0 NC
SOSIO1 PTD7QSPI_A_IO1 NC
WP_NSIO2 PTD12QSPI_A_IO2 NC
HOLD_NSIO3 PTC2QSPI_A_IO3 NC
Touch PAD
TOUCH_ADC0_A PTA0FTM2_CH1LPI2C0_SCLSFXIO_D2FTM2_QD_PHALPUART0_CTSTRGMUX_OUT3ADC0_SE0CMP0_IN NC ADC0_SE0
TOUCH_ADC1_A PTA15FTM1_CH2LPSPI0_PCS3LPSPI2_PCS3FTM7_FLT0ADC1_SE12 NC ADC1_SE12
TOUCH_ADC0_B PTA1FTM1_CH1LPI2C0_SDASFXIO_D3FTM1_QD_PHALPUART0_RTSTRGMUX_OUT0ADC0_SE1CMP0_IN1 NC ADC0_SE1
TOUCH_ADC1_B PTA16FTM1_CH3LPSPI1_PCS2ADC1_SE13 NC ADC1_SE13
RGB LED
LED_RED PTE21FTM4_CH1ADC1_SE27 NCPTE work as
outputLED_GREEN PTE22FTM4_CH2ADC1_SE28 NC
LED_BLUE PTE23FTM4_CH3ADC1_SE29 NC
user BUTTOMBTN0 PTC12FTM3_CH6FTM2_CH6LPUART2_CTS NC PTC work as
inputEIRQBTN1 PTC13FTM3_CH7FTM2_CH7LPUART2_RTS NC
Potentiometer ADC test input PTC28FTM4_CH7ADC0_SE28 NC ADC0_SE28
HEADERPINOUT MAPPING FOR S32K148 CONT
7
23-PIN ECU CONNECTOR SIGNAL ROUTING AND WIRING HARNESS
The 23-pin ECU connector routing communication and external IO signals including
ndash 2x ADC input channels
ndash 2x HS PWM output channels
ndash 2x PWM input capture channels
ndash 3x CAN bus
ndash 2x LIN bus
ndash 1x 100M-base TX1 automotive ethernet
ndash +12V VBAT power supply input
ndash +5V power supply output for external devices
The 23-pin ECU connector enables the board to work as GP-ECU easily
The 23-pin ECU connector matched wiring harness with signal labels as below photo
It is not included in S32K148 T-BOX RDB please contact NXP sales for purchase
PIN Signal Wire colorWire gauge
(conductor CSAmm2)description
1 VBAT red 125 12V max 5A
2 CAN1H yellow 05 CAN bus 1 differential signal+
3 CAN2H yellow 05 CAN bus 2 differential signal+
4 ECU_EXT_HS1 green 05 ECU High Side driver output 1
5 CAN0H yellow 05 CAN bus 0 differential signal+
6 ECU_EXT_ADC1 blue 05 ECU external analog input 1
7 ECU_EXT_ADC2 blue 05 ECU external analog input 2
8 GND black 125 Powersignal ground
9 VBAT red 125 12V max 5A
10 ECU_EXT_LIN1 white 05 LIN bus 1
11 ECU_EXT_LIN2 white 05 LIN bus 2
12 SBC_HVIO5 orange 05 SBC HVIO5
13 ECU_EXT_PWM2 purple 05 PWM input channel 2
14 ECU_EXT_PWM1 purple 05 PWM input channel 1
15 ECU_EXT_5V red 075 5V power supply for ECU external devicemax100mA
16 GND black 125 Powersignal ground
17 CANL1 pink 05 CAN bus 1 differential signal-
18 CANL2 pink 05 CAN bus 2 differential signal-
19 ECU_EXT_HS2 green 05 ECU High Side driver output 2
20 CANL0 pink 05 CAN bus 0 differential signal-
21 GND black 125 Signal ground
22 ENET_TRX_P green 05100M-base TX1 automotive ethernet differential signal+
UTP
23 ENET_TRX_N orange 05100M-base TX1 automotive ethernet differential signal -
UTP
8
JUMPER SETTINGS (POWER SUPPLY)
JUMPER SETTINGS (LIN AND RTC CLOCK CONFIGURATION)
Jumper Configuration Description
J21-2 (Default) The 33V supply powered from VBAT(+12V)
2-3 The 33V supply powered from P5V0(5V)
J81-2 (Default) The P5V0 supply powered from SBC output
2-3 Not use no power source(NC on J8-3)
J91-2 (Default) The VDD supply powered from P3V3_SW(33V)
2-3 The VDD supply powered from P5V0(5V)
J291-2 (Default) VCAN_SBC supply powered from P5V0_V1SBC
2-3 VCAN_SBC supply powered from PVEXT_SBC
J11 1-2 (Default)Itrsquos connected between VDD and VDD_MCU and is designed for
S32K148 MCU low-power static current measurement for this case R77 needs to be unmounted
The jumper connection schematic is as below details can be found in the board schematic
Jumper Configuration Description
J32short (Default) Enable the LIN bus 1 pullup to work as a master node
open The LIN bus 1 is working as a slave node
J33short (Default) Enable the LIN bus 2 pullup to work as a master node
open The LIN bus 2 is working as a slave node
J34
1-2 (Default) External active 32768KHz oscillator for RTC is powered by VDD_MCU
2-3 External active 32768KHz oscillator for RTC is powered by VDD_MCU_PERH
External active 32768 KHz oscillator for RTC schematic is as right details can be found in the board schematic and HW UG
9
USING ETHERNET AND QSPI
IMPORTANT OBSERVATION
The S32K148 is the only member of the 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 user must follow an specific resistor configuration The default configuration of the board is to be used for ethernet communication
CHANGE 0Ω CONFIGURATION RESISTORS TO REUSE BETWEEN ENET AND QUADSPI
For S32K148 T-BOX RDB some ENET and QuadSPI data lines are shared from the MCU each interface is separated by two 0 Ω resistors
By default the ENET data lines are enabled
User can change the 0Ω configuration resistors to enable and use QuadSPI
S32K148 shared PIN Configuration resistor Description
PTD7 R161 (Default) ENET MII_RMII_TXD1
R162 QuadSPI QSPI_A_IO1
PTC2 R177(Default) ENET MII_RMII_TXD0
R178 QuadSPI QSPI_A_IO3
PTC3 R196 (Default) ENET MII_TX_ER
R203 QuadSPI QSPI_A_CS
PTD10 R178 (Default) ENET MII_RX_CLK
R179 QuadSPI QSPI_A_SCK
PTD11 R194 (Default) ENET MII_RMII_TX_CLK
R195 QuadSPI QSPI_A_IO0
PTD12 R190 (Default) ENET MII_RMII_TX_EN
R192 QuadSPI QSPI_A_IO2
10
S32K148-T-BOX RDB Out-of-the-Box SetupPOWER UP THE BOARD AND DEBUGGER CONNECTION
The S32K148 T-BOX RDB powers from external +12V power supply via the 23-pin ECU connector with the wiring harness If no 23-pin ECU connector wiring harness available the board be powered by J31-8 (GND) and J31-1 (+12V)
Note There is no embedded debugger (eg OpenSDA) on the RDB so debug is done using PEMicro U-MultilinkFX through J12 with a mini-20 pin cable on debuggerrsquos port F
After power on the D10 D11 and D12 on the left up corner of the board will light on
With Connecting the U-Multilink debugger to PC its USB and TGTPWR LED will be lighted on
USB Cable to PC
DC - 12 Vpower supply
S32K148 T-BOX RDB SETUP CONNECTION
11
Use the BSP test project
STEP 1 DOWNLOAD amp INSTALL S32DS FOR ARM V2018R1 AND S32K SDK RTM 200
Download S32DS for ARM v2018R1 from the following link
httpwwwnxpcomS32DS
ndash The download will require a NXP account login user can register the account with any e-mail and after download you can install S32DS IDE with a 32-bit active code received by the e-mail when download
Download and install the S32K SDK RTM 200
ndash S32 Design Studio for Armreg 2018R1 Update 6 SDK S32K14x RTM v200 (REV UP6)
Any questions please refer to the following NXP technical community for help
httpscommunitynxpcomdocsDOC-335302
STEP 2 IMPORT AND COMPILE THE BSP TEST PROJECT (1)
Open S32DS for ARM v2018R1 IDE select File gt Import Select General gt Existing Projects into Workspace gt Next
12
STEP 2 IMPORT AND COMPILE THE BSP TEST PROJECT (2)
Select archive file gt Browse browse and choose S32K148_Based_T_BOX_BSP_TestPrj_SDK_RTM2_0zip select the project gt Finish
After importing the project clean it at first select the project in Project Explorer then right-click choose Clean Project
13
STEP 2 IMPORT AND COMPILE THE BSP TEST PROJECT (3)
Select the project in Project Explorer then right-click choose Build Project
The compile result is as below if no errors are found
14
STEP 3 DOWNLOAD AND DEBUG THE BSP TEST PROJECT
Select the project in Project Explorer then right-click choose Debug As gt Debug Configuration
In the Debug Configuration window select the GDB PEMicro Interface Debugging gt S32K148_Based_T_BOX_BSP_TestPrj_SDK_RTM2_0_DebuggtDebuggergtunder Interface select right debugger and ensure Port has the right part number then in Additional Options check Emergency Kinetis Device Recovery by Full Chip Erase and Use SWD protocol (if not check this option it will use JTAG debug protocol) at last click Debug to launch the debug(it will download the compile resultmdashelf file in to the target MCU at first)
15
STEP 4 CONNECT THE UART CONSOLE FOR TEST RESULT OUTPUT DISPLAY
The BSP test project use S32K148 LPUART2 to output the test result
Use a USB-to-UART adapter to connect the board with PC via J25-6(TXD) J25-7(RXD) and J25-12(GND)
For more details on the test results description and demo projects please refer to the Software User Guide
Open a UART console(eg Serial Port Utility) on PC configure its serial communication format as the following
ndash Data rate 115200 bauds
ndash Data Bits 8
ndash Parity None
ndash Stop Bits 1
ndash Flow Control OFF
Then you can see the test result output as below
16
RDB Software package overview
OTHER DEMO PROJECTS
Besides of the BSP test project which includes the SDK API based LLD of GPS module BLE module MMA8452Q PCA85063ATT 3x FlexCAN 3x LPUART communication 2x HS(PWM) 2x user bottom GPIO IRQ interrupt RGB LED 2x input capture 2x external analog input 2x Touch Sense PAD and etc
The SW package also provides the following demo projects
ndash QSPI Flash test project
ndash LwIP based ENET and TJA1101 TCPIP severclient communication demo project
ndash LIN stack based Single board LIN master and slave communication demo project
ndash I2S audio codecmdashSGTL500 demo project
ndash T-BOX reference design project
For more details please refer to the S32K148 T-BOX_GP-ECU RDB SW user guide and download the SW package
17
Create a New Project in S32 Design StudioCREATE NEW PROJECT FIRST TIME ndash SELECT A WORKSPACE
Start program Click on ldquoS32 Design Studio for ARM v10rdquo icon
Select workspace
ndash Choose default (see below example) or specify new one
ndash Suggestion Uncheck the box ldquoUse this as the default and do not ask againrdquo
ndash Click OK
CREATE NEW PROJECT TOP MENU SELECTION
File ndash New ndashProject
18
CREATE NEW PROJECT S32DS PROJECT
Project Name
ndash Example FirstProject
Project Type
ndash Select from inside executable or library folder
Next
Select Debugger Support and Library Support
Click Finish
19
OPENSDA CONFIGURATION
To Debug your project with OpenSDA it is necessary to select the OpenSDA in the Debug Configuration
Select your project and click on debug configuration
Select the Debug configuration under GDB PEMicro Interface Debugging
Click on Debugger tab
Select OpenSDA as the interface if your board is plugged should appear in the Port field
Click Apply and debug to finish
20
Debug Basics
DEBUG BASICS STARTING THE DEBUGGER
Debug configuration is only required once Subsequent starting of debugger does not require those steps
Three options to start debugger
ndash If the ldquoDebug Configurationrdquo has not been closed click on ldquoDebugrdquo button on bottom right
ndash Select Run ndash Debug (or hit F11)
Note This method currently selects the desktop target (projectelf) and gives an error Do not use until this is changed
Recommended Method Click on pull down arrow for bug icon and select hellip_debugelf target
DEBUG BASICS STEP RUN SUSPEND RESUME
Step Into (F5)
Step Over (F6)
Step Return (F7)
Run
Suspend
Resume (F8)
21
DEBUG BASICS VIEW amp ALTER VARIABLES
View variables in ldquoVariablesrdquo tab
Click on a value to allow typing in a different value
DEBUG BASICS VIEW AND ALTER REGISTERS
View CPU registers in the ldquoRegistersrdquo tab
Click on a value to allow typing in a different value
View peripheral registers in the EmbSys Registers tab
DEBUG BASICS VIEW AND ALTER MEMORY
Add Memory Monitor
Select Base Address to Start at 40000000
View Memory
22
DEBUG BASICS BREAKPOINTS
Add Breakpoint Point and Click
Light blue dot represents debugger breakpoint
DEBUG BASICS RESET amp TERMINATE DEBUG SESSION
Reset program counter
Terminate Ctl+F2()
23
Create a PampE Debug Configuration (Optional)
NEW PampE DEBUG CONFIGURATION
Click in debug configurations
Create a new PampE launch configuration
Select S32K144 device
Click Apply and debug your application
wwwnxpcomS32K148-T-BOX
NXP and the NXP logo are trademarks of NXP BV All other product or service names are the property of their respective owners copy 2019 NXP BV
Document Number S32K148TBOXEFS REV 0
6
External Modules
Function Pin S32K148 MCU PinsOn-board Connector
Used MCU Peripherals
SBC(UJA113X)
SBC_SPI_CS PTA26FTM5_CH1LPSPI1_PCS0 NC
LPSPI1SBC_SPI_SCLK PTA28FTM5_CH3LPSPI1_SCKLPUART0_RX NC
SBC_SPI_MOSI PTA29FTM5_CH4LPUART2_TXLPSPI1_SIN NC
SBC_SPI_MISO PTA27FTM5_CH2LPSPI1_SOUTLPUART0_TX NC
SBC_CAN_TXD PTE5TCLK2FTM2_CH3CAN0_TXFXIO_D7 NCCAN0
SBC_CAN_RXD PTE4TRACE_D1FTM2_CH2CAN0_RXFXIO_D6 NC
SBC_LIN1_TXD PTA3LPUART0_TXFXIO_D5 NC LPUART0FlexIO4_5SBC_LIN1_RXD PTA2LPUART0_RXFXIO_D4 NC
SBC_LIN2_TXD PTA9LPUART2_TXLPSPI2_PCS0FXIO_D7FTM3_FLT2 NC LPUART2FlexIO6_7SBC_LIN2_RXD PTA8LPUART2_RXLPSPI2_SOUTFXIO_D6FTM3_FLT3 NC
SBC_CANH NC J5-1
SBC_CANL NC J5-2
SBC_LIN1 NC J31-10
SBC_LIN2 NC J31-11
INTN1 PTE19FTM7_CH7FTM7_CH7ADC1_SE25 NC
INTN2 PTE20FTM4_CH0FTM4_CH0ADC1_SE26 NC
External RTC amp ACCELERATOR
I2C_SCL PTD19FTM6_CH0FXIO_D3LPI2C1_SCLADC1_SE17 NC
LPI2C1I2C_SDA PTC31FTM5_CH6FXIO_D1LPI2C1_SDAFXIO_D1ADC0_SE31 NC
ACC_INT1 PTD22FTM6_CH3FTM6_CH3ADC1_SE18 NC
ACC_INT2RTC_INT PTD23FTM6_CH4FTM6_CH4ADC1_SE19 NC
Internal RTCRTC_CLKIN PTA7FTM0_FLT2FTM5_CH3RTC_CLKINLPUART1_RTSADC0_SE3 NC
RTCRTC_CLK_EN PTA6FTM0_FLT1LPSPI1_PCS1FTM5_CH5LPUART1_CTSADC0_SE2 NC
SAI(I2S) AUDIO-SGTL5000
SYS_MCLK PTD1FTM0_CH3LPSPI1_SINFTM2_CH1SAI0_MCLK NC
SAI0
I2S_SCLK PTA12FTM1_CH6CAN1_RXLPI2C1_SDASSAI0_BCLK NC
I2S_LRCLK PTA11FTM1_CH5FXIO_D1CMP0_RRTSAI0_SYNC NC
I2S_DIN PTA13FTM1_CH7FTM2_QD_PHASAI0_D0 NC
I2S_DOUT PTE1LPSPI0_SINLPI2C0_HREQLPI2C1_SCLSAI0_D1 NC
CTRL_CLK PTA3LPUART0_TXLPI2C0_SCLFXIO_D5 NC LPI2C0FLEXIOCTRL_DATA PTA2LPUART0_RXLPI2C0_SDAFXIO_D4 NC
QSPI-FLASH(64Bit)
SCLK PTD10QSPI_A_SCK NC
QSPI_A
CS_N PTC3QSPI_A_CS NC
SISIO0 PTD11QSPI_A_IO0 NC
SOSIO1 PTD7QSPI_A_IO1 NC
WP_NSIO2 PTD12QSPI_A_IO2 NC
HOLD_NSIO3 PTC2QSPI_A_IO3 NC
Touch PAD
TOUCH_ADC0_A PTA0FTM2_CH1LPI2C0_SCLSFXIO_D2FTM2_QD_PHALPUART0_CTSTRGMUX_OUT3ADC0_SE0CMP0_IN NC ADC0_SE0
TOUCH_ADC1_A PTA15FTM1_CH2LPSPI0_PCS3LPSPI2_PCS3FTM7_FLT0ADC1_SE12 NC ADC1_SE12
TOUCH_ADC0_B PTA1FTM1_CH1LPI2C0_SDASFXIO_D3FTM1_QD_PHALPUART0_RTSTRGMUX_OUT0ADC0_SE1CMP0_IN1 NC ADC0_SE1
TOUCH_ADC1_B PTA16FTM1_CH3LPSPI1_PCS2ADC1_SE13 NC ADC1_SE13
RGB LED
LED_RED PTE21FTM4_CH1ADC1_SE27 NCPTE work as
outputLED_GREEN PTE22FTM4_CH2ADC1_SE28 NC
LED_BLUE PTE23FTM4_CH3ADC1_SE29 NC
user BUTTOMBTN0 PTC12FTM3_CH6FTM2_CH6LPUART2_CTS NC PTC work as
inputEIRQBTN1 PTC13FTM3_CH7FTM2_CH7LPUART2_RTS NC
Potentiometer ADC test input PTC28FTM4_CH7ADC0_SE28 NC ADC0_SE28
HEADERPINOUT MAPPING FOR S32K148 CONT
7
23-PIN ECU CONNECTOR SIGNAL ROUTING AND WIRING HARNESS
The 23-pin ECU connector routing communication and external IO signals including
ndash 2x ADC input channels
ndash 2x HS PWM output channels
ndash 2x PWM input capture channels
ndash 3x CAN bus
ndash 2x LIN bus
ndash 1x 100M-base TX1 automotive ethernet
ndash +12V VBAT power supply input
ndash +5V power supply output for external devices
The 23-pin ECU connector enables the board to work as GP-ECU easily
The 23-pin ECU connector matched wiring harness with signal labels as below photo
It is not included in S32K148 T-BOX RDB please contact NXP sales for purchase
PIN Signal Wire colorWire gauge
(conductor CSAmm2)description
1 VBAT red 125 12V max 5A
2 CAN1H yellow 05 CAN bus 1 differential signal+
3 CAN2H yellow 05 CAN bus 2 differential signal+
4 ECU_EXT_HS1 green 05 ECU High Side driver output 1
5 CAN0H yellow 05 CAN bus 0 differential signal+
6 ECU_EXT_ADC1 blue 05 ECU external analog input 1
7 ECU_EXT_ADC2 blue 05 ECU external analog input 2
8 GND black 125 Powersignal ground
9 VBAT red 125 12V max 5A
10 ECU_EXT_LIN1 white 05 LIN bus 1
11 ECU_EXT_LIN2 white 05 LIN bus 2
12 SBC_HVIO5 orange 05 SBC HVIO5
13 ECU_EXT_PWM2 purple 05 PWM input channel 2
14 ECU_EXT_PWM1 purple 05 PWM input channel 1
15 ECU_EXT_5V red 075 5V power supply for ECU external devicemax100mA
16 GND black 125 Powersignal ground
17 CANL1 pink 05 CAN bus 1 differential signal-
18 CANL2 pink 05 CAN bus 2 differential signal-
19 ECU_EXT_HS2 green 05 ECU High Side driver output 2
20 CANL0 pink 05 CAN bus 0 differential signal-
21 GND black 125 Signal ground
22 ENET_TRX_P green 05100M-base TX1 automotive ethernet differential signal+
UTP
23 ENET_TRX_N orange 05100M-base TX1 automotive ethernet differential signal -
UTP
8
JUMPER SETTINGS (POWER SUPPLY)
JUMPER SETTINGS (LIN AND RTC CLOCK CONFIGURATION)
Jumper Configuration Description
J21-2 (Default) The 33V supply powered from VBAT(+12V)
2-3 The 33V supply powered from P5V0(5V)
J81-2 (Default) The P5V0 supply powered from SBC output
2-3 Not use no power source(NC on J8-3)
J91-2 (Default) The VDD supply powered from P3V3_SW(33V)
2-3 The VDD supply powered from P5V0(5V)
J291-2 (Default) VCAN_SBC supply powered from P5V0_V1SBC
2-3 VCAN_SBC supply powered from PVEXT_SBC
J11 1-2 (Default)Itrsquos connected between VDD and VDD_MCU and is designed for
S32K148 MCU low-power static current measurement for this case R77 needs to be unmounted
The jumper connection schematic is as below details can be found in the board schematic
Jumper Configuration Description
J32short (Default) Enable the LIN bus 1 pullup to work as a master node
open The LIN bus 1 is working as a slave node
J33short (Default) Enable the LIN bus 2 pullup to work as a master node
open The LIN bus 2 is working as a slave node
J34
1-2 (Default) External active 32768KHz oscillator for RTC is powered by VDD_MCU
2-3 External active 32768KHz oscillator for RTC is powered by VDD_MCU_PERH
External active 32768 KHz oscillator for RTC schematic is as right details can be found in the board schematic and HW UG
9
USING ETHERNET AND QSPI
IMPORTANT OBSERVATION
The S32K148 is the only member of the 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 user must follow an specific resistor configuration The default configuration of the board is to be used for ethernet communication
CHANGE 0Ω CONFIGURATION RESISTORS TO REUSE BETWEEN ENET AND QUADSPI
For S32K148 T-BOX RDB some ENET and QuadSPI data lines are shared from the MCU each interface is separated by two 0 Ω resistors
By default the ENET data lines are enabled
User can change the 0Ω configuration resistors to enable and use QuadSPI
S32K148 shared PIN Configuration resistor Description
PTD7 R161 (Default) ENET MII_RMII_TXD1
R162 QuadSPI QSPI_A_IO1
PTC2 R177(Default) ENET MII_RMII_TXD0
R178 QuadSPI QSPI_A_IO3
PTC3 R196 (Default) ENET MII_TX_ER
R203 QuadSPI QSPI_A_CS
PTD10 R178 (Default) ENET MII_RX_CLK
R179 QuadSPI QSPI_A_SCK
PTD11 R194 (Default) ENET MII_RMII_TX_CLK
R195 QuadSPI QSPI_A_IO0
PTD12 R190 (Default) ENET MII_RMII_TX_EN
R192 QuadSPI QSPI_A_IO2
10
S32K148-T-BOX RDB Out-of-the-Box SetupPOWER UP THE BOARD AND DEBUGGER CONNECTION
The S32K148 T-BOX RDB powers from external +12V power supply via the 23-pin ECU connector with the wiring harness If no 23-pin ECU connector wiring harness available the board be powered by J31-8 (GND) and J31-1 (+12V)
Note There is no embedded debugger (eg OpenSDA) on the RDB so debug is done using PEMicro U-MultilinkFX through J12 with a mini-20 pin cable on debuggerrsquos port F
After power on the D10 D11 and D12 on the left up corner of the board will light on
With Connecting the U-Multilink debugger to PC its USB and TGTPWR LED will be lighted on
USB Cable to PC
DC - 12 Vpower supply
S32K148 T-BOX RDB SETUP CONNECTION
11
Use the BSP test project
STEP 1 DOWNLOAD amp INSTALL S32DS FOR ARM V2018R1 AND S32K SDK RTM 200
Download S32DS for ARM v2018R1 from the following link
httpwwwnxpcomS32DS
ndash The download will require a NXP account login user can register the account with any e-mail and after download you can install S32DS IDE with a 32-bit active code received by the e-mail when download
Download and install the S32K SDK RTM 200
ndash S32 Design Studio for Armreg 2018R1 Update 6 SDK S32K14x RTM v200 (REV UP6)
Any questions please refer to the following NXP technical community for help
httpscommunitynxpcomdocsDOC-335302
STEP 2 IMPORT AND COMPILE THE BSP TEST PROJECT (1)
Open S32DS for ARM v2018R1 IDE select File gt Import Select General gt Existing Projects into Workspace gt Next
12
STEP 2 IMPORT AND COMPILE THE BSP TEST PROJECT (2)
Select archive file gt Browse browse and choose S32K148_Based_T_BOX_BSP_TestPrj_SDK_RTM2_0zip select the project gt Finish
After importing the project clean it at first select the project in Project Explorer then right-click choose Clean Project
13
STEP 2 IMPORT AND COMPILE THE BSP TEST PROJECT (3)
Select the project in Project Explorer then right-click choose Build Project
The compile result is as below if no errors are found
14
STEP 3 DOWNLOAD AND DEBUG THE BSP TEST PROJECT
Select the project in Project Explorer then right-click choose Debug As gt Debug Configuration
In the Debug Configuration window select the GDB PEMicro Interface Debugging gt S32K148_Based_T_BOX_BSP_TestPrj_SDK_RTM2_0_DebuggtDebuggergtunder Interface select right debugger and ensure Port has the right part number then in Additional Options check Emergency Kinetis Device Recovery by Full Chip Erase and Use SWD protocol (if not check this option it will use JTAG debug protocol) at last click Debug to launch the debug(it will download the compile resultmdashelf file in to the target MCU at first)
15
STEP 4 CONNECT THE UART CONSOLE FOR TEST RESULT OUTPUT DISPLAY
The BSP test project use S32K148 LPUART2 to output the test result
Use a USB-to-UART adapter to connect the board with PC via J25-6(TXD) J25-7(RXD) and J25-12(GND)
For more details on the test results description and demo projects please refer to the Software User Guide
Open a UART console(eg Serial Port Utility) on PC configure its serial communication format as the following
ndash Data rate 115200 bauds
ndash Data Bits 8
ndash Parity None
ndash Stop Bits 1
ndash Flow Control OFF
Then you can see the test result output as below
16
RDB Software package overview
OTHER DEMO PROJECTS
Besides of the BSP test project which includes the SDK API based LLD of GPS module BLE module MMA8452Q PCA85063ATT 3x FlexCAN 3x LPUART communication 2x HS(PWM) 2x user bottom GPIO IRQ interrupt RGB LED 2x input capture 2x external analog input 2x Touch Sense PAD and etc
The SW package also provides the following demo projects
ndash QSPI Flash test project
ndash LwIP based ENET and TJA1101 TCPIP severclient communication demo project
ndash LIN stack based Single board LIN master and slave communication demo project
ndash I2S audio codecmdashSGTL500 demo project
ndash T-BOX reference design project
For more details please refer to the S32K148 T-BOX_GP-ECU RDB SW user guide and download the SW package
17
Create a New Project in S32 Design StudioCREATE NEW PROJECT FIRST TIME ndash SELECT A WORKSPACE
Start program Click on ldquoS32 Design Studio for ARM v10rdquo icon
Select workspace
ndash Choose default (see below example) or specify new one
ndash Suggestion Uncheck the box ldquoUse this as the default and do not ask againrdquo
ndash Click OK
CREATE NEW PROJECT TOP MENU SELECTION
File ndash New ndashProject
18
CREATE NEW PROJECT S32DS PROJECT
Project Name
ndash Example FirstProject
Project Type
ndash Select from inside executable or library folder
Next
Select Debugger Support and Library Support
Click Finish
19
OPENSDA CONFIGURATION
To Debug your project with OpenSDA it is necessary to select the OpenSDA in the Debug Configuration
Select your project and click on debug configuration
Select the Debug configuration under GDB PEMicro Interface Debugging
Click on Debugger tab
Select OpenSDA as the interface if your board is plugged should appear in the Port field
Click Apply and debug to finish
20
Debug Basics
DEBUG BASICS STARTING THE DEBUGGER
Debug configuration is only required once Subsequent starting of debugger does not require those steps
Three options to start debugger
ndash If the ldquoDebug Configurationrdquo has not been closed click on ldquoDebugrdquo button on bottom right
ndash Select Run ndash Debug (or hit F11)
Note This method currently selects the desktop target (projectelf) and gives an error Do not use until this is changed
Recommended Method Click on pull down arrow for bug icon and select hellip_debugelf target
DEBUG BASICS STEP RUN SUSPEND RESUME
Step Into (F5)
Step Over (F6)
Step Return (F7)
Run
Suspend
Resume (F8)
21
DEBUG BASICS VIEW amp ALTER VARIABLES
View variables in ldquoVariablesrdquo tab
Click on a value to allow typing in a different value
DEBUG BASICS VIEW AND ALTER REGISTERS
View CPU registers in the ldquoRegistersrdquo tab
Click on a value to allow typing in a different value
View peripheral registers in the EmbSys Registers tab
DEBUG BASICS VIEW AND ALTER MEMORY
Add Memory Monitor
Select Base Address to Start at 40000000
View Memory
22
DEBUG BASICS BREAKPOINTS
Add Breakpoint Point and Click
Light blue dot represents debugger breakpoint
DEBUG BASICS RESET amp TERMINATE DEBUG SESSION
Reset program counter
Terminate Ctl+F2()
23
Create a PampE Debug Configuration (Optional)
NEW PampE DEBUG CONFIGURATION
Click in debug configurations
Create a new PampE launch configuration
Select S32K144 device
Click Apply and debug your application
wwwnxpcomS32K148-T-BOX
NXP and the NXP logo are trademarks of NXP BV All other product or service names are the property of their respective owners copy 2019 NXP BV
Document Number S32K148TBOXEFS REV 0
7
23-PIN ECU CONNECTOR SIGNAL ROUTING AND WIRING HARNESS
The 23-pin ECU connector routing communication and external IO signals including
ndash 2x ADC input channels
ndash 2x HS PWM output channels
ndash 2x PWM input capture channels
ndash 3x CAN bus
ndash 2x LIN bus
ndash 1x 100M-base TX1 automotive ethernet
ndash +12V VBAT power supply input
ndash +5V power supply output for external devices
The 23-pin ECU connector enables the board to work as GP-ECU easily
The 23-pin ECU connector matched wiring harness with signal labels as below photo
It is not included in S32K148 T-BOX RDB please contact NXP sales for purchase
PIN Signal Wire colorWire gauge
(conductor CSAmm2)description
1 VBAT red 125 12V max 5A
2 CAN1H yellow 05 CAN bus 1 differential signal+
3 CAN2H yellow 05 CAN bus 2 differential signal+
4 ECU_EXT_HS1 green 05 ECU High Side driver output 1
5 CAN0H yellow 05 CAN bus 0 differential signal+
6 ECU_EXT_ADC1 blue 05 ECU external analog input 1
7 ECU_EXT_ADC2 blue 05 ECU external analog input 2
8 GND black 125 Powersignal ground
9 VBAT red 125 12V max 5A
10 ECU_EXT_LIN1 white 05 LIN bus 1
11 ECU_EXT_LIN2 white 05 LIN bus 2
12 SBC_HVIO5 orange 05 SBC HVIO5
13 ECU_EXT_PWM2 purple 05 PWM input channel 2
14 ECU_EXT_PWM1 purple 05 PWM input channel 1
15 ECU_EXT_5V red 075 5V power supply for ECU external devicemax100mA
16 GND black 125 Powersignal ground
17 CANL1 pink 05 CAN bus 1 differential signal-
18 CANL2 pink 05 CAN bus 2 differential signal-
19 ECU_EXT_HS2 green 05 ECU High Side driver output 2
20 CANL0 pink 05 CAN bus 0 differential signal-
21 GND black 125 Signal ground
22 ENET_TRX_P green 05100M-base TX1 automotive ethernet differential signal+
UTP
23 ENET_TRX_N orange 05100M-base TX1 automotive ethernet differential signal -
UTP
8
JUMPER SETTINGS (POWER SUPPLY)
JUMPER SETTINGS (LIN AND RTC CLOCK CONFIGURATION)
Jumper Configuration Description
J21-2 (Default) The 33V supply powered from VBAT(+12V)
2-3 The 33V supply powered from P5V0(5V)
J81-2 (Default) The P5V0 supply powered from SBC output
2-3 Not use no power source(NC on J8-3)
J91-2 (Default) The VDD supply powered from P3V3_SW(33V)
2-3 The VDD supply powered from P5V0(5V)
J291-2 (Default) VCAN_SBC supply powered from P5V0_V1SBC
2-3 VCAN_SBC supply powered from PVEXT_SBC
J11 1-2 (Default)Itrsquos connected between VDD and VDD_MCU and is designed for
S32K148 MCU low-power static current measurement for this case R77 needs to be unmounted
The jumper connection schematic is as below details can be found in the board schematic
Jumper Configuration Description
J32short (Default) Enable the LIN bus 1 pullup to work as a master node
open The LIN bus 1 is working as a slave node
J33short (Default) Enable the LIN bus 2 pullup to work as a master node
open The LIN bus 2 is working as a slave node
J34
1-2 (Default) External active 32768KHz oscillator for RTC is powered by VDD_MCU
2-3 External active 32768KHz oscillator for RTC is powered by VDD_MCU_PERH
External active 32768 KHz oscillator for RTC schematic is as right details can be found in the board schematic and HW UG
9
USING ETHERNET AND QSPI
IMPORTANT OBSERVATION
The S32K148 is the only member of the 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 user must follow an specific resistor configuration The default configuration of the board is to be used for ethernet communication
CHANGE 0Ω CONFIGURATION RESISTORS TO REUSE BETWEEN ENET AND QUADSPI
For S32K148 T-BOX RDB some ENET and QuadSPI data lines are shared from the MCU each interface is separated by two 0 Ω resistors
By default the ENET data lines are enabled
User can change the 0Ω configuration resistors to enable and use QuadSPI
S32K148 shared PIN Configuration resistor Description
PTD7 R161 (Default) ENET MII_RMII_TXD1
R162 QuadSPI QSPI_A_IO1
PTC2 R177(Default) ENET MII_RMII_TXD0
R178 QuadSPI QSPI_A_IO3
PTC3 R196 (Default) ENET MII_TX_ER
R203 QuadSPI QSPI_A_CS
PTD10 R178 (Default) ENET MII_RX_CLK
R179 QuadSPI QSPI_A_SCK
PTD11 R194 (Default) ENET MII_RMII_TX_CLK
R195 QuadSPI QSPI_A_IO0
PTD12 R190 (Default) ENET MII_RMII_TX_EN
R192 QuadSPI QSPI_A_IO2
10
S32K148-T-BOX RDB Out-of-the-Box SetupPOWER UP THE BOARD AND DEBUGGER CONNECTION
The S32K148 T-BOX RDB powers from external +12V power supply via the 23-pin ECU connector with the wiring harness If no 23-pin ECU connector wiring harness available the board be powered by J31-8 (GND) and J31-1 (+12V)
Note There is no embedded debugger (eg OpenSDA) on the RDB so debug is done using PEMicro U-MultilinkFX through J12 with a mini-20 pin cable on debuggerrsquos port F
After power on the D10 D11 and D12 on the left up corner of the board will light on
With Connecting the U-Multilink debugger to PC its USB and TGTPWR LED will be lighted on
USB Cable to PC
DC - 12 Vpower supply
S32K148 T-BOX RDB SETUP CONNECTION
11
Use the BSP test project
STEP 1 DOWNLOAD amp INSTALL S32DS FOR ARM V2018R1 AND S32K SDK RTM 200
Download S32DS for ARM v2018R1 from the following link
httpwwwnxpcomS32DS
ndash The download will require a NXP account login user can register the account with any e-mail and after download you can install S32DS IDE with a 32-bit active code received by the e-mail when download
Download and install the S32K SDK RTM 200
ndash S32 Design Studio for Armreg 2018R1 Update 6 SDK S32K14x RTM v200 (REV UP6)
Any questions please refer to the following NXP technical community for help
httpscommunitynxpcomdocsDOC-335302
STEP 2 IMPORT AND COMPILE THE BSP TEST PROJECT (1)
Open S32DS for ARM v2018R1 IDE select File gt Import Select General gt Existing Projects into Workspace gt Next
12
STEP 2 IMPORT AND COMPILE THE BSP TEST PROJECT (2)
Select archive file gt Browse browse and choose S32K148_Based_T_BOX_BSP_TestPrj_SDK_RTM2_0zip select the project gt Finish
After importing the project clean it at first select the project in Project Explorer then right-click choose Clean Project
13
STEP 2 IMPORT AND COMPILE THE BSP TEST PROJECT (3)
Select the project in Project Explorer then right-click choose Build Project
The compile result is as below if no errors are found
14
STEP 3 DOWNLOAD AND DEBUG THE BSP TEST PROJECT
Select the project in Project Explorer then right-click choose Debug As gt Debug Configuration
In the Debug Configuration window select the GDB PEMicro Interface Debugging gt S32K148_Based_T_BOX_BSP_TestPrj_SDK_RTM2_0_DebuggtDebuggergtunder Interface select right debugger and ensure Port has the right part number then in Additional Options check Emergency Kinetis Device Recovery by Full Chip Erase and Use SWD protocol (if not check this option it will use JTAG debug protocol) at last click Debug to launch the debug(it will download the compile resultmdashelf file in to the target MCU at first)
15
STEP 4 CONNECT THE UART CONSOLE FOR TEST RESULT OUTPUT DISPLAY
The BSP test project use S32K148 LPUART2 to output the test result
Use a USB-to-UART adapter to connect the board with PC via J25-6(TXD) J25-7(RXD) and J25-12(GND)
For more details on the test results description and demo projects please refer to the Software User Guide
Open a UART console(eg Serial Port Utility) on PC configure its serial communication format as the following
ndash Data rate 115200 bauds
ndash Data Bits 8
ndash Parity None
ndash Stop Bits 1
ndash Flow Control OFF
Then you can see the test result output as below
16
RDB Software package overview
OTHER DEMO PROJECTS
Besides of the BSP test project which includes the SDK API based LLD of GPS module BLE module MMA8452Q PCA85063ATT 3x FlexCAN 3x LPUART communication 2x HS(PWM) 2x user bottom GPIO IRQ interrupt RGB LED 2x input capture 2x external analog input 2x Touch Sense PAD and etc
The SW package also provides the following demo projects
ndash QSPI Flash test project
ndash LwIP based ENET and TJA1101 TCPIP severclient communication demo project
ndash LIN stack based Single board LIN master and slave communication demo project
ndash I2S audio codecmdashSGTL500 demo project
ndash T-BOX reference design project
For more details please refer to the S32K148 T-BOX_GP-ECU RDB SW user guide and download the SW package
17
Create a New Project in S32 Design StudioCREATE NEW PROJECT FIRST TIME ndash SELECT A WORKSPACE
Start program Click on ldquoS32 Design Studio for ARM v10rdquo icon
Select workspace
ndash Choose default (see below example) or specify new one
ndash Suggestion Uncheck the box ldquoUse this as the default and do not ask againrdquo
ndash Click OK
CREATE NEW PROJECT TOP MENU SELECTION
File ndash New ndashProject
18
CREATE NEW PROJECT S32DS PROJECT
Project Name
ndash Example FirstProject
Project Type
ndash Select from inside executable or library folder
Next
Select Debugger Support and Library Support
Click Finish
19
OPENSDA CONFIGURATION
To Debug your project with OpenSDA it is necessary to select the OpenSDA in the Debug Configuration
Select your project and click on debug configuration
Select the Debug configuration under GDB PEMicro Interface Debugging
Click on Debugger tab
Select OpenSDA as the interface if your board is plugged should appear in the Port field
Click Apply and debug to finish
20
Debug Basics
DEBUG BASICS STARTING THE DEBUGGER
Debug configuration is only required once Subsequent starting of debugger does not require those steps
Three options to start debugger
ndash If the ldquoDebug Configurationrdquo has not been closed click on ldquoDebugrdquo button on bottom right
ndash Select Run ndash Debug (or hit F11)
Note This method currently selects the desktop target (projectelf) and gives an error Do not use until this is changed
Recommended Method Click on pull down arrow for bug icon and select hellip_debugelf target
DEBUG BASICS STEP RUN SUSPEND RESUME
Step Into (F5)
Step Over (F6)
Step Return (F7)
Run
Suspend
Resume (F8)
21
DEBUG BASICS VIEW amp ALTER VARIABLES
View variables in ldquoVariablesrdquo tab
Click on a value to allow typing in a different value
DEBUG BASICS VIEW AND ALTER REGISTERS
View CPU registers in the ldquoRegistersrdquo tab
Click on a value to allow typing in a different value
View peripheral registers in the EmbSys Registers tab
DEBUG BASICS VIEW AND ALTER MEMORY
Add Memory Monitor
Select Base Address to Start at 40000000
View Memory
22
DEBUG BASICS BREAKPOINTS
Add Breakpoint Point and Click
Light blue dot represents debugger breakpoint
DEBUG BASICS RESET amp TERMINATE DEBUG SESSION
Reset program counter
Terminate Ctl+F2()
23
Create a PampE Debug Configuration (Optional)
NEW PampE DEBUG CONFIGURATION
Click in debug configurations
Create a new PampE launch configuration
Select S32K144 device
Click Apply and debug your application
wwwnxpcomS32K148-T-BOX
NXP and the NXP logo are trademarks of NXP BV All other product or service names are the property of their respective owners copy 2019 NXP BV
Document Number S32K148TBOXEFS REV 0
8
JUMPER SETTINGS (POWER SUPPLY)
JUMPER SETTINGS (LIN AND RTC CLOCK CONFIGURATION)
Jumper Configuration Description
J21-2 (Default) The 33V supply powered from VBAT(+12V)
2-3 The 33V supply powered from P5V0(5V)
J81-2 (Default) The P5V0 supply powered from SBC output
2-3 Not use no power source(NC on J8-3)
J91-2 (Default) The VDD supply powered from P3V3_SW(33V)
2-3 The VDD supply powered from P5V0(5V)
J291-2 (Default) VCAN_SBC supply powered from P5V0_V1SBC
2-3 VCAN_SBC supply powered from PVEXT_SBC
J11 1-2 (Default)Itrsquos connected between VDD and VDD_MCU and is designed for
S32K148 MCU low-power static current measurement for this case R77 needs to be unmounted
The jumper connection schematic is as below details can be found in the board schematic
Jumper Configuration Description
J32short (Default) Enable the LIN bus 1 pullup to work as a master node
open The LIN bus 1 is working as a slave node
J33short (Default) Enable the LIN bus 2 pullup to work as a master node
open The LIN bus 2 is working as a slave node
J34
1-2 (Default) External active 32768KHz oscillator for RTC is powered by VDD_MCU
2-3 External active 32768KHz oscillator for RTC is powered by VDD_MCU_PERH
External active 32768 KHz oscillator for RTC schematic is as right details can be found in the board schematic and HW UG
9
USING ETHERNET AND QSPI
IMPORTANT OBSERVATION
The S32K148 is the only member of the 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 user must follow an specific resistor configuration The default configuration of the board is to be used for ethernet communication
CHANGE 0Ω CONFIGURATION RESISTORS TO REUSE BETWEEN ENET AND QUADSPI
For S32K148 T-BOX RDB some ENET and QuadSPI data lines are shared from the MCU each interface is separated by two 0 Ω resistors
By default the ENET data lines are enabled
User can change the 0Ω configuration resistors to enable and use QuadSPI
S32K148 shared PIN Configuration resistor Description
PTD7 R161 (Default) ENET MII_RMII_TXD1
R162 QuadSPI QSPI_A_IO1
PTC2 R177(Default) ENET MII_RMII_TXD0
R178 QuadSPI QSPI_A_IO3
PTC3 R196 (Default) ENET MII_TX_ER
R203 QuadSPI QSPI_A_CS
PTD10 R178 (Default) ENET MII_RX_CLK
R179 QuadSPI QSPI_A_SCK
PTD11 R194 (Default) ENET MII_RMII_TX_CLK
R195 QuadSPI QSPI_A_IO0
PTD12 R190 (Default) ENET MII_RMII_TX_EN
R192 QuadSPI QSPI_A_IO2
10
S32K148-T-BOX RDB Out-of-the-Box SetupPOWER UP THE BOARD AND DEBUGGER CONNECTION
The S32K148 T-BOX RDB powers from external +12V power supply via the 23-pin ECU connector with the wiring harness If no 23-pin ECU connector wiring harness available the board be powered by J31-8 (GND) and J31-1 (+12V)
Note There is no embedded debugger (eg OpenSDA) on the RDB so debug is done using PEMicro U-MultilinkFX through J12 with a mini-20 pin cable on debuggerrsquos port F
After power on the D10 D11 and D12 on the left up corner of the board will light on
With Connecting the U-Multilink debugger to PC its USB and TGTPWR LED will be lighted on
USB Cable to PC
DC - 12 Vpower supply
S32K148 T-BOX RDB SETUP CONNECTION
11
Use the BSP test project
STEP 1 DOWNLOAD amp INSTALL S32DS FOR ARM V2018R1 AND S32K SDK RTM 200
Download S32DS for ARM v2018R1 from the following link
httpwwwnxpcomS32DS
ndash The download will require a NXP account login user can register the account with any e-mail and after download you can install S32DS IDE with a 32-bit active code received by the e-mail when download
Download and install the S32K SDK RTM 200
ndash S32 Design Studio for Armreg 2018R1 Update 6 SDK S32K14x RTM v200 (REV UP6)
Any questions please refer to the following NXP technical community for help
httpscommunitynxpcomdocsDOC-335302
STEP 2 IMPORT AND COMPILE THE BSP TEST PROJECT (1)
Open S32DS for ARM v2018R1 IDE select File gt Import Select General gt Existing Projects into Workspace gt Next
12
STEP 2 IMPORT AND COMPILE THE BSP TEST PROJECT (2)
Select archive file gt Browse browse and choose S32K148_Based_T_BOX_BSP_TestPrj_SDK_RTM2_0zip select the project gt Finish
After importing the project clean it at first select the project in Project Explorer then right-click choose Clean Project
13
STEP 2 IMPORT AND COMPILE THE BSP TEST PROJECT (3)
Select the project in Project Explorer then right-click choose Build Project
The compile result is as below if no errors are found
14
STEP 3 DOWNLOAD AND DEBUG THE BSP TEST PROJECT
Select the project in Project Explorer then right-click choose Debug As gt Debug Configuration
In the Debug Configuration window select the GDB PEMicro Interface Debugging gt S32K148_Based_T_BOX_BSP_TestPrj_SDK_RTM2_0_DebuggtDebuggergtunder Interface select right debugger and ensure Port has the right part number then in Additional Options check Emergency Kinetis Device Recovery by Full Chip Erase and Use SWD protocol (if not check this option it will use JTAG debug protocol) at last click Debug to launch the debug(it will download the compile resultmdashelf file in to the target MCU at first)
15
STEP 4 CONNECT THE UART CONSOLE FOR TEST RESULT OUTPUT DISPLAY
The BSP test project use S32K148 LPUART2 to output the test result
Use a USB-to-UART adapter to connect the board with PC via J25-6(TXD) J25-7(RXD) and J25-12(GND)
For more details on the test results description and demo projects please refer to the Software User Guide
Open a UART console(eg Serial Port Utility) on PC configure its serial communication format as the following
ndash Data rate 115200 bauds
ndash Data Bits 8
ndash Parity None
ndash Stop Bits 1
ndash Flow Control OFF
Then you can see the test result output as below
16
RDB Software package overview
OTHER DEMO PROJECTS
Besides of the BSP test project which includes the SDK API based LLD of GPS module BLE module MMA8452Q PCA85063ATT 3x FlexCAN 3x LPUART communication 2x HS(PWM) 2x user bottom GPIO IRQ interrupt RGB LED 2x input capture 2x external analog input 2x Touch Sense PAD and etc
The SW package also provides the following demo projects
ndash QSPI Flash test project
ndash LwIP based ENET and TJA1101 TCPIP severclient communication demo project
ndash LIN stack based Single board LIN master and slave communication demo project
ndash I2S audio codecmdashSGTL500 demo project
ndash T-BOX reference design project
For more details please refer to the S32K148 T-BOX_GP-ECU RDB SW user guide and download the SW package
17
Create a New Project in S32 Design StudioCREATE NEW PROJECT FIRST TIME ndash SELECT A WORKSPACE
Start program Click on ldquoS32 Design Studio for ARM v10rdquo icon
Select workspace
ndash Choose default (see below example) or specify new one
ndash Suggestion Uncheck the box ldquoUse this as the default and do not ask againrdquo
ndash Click OK
CREATE NEW PROJECT TOP MENU SELECTION
File ndash New ndashProject
18
CREATE NEW PROJECT S32DS PROJECT
Project Name
ndash Example FirstProject
Project Type
ndash Select from inside executable or library folder
Next
Select Debugger Support and Library Support
Click Finish
19
OPENSDA CONFIGURATION
To Debug your project with OpenSDA it is necessary to select the OpenSDA in the Debug Configuration
Select your project and click on debug configuration
Select the Debug configuration under GDB PEMicro Interface Debugging
Click on Debugger tab
Select OpenSDA as the interface if your board is plugged should appear in the Port field
Click Apply and debug to finish
20
Debug Basics
DEBUG BASICS STARTING THE DEBUGGER
Debug configuration is only required once Subsequent starting of debugger does not require those steps
Three options to start debugger
ndash If the ldquoDebug Configurationrdquo has not been closed click on ldquoDebugrdquo button on bottom right
ndash Select Run ndash Debug (or hit F11)
Note This method currently selects the desktop target (projectelf) and gives an error Do not use until this is changed
Recommended Method Click on pull down arrow for bug icon and select hellip_debugelf target
DEBUG BASICS STEP RUN SUSPEND RESUME
Step Into (F5)
Step Over (F6)
Step Return (F7)
Run
Suspend
Resume (F8)
21
DEBUG BASICS VIEW amp ALTER VARIABLES
View variables in ldquoVariablesrdquo tab
Click on a value to allow typing in a different value
DEBUG BASICS VIEW AND ALTER REGISTERS
View CPU registers in the ldquoRegistersrdquo tab
Click on a value to allow typing in a different value
View peripheral registers in the EmbSys Registers tab
DEBUG BASICS VIEW AND ALTER MEMORY
Add Memory Monitor
Select Base Address to Start at 40000000
View Memory
22
DEBUG BASICS BREAKPOINTS
Add Breakpoint Point and Click
Light blue dot represents debugger breakpoint
DEBUG BASICS RESET amp TERMINATE DEBUG SESSION
Reset program counter
Terminate Ctl+F2()
23
Create a PampE Debug Configuration (Optional)
NEW PampE DEBUG CONFIGURATION
Click in debug configurations
Create a new PampE launch configuration
Select S32K144 device
Click Apply and debug your application
wwwnxpcomS32K148-T-BOX
NXP and the NXP logo are trademarks of NXP BV All other product or service names are the property of their respective owners copy 2019 NXP BV
Document Number S32K148TBOXEFS REV 0
9
USING ETHERNET AND QSPI
IMPORTANT OBSERVATION
The S32K148 is the only member of the 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 user must follow an specific resistor configuration The default configuration of the board is to be used for ethernet communication
CHANGE 0Ω CONFIGURATION RESISTORS TO REUSE BETWEEN ENET AND QUADSPI
For S32K148 T-BOX RDB some ENET and QuadSPI data lines are shared from the MCU each interface is separated by two 0 Ω resistors
By default the ENET data lines are enabled
User can change the 0Ω configuration resistors to enable and use QuadSPI
S32K148 shared PIN Configuration resistor Description
PTD7 R161 (Default) ENET MII_RMII_TXD1
R162 QuadSPI QSPI_A_IO1
PTC2 R177(Default) ENET MII_RMII_TXD0
R178 QuadSPI QSPI_A_IO3
PTC3 R196 (Default) ENET MII_TX_ER
R203 QuadSPI QSPI_A_CS
PTD10 R178 (Default) ENET MII_RX_CLK
R179 QuadSPI QSPI_A_SCK
PTD11 R194 (Default) ENET MII_RMII_TX_CLK
R195 QuadSPI QSPI_A_IO0
PTD12 R190 (Default) ENET MII_RMII_TX_EN
R192 QuadSPI QSPI_A_IO2
10
S32K148-T-BOX RDB Out-of-the-Box SetupPOWER UP THE BOARD AND DEBUGGER CONNECTION
The S32K148 T-BOX RDB powers from external +12V power supply via the 23-pin ECU connector with the wiring harness If no 23-pin ECU connector wiring harness available the board be powered by J31-8 (GND) and J31-1 (+12V)
Note There is no embedded debugger (eg OpenSDA) on the RDB so debug is done using PEMicro U-MultilinkFX through J12 with a mini-20 pin cable on debuggerrsquos port F
After power on the D10 D11 and D12 on the left up corner of the board will light on
With Connecting the U-Multilink debugger to PC its USB and TGTPWR LED will be lighted on
USB Cable to PC
DC - 12 Vpower supply
S32K148 T-BOX RDB SETUP CONNECTION
11
Use the BSP test project
STEP 1 DOWNLOAD amp INSTALL S32DS FOR ARM V2018R1 AND S32K SDK RTM 200
Download S32DS for ARM v2018R1 from the following link
httpwwwnxpcomS32DS
ndash The download will require a NXP account login user can register the account with any e-mail and after download you can install S32DS IDE with a 32-bit active code received by the e-mail when download
Download and install the S32K SDK RTM 200
ndash S32 Design Studio for Armreg 2018R1 Update 6 SDK S32K14x RTM v200 (REV UP6)
Any questions please refer to the following NXP technical community for help
httpscommunitynxpcomdocsDOC-335302
STEP 2 IMPORT AND COMPILE THE BSP TEST PROJECT (1)
Open S32DS for ARM v2018R1 IDE select File gt Import Select General gt Existing Projects into Workspace gt Next
12
STEP 2 IMPORT AND COMPILE THE BSP TEST PROJECT (2)
Select archive file gt Browse browse and choose S32K148_Based_T_BOX_BSP_TestPrj_SDK_RTM2_0zip select the project gt Finish
After importing the project clean it at first select the project in Project Explorer then right-click choose Clean Project
13
STEP 2 IMPORT AND COMPILE THE BSP TEST PROJECT (3)
Select the project in Project Explorer then right-click choose Build Project
The compile result is as below if no errors are found
14
STEP 3 DOWNLOAD AND DEBUG THE BSP TEST PROJECT
Select the project in Project Explorer then right-click choose Debug As gt Debug Configuration
In the Debug Configuration window select the GDB PEMicro Interface Debugging gt S32K148_Based_T_BOX_BSP_TestPrj_SDK_RTM2_0_DebuggtDebuggergtunder Interface select right debugger and ensure Port has the right part number then in Additional Options check Emergency Kinetis Device Recovery by Full Chip Erase and Use SWD protocol (if not check this option it will use JTAG debug protocol) at last click Debug to launch the debug(it will download the compile resultmdashelf file in to the target MCU at first)
15
STEP 4 CONNECT THE UART CONSOLE FOR TEST RESULT OUTPUT DISPLAY
The BSP test project use S32K148 LPUART2 to output the test result
Use a USB-to-UART adapter to connect the board with PC via J25-6(TXD) J25-7(RXD) and J25-12(GND)
For more details on the test results description and demo projects please refer to the Software User Guide
Open a UART console(eg Serial Port Utility) on PC configure its serial communication format as the following
ndash Data rate 115200 bauds
ndash Data Bits 8
ndash Parity None
ndash Stop Bits 1
ndash Flow Control OFF
Then you can see the test result output as below
16
RDB Software package overview
OTHER DEMO PROJECTS
Besides of the BSP test project which includes the SDK API based LLD of GPS module BLE module MMA8452Q PCA85063ATT 3x FlexCAN 3x LPUART communication 2x HS(PWM) 2x user bottom GPIO IRQ interrupt RGB LED 2x input capture 2x external analog input 2x Touch Sense PAD and etc
The SW package also provides the following demo projects
ndash QSPI Flash test project
ndash LwIP based ENET and TJA1101 TCPIP severclient communication demo project
ndash LIN stack based Single board LIN master and slave communication demo project
ndash I2S audio codecmdashSGTL500 demo project
ndash T-BOX reference design project
For more details please refer to the S32K148 T-BOX_GP-ECU RDB SW user guide and download the SW package
17
Create a New Project in S32 Design StudioCREATE NEW PROJECT FIRST TIME ndash SELECT A WORKSPACE
Start program Click on ldquoS32 Design Studio for ARM v10rdquo icon
Select workspace
ndash Choose default (see below example) or specify new one
ndash Suggestion Uncheck the box ldquoUse this as the default and do not ask againrdquo
ndash Click OK
CREATE NEW PROJECT TOP MENU SELECTION
File ndash New ndashProject
18
CREATE NEW PROJECT S32DS PROJECT
Project Name
ndash Example FirstProject
Project Type
ndash Select from inside executable or library folder
Next
Select Debugger Support and Library Support
Click Finish
19
OPENSDA CONFIGURATION
To Debug your project with OpenSDA it is necessary to select the OpenSDA in the Debug Configuration
Select your project and click on debug configuration
Select the Debug configuration under GDB PEMicro Interface Debugging
Click on Debugger tab
Select OpenSDA as the interface if your board is plugged should appear in the Port field
Click Apply and debug to finish
20
Debug Basics
DEBUG BASICS STARTING THE DEBUGGER
Debug configuration is only required once Subsequent starting of debugger does not require those steps
Three options to start debugger
ndash If the ldquoDebug Configurationrdquo has not been closed click on ldquoDebugrdquo button on bottom right
ndash Select Run ndash Debug (or hit F11)
Note This method currently selects the desktop target (projectelf) and gives an error Do not use until this is changed
Recommended Method Click on pull down arrow for bug icon and select hellip_debugelf target
DEBUG BASICS STEP RUN SUSPEND RESUME
Step Into (F5)
Step Over (F6)
Step Return (F7)
Run
Suspend
Resume (F8)
21
DEBUG BASICS VIEW amp ALTER VARIABLES
View variables in ldquoVariablesrdquo tab
Click on a value to allow typing in a different value
DEBUG BASICS VIEW AND ALTER REGISTERS
View CPU registers in the ldquoRegistersrdquo tab
Click on a value to allow typing in a different value
View peripheral registers in the EmbSys Registers tab
DEBUG BASICS VIEW AND ALTER MEMORY
Add Memory Monitor
Select Base Address to Start at 40000000
View Memory
22
DEBUG BASICS BREAKPOINTS
Add Breakpoint Point and Click
Light blue dot represents debugger breakpoint
DEBUG BASICS RESET amp TERMINATE DEBUG SESSION
Reset program counter
Terminate Ctl+F2()
23
Create a PampE Debug Configuration (Optional)
NEW PampE DEBUG CONFIGURATION
Click in debug configurations
Create a new PampE launch configuration
Select S32K144 device
Click Apply and debug your application
wwwnxpcomS32K148-T-BOX
NXP and the NXP logo are trademarks of NXP BV All other product or service names are the property of their respective owners copy 2019 NXP BV
Document Number S32K148TBOXEFS REV 0
10
S32K148-T-BOX RDB Out-of-the-Box SetupPOWER UP THE BOARD AND DEBUGGER CONNECTION
The S32K148 T-BOX RDB powers from external +12V power supply via the 23-pin ECU connector with the wiring harness If no 23-pin ECU connector wiring harness available the board be powered by J31-8 (GND) and J31-1 (+12V)
Note There is no embedded debugger (eg OpenSDA) on the RDB so debug is done using PEMicro U-MultilinkFX through J12 with a mini-20 pin cable on debuggerrsquos port F
After power on the D10 D11 and D12 on the left up corner of the board will light on
With Connecting the U-Multilink debugger to PC its USB and TGTPWR LED will be lighted on
USB Cable to PC
DC - 12 Vpower supply
S32K148 T-BOX RDB SETUP CONNECTION
11
Use the BSP test project
STEP 1 DOWNLOAD amp INSTALL S32DS FOR ARM V2018R1 AND S32K SDK RTM 200
Download S32DS for ARM v2018R1 from the following link
httpwwwnxpcomS32DS
ndash The download will require a NXP account login user can register the account with any e-mail and after download you can install S32DS IDE with a 32-bit active code received by the e-mail when download
Download and install the S32K SDK RTM 200
ndash S32 Design Studio for Armreg 2018R1 Update 6 SDK S32K14x RTM v200 (REV UP6)
Any questions please refer to the following NXP technical community for help
httpscommunitynxpcomdocsDOC-335302
STEP 2 IMPORT AND COMPILE THE BSP TEST PROJECT (1)
Open S32DS for ARM v2018R1 IDE select File gt Import Select General gt Existing Projects into Workspace gt Next
12
STEP 2 IMPORT AND COMPILE THE BSP TEST PROJECT (2)
Select archive file gt Browse browse and choose S32K148_Based_T_BOX_BSP_TestPrj_SDK_RTM2_0zip select the project gt Finish
After importing the project clean it at first select the project in Project Explorer then right-click choose Clean Project
13
STEP 2 IMPORT AND COMPILE THE BSP TEST PROJECT (3)
Select the project in Project Explorer then right-click choose Build Project
The compile result is as below if no errors are found
14
STEP 3 DOWNLOAD AND DEBUG THE BSP TEST PROJECT
Select the project in Project Explorer then right-click choose Debug As gt Debug Configuration
In the Debug Configuration window select the GDB PEMicro Interface Debugging gt S32K148_Based_T_BOX_BSP_TestPrj_SDK_RTM2_0_DebuggtDebuggergtunder Interface select right debugger and ensure Port has the right part number then in Additional Options check Emergency Kinetis Device Recovery by Full Chip Erase and Use SWD protocol (if not check this option it will use JTAG debug protocol) at last click Debug to launch the debug(it will download the compile resultmdashelf file in to the target MCU at first)
15
STEP 4 CONNECT THE UART CONSOLE FOR TEST RESULT OUTPUT DISPLAY
The BSP test project use S32K148 LPUART2 to output the test result
Use a USB-to-UART adapter to connect the board with PC via J25-6(TXD) J25-7(RXD) and J25-12(GND)
For more details on the test results description and demo projects please refer to the Software User Guide
Open a UART console(eg Serial Port Utility) on PC configure its serial communication format as the following
ndash Data rate 115200 bauds
ndash Data Bits 8
ndash Parity None
ndash Stop Bits 1
ndash Flow Control OFF
Then you can see the test result output as below
16
RDB Software package overview
OTHER DEMO PROJECTS
Besides of the BSP test project which includes the SDK API based LLD of GPS module BLE module MMA8452Q PCA85063ATT 3x FlexCAN 3x LPUART communication 2x HS(PWM) 2x user bottom GPIO IRQ interrupt RGB LED 2x input capture 2x external analog input 2x Touch Sense PAD and etc
The SW package also provides the following demo projects
ndash QSPI Flash test project
ndash LwIP based ENET and TJA1101 TCPIP severclient communication demo project
ndash LIN stack based Single board LIN master and slave communication demo project
ndash I2S audio codecmdashSGTL500 demo project
ndash T-BOX reference design project
For more details please refer to the S32K148 T-BOX_GP-ECU RDB SW user guide and download the SW package
17
Create a New Project in S32 Design StudioCREATE NEW PROJECT FIRST TIME ndash SELECT A WORKSPACE
Start program Click on ldquoS32 Design Studio for ARM v10rdquo icon
Select workspace
ndash Choose default (see below example) or specify new one
ndash Suggestion Uncheck the box ldquoUse this as the default and do not ask againrdquo
ndash Click OK
CREATE NEW PROJECT TOP MENU SELECTION
File ndash New ndashProject
18
CREATE NEW PROJECT S32DS PROJECT
Project Name
ndash Example FirstProject
Project Type
ndash Select from inside executable or library folder
Next
Select Debugger Support and Library Support
Click Finish
19
OPENSDA CONFIGURATION
To Debug your project with OpenSDA it is necessary to select the OpenSDA in the Debug Configuration
Select your project and click on debug configuration
Select the Debug configuration under GDB PEMicro Interface Debugging
Click on Debugger tab
Select OpenSDA as the interface if your board is plugged should appear in the Port field
Click Apply and debug to finish
20
Debug Basics
DEBUG BASICS STARTING THE DEBUGGER
Debug configuration is only required once Subsequent starting of debugger does not require those steps
Three options to start debugger
ndash If the ldquoDebug Configurationrdquo has not been closed click on ldquoDebugrdquo button on bottom right
ndash Select Run ndash Debug (or hit F11)
Note This method currently selects the desktop target (projectelf) and gives an error Do not use until this is changed
Recommended Method Click on pull down arrow for bug icon and select hellip_debugelf target
DEBUG BASICS STEP RUN SUSPEND RESUME
Step Into (F5)
Step Over (F6)
Step Return (F7)
Run
Suspend
Resume (F8)
21
DEBUG BASICS VIEW amp ALTER VARIABLES
View variables in ldquoVariablesrdquo tab
Click on a value to allow typing in a different value
DEBUG BASICS VIEW AND ALTER REGISTERS
View CPU registers in the ldquoRegistersrdquo tab
Click on a value to allow typing in a different value
View peripheral registers in the EmbSys Registers tab
DEBUG BASICS VIEW AND ALTER MEMORY
Add Memory Monitor
Select Base Address to Start at 40000000
View Memory
22
DEBUG BASICS BREAKPOINTS
Add Breakpoint Point and Click
Light blue dot represents debugger breakpoint
DEBUG BASICS RESET amp TERMINATE DEBUG SESSION
Reset program counter
Terminate Ctl+F2()
23
Create a PampE Debug Configuration (Optional)
NEW PampE DEBUG CONFIGURATION
Click in debug configurations
Create a new PampE launch configuration
Select S32K144 device
Click Apply and debug your application
wwwnxpcomS32K148-T-BOX
NXP and the NXP logo are trademarks of NXP BV All other product or service names are the property of their respective owners copy 2019 NXP BV
Document Number S32K148TBOXEFS REV 0
11
Use the BSP test project
STEP 1 DOWNLOAD amp INSTALL S32DS FOR ARM V2018R1 AND S32K SDK RTM 200
Download S32DS for ARM v2018R1 from the following link
httpwwwnxpcomS32DS
ndash The download will require a NXP account login user can register the account with any e-mail and after download you can install S32DS IDE with a 32-bit active code received by the e-mail when download
Download and install the S32K SDK RTM 200
ndash S32 Design Studio for Armreg 2018R1 Update 6 SDK S32K14x RTM v200 (REV UP6)
Any questions please refer to the following NXP technical community for help
httpscommunitynxpcomdocsDOC-335302
STEP 2 IMPORT AND COMPILE THE BSP TEST PROJECT (1)
Open S32DS for ARM v2018R1 IDE select File gt Import Select General gt Existing Projects into Workspace gt Next
12
STEP 2 IMPORT AND COMPILE THE BSP TEST PROJECT (2)
Select archive file gt Browse browse and choose S32K148_Based_T_BOX_BSP_TestPrj_SDK_RTM2_0zip select the project gt Finish
After importing the project clean it at first select the project in Project Explorer then right-click choose Clean Project
13
STEP 2 IMPORT AND COMPILE THE BSP TEST PROJECT (3)
Select the project in Project Explorer then right-click choose Build Project
The compile result is as below if no errors are found
14
STEP 3 DOWNLOAD AND DEBUG THE BSP TEST PROJECT
Select the project in Project Explorer then right-click choose Debug As gt Debug Configuration
In the Debug Configuration window select the GDB PEMicro Interface Debugging gt S32K148_Based_T_BOX_BSP_TestPrj_SDK_RTM2_0_DebuggtDebuggergtunder Interface select right debugger and ensure Port has the right part number then in Additional Options check Emergency Kinetis Device Recovery by Full Chip Erase and Use SWD protocol (if not check this option it will use JTAG debug protocol) at last click Debug to launch the debug(it will download the compile resultmdashelf file in to the target MCU at first)
15
STEP 4 CONNECT THE UART CONSOLE FOR TEST RESULT OUTPUT DISPLAY
The BSP test project use S32K148 LPUART2 to output the test result
Use a USB-to-UART adapter to connect the board with PC via J25-6(TXD) J25-7(RXD) and J25-12(GND)
For more details on the test results description and demo projects please refer to the Software User Guide
Open a UART console(eg Serial Port Utility) on PC configure its serial communication format as the following
ndash Data rate 115200 bauds
ndash Data Bits 8
ndash Parity None
ndash Stop Bits 1
ndash Flow Control OFF
Then you can see the test result output as below
16
RDB Software package overview
OTHER DEMO PROJECTS
Besides of the BSP test project which includes the SDK API based LLD of GPS module BLE module MMA8452Q PCA85063ATT 3x FlexCAN 3x LPUART communication 2x HS(PWM) 2x user bottom GPIO IRQ interrupt RGB LED 2x input capture 2x external analog input 2x Touch Sense PAD and etc
The SW package also provides the following demo projects
ndash QSPI Flash test project
ndash LwIP based ENET and TJA1101 TCPIP severclient communication demo project
ndash LIN stack based Single board LIN master and slave communication demo project
ndash I2S audio codecmdashSGTL500 demo project
ndash T-BOX reference design project
For more details please refer to the S32K148 T-BOX_GP-ECU RDB SW user guide and download the SW package
17
Create a New Project in S32 Design StudioCREATE NEW PROJECT FIRST TIME ndash SELECT A WORKSPACE
Start program Click on ldquoS32 Design Studio for ARM v10rdquo icon
Select workspace
ndash Choose default (see below example) or specify new one
ndash Suggestion Uncheck the box ldquoUse this as the default and do not ask againrdquo
ndash Click OK
CREATE NEW PROJECT TOP MENU SELECTION
File ndash New ndashProject
18
CREATE NEW PROJECT S32DS PROJECT
Project Name
ndash Example FirstProject
Project Type
ndash Select from inside executable or library folder
Next
Select Debugger Support and Library Support
Click Finish
19
OPENSDA CONFIGURATION
To Debug your project with OpenSDA it is necessary to select the OpenSDA in the Debug Configuration
Select your project and click on debug configuration
Select the Debug configuration under GDB PEMicro Interface Debugging
Click on Debugger tab
Select OpenSDA as the interface if your board is plugged should appear in the Port field
Click Apply and debug to finish
20
Debug Basics
DEBUG BASICS STARTING THE DEBUGGER
Debug configuration is only required once Subsequent starting of debugger does not require those steps
Three options to start debugger
ndash If the ldquoDebug Configurationrdquo has not been closed click on ldquoDebugrdquo button on bottom right
ndash Select Run ndash Debug (or hit F11)
Note This method currently selects the desktop target (projectelf) and gives an error Do not use until this is changed
Recommended Method Click on pull down arrow for bug icon and select hellip_debugelf target
DEBUG BASICS STEP RUN SUSPEND RESUME
Step Into (F5)
Step Over (F6)
Step Return (F7)
Run
Suspend
Resume (F8)
21
DEBUG BASICS VIEW amp ALTER VARIABLES
View variables in ldquoVariablesrdquo tab
Click on a value to allow typing in a different value
DEBUG BASICS VIEW AND ALTER REGISTERS
View CPU registers in the ldquoRegistersrdquo tab
Click on a value to allow typing in a different value
View peripheral registers in the EmbSys Registers tab
DEBUG BASICS VIEW AND ALTER MEMORY
Add Memory Monitor
Select Base Address to Start at 40000000
View Memory
22
DEBUG BASICS BREAKPOINTS
Add Breakpoint Point and Click
Light blue dot represents debugger breakpoint
DEBUG BASICS RESET amp TERMINATE DEBUG SESSION
Reset program counter
Terminate Ctl+F2()
23
Create a PampE Debug Configuration (Optional)
NEW PampE DEBUG CONFIGURATION
Click in debug configurations
Create a new PampE launch configuration
Select S32K144 device
Click Apply and debug your application
wwwnxpcomS32K148-T-BOX
NXP and the NXP logo are trademarks of NXP BV All other product or service names are the property of their respective owners copy 2019 NXP BV
Document Number S32K148TBOXEFS REV 0
12
STEP 2 IMPORT AND COMPILE THE BSP TEST PROJECT (2)
Select archive file gt Browse browse and choose S32K148_Based_T_BOX_BSP_TestPrj_SDK_RTM2_0zip select the project gt Finish
After importing the project clean it at first select the project in Project Explorer then right-click choose Clean Project
13
STEP 2 IMPORT AND COMPILE THE BSP TEST PROJECT (3)
Select the project in Project Explorer then right-click choose Build Project
The compile result is as below if no errors are found
14
STEP 3 DOWNLOAD AND DEBUG THE BSP TEST PROJECT
Select the project in Project Explorer then right-click choose Debug As gt Debug Configuration
In the Debug Configuration window select the GDB PEMicro Interface Debugging gt S32K148_Based_T_BOX_BSP_TestPrj_SDK_RTM2_0_DebuggtDebuggergtunder Interface select right debugger and ensure Port has the right part number then in Additional Options check Emergency Kinetis Device Recovery by Full Chip Erase and Use SWD protocol (if not check this option it will use JTAG debug protocol) at last click Debug to launch the debug(it will download the compile resultmdashelf file in to the target MCU at first)
15
STEP 4 CONNECT THE UART CONSOLE FOR TEST RESULT OUTPUT DISPLAY
The BSP test project use S32K148 LPUART2 to output the test result
Use a USB-to-UART adapter to connect the board with PC via J25-6(TXD) J25-7(RXD) and J25-12(GND)
For more details on the test results description and demo projects please refer to the Software User Guide
Open a UART console(eg Serial Port Utility) on PC configure its serial communication format as the following
ndash Data rate 115200 bauds
ndash Data Bits 8
ndash Parity None
ndash Stop Bits 1
ndash Flow Control OFF
Then you can see the test result output as below
16
RDB Software package overview
OTHER DEMO PROJECTS
Besides of the BSP test project which includes the SDK API based LLD of GPS module BLE module MMA8452Q PCA85063ATT 3x FlexCAN 3x LPUART communication 2x HS(PWM) 2x user bottom GPIO IRQ interrupt RGB LED 2x input capture 2x external analog input 2x Touch Sense PAD and etc
The SW package also provides the following demo projects
ndash QSPI Flash test project
ndash LwIP based ENET and TJA1101 TCPIP severclient communication demo project
ndash LIN stack based Single board LIN master and slave communication demo project
ndash I2S audio codecmdashSGTL500 demo project
ndash T-BOX reference design project
For more details please refer to the S32K148 T-BOX_GP-ECU RDB SW user guide and download the SW package
17
Create a New Project in S32 Design StudioCREATE NEW PROJECT FIRST TIME ndash SELECT A WORKSPACE
Start program Click on ldquoS32 Design Studio for ARM v10rdquo icon
Select workspace
ndash Choose default (see below example) or specify new one
ndash Suggestion Uncheck the box ldquoUse this as the default and do not ask againrdquo
ndash Click OK
CREATE NEW PROJECT TOP MENU SELECTION
File ndash New ndashProject
18
CREATE NEW PROJECT S32DS PROJECT
Project Name
ndash Example FirstProject
Project Type
ndash Select from inside executable or library folder
Next
Select Debugger Support and Library Support
Click Finish
19
OPENSDA CONFIGURATION
To Debug your project with OpenSDA it is necessary to select the OpenSDA in the Debug Configuration
Select your project and click on debug configuration
Select the Debug configuration under GDB PEMicro Interface Debugging
Click on Debugger tab
Select OpenSDA as the interface if your board is plugged should appear in the Port field
Click Apply and debug to finish
20
Debug Basics
DEBUG BASICS STARTING THE DEBUGGER
Debug configuration is only required once Subsequent starting of debugger does not require those steps
Three options to start debugger
ndash If the ldquoDebug Configurationrdquo has not been closed click on ldquoDebugrdquo button on bottom right
ndash Select Run ndash Debug (or hit F11)
Note This method currently selects the desktop target (projectelf) and gives an error Do not use until this is changed
Recommended Method Click on pull down arrow for bug icon and select hellip_debugelf target
DEBUG BASICS STEP RUN SUSPEND RESUME
Step Into (F5)
Step Over (F6)
Step Return (F7)
Run
Suspend
Resume (F8)
21
DEBUG BASICS VIEW amp ALTER VARIABLES
View variables in ldquoVariablesrdquo tab
Click on a value to allow typing in a different value
DEBUG BASICS VIEW AND ALTER REGISTERS
View CPU registers in the ldquoRegistersrdquo tab
Click on a value to allow typing in a different value
View peripheral registers in the EmbSys Registers tab
DEBUG BASICS VIEW AND ALTER MEMORY
Add Memory Monitor
Select Base Address to Start at 40000000
View Memory
22
DEBUG BASICS BREAKPOINTS
Add Breakpoint Point and Click
Light blue dot represents debugger breakpoint
DEBUG BASICS RESET amp TERMINATE DEBUG SESSION
Reset program counter
Terminate Ctl+F2()
23
Create a PampE Debug Configuration (Optional)
NEW PampE DEBUG CONFIGURATION
Click in debug configurations
Create a new PampE launch configuration
Select S32K144 device
Click Apply and debug your application
wwwnxpcomS32K148-T-BOX
NXP and the NXP logo are trademarks of NXP BV All other product or service names are the property of their respective owners copy 2019 NXP BV
Document Number S32K148TBOXEFS REV 0
13
STEP 2 IMPORT AND COMPILE THE BSP TEST PROJECT (3)
Select the project in Project Explorer then right-click choose Build Project
The compile result is as below if no errors are found
14
STEP 3 DOWNLOAD AND DEBUG THE BSP TEST PROJECT
Select the project in Project Explorer then right-click choose Debug As gt Debug Configuration
In the Debug Configuration window select the GDB PEMicro Interface Debugging gt S32K148_Based_T_BOX_BSP_TestPrj_SDK_RTM2_0_DebuggtDebuggergtunder Interface select right debugger and ensure Port has the right part number then in Additional Options check Emergency Kinetis Device Recovery by Full Chip Erase and Use SWD protocol (if not check this option it will use JTAG debug protocol) at last click Debug to launch the debug(it will download the compile resultmdashelf file in to the target MCU at first)
15
STEP 4 CONNECT THE UART CONSOLE FOR TEST RESULT OUTPUT DISPLAY
The BSP test project use S32K148 LPUART2 to output the test result
Use a USB-to-UART adapter to connect the board with PC via J25-6(TXD) J25-7(RXD) and J25-12(GND)
For more details on the test results description and demo projects please refer to the Software User Guide
Open a UART console(eg Serial Port Utility) on PC configure its serial communication format as the following
ndash Data rate 115200 bauds
ndash Data Bits 8
ndash Parity None
ndash Stop Bits 1
ndash Flow Control OFF
Then you can see the test result output as below
16
RDB Software package overview
OTHER DEMO PROJECTS
Besides of the BSP test project which includes the SDK API based LLD of GPS module BLE module MMA8452Q PCA85063ATT 3x FlexCAN 3x LPUART communication 2x HS(PWM) 2x user bottom GPIO IRQ interrupt RGB LED 2x input capture 2x external analog input 2x Touch Sense PAD and etc
The SW package also provides the following demo projects
ndash QSPI Flash test project
ndash LwIP based ENET and TJA1101 TCPIP severclient communication demo project
ndash LIN stack based Single board LIN master and slave communication demo project
ndash I2S audio codecmdashSGTL500 demo project
ndash T-BOX reference design project
For more details please refer to the S32K148 T-BOX_GP-ECU RDB SW user guide and download the SW package
17
Create a New Project in S32 Design StudioCREATE NEW PROJECT FIRST TIME ndash SELECT A WORKSPACE
Start program Click on ldquoS32 Design Studio for ARM v10rdquo icon
Select workspace
ndash Choose default (see below example) or specify new one
ndash Suggestion Uncheck the box ldquoUse this as the default and do not ask againrdquo
ndash Click OK
CREATE NEW PROJECT TOP MENU SELECTION
File ndash New ndashProject
18
CREATE NEW PROJECT S32DS PROJECT
Project Name
ndash Example FirstProject
Project Type
ndash Select from inside executable or library folder
Next
Select Debugger Support and Library Support
Click Finish
19
OPENSDA CONFIGURATION
To Debug your project with OpenSDA it is necessary to select the OpenSDA in the Debug Configuration
Select your project and click on debug configuration
Select the Debug configuration under GDB PEMicro Interface Debugging
Click on Debugger tab
Select OpenSDA as the interface if your board is plugged should appear in the Port field
Click Apply and debug to finish
20
Debug Basics
DEBUG BASICS STARTING THE DEBUGGER
Debug configuration is only required once Subsequent starting of debugger does not require those steps
Three options to start debugger
ndash If the ldquoDebug Configurationrdquo has not been closed click on ldquoDebugrdquo button on bottom right
ndash Select Run ndash Debug (or hit F11)
Note This method currently selects the desktop target (projectelf) and gives an error Do not use until this is changed
Recommended Method Click on pull down arrow for bug icon and select hellip_debugelf target
DEBUG BASICS STEP RUN SUSPEND RESUME
Step Into (F5)
Step Over (F6)
Step Return (F7)
Run
Suspend
Resume (F8)
21
DEBUG BASICS VIEW amp ALTER VARIABLES
View variables in ldquoVariablesrdquo tab
Click on a value to allow typing in a different value
DEBUG BASICS VIEW AND ALTER REGISTERS
View CPU registers in the ldquoRegistersrdquo tab
Click on a value to allow typing in a different value
View peripheral registers in the EmbSys Registers tab
DEBUG BASICS VIEW AND ALTER MEMORY
Add Memory Monitor
Select Base Address to Start at 40000000
View Memory
22
DEBUG BASICS BREAKPOINTS
Add Breakpoint Point and Click
Light blue dot represents debugger breakpoint
DEBUG BASICS RESET amp TERMINATE DEBUG SESSION
Reset program counter
Terminate Ctl+F2()
23
Create a PampE Debug Configuration (Optional)
NEW PampE DEBUG CONFIGURATION
Click in debug configurations
Create a new PampE launch configuration
Select S32K144 device
Click Apply and debug your application
wwwnxpcomS32K148-T-BOX
NXP and the NXP logo are trademarks of NXP BV All other product or service names are the property of their respective owners copy 2019 NXP BV
Document Number S32K148TBOXEFS REV 0
14
STEP 3 DOWNLOAD AND DEBUG THE BSP TEST PROJECT
Select the project in Project Explorer then right-click choose Debug As gt Debug Configuration
In the Debug Configuration window select the GDB PEMicro Interface Debugging gt S32K148_Based_T_BOX_BSP_TestPrj_SDK_RTM2_0_DebuggtDebuggergtunder Interface select right debugger and ensure Port has the right part number then in Additional Options check Emergency Kinetis Device Recovery by Full Chip Erase and Use SWD protocol (if not check this option it will use JTAG debug protocol) at last click Debug to launch the debug(it will download the compile resultmdashelf file in to the target MCU at first)
15
STEP 4 CONNECT THE UART CONSOLE FOR TEST RESULT OUTPUT DISPLAY
The BSP test project use S32K148 LPUART2 to output the test result
Use a USB-to-UART adapter to connect the board with PC via J25-6(TXD) J25-7(RXD) and J25-12(GND)
For more details on the test results description and demo projects please refer to the Software User Guide
Open a UART console(eg Serial Port Utility) on PC configure its serial communication format as the following
ndash Data rate 115200 bauds
ndash Data Bits 8
ndash Parity None
ndash Stop Bits 1
ndash Flow Control OFF
Then you can see the test result output as below
16
RDB Software package overview
OTHER DEMO PROJECTS
Besides of the BSP test project which includes the SDK API based LLD of GPS module BLE module MMA8452Q PCA85063ATT 3x FlexCAN 3x LPUART communication 2x HS(PWM) 2x user bottom GPIO IRQ interrupt RGB LED 2x input capture 2x external analog input 2x Touch Sense PAD and etc
The SW package also provides the following demo projects
ndash QSPI Flash test project
ndash LwIP based ENET and TJA1101 TCPIP severclient communication demo project
ndash LIN stack based Single board LIN master and slave communication demo project
ndash I2S audio codecmdashSGTL500 demo project
ndash T-BOX reference design project
For more details please refer to the S32K148 T-BOX_GP-ECU RDB SW user guide and download the SW package
17
Create a New Project in S32 Design StudioCREATE NEW PROJECT FIRST TIME ndash SELECT A WORKSPACE
Start program Click on ldquoS32 Design Studio for ARM v10rdquo icon
Select workspace
ndash Choose default (see below example) or specify new one
ndash Suggestion Uncheck the box ldquoUse this as the default and do not ask againrdquo
ndash Click OK
CREATE NEW PROJECT TOP MENU SELECTION
File ndash New ndashProject
18
CREATE NEW PROJECT S32DS PROJECT
Project Name
ndash Example FirstProject
Project Type
ndash Select from inside executable or library folder
Next
Select Debugger Support and Library Support
Click Finish
19
OPENSDA CONFIGURATION
To Debug your project with OpenSDA it is necessary to select the OpenSDA in the Debug Configuration
Select your project and click on debug configuration
Select the Debug configuration under GDB PEMicro Interface Debugging
Click on Debugger tab
Select OpenSDA as the interface if your board is plugged should appear in the Port field
Click Apply and debug to finish
20
Debug Basics
DEBUG BASICS STARTING THE DEBUGGER
Debug configuration is only required once Subsequent starting of debugger does not require those steps
Three options to start debugger
ndash If the ldquoDebug Configurationrdquo has not been closed click on ldquoDebugrdquo button on bottom right
ndash Select Run ndash Debug (or hit F11)
Note This method currently selects the desktop target (projectelf) and gives an error Do not use until this is changed
Recommended Method Click on pull down arrow for bug icon and select hellip_debugelf target
DEBUG BASICS STEP RUN SUSPEND RESUME
Step Into (F5)
Step Over (F6)
Step Return (F7)
Run
Suspend
Resume (F8)
21
DEBUG BASICS VIEW amp ALTER VARIABLES
View variables in ldquoVariablesrdquo tab
Click on a value to allow typing in a different value
DEBUG BASICS VIEW AND ALTER REGISTERS
View CPU registers in the ldquoRegistersrdquo tab
Click on a value to allow typing in a different value
View peripheral registers in the EmbSys Registers tab
DEBUG BASICS VIEW AND ALTER MEMORY
Add Memory Monitor
Select Base Address to Start at 40000000
View Memory
22
DEBUG BASICS BREAKPOINTS
Add Breakpoint Point and Click
Light blue dot represents debugger breakpoint
DEBUG BASICS RESET amp TERMINATE DEBUG SESSION
Reset program counter
Terminate Ctl+F2()
23
Create a PampE Debug Configuration (Optional)
NEW PampE DEBUG CONFIGURATION
Click in debug configurations
Create a new PampE launch configuration
Select S32K144 device
Click Apply and debug your application
wwwnxpcomS32K148-T-BOX
NXP and the NXP logo are trademarks of NXP BV All other product or service names are the property of their respective owners copy 2019 NXP BV
Document Number S32K148TBOXEFS REV 0
15
STEP 4 CONNECT THE UART CONSOLE FOR TEST RESULT OUTPUT DISPLAY
The BSP test project use S32K148 LPUART2 to output the test result
Use a USB-to-UART adapter to connect the board with PC via J25-6(TXD) J25-7(RXD) and J25-12(GND)
For more details on the test results description and demo projects please refer to the Software User Guide
Open a UART console(eg Serial Port Utility) on PC configure its serial communication format as the following
ndash Data rate 115200 bauds
ndash Data Bits 8
ndash Parity None
ndash Stop Bits 1
ndash Flow Control OFF
Then you can see the test result output as below
16
RDB Software package overview
OTHER DEMO PROJECTS
Besides of the BSP test project which includes the SDK API based LLD of GPS module BLE module MMA8452Q PCA85063ATT 3x FlexCAN 3x LPUART communication 2x HS(PWM) 2x user bottom GPIO IRQ interrupt RGB LED 2x input capture 2x external analog input 2x Touch Sense PAD and etc
The SW package also provides the following demo projects
ndash QSPI Flash test project
ndash LwIP based ENET and TJA1101 TCPIP severclient communication demo project
ndash LIN stack based Single board LIN master and slave communication demo project
ndash I2S audio codecmdashSGTL500 demo project
ndash T-BOX reference design project
For more details please refer to the S32K148 T-BOX_GP-ECU RDB SW user guide and download the SW package
17
Create a New Project in S32 Design StudioCREATE NEW PROJECT FIRST TIME ndash SELECT A WORKSPACE
Start program Click on ldquoS32 Design Studio for ARM v10rdquo icon
Select workspace
ndash Choose default (see below example) or specify new one
ndash Suggestion Uncheck the box ldquoUse this as the default and do not ask againrdquo
ndash Click OK
CREATE NEW PROJECT TOP MENU SELECTION
File ndash New ndashProject
18
CREATE NEW PROJECT S32DS PROJECT
Project Name
ndash Example FirstProject
Project Type
ndash Select from inside executable or library folder
Next
Select Debugger Support and Library Support
Click Finish
19
OPENSDA CONFIGURATION
To Debug your project with OpenSDA it is necessary to select the OpenSDA in the Debug Configuration
Select your project and click on debug configuration
Select the Debug configuration under GDB PEMicro Interface Debugging
Click on Debugger tab
Select OpenSDA as the interface if your board is plugged should appear in the Port field
Click Apply and debug to finish
20
Debug Basics
DEBUG BASICS STARTING THE DEBUGGER
Debug configuration is only required once Subsequent starting of debugger does not require those steps
Three options to start debugger
ndash If the ldquoDebug Configurationrdquo has not been closed click on ldquoDebugrdquo button on bottom right
ndash Select Run ndash Debug (or hit F11)
Note This method currently selects the desktop target (projectelf) and gives an error Do not use until this is changed
Recommended Method Click on pull down arrow for bug icon and select hellip_debugelf target
DEBUG BASICS STEP RUN SUSPEND RESUME
Step Into (F5)
Step Over (F6)
Step Return (F7)
Run
Suspend
Resume (F8)
21
DEBUG BASICS VIEW amp ALTER VARIABLES
View variables in ldquoVariablesrdquo tab
Click on a value to allow typing in a different value
DEBUG BASICS VIEW AND ALTER REGISTERS
View CPU registers in the ldquoRegistersrdquo tab
Click on a value to allow typing in a different value
View peripheral registers in the EmbSys Registers tab
DEBUG BASICS VIEW AND ALTER MEMORY
Add Memory Monitor
Select Base Address to Start at 40000000
View Memory
22
DEBUG BASICS BREAKPOINTS
Add Breakpoint Point and Click
Light blue dot represents debugger breakpoint
DEBUG BASICS RESET amp TERMINATE DEBUG SESSION
Reset program counter
Terminate Ctl+F2()
23
Create a PampE Debug Configuration (Optional)
NEW PampE DEBUG CONFIGURATION
Click in debug configurations
Create a new PampE launch configuration
Select S32K144 device
Click Apply and debug your application
wwwnxpcomS32K148-T-BOX
NXP and the NXP logo are trademarks of NXP BV All other product or service names are the property of their respective owners copy 2019 NXP BV
Document Number S32K148TBOXEFS REV 0
16
RDB Software package overview
OTHER DEMO PROJECTS
Besides of the BSP test project which includes the SDK API based LLD of GPS module BLE module MMA8452Q PCA85063ATT 3x FlexCAN 3x LPUART communication 2x HS(PWM) 2x user bottom GPIO IRQ interrupt RGB LED 2x input capture 2x external analog input 2x Touch Sense PAD and etc
The SW package also provides the following demo projects
ndash QSPI Flash test project
ndash LwIP based ENET and TJA1101 TCPIP severclient communication demo project
ndash LIN stack based Single board LIN master and slave communication demo project
ndash I2S audio codecmdashSGTL500 demo project
ndash T-BOX reference design project
For more details please refer to the S32K148 T-BOX_GP-ECU RDB SW user guide and download the SW package
17
Create a New Project in S32 Design StudioCREATE NEW PROJECT FIRST TIME ndash SELECT A WORKSPACE
Start program Click on ldquoS32 Design Studio for ARM v10rdquo icon
Select workspace
ndash Choose default (see below example) or specify new one
ndash Suggestion Uncheck the box ldquoUse this as the default and do not ask againrdquo
ndash Click OK
CREATE NEW PROJECT TOP MENU SELECTION
File ndash New ndashProject
18
CREATE NEW PROJECT S32DS PROJECT
Project Name
ndash Example FirstProject
Project Type
ndash Select from inside executable or library folder
Next
Select Debugger Support and Library Support
Click Finish
19
OPENSDA CONFIGURATION
To Debug your project with OpenSDA it is necessary to select the OpenSDA in the Debug Configuration
Select your project and click on debug configuration
Select the Debug configuration under GDB PEMicro Interface Debugging
Click on Debugger tab
Select OpenSDA as the interface if your board is plugged should appear in the Port field
Click Apply and debug to finish
20
Debug Basics
DEBUG BASICS STARTING THE DEBUGGER
Debug configuration is only required once Subsequent starting of debugger does not require those steps
Three options to start debugger
ndash If the ldquoDebug Configurationrdquo has not been closed click on ldquoDebugrdquo button on bottom right
ndash Select Run ndash Debug (or hit F11)
Note This method currently selects the desktop target (projectelf) and gives an error Do not use until this is changed
Recommended Method Click on pull down arrow for bug icon and select hellip_debugelf target
DEBUG BASICS STEP RUN SUSPEND RESUME
Step Into (F5)
Step Over (F6)
Step Return (F7)
Run
Suspend
Resume (F8)
21
DEBUG BASICS VIEW amp ALTER VARIABLES
View variables in ldquoVariablesrdquo tab
Click on a value to allow typing in a different value
DEBUG BASICS VIEW AND ALTER REGISTERS
View CPU registers in the ldquoRegistersrdquo tab
Click on a value to allow typing in a different value
View peripheral registers in the EmbSys Registers tab
DEBUG BASICS VIEW AND ALTER MEMORY
Add Memory Monitor
Select Base Address to Start at 40000000
View Memory
22
DEBUG BASICS BREAKPOINTS
Add Breakpoint Point and Click
Light blue dot represents debugger breakpoint
DEBUG BASICS RESET amp TERMINATE DEBUG SESSION
Reset program counter
Terminate Ctl+F2()
23
Create a PampE Debug Configuration (Optional)
NEW PampE DEBUG CONFIGURATION
Click in debug configurations
Create a new PampE launch configuration
Select S32K144 device
Click Apply and debug your application
wwwnxpcomS32K148-T-BOX
NXP and the NXP logo are trademarks of NXP BV All other product or service names are the property of their respective owners copy 2019 NXP BV
Document Number S32K148TBOXEFS REV 0
17
Create a New Project in S32 Design StudioCREATE NEW PROJECT FIRST TIME ndash SELECT A WORKSPACE
Start program Click on ldquoS32 Design Studio for ARM v10rdquo icon
Select workspace
ndash Choose default (see below example) or specify new one
ndash Suggestion Uncheck the box ldquoUse this as the default and do not ask againrdquo
ndash Click OK
CREATE NEW PROJECT TOP MENU SELECTION
File ndash New ndashProject
18
CREATE NEW PROJECT S32DS PROJECT
Project Name
ndash Example FirstProject
Project Type
ndash Select from inside executable or library folder
Next
Select Debugger Support and Library Support
Click Finish
19
OPENSDA CONFIGURATION
To Debug your project with OpenSDA it is necessary to select the OpenSDA in the Debug Configuration
Select your project and click on debug configuration
Select the Debug configuration under GDB PEMicro Interface Debugging
Click on Debugger tab
Select OpenSDA as the interface if your board is plugged should appear in the Port field
Click Apply and debug to finish
20
Debug Basics
DEBUG BASICS STARTING THE DEBUGGER
Debug configuration is only required once Subsequent starting of debugger does not require those steps
Three options to start debugger
ndash If the ldquoDebug Configurationrdquo has not been closed click on ldquoDebugrdquo button on bottom right
ndash Select Run ndash Debug (or hit F11)
Note This method currently selects the desktop target (projectelf) and gives an error Do not use until this is changed
Recommended Method Click on pull down arrow for bug icon and select hellip_debugelf target
DEBUG BASICS STEP RUN SUSPEND RESUME
Step Into (F5)
Step Over (F6)
Step Return (F7)
Run
Suspend
Resume (F8)
21
DEBUG BASICS VIEW amp ALTER VARIABLES
View variables in ldquoVariablesrdquo tab
Click on a value to allow typing in a different value
DEBUG BASICS VIEW AND ALTER REGISTERS
View CPU registers in the ldquoRegistersrdquo tab
Click on a value to allow typing in a different value
View peripheral registers in the EmbSys Registers tab
DEBUG BASICS VIEW AND ALTER MEMORY
Add Memory Monitor
Select Base Address to Start at 40000000
View Memory
22
DEBUG BASICS BREAKPOINTS
Add Breakpoint Point and Click
Light blue dot represents debugger breakpoint
DEBUG BASICS RESET amp TERMINATE DEBUG SESSION
Reset program counter
Terminate Ctl+F2()
23
Create a PampE Debug Configuration (Optional)
NEW PampE DEBUG CONFIGURATION
Click in debug configurations
Create a new PampE launch configuration
Select S32K144 device
Click Apply and debug your application
wwwnxpcomS32K148-T-BOX
NXP and the NXP logo are trademarks of NXP BV All other product or service names are the property of their respective owners copy 2019 NXP BV
Document Number S32K148TBOXEFS REV 0
18
CREATE NEW PROJECT S32DS PROJECT
Project Name
ndash Example FirstProject
Project Type
ndash Select from inside executable or library folder
Next
Select Debugger Support and Library Support
Click Finish
19
OPENSDA CONFIGURATION
To Debug your project with OpenSDA it is necessary to select the OpenSDA in the Debug Configuration
Select your project and click on debug configuration
Select the Debug configuration under GDB PEMicro Interface Debugging
Click on Debugger tab
Select OpenSDA as the interface if your board is plugged should appear in the Port field
Click Apply and debug to finish
20
Debug Basics
DEBUG BASICS STARTING THE DEBUGGER
Debug configuration is only required once Subsequent starting of debugger does not require those steps
Three options to start debugger
ndash If the ldquoDebug Configurationrdquo has not been closed click on ldquoDebugrdquo button on bottom right
ndash Select Run ndash Debug (or hit F11)
Note This method currently selects the desktop target (projectelf) and gives an error Do not use until this is changed
Recommended Method Click on pull down arrow for bug icon and select hellip_debugelf target
DEBUG BASICS STEP RUN SUSPEND RESUME
Step Into (F5)
Step Over (F6)
Step Return (F7)
Run
Suspend
Resume (F8)
21
DEBUG BASICS VIEW amp ALTER VARIABLES
View variables in ldquoVariablesrdquo tab
Click on a value to allow typing in a different value
DEBUG BASICS VIEW AND ALTER REGISTERS
View CPU registers in the ldquoRegistersrdquo tab
Click on a value to allow typing in a different value
View peripheral registers in the EmbSys Registers tab
DEBUG BASICS VIEW AND ALTER MEMORY
Add Memory Monitor
Select Base Address to Start at 40000000
View Memory
22
DEBUG BASICS BREAKPOINTS
Add Breakpoint Point and Click
Light blue dot represents debugger breakpoint
DEBUG BASICS RESET amp TERMINATE DEBUG SESSION
Reset program counter
Terminate Ctl+F2()
23
Create a PampE Debug Configuration (Optional)
NEW PampE DEBUG CONFIGURATION
Click in debug configurations
Create a new PampE launch configuration
Select S32K144 device
Click Apply and debug your application
wwwnxpcomS32K148-T-BOX
NXP and the NXP logo are trademarks of NXP BV All other product or service names are the property of their respective owners copy 2019 NXP BV
Document Number S32K148TBOXEFS REV 0
19
OPENSDA CONFIGURATION
To Debug your project with OpenSDA it is necessary to select the OpenSDA in the Debug Configuration
Select your project and click on debug configuration
Select the Debug configuration under GDB PEMicro Interface Debugging
Click on Debugger tab
Select OpenSDA as the interface if your board is plugged should appear in the Port field
Click Apply and debug to finish
20
Debug Basics
DEBUG BASICS STARTING THE DEBUGGER
Debug configuration is only required once Subsequent starting of debugger does not require those steps
Three options to start debugger
ndash If the ldquoDebug Configurationrdquo has not been closed click on ldquoDebugrdquo button on bottom right
ndash Select Run ndash Debug (or hit F11)
Note This method currently selects the desktop target (projectelf) and gives an error Do not use until this is changed
Recommended Method Click on pull down arrow for bug icon and select hellip_debugelf target
DEBUG BASICS STEP RUN SUSPEND RESUME
Step Into (F5)
Step Over (F6)
Step Return (F7)
Run
Suspend
Resume (F8)
21
DEBUG BASICS VIEW amp ALTER VARIABLES
View variables in ldquoVariablesrdquo tab
Click on a value to allow typing in a different value
DEBUG BASICS VIEW AND ALTER REGISTERS
View CPU registers in the ldquoRegistersrdquo tab
Click on a value to allow typing in a different value
View peripheral registers in the EmbSys Registers tab
DEBUG BASICS VIEW AND ALTER MEMORY
Add Memory Monitor
Select Base Address to Start at 40000000
View Memory
22
DEBUG BASICS BREAKPOINTS
Add Breakpoint Point and Click
Light blue dot represents debugger breakpoint
DEBUG BASICS RESET amp TERMINATE DEBUG SESSION
Reset program counter
Terminate Ctl+F2()
23
Create a PampE Debug Configuration (Optional)
NEW PampE DEBUG CONFIGURATION
Click in debug configurations
Create a new PampE launch configuration
Select S32K144 device
Click Apply and debug your application
wwwnxpcomS32K148-T-BOX
NXP and the NXP logo are trademarks of NXP BV All other product or service names are the property of their respective owners copy 2019 NXP BV
Document Number S32K148TBOXEFS REV 0
20
Debug Basics
DEBUG BASICS STARTING THE DEBUGGER
Debug configuration is only required once Subsequent starting of debugger does not require those steps
Three options to start debugger
ndash If the ldquoDebug Configurationrdquo has not been closed click on ldquoDebugrdquo button on bottom right
ndash Select Run ndash Debug (or hit F11)
Note This method currently selects the desktop target (projectelf) and gives an error Do not use until this is changed
Recommended Method Click on pull down arrow for bug icon and select hellip_debugelf target
DEBUG BASICS STEP RUN SUSPEND RESUME
Step Into (F5)
Step Over (F6)
Step Return (F7)
Run
Suspend
Resume (F8)
21
DEBUG BASICS VIEW amp ALTER VARIABLES
View variables in ldquoVariablesrdquo tab
Click on a value to allow typing in a different value
DEBUG BASICS VIEW AND ALTER REGISTERS
View CPU registers in the ldquoRegistersrdquo tab
Click on a value to allow typing in a different value
View peripheral registers in the EmbSys Registers tab
DEBUG BASICS VIEW AND ALTER MEMORY
Add Memory Monitor
Select Base Address to Start at 40000000
View Memory
22
DEBUG BASICS BREAKPOINTS
Add Breakpoint Point and Click
Light blue dot represents debugger breakpoint
DEBUG BASICS RESET amp TERMINATE DEBUG SESSION
Reset program counter
Terminate Ctl+F2()
23
Create a PampE Debug Configuration (Optional)
NEW PampE DEBUG CONFIGURATION
Click in debug configurations
Create a new PampE launch configuration
Select S32K144 device
Click Apply and debug your application
wwwnxpcomS32K148-T-BOX
NXP and the NXP logo are trademarks of NXP BV All other product or service names are the property of their respective owners copy 2019 NXP BV
Document Number S32K148TBOXEFS REV 0
21
DEBUG BASICS VIEW amp ALTER VARIABLES
View variables in ldquoVariablesrdquo tab
Click on a value to allow typing in a different value
DEBUG BASICS VIEW AND ALTER REGISTERS
View CPU registers in the ldquoRegistersrdquo tab
Click on a value to allow typing in a different value
View peripheral registers in the EmbSys Registers tab
DEBUG BASICS VIEW AND ALTER MEMORY
Add Memory Monitor
Select Base Address to Start at 40000000
View Memory
22
DEBUG BASICS BREAKPOINTS
Add Breakpoint Point and Click
Light blue dot represents debugger breakpoint
DEBUG BASICS RESET amp TERMINATE DEBUG SESSION
Reset program counter
Terminate Ctl+F2()
23
Create a PampE Debug Configuration (Optional)
NEW PampE DEBUG CONFIGURATION
Click in debug configurations
Create a new PampE launch configuration
Select S32K144 device
Click Apply and debug your application
wwwnxpcomS32K148-T-BOX
NXP and the NXP logo are trademarks of NXP BV All other product or service names are the property of their respective owners copy 2019 NXP BV
Document Number S32K148TBOXEFS REV 0
22
DEBUG BASICS BREAKPOINTS
Add Breakpoint Point and Click
Light blue dot represents debugger breakpoint
DEBUG BASICS RESET amp TERMINATE DEBUG SESSION
Reset program counter
Terminate Ctl+F2()
23
Create a PampE Debug Configuration (Optional)
NEW PampE DEBUG CONFIGURATION
Click in debug configurations
Create a new PampE launch configuration
Select S32K144 device
Click Apply and debug your application
wwwnxpcomS32K148-T-BOX
NXP and the NXP logo are trademarks of NXP BV All other product or service names are the property of their respective owners copy 2019 NXP BV
Document Number S32K148TBOXEFS REV 0
23
Create a PampE Debug Configuration (Optional)
NEW PampE DEBUG CONFIGURATION
Click in debug configurations
Create a new PampE launch configuration
Select S32K144 device
Click Apply and debug your application
wwwnxpcomS32K148-T-BOX
NXP and the NXP logo are trademarks of NXP BV All other product or service names are the property of their respective owners copy 2019 NXP BV
Document Number S32K148TBOXEFS REV 0
wwwnxpcomS32K148-T-BOX
NXP and the NXP logo are trademarks of NXP BV All other product or service names are the property of their respective owners copy 2019 NXP BV
Document Number S32K148TBOXEFS REV 0