S32 Design Studio Knowledge Base

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

S32 Design Studio Knowledge Base

Discussions

Sort by:
This document describes, how to create FreeRTOS project for S32K144 microcontroller using S32 Design Studio v1.3 ARM and S32K144_SDK_gcc 1.0.0 RTM. Be sure, you have correctly installed all available updates. S32 Design Studio for Arm v1.3 - Update 1 available  S32 Design Studio for Arm v1.3 - Update 2 available  S32 Design Studio for Arm v1.3 - Update 3 & 4 available  1) Create new project. Choose S32K144 microcontroller. Click Next. 2) Choose NewLib Nano Library, and choose S32K144_SDK_gcc RTM 1.0.0. Click Finish. 3) Open project properties and click Target Processor tab. For Float ABI, choose FP instructions (hard). 4) Open Component Library, right click FreeRTOS component and add this component to project. 5) Last, Generate Processor Expert Code and compile project. Now, you can use FreeRTOS component in your project. Another way is to create FreeRTOS proejct from example. Click New S32DS Project from Example. Choose freertos in S32K144 RTM SDK v1.0.0 Example Projects folder. Best Regards, Martin
View full article
      Product Release Announcement Automotive Microcontrollers and Processors S32 Design Studio for Power Architecture 2017.R1 Update 10          What is new? S32 SDK for Power Architecture 2.9.0 BETA supporting  S32R274, S32R372, MPC574x-B-C-G, MPC574x-P, MPC574x-R and MPC577x-B-E-C (see the S32 SDK release notes) Updated version of GCC 4.9.4 tools AMMCLIB version 1.1.15 (see the AMMCLIB MPC574xP example release notes) Updated version of SPT tools for SPT 2.5 Updated version of P&E This is a cumulative update - it includes all of the content of previous updates (Update 1, Update 2, Update 3, Update 4, Updates 5 and 6, Update 7, Update 8, Update 9 ). Installation instructions The update is available for online installation (via S32DS Eclipse Updater) or offline installation (direct download link)  installation:  go to menu "Help" -> "Install New Software..." dialog  select predefined update site "S32DesignStudio - http://www.nxp.com/lgfiles/updates/Eclipse/S32DS_POWER_2017.R1/updatesite" select all available items and click "Next" button offline installation:   go to S32 Design Studio for Power product page -> Downloads section or use direct link to download the update archive zip file  Start S32DS and go to "Help" -> "Install New Software..." Add a new "Archive" repository and browse to select the downloaded update archive zip file you downloaded in the previous step Select all available items and click "Next" button.   This will start the update installation process.
View full article
This document explains how to change the package of a processor expert project, for example, from S32K144 100LQFP to S32K144 64LQFP.  It does NOT explain how to change processor derivatives (e.g. S32K144 to S32K142). 1. Assuming that the project is opened and active, go to Components Library View and click on Processors     2. Expand the repository folders and double click on your processor (e.g. S32K144) 3. Select new package (e.g.S32K144_64) and click on finish. Now the new variant will be added to your project 4. Go to PinSettings component and click on Switch Configuration. This action will change the pins configuration for new package and will discard the original pin configuration.
View full article
      Product Release Announcement Automotive Microcontrollers and Processors S32 Design Studio 3.3  S32K1xx dev package and S32 SDK for S32K1xx RTM 4.0.0          What is new? S32K1xx Development Package: New Project Wizard support for S32K1xx family, including S32K14xW P&E debugger support for S32K1 family NXP GCC for ARM NXP GCC for Arm version 6.3 build 2017 (same as was used in S32DS for ARM 2.2) S32 SDK for S32K1xx RTM 4.0.0: S32 SDK RTM 4.0.0 package adding support for S32K1xx and S32K1xxW families, cumulative release containing also the changes present in S32 SDK for S32K1xx RTM 3.0.0, 3.0.1, 3.0.2 and 3.0.3 Supports S32 Design Studio for S32 Platform v3.3 with S32 Configuration tools - Pin Wizard, Clock Configuration,... Supports creating project with NXP GCC for Arm Release version 6.3.1, GreenHills Multi and IAR Compiler Examples for supported devices with P&E Debugger and Segger J-link support Migration support for projects created in S32DS for ARM v2.2 (with Processor Expert) For more details, please review the S32SDK_for_S32K1xx_RTM_4.0.0_ReleaseNotes.pdf attached to this notice. See below. Installation instructions The update is available for online (via Eclipse Updater) or offline installation   online installation:  go to menu "Help" -> "S32DS Extensions and Updates" dialog  select from available items and click "Install/Update" button   offline installation:   go to S32 Design Studio v3.3 product download page: S32 Design Studio for S32 Platform -> Downloads, click 'Download' button next to S32DS for S32 Platform v3.3, then select 'S32DS.S32K1.3.3.0_D2006.zip' to download the update archive zip file Start S32 Design Studio and go to "Help" -> "S32DS Extensions and Updates" Add a new "Add.." S32DS Software Site and browse to select the downloaded update archive .zip file you downloaded in the previous step         Select from available items and click "Install/Update" button. This will start the update installation process.
