MCX Microcontrollers Knowledge Base

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

MCX Microcontrollers Knowledge Base

Discussions

Sort by:
The following steps will guide you through opening the  hello_world  application. The instructions for compiling and debugging the Cortex M33 core are covered in the instructions below. Build an Example Application Please use IAR Embedded Workbench for Arm version 9.50.1 or above. First, unzip the previously downloaded FRDM-MCXW71 SDK package Open the desired example application workspace. Most example application workspace files can be located using the following path: <install_dir>/boards/<sdk_board_name>/<example_type>/<application_name>/iar Select the desired build target from the drop-down. For this example, select the "hello_world - debug" target Open the project properties by doing a right-click on the project and selecting "Options" Now, go to the "Debugger" section and change the debugger driver to CMSIS DAP. Press the OK button To build the application, click the "Make" button, highlighted in red below The build will complete without errors   Note: In case of building errors, make sure that the correct board is selected, right-click in Project → Options → General Options → Target → Device. Select the NXP MCU you are using and is supported by the IAR version you have installed.   Run an Example Application Connect the development platform to your PC via USB cable to 'MCU-Link' port Click the "Download and Debug" button to download the application to the target The application is then downloaded to the target and automatically runs to the main() function Run the code by clicking the "Go" button to start the application The  hello_world  application is now running on the MCU.
View full article
The most recent versions of MCUXpresso IDE count with a terminal emulation application. This tool can be used to display information sent from your NXP development platform's virtual serial port 1. Open the MCUXpresso IDE   2. Launch the MCUXpresso IDE terminal by clicking on the "Open a Terminal" button on the top of the IDE or press "Ctrl + Alt + Shift + T" 3. Select Serial Terminal   4. Configure the serial port settings (using the LPC-Link2 COM port number) to 115200 baud rate, 8 data bits, no parity and 1 stop bit, then press the "OK" button     5. Verify that the connection is open. If connected, MCUXpresso IDE will look like the figure below at the Terminal view     6. You're ready to go  
View full article
Clone an Example Project Using MCUXpresso Config Tool    The following steps will guide you through the manipulation of the general-purpose outputs. The example sets up a SCTimer to generate a PWM signal and change a LED brightness. Open the MCUXpresso Config Tool In the wizard that comes up, select the “Create a new configuration based on an SDK example or hello word project” radio button and click on Next On the next screen, select the location of the MCUXpresso SDK . The SDK package must be unzipped beforehand. Then select the IDE that is being used. Note that only IDEs that were selected in the online SDK builder when the SDK was built will be available and click on clone select example. Then select the project to clone. For this example, we want to use the gpio led output project. You can filter for this by typing “ctimer” in the filter box and then selecting the  “ctimer_match_interrupt_example”  example project. You can then also specify where to clone the project and the name. Then click on Finish After cloning go to the directory you selected and open the project for your IDE. Import, compile, and run the project as done in previous sections You should see the BLUE and RED LED changing back and forth Terminate the debug session Use MCUXpresso IDE Pins Tools to Modify Example   Note: Previously, you had to clone an SDK project like in the previous step. Open the pins tool by selecting “ConfigTools” on the top right hand of the file explorer window and then select “ Open Pins”   The pins tool should now display the pin configuration for the ctimer project   In the Pins view deselect “Show dedicated pins” and “Show no routed pins” checkboxes to see only the routed pins. Routed pins have a check in a green box next to the pin name. The functions selected for each routed pin are highlighted in green In the current configuration, PIO3_2 and PIO3_3 are routed as the outputs of the CTimer. Let’s add a third Ctimer Match output and enable the Green LED Select “Show no routed pins” to see the other options. To enable the third Ctimer Match Output, browse the column for Ctimer and select and output. In this example, we will select, Ctimer4 Match 2 on PIO3_6. Select the item in the Ctimer column to enable Now, let’s route the Green LED. In the search box type “green” so that the routed pin for this LED is shown. Finally, click the box under the GPIO column. The box will highlight in green, and a check will appear next to the pin Next configure the GPIO pin as an output in the “Routing Details” window Now it’s time to implement these changes into the project by exporting the new updated pin_mux.c and pin_mux.h files that are generated by the Pins tool. Click on Update Project in the menu bar The screen that pops up will show the files that are changing and you can click on “diff” to see the difference between the current file and the new file generated by the Pins tool. Click on “OK” to overwrite the new files into your project Let’s add some additional code to the example. Open  simple_match_interrupt.c  file and add the following macros for the third ctimer output. Add the Green LED functions as well. Some additional code to be implemented will be the third ctimer’s callback, this can be copied from  ctimer_match1_callback  and modify the content to match2. To be able to visually identify the new ctimer, we will remove one of the previous ctimers as shown   The main function will need to include the initialization of both the Green LED and the Ctimer Build and download the project as done in the previous section Run the application. You should now see the Green and Blue LED blinking back and forth Terminate the debug session  
View full article
eIQ Time Series Studio includes a command line interface (CLI) that allows you to generate time series models via the command line just like you would in the GUI. Full documentation of this feature can be found in the eIQ TSS documentation A Quick Start with the basic key commands is also available.  In TSS version 1.5.5, there are a few command line interface issues to be aware of that will be addressed in the next TSS release. In the meantime, here are workarounds and clarifications: Library Compile Error Generating the TSS library with the library compile option may not work in all circumstances and may return a "Not Found" error.  Workaround: This will be fixed in the next TSS release.    Windows Workspace Permissions On Windows PCs, specify the workspace location when launching the TSS CLI server. The default workspace on Windows may not work properly due to a permissions issue, resulting in the following error: [PYI-12556:ERROR] Failed to execute script 'server' due to unhandled exception!   Workaround: Specify a workspace directory location where TSS has read/write access with the tss_cli engine launch --workspace <directory_location> argument   Do Not Run CLI and GUI Simultaneously The TSS CLI and TSS GUI should not be run at the same time. Also only one user should interact with the TSS CLI at a time to avoid race conditions in the TSS database if it is on a shared server.    Engine Launch Syntax Correction The TSS CLI documentation uses tss_cli engine launch –engine <path to tss_engine>, but the correct syntax is: tss_cli engine –exe_path <path to tss_engine>   Windows Command Prompt Delimiters When using Windows Command Prompt and importing sensor data with the signal import command, use double quotes (" ") to specify the delimiters (ie a space in this case) instead of the single quotes ('  ')    Terminology Clarification "Optimization" in the documentation refers to the process of training the time series model.   Finding the Optimization ID during training The my-opt-id value can be found by viewing the optimization list with tss_cli optimization list --project_name cli_test_project   Finding the Label Name The label-name value used for emulation commands can be found by viewing the name of the signals with tss_cli signal list --project_name cli_test_project   Boolean Arguments Arguments such as quick search during training are Boolean values, which are automatically enabled when included as part of the command line argument. For example, use -qs rather than -qs true. Below is an example using the command line interface with eIQ Time Series Studio: #Assumes the following items: #1) tss_cli is in the executable path (C:\Program Files\NXP\eIQ_TimeSeriesStudio-1.5.5) #2) The dataset is in C:\tss\dataset #3) A workspace will be setup in C:\tss\workspace #4) The license key has already been retrieved from the TSS GUI #5) The TSS GUI is not also concurrently running #Install license Key tss_cli.exe license activate --key <your_key> #Start TSS CLI tss_cli engine launch -e "C:\Program Files\NXP\eIQ_TimeSeriesStudio-1.5.5\tss_engine\tss_engine.exe" --port 18000 --workspace "C:\tss\workspace" #Install license key tss_cli license activate --key <your_key> #Create a classification project for a FRDM-MCXN947 tss_cli project create --project_name cli_fan_project --algo_type cls --device FRDM-MCXN947 --channels 3 --label_target_num 4 #List all projects in the workspace and see details for the newly generated cli_fan_project tss_cli project list tss_cli project query --project_name cli_fan_project #Add training data tss_cli signal list --project_name cli_fan_project tss_cli signal import --project_name cli_fan_project --signal_name ON --file_path C:\tss\data\fan_state_monitoring_3channel\train\train_on.csv --label_id 1 --delimiter " " tss_cli signal import --project_name cli_fan_project --signal_name OFF --file_path C:\tss\data\fan_state_monitoring_3channel\train\train_off.csv --label_id 2 --delimiter " " tss_cli signal import --project_name cli_fan_project --signal_name FRICTION --file_path C:\tss\data\fan_state_monitoring_3channel\train\train_friction.csv --label_id 3 --delimiter " " tss_cli signal import --project_name cli_fan_project --signal_name CLOG --file_path C:\tss\data\fan_state_monitoring_3channel\train\train_clog.csv --label_id 4 --delimiter " " #Check training data tss_cli signal query --project_name cli_fan_project --signal_id 1 #Start training the model. It will print out an opt_ID number, which the first time you run it will be "1". tss_cli optimization start --project_name cli_fan_project -qs --opt_name cli_fan_opt --signals 1 2 3 4 #Get opt_id number while training is running tss_cli optimization list --project_name cli_fan_project #Check how far along the training is and get ranking of models to choose a result_ids tss_cli optimization progress --project_name cli_fan_project --opt_id 1   #Can stop the training if feel like have enough results tss_cli optimization stop --project_name cli_fan_project --opt_id 1 #Get the result_ids of the best result. It will also be the top ID when checking the progress above. In this case will use 48 tss_cli optimization results --project_name cli_fan_project --opt_id 1 #Get Execution Time estimate for that model tss_cli library time_estimate --project_name cli_fan_project --opt_id 1 --result_id 48   #Get Label Names tss_cli signal list --project_name cli_fan_project   #Emulate the library on test data tss_cli emulation launch --project_name cli_fan_project --opt_id 1 --result_ids 48 --test_file_info "1" C:\tss\data\fan_state_monitoring_3channel\test\test_on.csv " " --test_file_info "2" C:\tss\data\fan_state_monitoring_3channel\test\test_off.csv " " --test_file_info "3" C:\tss\data\fan_state_monitoring_3channel\test\test_friction.csv " " --test_file_info "4" C:\tss\data\fan_state_monitoring_3channel\test\test_clog.csv " " #Create a TSS library tss_cli library compile --project_name cli_fan_project --opt_id 1 --result_id 48 --save_path "C:\tss\" --arch "cortex-m33" --toolchain "GCC" #Create a TSS example project tss_cli library sample_project --project_name cli_fan_project --opt_id 1 --result_id 48 --save_path "C:\tss" --arch "cortex-m33" --toolchain "GCC"  
View full article
The attached lab will describe how to add eIQ Time Series Studio generated libraries to an existing NXP embedded application.   It describes how to add the TSS library files to your application and configure the project settings in VS Code, MCUXpresso IDE, IAR, and Keil. It also covers how to call the TSS API from existing user code so that you can quickly and easily add time series ML analysis to  your embedded application.  For details on how to create a time series model with eIQ Time Series Studio, see the Getting Started with TSS Lab.
View full article