View full article
The FreeMASTER serial communication driver is a piece of code that enables an embedded application to communicate with the FreeMASTER PC application. Please note: The FreeMASTER_S32xx does not support all Toolchains and not all versions of supported Toolchains. The available SDKs will vary depending upon the toolchain which is selected. It is independent of the S32/MPC SDKs. In most cases, it is not integrated with the S32/MPC SDKs, although this could change in the future. When creating a new S32DS Application Project, you may have noticed the FreeMASTER_S32xx SDK option in the Select SDK menu. To add the FreeMASTER SDK to your project, simply add it in the New Project Wizard (as pictured above) or add it later through the project properties menu, SDKs: Select the desired SDK from the list, then click 'Attach/Detach...' Click in the column for each build configuration for which you wish to have the SDK attached. You can remove SDKs by clicking the '+', making it disappear. It should also be noted that there exists example projects which demonstrate usage of the FreeMASTER serial communication driver, though these do not use the FreeMASTER SDK, the driver was added manually. When working in your project, you can use the SDK Explorer to drag and drop macros and function calls into your code. To add the SDK Explorer to your perspective, there are at least 2 methods: 1) Menu method a) Window -> Show View -> Other... OR Alt + Shift + Q, Q b) Filter on 'SDK' c) Select 'SDK Explorer' d) Click OK 2) Quick Access method a) Type 'SDK' b) Select 'SDK Explorer' To access the macros and function calls from the SDK Explorer: 1) Go to the Project Explorer and select your project to make it active. 2) Go to SDK Explorer and all of the SDKs you included in the project will be listed. 3) For the SDK you wish to access, expand the folders and files until you can see the function you wish to add. You can set some filters to hide unwanted content. 4) Simply drag and drop the macro/function call into your source file. The #include statement for the associated header file will be automatically added near the top of your source file. Happy FreeMASTER serial communicating!
View full article
1. Install S32Design Studio 3.5: S32DS.3.5_b220726_win32.x86_64.exe 2. Download and Install S32 Design Studio 3.5 Update 2 D2302: SW32_S32DS_3.5.2_D2302.zip  (com.nxp.s32ds.update_3.5.2.20230227110156)   3. Download and Install S32 Design Studio 3.5.0 Development Package with support for S32K3xx devices(3.5.0_D2303): SW32K3xx_S32DS_3.5.0_D2303.zip  (com.nxp.s32ds.sp1.s32k3xx.update_3.5.0.20230405175452)   4. For users who need to install S32K396 RTD for development, please download and install S32 Design Studio Service Pack 1 RTM with support for S32K39x devices(3.5.0_D2303): SW32K39x_S32DS_3.5.0_D2303.zip (com.nxp.s32ds.sp1.s32k396.update_3.5.0.20230330)   5.a) For users who need to install S32M276 RTD in S32K3 RTD 3.0.0\P01\P01 HF01\P01 HF02 for development, please download and install S32 Design Studio Service Pack 2 CD with support for S32M2xx devices (3.5.0_D2302😞 SW32M2xx_S32DS_3.5.0_D2302.zip(com.nxp.s32ds.s32m2.update_3.5.0.20230222151347)  Note: Please contact your local FAE to enable for you download the S32M276 development package. 5.b) For users who need to install S32M276 RTD in S32K3 RTD 3.0.0 P07 for development, , please download and install S32 Design Studio Service Pack 2 EAR2 with support for S32M2xx devices(3.5.0_D2303😞 SW32M2xx_S32DS_3.5.0_D2303.zip(com.nxp.s32ds.s32m2.update_3.5.0.20230328160305)   6. Select and install one of the following updatesite for S32K3 RTD 3.0.0: 6.a) Download and install S32K3 Real-Time Drivers Version 3.0.0: SW32K3_RTD_4.4_R21-11_3.0.0_D2303_DS_updatesite.zip   6.b) Download and install S32K3 Real-Time Drivers Version 3.0.0 P01 : SW32K3_RTD_4.4_3.0.0_P01_D2303_DS_updatesite.zip   6.c) Download and install S32K3 Real-Time Drivers Version 3.0.0 P01 HotFix 02 (3.0.0_P01_HF02😞 SW32K3_RTD_4.4_3.0.0_P01_HF02_DS_updatesite_D2305.zip   6.d) Download and install S32K3_M27X Real-Time Drivers Version 3.0.0 P07: SW32K3_RTD_R21-11_3.0.0 _P07_D2307.zip  
View full article
      Product Release Announcement Automotive Microcontrollers and Processors S32 Design Studio for ARM 2018.R1  Update 1          What is new? This update adds device support for S32K116  and installs the S32 SDK 1.8.7 EAR (Early Access Release) supporting the S32K116 (see attached S32K116 SDK release notes for more details) S32K116 EAR SDK v1.8.7 Examples - "Create S32DS Project from Example" Installation instructions The update is available for online (via Eclipse Updater) or offline installation (direct download link) online installation:  go to menu "Help" -> "Install New Software..." dialog  select predefined update site "S32DesignStudio - http://www.nxp.com/lgfiles/updates/Eclipse/S32DS_ARM_2018.R1/updatesite" select all available items and click "Next" button   offline installation:   go to S32 Design Studio for ARM product page -> Downloads section or use direct link to download the update archive zip file Start S32DS and go to "Help" -> "Install New Software..." Add a new "Archive" repository and browse to select the downloaded update archive zip file you downloaded in the previous step Select all available items and click "Next" button.   This will starts the update installation process.
View full article
Perhaps you are just using the S32DS for Power for the first time, and maybe you've seen the provided examples and want to learn a bit more about how they were created. Here are the steps to create a simple application for the MCP5748G MCU which toggles a pin causing one of the user LEDs to blink. This example includes use of the S32 SDK for Power Architecture. Please note: There are options in the steps below to cover the case of either the DEV-KIT(DEVKIT-MPC5748G) or Motherboard(X-MPC574XG-MB) with Daughtercard(X-MPC574XG-324DS) hardware EVBs. 1) Launch S32DS for Power 2) Select File -> New -> New S32DS Project 3) Enter a name for the project, such as 'BlinkingLED' 4) Locate, from the list of processors, Family MPC574xG -> MPC5748G, and select it. 5) Click Next 6) Uncheck the boxes for cores e200z4 and e200z2, leaving just e200z4 (boot) checked. This is because the application will run on the boot core and will not use either of the other two cores. 7) Click on the '…' button next to SDKs, in the column for BlinkingLED_Z4_0. 😎 Check the box next to MPC5748G_SDK_Z4_0_GCC to include support for the SDK within the new project and for the core we have selected. 9) Click OK 10) Click Finish to close the New Project wizard window and start the project generation. 11) Wait a minute or two for the project generation script to complete. 12) Go to the 'Components Library' view then locate and double-click on 'pit' component to add it to the project.  Alternatively, right-click and select Add to project. You can verify it was added by inspecting the 'Components - <project_name>' view. 13) With 'pit' selected in the 'Components - BlinkingLED_Z4_0' view, go to the 'Component Inspector' view to see the configurations for the PIT component. Locate the section for 'Configuration 0'. You may have to scroll down to see it. Change the 'Time period' setting to 500000 microsec(0.5 sec). Note that we are editing the settings for Clock configuration 'clockMan_InitConfig0', you will need the name of this configuration later. 14) Back in the 'Components' view, select 'pin_mux' component and return to the 'Component Inspector' view 15) From the 'Routing' tab, select the 'SIUL2' sub-tab and scroll down the Signals list until 'GPIO_0' (DEV-KIT) or 'GPIO_99' (Motherboard) is shown. 16) Change to the following settings: a. Pin/Signal Selection: PA[0] (DEV-KIT) / PG[3] (Motherboard) b. Direction: Output Pin PA0/PG3 is connected to user LED 2 on the evaluation board. 17) All configuration settings are now complete. Click Generate Processor Expert code button in the 'Components' view or use the menu bar Project-> Generate Processor Expert Code. 18) Wait for the code generation to complete. 19) Now, from the 'Project Explorer' view, the generated code is visible in the folder 'Generated_Code' of the project 'BlinkingLED_Z4_0'. 20) If not already open, in 'Project Explorer' open the file 'BlinkngLED_Z4_0\Sources\main.c' by double-click. This will open the file in the editor view. 21) Scroll down until the following comments are shown: /* Write your code here */ /* For example: for(;;) { } */ We need to add some code here to initialize the clocks, timers and pins. Then we will setup a timer interrupt handler to toggle the pin. 22) First we need to initialize the clocks. From the 'Components' view, expand 'clock_manager' and then drag & drop CLOCK_DRV_Init function into main() of main.c, just after the comments identified in the previous step within the text editor view. 23) Add to the function CLOCK_DRV_Init(), the parameter &clockMan1_InitConfig0 to give it the address of the user configuration structure generated by ProcessorExpert in '.../Generated_Code/clockMan1.c'. This is the clock configuration for which we edited the timer period in an earlier step. 24) Next we need to initialize the pins. Back in the 'Components' view, expand the 'pin_mux' then drag and drop the function PINS_DRV_Init after the clock initialization. 25) Again from the 'Components' view, expand 'interrupt_manager', then drag & drop INT_SYS_InstallHandler in 'main()'. This installs the PIT channel 0 interrupt handler. 26) Enter the parameters: PIT_Ch0_IRQn, &pitCh0Handler, NULL 27) In the User includes section at the start of main.c, add the implementation of the handler a. Create a function called pitCh0Handler b. In the function body: clear the interrupt flag and toggle LED   /* IRQ handler for PIT ch0 interrupt */   void pitCh0Handler(void)   { /* Clear PIT channel 0 interrupt flag */ PIT_DRV_ClearStatusFlags(INST_PIT1, 0U); /* Toggle LED (GPIO 0 connected to user LED 2) */ SIUL2->GPDO[0] ^= SIUL2_GPDO_PDO_4n_MASK; // DEV-KIT /* SIUL2->GPDO[99/4] ^=SIUL2_GPDO_PDO_4n3_MASK;*/ // Motherboard   } Note: Get PIT_DRV_ClearStatusFlags by drag & drop from the 'pit' component. 28) In 'Components' view, expand 'pit' component and then drag & drop PIT_DRV_Init, PIT_DRV_InitChannel & PID_DRV_StartChannel in main() after INT_SYS_InstallHandler(). 29) Fill in the second parameter of the last function(channel number): 0U 30) Build the code. Click the down arrow next to the 'Build' button and select Debug_RAM. Check that there are no build errors. 31) Enter the 'Debug Configurations' menu: a. From the menu bar, Run -> Debug Configurations... b. From the toolbar, down arrow next to Debug button -> Debug Configurations... 32) The Debug Configurations window appears. Select the configuration BlinkingLED_Z4_0_Debug_RAM from within the GDB PEMicro Interface Debugging group. 33) Select the 'Debugger' tab to setup the connection to the debugger hardware device. 34) Select the PEMicro Interface which corresponds to your setup: a. If using the motherboard, you will likely use the USB Multilink, which is connected to your PC via USB cable (type A on one end, type B on the other) and is connected to the motherboard via the 14-pin JTAG cable. b. If using the DEV-KIT board, you will likely choose the OpenSDA, which is integrated into the DEV-KIT board and is connected with just a USB cable (type A on one end, type micro on the other). 35) Click Debug To launch the debugging session. This will also open the Debug perspective. 36) In the Debug perspective, once the debugging session has fully launched, the code will be executed to the start of main(), where a breakpoint was automatically set for you. Press Resume button in the toolbar, Run -> Resume in the menu bar, or F8 on your keyboard to run the application. 37) You should now see the User LED2 on the board blink every 0.5 seconds. 38) To see the value of the output register bit for the output pin connected to the LED: a. Set a breakpoint on a line within pitCh0Handler() b. Go to the EmbSys Registers view, expand the SIUL2 module and scroll down to the GPDO register index which is accessed in the code. Double-click it to read the value. Expand it to see the individual bits. c. Press Resume a few times to see the register value change
View full article
The S32K3 RTD 2.0.0 lacks SIUL2 external interrupt function. Siul2_Icu is part of Icu(Input Capture Unit), the main function of the example should have been: use the Icu and Dio drivers to toggle a LED on a push button. But it doesn't. So this document will show the step-by-step process to add 'SIUL2 external interrupt' function in Siul2_Port_Ip_Example_S32K344 using the S32K3xx RTD LLD(Low Level Driver) and the S32 Configuration Tools. This example is for the S32K3X4EVB-Q257, connected to a PC through USB (OpenSDA) connection. Preparation Setup the software tools Install S32 Design Studio for S32 Platform Install the S32K1xx development package and the S32K1 RTD AUTOSAR 4.4. Both of these are required for the S32 Configuration Tools. Launch S32 Design Studio for S32 Platform Procedure 1. Import Siul2_Port_Ip_Example_S32K344 example File->New->S32DS Project from Example It can be seen that in the Icu (Input Capture Unit Driver) folder of S32K3 RTD 2.0.0, there are only interrupt routines implemented by the Emios module for the time being, and external interrupt routines for the EIRQ pin of the Siul2 module does not exist. Here we import the Siul2_Port_Ip_Example_S32K344 routine, and add the Siul2_Icu part on this basis.   2. Add push button and LED in Pins tool Add the pins for user buttons (SW4 PTB26 SIUL2 eirq13) according to the S32K3X4EVB-Q257.   3. Add IntCtrl_Ip component Go to Peripherals tool. Here we can see that the ‘Siul2_Dio’ and ‘Siul2_Port’ components are already added. From the Components view, click on ‘Add a new configuration component…’ button from the Drivers category. This will bring up a list of non-AUTOSAR components. Locate and then select the ‘IntCtrl_Ip’ component from the list and click OK. Option 1: Keep the default setting after add ‘IntCtrl_Ip’ component(Here we didn't change the settings of ‘IntCtrl_Ip’, nor use IntCtrl_Ip_Init and IntCtrl_Ip_ConfigIrqRouting API to enable interrupts and install handlers in IntCtrl_Ip).This routine only uses one interrupt, so we will call IntCtrl_Ip_InstallHandler and IntCtrl_Ip_EnableIrq those two APIs to install and enable the SIUL2 EIRQ13 IRQ separately. Option 2: User can enable many interrupts in the Interrupt Controller configuration(Note user can only add one interrupt controller configuration in the RTD); Meanwhile, it can set interrupt’s priority separately. The two APIs IntCtrl_Ip_Init and IntCtrl_Ip_ConfigIrqRouting can initialize these interrupts as a whole. The name of the Handler in the Generic Interrupt Settings tab needs to be the same as the name in peripheral_Ip_Irq.c of the corresponding peripheral. For example, this routine uses the PTB26 SIUL2 EIRQ13 external interrupt, which can be found in RTD/src/Siul2_Icu_Ip_Irq.c: ISR(SIUL2_EXT_IRQ_8_15_ISR) According to the "Table 35" of S32K3XXRM reference manual, we can see the SIUL2 EIRQ13(PTB26) external interrupt used in this routine belongs to SIUL_1_IRQn and the Handler name SIUL2_EXT_IRQ_8_15_ISR.   4. Add Siul2_Icu component Click on ‘Add a new configuration component…’ button from the Drivers category. Locate and then select the ‘Siul2_Icu’ component from the list and click OK. Step 5 select SIUL2_0_IRQ_CH_13 because this routine selects the onboard SW4 PTB26 SIUL2 EIRQ13 external interrupt (the onboard SW5 PTB19 pin has no EIRQ external interrupt function, so I did not added here). Step 6 set DIRER0[EIREn] to enable this external interrupt pin. Step 8 set the IFCPR[IFCP] filter clock prescaler. Step 10 input 13 for the Hardware channel due to we use SIUL2 EIRQ13. Step 11 set IFER0[IFEn] to enable the glitch filter for the external interrupt pin. Step 12 set IFMCRn[MAXCNT] to assign value to the external interrupt filter counter. Step 14 select the IcuSiu2Channel_0 channel configured in the IcuSiul2 tab above. Step 15 select the ICU_RISING_EDGE according to the SW4 button circuit (press to generate a rising edge). Step 16 Because the SIUL2 EIRQ external interrupt is used in this routine, ICU_MODE_SIGNAL_EDGE_DETECT mode must be selected. Step 17 add the corresponding callback function name. That is, it corresponds to the notification after the SIUL2 EIRQ external interrupt pin captures the rising edge (the interrupt flag does not need to be cleared here, the driver has already been implemented it).   5. Include the headers for the drivers used in the application #include "Siul2_Icu_Ip.h" #include "IntCtrl_Ip.h"   6. Add Siul2_Icu LLD APIs Siul2_Icu_Ip_Init is used to initialize all Siul2_Icu channels generated by the S32 Configuration Tools (this routine only configures the channel SW4 PTB26 SIUL2 EIRQ13). Siul2_Icu_Ip_EnableInterrupt enable Siul2 IRQ interrupt for the specified channels. Siul2_Icu_Ip_EnableNotification enable callback function of Siul2 IRQ interrupt for the specified channels. This routine uses the SW4 button to trigger the PTB26 SIUL2 EIRQ13 external interrupt callback function SW4_eirq13_PTB26_Callback to flip the PTB18 D33 red LED.   7. Add IntCtrl LLD APIs IntCtrl_Ip_InstallHandler installs the SIUL2_EXT_IRQ_8_15_ISR interrupt handler generated by the S32 Configuration Tools. IntCtrl_Ip_EnableIrq enables the corresponding interrupt. Why input SIUL_1_IRQn and SIUL2_EXT_IRQ_8_15_ISR has been explained at the end of "4. Adding the IntCtrl_Ip component" above. References - S32K3xx Pins and Clocks with RTD - Training - AN13435: SDK/MCAL to Real-Time Drivers - Integration Manual for S32K3 ICU Driver (RTD_ICU_IM.pdf) - User Manual for S32K3 ICU Driver (RTD_ICU_UM.pdf) - Integration Manual for S32K3 PLATFORM Driver (RTD_PLATFORM_IM.pdf) - User Manual for S32K3 PLATFORM Driver (RTD_PLATFORM_UM.pdf)
View full article
The Port_Ci_Port_Ip_Example in S32K1 RTD 1.0.1 lacks GPIO interrupt function. Port_Ci is part of Icu(Input Capture Unit), the main function of the example should have been: use the Icu and Dio drivers to toggle a LED on a push button. But it doesn't. So this document will show the step-by-step process to add 'GPIO interrupt' function in Port_Ci_Port_Ip_Example using the S32K1xx RTD and the S32 Configuration Tools. This example is for the S32K144EVB-Q100 EVB, connected to a PC through USB (OpenSDA) connection. Preparation Setup the software tools Install S32 Design Studio for S32 Platform Install the S32K1xx development package and the S32K1 RTD AUTOSAR 4.4. Both of these are required for the S32 Configuration Tools.   Launch S32 Design Studio for S32 Platform   Procedure 1. Import Port_Ci_Port_Ip_Example_S32K144 example File->New->S32DS Project from Example Although the main function mentions the example use the Icu and Dio drivers to toggle a LED on a push button, it actually just waits in a loop for a delay to blink the LED. Not sure why the implementation of GPIO interrupts(Port_Ci_Icu) is missing.   2. Add push button and LED in Pins tool Add the pins for user buttons (SW2 PTC12 and SW3 PTC13) and LEDRGB_RED (RGB_RED PTD15) according to the S32K144EVB schematic RB1.   3. Add IntCtrl_Ip component Go to Peripherals tool. Here we can see that the ‘Gpio_Dio’ and ‘Port’ components are already added. From the Components view, click on ‘Add a new configuration component…’ button from the Drivers category. This will bring up a list of non-AUTOSAR components. Locate and then select the ‘IntCtrl_Ip’ component from the list and click OK. Keep the default setting after add ‘IntCtrl_Ip’ component, we will call IntCtrl_Ip_InstallHandler and IntCtrl_Ip_EnableIrq those two APIs to install and enable the PORTC IRQ separately. (Here we didn't change the settings of ‘IntCtrl_Ip’, nor use IntCtrl_Ip_Init and IntCtrl_Ip_ConfigIrqRouting API to enable interrupts and install handlers in IntCtrl_Ip.)   4. Add Port_Ci_Icu component Locate and then select the ‘Port_Ci_Icu’ component from the list and click OK. Follow the steps below to configure it. Selecting PORT_2 for ICU Peripheral ISR Name and select IcuIsrEnable at step 6 actually refers to PORT C used in this example. In order to use the GPIO interrupts of the onboard SW2 (PTC12) and SW3 (PTC13) buttons, you need to add one more channel in step 9, and select Port CI Hardware Module and Hardware channel in steps 8 and 10. The button circuit has a pull-down resistor, and it will be pulled high after being pressed, so the rising edge trigger is selected. In step 14, add IcuSignalNotification for PTC12 and PTC13 respectively, that is, the notification after the corresponding GPIO pin input captures the rising edge (there is no need to clear the interrupt flag here, the RTD driver has already done it).   5. Include the headers for the drivers used in the application   6. Add Port_Ci_Icu drivers Port_Ci_Icu_Ip_Init initialize the rising edge of PTC12 and PTC13 set by the S32 Configuration Tools. Port_Ci_Icu_Ip_EnableNotification enable the Callback of PTC12 and PTC13 respectively, and we toggle the blue and red LEDs in the corresponding Callback.   7. Add IntCtrl drivers IntCtrl_Ip_InstallHandler installs the PORT_CI_ICU_IP_C_EXT_IRQ_ISR interrupt handler generated by the S32 Configuration Tools.
View full article
Migrating an SDK project for S32K1xx devices between SDK v4.0.1 and v4.0.2 is not as simple as attach and detaching the SDKs. It is complicated by the fact that SDK v4.0.1 is supported by only S32DS v3.3 and SDK v4.0.2 is supported by only S32DS v3.4. So this means both SDKs will not be present at the same time in one version of S32DS. In addition, the method for attaching the SDKs changed between SDK v4.0.1 and v4.0.2. In v4.0.1, the SDKs were added to the S32DS project via a link. In v4.0.2, the SDK files are added to the S32DS project by copying the actual files into the project. To overcome this, it is necessary to perform some manual operations. The steps required are detailed in this document, along with the necessary steps to adapt the .mex file containing the S32 Configuration Tools settings. Due to differences in projects based on the method of creation, there are 3 scenarios to be covered here which are assumed to be the most common: Project was created by 'New Project from Example' wizard and one of the SDK example projects was selected. Project was created by 'New Application Project' wizard and the SDK was selected for attachment within the wizard. Project was existing one and SDK was attached using the SDK management tool. Due to enough similarities between the projects, the last two will be covered as one scenario, under the heading 'New Application Project'. The first one will be covered under the heading 'New Project from Example'. Prerequisites Install S32 Design Studio IDE 3.4 Install the S32K1xx development package and S32SDK S32K1XX RTM 4.0.2 package Procedure New Project from Example For this demonstration, the S32K1xx SDK v4.0.1 example project 'flexio_i2s_master_s32k144' will be used. Open or create the project within S32DS 3.3 Expand project directory in Project Explorer and look for .mex file If no .mex file is present, then right click on project name and select 'S32 Configuration Tool -> Open Pins' (could select any tool within S32 Configuration Tool). Even though the .mex file contains the settings for S32 Configuration Tools, the same settings are also preserved in YAML code placed into the headers of each of the .c files generated by the S32 Configuration Tools into the 'board' folder in the project. By opening the S32 Configuration Tools, it detects there is no .mex file and scans the generated files for the YAML code. If YAML code is found, then a new .mex file is produced and placed in the project. The perspective is changed to the Pins Tool, nothing more needs to be done, .mex file has been created from the YAML code. If no YAML code had been found, then the user would be presented with a menu to select target device and SDK. Switch back to C/C++ perspective to confirm. Open S32DS 3.4 and import the project. It is important to note that separate workspaces should be used for S32DS 3.3 and S32DS 3.4. The project should be imported into the S32DS 3.4 workspace so the checkbox 'Copy projects into workspace' should be ticked. Right-click on Project -> Properties -> C/C++ Build -> Settings -> Standard S32DS C Compiler -> Includes, then delete all paths which contain 'S32_SDK_PATH' Repeat for Standard S32DS Assembler -> General Apply and Close The files in the SDK folder were included in the project as links and not actual files, and since the SDK 4.0.1 is not installed to S32DS 3.4, the links point to non-existing files. This means the Attach function in the SDK manager will not be able to replace them with the corresponding files from SDK 4.0.2 because it doesn't know how to replace files which don't exist. From Project Explorer, delete folder ' SDK' from the project. Now the project is ready to use the SDK manager to detach the old SDK and attach the new SDK. In Project Explorer, right-click on Project -> SDKs. When the SDK manager launches, it scans the project for any attached SDKs. In the case of this example, an SDK is detected as attached, but since it does not match any installed SDKs, a message appears asking to detach SDK 4.0.1. Since this is a desired action, click OK. With SDK 4.0.1 already detached, select SDK 4.0.2, click 'Attach/Detach...' Click 'Select All' to attach the SDK to all build configurations. This sets up the include paths, and linker paths for the SDK for each build configuration. If desired, the build configurations could be selected individually. Click OK to complete the selections. To apply the changes and exit the SDK manager, click 'Apply and Close'. The SDK Manager detects that some of the files from the new SDK are replacing existing files in the project. By default, all conflicting files are set to replace the existing file. If desired, individual files can be deselected. Please note, with the checkbox for 'Backup project files' ticked, any files replaced will be preserved in a backup folder for future recovery, comparison, etc. In general, it may be wise to allow the file to be replaced and later merge with the customizations in the backup folder. For this example, no modifications were made, so default settings are kept. Click OK to complete the process. The new SDK is attached and the new SDK folder can be identified. The .mex file contains the settings for the S32 Configuration Tools, however, it is still set for the SDK 4.0.1. It must be manually updated so the S32 Configuration Tools can be used to generate the new code for the 'board' folder. Right-click on .mex file and select 'Open With -> Text Editor'. All that is required is to modify the mcu_data section containing the SDK name: 's32sdk_s32k1xx_rtm_401' -> 's32sdk_s32k1xx_rtm_402' Now save the change. Next, the files in the 'board' folder must be regenerated from the S32 Configuration Tools to reflect the new SDK. Right-click on the .mex file and select 'Open With -> S32 Configuration Tools'. A warning message appears indicating that it has detected the mex file was created in an older version of the tool and that once the mex file is saved in the current tool, it may no longer open in an older version of the tool. This is expected. Click OK. Notice the error symbol. Mouse-over to see the details. It is an error with Peripherals tool. Select Peripherals tool. The issue is with edma_config_1, because it is highlighted red. Click on it to see the interface. The interface changed from the previous version to allow for multiple configurations where previously it supported only one. To resolve the error a new configuration must be added to the list. Click on the '+' as shown to add the new configuration. This particular error will only appear for projects which include the EDMA module. The Problem Indicator is now green, this means there are no warnings or errors. It is now time to generate the code, click 'Update Code' A menu appears identifying new and/or updated files. If desired, selecting 'change' on a row will open a comparison tool showing the changes between the existing and the new versions of the associated file. Click OK to proceed. Switch to C/C++ perspective Errors on project are now gone. If the project successfully built before the conversion, then build again to confirm everything was converted properly.   New Application Project For this demonstration, a new project will be created in S32DS 3.3 using the New Application Project wizard and the S32K1xx SDK 4.0.1 will be selected during project creation. Import the project into S32DS 3.4 Use the SDK Manager to detach the old SDK and then attach the new SDK. In Project Explorer, right-click on Project -> SDKs. When the SDK manager launches, it scans the project for any attached SDKs. In the case of this example, an SDK is detected as attached, but since it does not match any installed SDKs, a message appears asking to detach SDK 4.0.1. Since this is a desired action, click OK With SDK 4.0.1 already detached, select SDK 4.0.2, click 'Attach/Detach...' Click 'Select All' to attach the SDK to all build configurations. This sets up the include paths, and linker paths for the SDK for each build configuration. If desired, the build configurations could be selected individually. Click OK to complete the selections. To apply the changes and exit the SDK manager, click 'Apply and Close'. The SDK Manager detects that some of the files from the new SDK are replacing existing files in the project. By default, all conflicting files are set to replace the existing file. If desired, individual files can be deselected. Please note, with the checkbox for 'Backup project files' ticked, any files replaced will be preserved in a backup folder for future recovery, comparison, etc. In general, it may be wise to allow the file to be replaced and later merge with the customizations in the backup folder. For this example, no modifications were made, so default settings are kept. Click OK to complete the process. The .mex file contains the settings for the S32 Configuration Tools, however, it is still set for the SDK 4.0.1. It must be manually updated so the S32 Configuration Tools can be used to generate the new code for the 'board' folder. Right-click on .mex file and select 'Open With -> Text Editor'. All that is required is to modify the mcu_data section containing the SDK name: 's32sdk_s32k1xx_rtm_401' -> 's32sdk_s32k1xx_rtm_402' Now save the change. Next, the files in the 'board' folder must be regenerated from the S32 Configuration Tools to reflect the new SDK. Right-click on the .mex file and select 'Open With -> S32 Configuration Tools'. A warning message appears indicating that it has detected the mex file was created in an older version of the tool and that once the mex file is saved in the current tool, it may no longer open in an older version of the tool. This is expected. Click OK. Check for any errors or warnings by looking for the yield sign. It will change color based on the conditions: Green = No Problems, Yellow = Warnings, Red = Errors. Mouse-over the icon for more information on the location of the error. Aside from resolving warnings and errors, there should be no changes required as the settings have been preserved from the original project. In this example, there are no warnings or errors, so it is possible to proceed with updating the generated files. Click 'Update Code' A menu appears identifying new and/or updated files. If desired, selecting 'change' on a row will open a comparison tool showing the changes between the existing and the new versions of the associated file. Click OK to proceed. Change back to C/C++ perspective. Errors on project are now gone. If the project successfully built before the conversion, then build again to confirm everything was converted properly.
View full article
The S32 Flash Tool is provided with support for a few QuadSPI flash memory devices which are typically the devices provided as part of the standard NXP EVB for each of the support NXP Automotive Processors. This will work for most users, but some may select a device for which support is not included with the tool. The FlashSDK was created to provide an easy method for adding support for additional QuadSPI flash memory devices to the S32 Flash Tool. First, a brief explanation of how the S32 Flash Tool works. The S32 Flash Tool programs external flash devices such as QuadSPI, SD, MMC, and eMMC. For each external flash device, there is a flash device-specific flash algorithm file. This flash algorithm file is downloaded by S32 Flash Tool to the target device SRAM, where it will be executed by the target device BootROM. The S32 Flash Tool then sends commands to the flash algorithm along with the image to be programmed to external flash. The flash algorithm will perform the programming of the image to the external flash device. The Flash SDK provides the capability to produce new flash algorithm files, which could then be uploaded to the target device by the S32 Flash Tool and then used to program images to the associated external flash device. The FlashSDK is provided in the form of a S32 Design Studio for S32 Platform v3.x project. This example project, as provided, will build and output a binary file similar to the MX25UM51245G.bin, MX25UW51245G.bin files included in the S32 Flash Tool. The project is designed to build for the Arm M7 core. It is located within the S32 Flash Tool installation directory and inside the folder 'FlashSDK_Ext'. For example, since the S32 Flash Tool is included within the S32 Design Studio 3.x, if the default installation settings were used, this could be found at the path: C:\NXP\S32DS.3.x\S32DS\tools\S32FlashTool\FlashSDK_Ext There is some limited documentation included with the FlashSDK, it can be found by navigating to the '...\FlashSDK_Ext\doc\html' directory and then open 'index.html' with your web browser. In this document, an example process for using the FlashSDK to produce a new binary file will be detailed. Prerequisites Install S32 Design Studio Locate or prepare an image file to be programmed to flash memory Setup hardware to Serial Boot mode Procedure Launch the S32 Design Studio Import the FlashSDK project, using copy to workspace option to preserve the original project. File -> Import Select 'Existing Projects from Workspace' Click 'Browse', locate and then select the 'FlashSDK_Ext' folder, check the box for 'Copy projects into the workspace' Open source files. The files in the project which should be modified for a new flash device are: ...\FlashSDK\Algo\Generic\qSPI_Algorithm.c and qSPI_chip_commands.h Locate the files within the Project Explorer and double click them to open them in the editor. Edit source files. The header file 'qSPI_chip_commands.h' contains many #defines for the flash memory chip which should be adjusted to your new device. Please refer to the reference manual provided by the flash device manufacturer for details on the correct values. As you can see, it is currently setup for the MX25UM51245G device from Macronix. Build the project. The project is setup for 2 build types for you, Debug and Release. The Release build type is more efficient and will run faster, and the Debug build type will allow you to run the debugger in attach mode to investigate issues with the changes you've made. Test new binary on the target and flash memory device. Follow the usual steps to use the S32 Flash Tool.
View full article
      Product Release Announcement Automotive Microcontrollers and Processors S32 Design Studio for Power Architecture v2.1 Update 13          What is new? Integrated Radar SDK RTM 1.5.0 (replacing 1.4.0) This is a cumulative update - it includes all the content of previous updates (Update 1,Update 2, Update 7, Update 8, Update 10, Update 12)   Installation instructions The update is available for online installation (via S32DS Extensions and Updates) or offline installation (direct download link)  installation:  go to menu "Help" -> "S32DS Extensions and Updates" dialog  select from available items and click "Install/Update" button offline installation:   go to S32 Design Studio for Power product page -> Downloads section or use direct link to download the update archive zip file      Start S32 Design Studio and go to "Help" -> "S32DS Extensions and Updates", then click 'Go to Preferences' link And add a new site "Add..." repository and browse to select the downloaded update archive zip file you downloaded in the previous step   Select the 'S32 Design Studio for Power Architecture Device Package' and 'Update with S32 SDK 3.0.2 for Power Architecture' packages and click "Install/Update" button.   This will start the update installation process.
View full article
        Product Release Announcement Automotive Microcontrollers and Processors S32 Design Studio v3.3 Vision Extension Package for S32V234 1.2.0          What is new? Integrated VSDK 1.6.0   Installation instructions The update is available for online installation (via S32DS Extensions and Updates) or offline installation (direct download link)  installation:  go to menu "Help" -> "S32DS Extensions and Updates" dialog  select from available items and click "Install/Update" button offline installation:   go to S32 Design Studio for S32 Platform product page -> Downloads section or use direct link to download the update archive zip file        Start S32 Design Studio and go to "Help" -> "S32DS Extensions and Updates", then click 'Go to Preferences' link And add a new site "Add..." repository and browse to select the downloaded update archive zip file you downloaded in the previous step       Select the 'S32 Design Studio for Power Architecture Device Package' and 'Update with S32 SDK 3.0.2 for Power Architecture' packages and click "Install/Update" button.   This will start the update installation process.
View full article
      Product Release Announcement Automotive Microcontrollers and Processors S32 Design Studio for Power Architecture v2.1 Update 12          What is new? Integrated S32 SDK for Power Architecture RTM 3.0.3 (replacing 3.0.2) Integrated AMMCLIB 1.1.21 This is a cumulative update - it includes all the content of previous updates (Update 1,Update 2, Update 7, Update 8, Update 10)   Installation instructions The update is available for online installation (via S32DS Extensions and Updates) or offline installation (direct download link)  installation:  go to menu "Help" -> "S32DS Extensions and Updates" dialog  select from available items and click "Install/Update" button offline installation:   go to S32 Design Studio for Power product page -> Downloads section or use direct link to download the update archive zip file      Start S32 Design Studio and go to "Help" -> "S32DS Extensions and Updates", then click 'Go to Preferences' link And add a new site "Add..." repository and browse to select the downloaded update archive zip file you downloaded in the previous step   Select the 'S32 Design Studio for Power Architecture Device Package' and 'Update with S32 SDK 3.0.2 for Power Architecture' packages and click "Install/Update" button.     This will start the update installation process.
View full article
      Product Release Announcement Automotive Microcontrollers and Processors S32 Design Studio for Power Architecture 2017.R1 Update 9          What is new? S32 SDK for Power Architecture 2.0.0 RTM supporting  MPC5741P, MPC5742P, MPC5743P, MPC5744P, MPC5744B, MPC5745B,  MPC5746B, MPC5744C, MPC5745C, MPC5746C, MPC5747C, MPC5748C, MPC5746G, MPC5747G, MPC5748G, S32R274, S32R372 (see the S32 SDK release notes) AMMCLIB version 1.1.14 (see the AMMCLIB MPC574xP example release notes) Radar SDK RTM, version 1.2.0 (see the RSDK release notes) This is a cumulative update - it includes all of the content of previous updates (Update 1, Update 2, Update 3, Update 4, Updates 5 and 6, Update 7, Update 8 ). Installation instructions The update is available for online installation (via S32DS Eclipse Updater) or offline installation (direct download link)  installation:  go to menu "Help" -> "Install New Software..." dialog  select predefined update site "S32DesignStudio - http://www.nxp.com/lgfiles/updates/Eclipse/S32DS_POWER_2017.R1/updatesite" select all available items and click "Next" button offline installation:   go to S32 Design Studio for Power product page -> Downloads section or use direct link to download the update archive zip file Start S32DS and go to "Help" -> "Install New Software..." Add a new "Archive" repository and browse to select the downloaded update archive zip file you downloaded in the previous step Select all available items and click "Next" button.   This will start the update installation process.
View full article
      Product Release Announcement Automotive Microcontrollers and Processors S32 Design Studio for Power Architecture v2.1 Update 1          What is new? Integrated Radar SDK RTM 1.3.0 (see the Radar SDK release notes) Installation instructions The update is available for online installation (via S32DS Extensions and Updates) or offline installation (direct download link)  installation:  go to menu "Help" -> "S32DS Extensions and Updates" dialog  select from available items and click "Install/Update" button offline installation:   go to S32 Design Studio for Power product page -> Downloads section or use direct link to download the update archive zip file  Start S32 Design Studio and go to "Help" -> "S32DS Extensions and Updates", then click 'Go to Preferences' link And add a new site "Add..." repository and browse to select the downloaded update archive zip file you downloaded in the previous step Select the 'RSDK 1.3.0 for S32R274 and S32R372' package and click "Install/Update" button.   This will start the update installation process.
View full article
      Product Release Announcement Automotive Microcontrollers and Processors S32 Design Studio for Power Architecture 2017.R1 Update 3          What is new? S32 SDK for Power Architecture 0.8.3 EAR for S32Rx7x. This is a cumulative update - it includes all of the content of previous updates (Update 1, Update 2 ). Installation instructions The update is available for online (via S32DS Eclipse Updater) or offline installation (direct download link) online installation:  go to menu "Help" -> "Install New Software..." dialog  select predefined update site "S32DesignStudio - http://www.nxp.com/lgfiles/updates/Eclipse/S32DS_POWER_2017.R1/updatesite" select all available items and click "Next" button   offline installation:   go to S32 Design Studio for ARM product page -> Downloads section or use  direct link to download the update archive zip file  Start S32DS and go to "Help" -> "Install New Software..." Add a new "Archive" repository and browse to select the downloaded update archive zip file you downloaded in the previous step Select all available items and click "Next" button.   This will start the update installation process.
View full article
* Brief Periodical function call by LPIT timer ******************************************************************************** * Detailed Description: * Application performs function call on configurable period. Period in ms is * taken from potentiometer connected to ADC. * * * * ------------------------------------------------------------------------------ * Test HW: S32K144EVB, * MCU: S32K144 * * Debugger: PeMicro USB-ML-PPCNEXUS * * Target: internal_FLASH (debug mode, debug_ram and release mode) *
View full article
S32 Design Studio (S32DS) for ARM supports IAR Plugin, and the user can use IAR specific features in S32DS with IAR toolchain for ARM. This document describes the way to convert S32DS project to IAR EW based project using project exporting wizard in S32DS. This guidance is based on the NXP S32K144 microcontroller, and compatible with S32K14x / S32K11x family.   The version of each IDE which is used for this document is as follows: S32 Design Studio for Arm 2018.R1 IAR Embedded Workbench for ARM 8.32.1.18631     1. Install IAR Plugin using IAR Embedded Workbench plugin manager on S32DS Help - Install New Software   Put "IAR Embedded Workbench for Eclipse " as the repository for new installation of software.     Help - IAR Embedded Workbench Plugin Manager     Install IAR Plugin which is matched with your IAR version.         2. Create S32DS Project File - New - S32DS Application Project   The tool chain should be chosen as IAR Toolchain. Be noted that the IAR 7.x toolchain is different from the IAR 8.x.   The project is created as follows.     3. Export S32DS Application Project File - Export   Choose S32 Design Studio - Project Info Export Wizard   Now "ProjectInfo.xml" was created. "ProjectInfo.xml" should be used for creating a project in the IAR EW.   4. Create IAR EW Project The way to create IAR project as described below. The snapshots are based on IAR EW 8.32.1. Details may vary.   5. Connect the Project Use the menu - Project - Add Project Connection, and choose "Freescale Processor Expert".   Select the "ProjectInfo.xml" file which was created at step #3.    Now, the project which had been created in IAR was connected to the S32DS project.   The created IAR project should be modified if the user wants to use the project with S32DS SDK to build and debug under IAR EW environment as follows.   1. Modify the Linker configuration and remove ProjectInfo.xml Remove "ProjectInfo.xml"   Linker configuration from the project Options   Even though the user modified the linker configuration, a definition in IAR EW  for "device_registers.h" from SDK will cause build error when trying building the project.   This error will be eliminated by inserting Chip specific definition into IAR project. If you take a look into the "device_register.h", you can find the definition as follows.   2. Define symbols  Right mouse click on the Project name - Options   Write the symbols referred from "device_register.h". The symbols may vary (e.g., CPU_S32K146, CPU_S32K142, ...).   3. Build and Debugger configuration Options - Debugger   I used PE micro's OpenSDA on S32K144EVB for this document. After choosing debugger and clicking Download and Debug (Ctrl+D), you can see the P&E Configuration Manager as follows. Just choose appropriate configuration, and select the correct part number of S32K by clicking Select New Device.   Finally, you can download and debug the converted IAR EW project with S32DS SDK.
View full article