Multi Source Translation Content

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Multi Source Translation Content

讨论

排序依据:
Multi-Stream YOLOv8 Object Detection with Ara240 DNPU on i.MX (ara2-vision-examples) Multi-Stream YOLOv8 Object Detection with Ara240 DNPU on i.MX This post shows a walkthrough of the ARA2 Vision Examples package and its multi-stream YOLOv8 object detection application. The ara2-vision-examples package provides vision AI examples for NXP i.MX platforms using Ara240 DNPU acceleration. It demonstrates real-time video processing with AI/ML inference capabilities such as object detection, classification, pose estimation, and semantic segmentation. This walkthrough focuses on the multistream_yolov8 application, which uses GStreamer to process up to eight simultaneous video streams, run YOLOv8 object detection on each stream, and display the results in a single mosaic view. Supported Platforms FRDM i.MX 8M Plus FRDM i.MX 95 Key Features Multi-stream video processing from 1 to 8 streams YOLOv8 object detection accelerated by Ara240 DNPU Support for YOLOv8n, YOLOv8s, YOLOv8m, YOLOv8l, and YOLOv8x models GStreamer-based video pipeline Mosaic display output with bounding boxes Runtime options for stream count, model selection, synchronization, and endpoint selection FPS and IPS performance overlay per stream Running the Demo Run the application with the default settings: multistream_yolov8 Run with a specific number of streams: multistream_yolov8 -s 4 Select a different YOLOv8 model: multistream_yolov8 -s 4 --model yolov8s Run eight streams for maximum throughput: multistream_yolov8 -s 8 --sync false Enable synchronized playback: multistream_yolov8 -s 4 --sync true Walkthrough Video In the attached video, it is shown how to launch the application, configure the number of streams, select different YOLOv8 models, and view the object detection results in the mosaic display. This video is currently being processed. Please try again in a few minutes. (view in My Videos) Links ARA2 Vision Examples repository: https://github.com/nxp-imx-support/ara2-vision-examples Multi-stream YOLOv8 README: https://github.com/nxp-imx-support/ara2-vision-examples/blob/main/tasks/object-detection/yolov8n/multistream-gstreamer/README.md
查看全文
Ara240 Run Time Environment (rt-sdk-ara2) The Runtime SDK for AI/ML acceleration using the Ara240 NPU on NXP i.MX SoCs, provides the runtime environment for the Ara‑2 NPU.   Main Purpose of the Package    1. Provide the runtime environment for the Ara‑2 NPU This runtime sdk package installs everything needed for an i.MX system to communicate with and utilize the Ara240 NPU hardware, including: NPU drivers  Low‑level utilities (metrics, hardware bring‑up, flash tools) Proxy services that interface applications with the NPU Firmware loaders and NPU configuration files 2. Allow users to run AI/ML inference models on the NPU The Ara240 runtime environment includes tools for: Downloading pre‑compiled AI/ML models Running performance tests on the NPU Running classification, detection, pose, and segmentation models Inspecting HW IPS (inference/second) and real hardware performance   Scripts such as: fetch_models.sh ara_metrics.sh chip_info.sh program_flash.sh run_models_perf.sh 3. Automatically configure and optimize the i.MX system Installation does the following automatically: Expands system partition to handle large models (LLMs/VLMs) Sets up an 8GB SWAP for devices with limited RAM Prepares the runtime environment for AI workloads 4. Manage and update Ara‑2 firmware The package contains scripts to: Check the installed firmware version ( chip_info.sh ) Update firmware if needed ( program_flash.sh ) 5. Provide systemd service for automatic startup The SDK installs: A systemd service: rt‑sdk‑ara2.service   Walkthrough Video Below is the walkthrough video for this package This video is currently being processed. Please try again in a few minutes. (view in My Videos)
查看全文
MCUXpresso Config Tools: How to Use the Clocks Tool (Japanese Blog) table of contents Introduction In what situations can Clocks Tool be used? Installing Config Tools Browse Tool screen configuration Basic Terminology for Using Clocks Tool Demonstration: Change the CPU core clock settings and alter the LED blinking speed. Bonus 1 - Clock settings are already available as presets. Bonus 2 - Where are the settings values that were automatically generated by the initialization code? Introduction MCUXpresso is a microcontroller development software platform provided by NXP. In addition to the MCUXpresso IDE, it also offers MCUXpresso for VSC (Visual Studio Code) and Config Tools to assist with peripheral configuration. Config Tools consists of tools such as the " Pins Tool " for setting pins and the " Clocks Tool " for configuring clock settings, and its key feature is that initial setup of the microcontroller can be performed intuitively and easily via a GUI . In this article, we will focus on the "Clocks Tool," which is responsible for clock settings. Clock settings are a crucial element directly impacting microcontroller performance, power consumption, and the operation of each peripheral. However, the clock tree can be complex, making it difficult to understand which clock is being used where . Clocks Tool allows you to visualize and configure clock sources, frequency division settings, and the clock supply status to each peripheral. It can also automatically generate initialization code based on the settings. When you install the MCUXpresso IDE , Config Tools are also installed, making them available as a built-in feature of the IDE . On the other hand, in the Visual Studio Code ( VSC ) environment, which has become increasingly popular in embedded development in recent years, you can similarly use Config Tools (including Clocks Tool ) by installing MCUXpresso -related extensions. There are no significant differences in the functionality of Config Tools between the IDE version and the VSC version. This article explains how to install Config Tools in the VS Code environment, how to use the tools, and finally demonstrates how to change the CPU clock settings within Clocks Tool and alter the LED blinking speed using the FRDM-MCXN947 . In what situations can Clocks Tool be used? When you want to check the existing internal clock settings (clock tree) When you want to adjust and optimize the operating frequency for each module When you want to consider a configuration that lowers the clock frequency with low power consumption in mind. Installing Config Tools This guide explains how to install Config Tools in the VS Code environment. *If you haven't installed MCUXpresso for VS Code yet, please refer to this blog post. Installing MCUXpresso for VSC and SDK (Japanese blog) After launching VS Code , select MCUXpresso from the left-hand panel, and then click Open MCUXpresso Installer from the Quick Start Panel . The installer will launch. Select MCUXpresso Configuration Tools and click Install in the upper right corner. (This blog post describes the installation of MCUXpresso Config Tools v26.03.) You will be prompted to log in to MyNXP as soon as the installation begins. After logging in, the License Agreement will be displayed. Please review its contents and agree to them. *Please restart VS Code after installation. Q. What if the installation fails? A. Please download the installer appropriate for your PC's OS environment from the following website and try it. MCUXpresso Config Tools | Software Development for NXP Microcontrollers (MCUs) | NXP Semiconductors As you proceed with the installation, the following screen will appear on the initial screen. If you do not see anything relevant, you can close it. To access Config Tools from VS Code , install the SDK , import the sample, then right-click on your project. "Open with MCUXpresso Config Tools " will appear; click on it. *This entire process will be explained in detail in the final demonstration, so we will omit it here. Config Tools will start after a short while. If you are using the MCUXpresso IDE, Config Tools are integrated by default and can be launched directly from the top tab. Browse Tool screen configuration After launching Config Tools , you can switch between tools using the panel on the right side of the screen. This time, we'll select " Clocks ". The Clocks Diagram , which is frequently used when changing clock settings , can be selected from the top left of the screen. The Problem view in the lower right corner of the screen displays any errors or warnings related to your settings. If there is an error due to incorrect clock settings, the Problem view will display the location and cause of the error. Additionally, the relevant area will be highlighted in red on the Clock Diagram, allowing you to visually identify the problem. For example, if you set the CPU clock to exceed the specified maximum value, an error message (shown below) will be displayed. Basic Terminology for Using Clocks Tool This section clarifies the basic terminology displayed on the Clock Diagram when using the Clocks Tool . Clock Tree This is a configuration diagram (tree diagram) showing where clocks are generated, how they are distributed and selected, and how they are supplied to each block. Clocks Tool allows you to configure settings while visually viewing this Clock Tree . Clock Source This is the signal source that serves as the starting point for the clock. This includes internal RC clocks, external crystals (oscillators), and external clock inputs, and is located upstream in the clock tree. In the MCX N947, the built-in 48MHz RC clock (FIRC) is used as the clock source by default . PLL ( Phase Locked Loop) This circuit generates a stable high-frequency clock using a clock source as input. The output frequency can be adjusted by setting the multiplier and frequency divider, allowing for flexible creation of clocks for CPUs and high-speed buses . Here, a 300MHz clock (48MHz/8*50=300MHz) is generated based on the 48MHz input clock, which is the Clock Source . DIV (Divider ) This function allows you to divide and adjust the clock frequency. Frequency division settings are available for the CPU , bus, and each peripheral, and are used to adjust to the required operating frequency. In the following example, a 150MHz clock (300MHz/2=150MHz) is generated from a 300MHz clock generated by PLL0. Mux ( Multiplexer ) This mechanism allows you to switch which clock to use from among several potential clocks. Switching the selection changes the clock supplied downstream. In the diagram below, there are two MUXs ; the one on the left selects a 48MHz clock from the internal RC clock, and the one on the right selects a 150MHz clock divided by DIV (PLL0_PDIV) . Demonstration: Change the CPU core clock settings and alter the LED blinking speed. Here, we will actually change the clock supplied to the CPU using Clocks Tool and see if the blinking speed of the LEDs on the evaluation board changes. Hardware Preparation The evaluation board used in this article is the FRDM-MCXN947 Installing the SDK With the MCUXpresso icon selected in the left-hand panel of VS Code , click " Import Repository ". Next, click on " REMOTE ARCHIVE ," the second option from the left, and search for " FRDM-MCXN947 " in the Package section . Entering " 947 " will immediately display FRDM-MCXN947 as a suggestion . The Name , Location , and the "Create Git" checkbox can be set as you wish. *For Name and Location names, it is best to use only lowercase alphanumeric characters and underscores (_) or hyphens (-) , and avoid symbols such as ( \, /, :, *, ?, ", <, >, | , specs) (which may cause program malfunctions). Finally, check the " I agree " box and click " Import " to begin the SDK installation. Please wait a moment. The installation is complete when " Repository successfully imported" is displayed in the lower right corner of the screen. Importing sample code Once the SDK installation is complete, proceed to import the sample code. Click " Import Example From Repository " in the panel on the left. Within each tab displayed on the right, under " Repository ," select the SDK you just imported. Please select FRDM-MCXN947 for " Board ". In this " Template " demonstration, we will be changing the blinking speed of the LED . I'll try it with " driver_examples/gpio/gpio_led_output_cm33_core0 " which appears when I type " led ". Next, select the Toolchain and click " Import" . Open ConfigTools Right-click on the imported sample and select " Open with MCUXpresso Config Tools ". The Config Tools will launch after a short wait. Once Config Tools opens, first check the Overview in the right-hand panel. In this example, both Clocks and Pins are green (ON ) , indicating that both tools are enabled. Now, let's look at the Clock Diagram . The main clock of 150MHz is generated from the clock source FIRC 48MHz via PLL (PLL0) , DIV (PLL0_PDIV) , and MUX (SCSSEL) . Next, scroll down a bit to see the clock supplied to the CPU . In this sample application, " System_clock" corresponds to the CPU core clock. The MAIN Clock at 150MHz passes through a DIV ( Distributed Variable) in between, but is still supplied to the System Clock at 150MHz . Later, we will change the value of this DIV and thereby change the clock signal input to the System Clock , observing the change in the LED blinking speed. Check the LED blinking speed when the CPU Clock is set to 150MHz. First, let's look at the LED blinking speed when the CPU Clock is set to 150MHz without any changes. Close Config Tools and open VS Code . Before building, connect the board ( FRDM-MCXN947) to the PC . Once the connection is established, debug the imported sample (build, write, and run the application). Once the debugging process is complete, the program will have stopped at the breakpoint, so click the "|▶" icon at the top of the screen. As shown in the video, the red LED will start blinking. This is the blinking speed at a clock speed of 150MHz (default setting). (function() { var wrapper = document.getElementById('lia-vid-6395306957112w304h540r825'); var videoEl = wrapper ? wrapper.querySelector('video-js') : null; if (videoEl) { if (window.videojs) { window.videojs(videoEl).ready(function() { this.on('loadedmetadata', function() { this.el().querySelectorAll('.vjs-load-progress div[data-start]').forEach(function(bar) { bar.setAttribute('role', 'presentation'); bar.setAttribute('aria-hidden', 'true'); }); }); }); } }})(); (Show My Videos) To stop, click the square icon (even after stopping the debug, the program will continue to run on the board, so the LED will continue to blink, but please ignore this for now ) . Change the CPU clock to 50MHz and check the LED blinking speed. Next, we'll use ClocksTool to change the CPU core clock from 150MHz to 50MHz . Open the Clocks Tool in Config Tools again . Scroll down slightly in the Clocks Diagram and change the DIV (AHBCLKDIV) connected to the System Clock . When changing it, click on the number within the DIV you want to change to select from the dropdown menu. Selecting 1/3 here will change the System Clock to 50MHz . *When changing clock settings, please note that changing the clock settings upstream, which are close to the Clock Source, may affect multiple clock settings downstream. Now, we will rewrite the sample code. First, click "Update Code" in the upper left corner of the Config Tools screen. In the dialog box that appears, select "OK". When you return to VS Code in this state, three checkboxes will appear at the top of the screen. Make sure they are checked and click OK . After a short wait, the changes made in Clocks Tool will be applied to the sample code in VS Code . If successful, the following message will be displayed in the lower right corner of the screen. Run the debug test again, and once it's finished, run the sample application using "|▶". The LED will start blinking. This is the blinking speed at a 50MHz clock. It is clearly slower compared to the speed at 150MHz . (function() { var wrapper = document.getElementById('lia-vid-6395308518112w304h540r707'); var videoEl = wrapper ? wrapper.querySelector('video-js') : null; if (videoEl) { if (window.videojs) { window.videojs(videoEl).ready(function() { this.on('loadedmetadata', function() { this.el().querySelectorAll('.vjs-load-progress div[data-start]').forEach(function(bar) { bar.setAttribute('role', 'presentation'); bar.setAttribute('aria-hidden', 'true'); }); }); }); } }})(); (Show My Videos) This concludes the demonstration. Thank you for your participation. Bonus 1 - Clock settings are already available as presets. While the previous steps involved changing the clock using DIV , Clocks Tool comes with several clock settings pre-configured. Select Clocks Tool in Config Tools , and then choose your desired clock from the top of the screen : FRO 12MHz / FRO HF 48MHz / FRO HF 144MHz… For example, if you select "BOARD_BootClockPLL_100M " , you will see that the Clock Source , PLL , and DIV are all different from before. For example, the Clock Source is a 24MHz external clock (SOSC) . Bonus 2 - Where are the settings used to automatically generate the initialization code? We will examine how the clock settings are automatically updated (Update Code) using Clock Tools, and how this is reflected in the actual initialization code. Check the C source file (gpio_led_output.c) in the Project Files of the imported sample. If you look inside the C source file, you'll find code that initializes the Pin , Clock , and Debug console . Right-click on BOARD_InitHardware(); and click "Go to Definition" to see more details. There is code to initialize the Pin , Clock , and Debug console . Right-click on BOARD_InitBootClocks(); and select " Go to Definition" (or "fn + F12") to see more details. The destination file (clock_config.c) is FRDM-MCXN947This is the generated code that defines the startup clock configuration. As you scroll down, you will see that, as explained earlier, multiple clock configurations ( FRO 12MHz / FRO HF 48MHz / FRO HF 144MHz / PLL 150MHz / PLL 100MHz ) are available as presets. In the image below, the default value of PLL150MHz is shown, For example, if you change this part to BOARD_BootClockFROHF48M Initialization will be performed using the FRO HF 48M clock configuration, which is prepared as a preset. Next, let's see how the clock configuration and code change when we directly modify the DIV in Clocks Tool while keeping the FRO HF 48M . The text and settings enclosed in the red box will be changed. Furthermore, if you change the DIV connected to the System Clock in Clocks Tool to 1/2 , i.e., from 48 to 24MHz, and then run Update Code, you will see that the red frame has changed due to the change in DIV.   You can also check the differences before and after the changes in Clocks Tool. After changing the clock settings, clicking Update Code will display a dialog box like the one below. Files with differences will have "change" displayed to the right of the file name. Clicking this will allow you to view the differences. clock_config.c Let's check the difference. The left side (Newly generated) shows the modified file, and the right side (On disk) shows the original file. You should be able to see that there is a difference in the System Clock. The areas where differences have occurred are highlighted with a different color, making them visually easy to spot.   Due to the increasing integration of functions in microcontrollers and processors, their internal clock trees have become extremely complex. Without a clock visualization tool like this, designing and evaluating such systems would be practically impossible, so please make use of it.   =========================​ We are currently unable to respond to comments left in the " Comment " section of this post . We apologize for the inconvenience, but please refer to " Technical Questions to NXP - How to Contact Us ( Japanese Blog ) " when making inquiries . (If you are already an NXP distributor or have a relationship with NXP , you may ask your representative directly.) This guide focuses on the "Clocks Tool" within the MCUXpresso Config Tools, explaining the basics and methods of setting the clock. It covers everything from installation in a VS Code environment to a demonstration of LED blinking caused by CPU clock changes. (Estimated time: 10 minutes *Assumes MCUXpresso for VSC (Visual Studio Code) SDK is installed) MCUXpresso MCX Victoria | Downloads Japanese Blog
查看全文
MCUXpresso 配置工具:如何使用时钟工具(日语博客) 目录 介绍 Clocks Tool 适用于哪些情况? 安装配置工具 Minecraft 工具的屏幕配置 时钟工具使用基本术语 演示:更改 CPU 核心时钟设置并改变 LED 闪烁速度。 奖励 1 - 时钟设置已作为预设提供。 附加题 2 - 初始化代码自动生成的设置值在哪里? 介绍 MCUXpresso 是恩智浦半导体 (NXP) 提供的一款微控制器开发软件平台。除了 MCUXpresso IDE 之外,它还提供 MCUXpresso for VSC(Visual Studio Code)和配置工具,以辅助外设配置。 配置工具包含诸如用于设置引脚的“引脚工具”和用于配置时钟设置的“时钟工具”等工具,其主要特点是可以通过图形用户界面 (GUI)直观便捷地完成微控制器的初始设置。本文将重点介绍负责时钟设置的“时钟工具” 。 时钟设置是直接影响微控制器性能、功耗和各外设运行的关键因素。然而,时钟树可能非常复杂,难以理解各个外设正在使用哪个时钟。时钟工具允许您可视化和配置时钟源、分频设置以及每个外设的时钟供电状态。它还可以根据设置自动生成初始化代码。 安装MCUXpresso IDE时,配置工具也会一并安装,使其成为IDE的内置功能。另一方面,在近年来嵌入式开发领域日益流行的Visual Studio Code ( VSC ) 环境中,您也可以通过安装MCUXpresso相关扩展来使用配置工具(包括时钟工具)。IDE版本和VSC版本在配置工具的功能上并无显著差异。 本文 解释了如何在 VS Code 环境中安装 配置工具 ,如何使用这些工具,并最终演示了如何在 时钟工具 中更改 CPU 时钟设置,以及如何使用 FRDM-MCXN947 改变 LED 闪烁速度。 Clocks Tool适用于哪些情况? 当您想要检查现有的内部时钟设置(时钟树)时 当您需要调整和优化每个模块的工作频率时。 当您想要考虑一种既能降低时钟频率又能降低功耗的配置时。 安装配置工具 本指南解释了如何在VS Code环境中安装Config Tools 。 *如果您尚未为 VS Code 安装 MCUXpresso ,请参阅此博客文章。 安装适用于 VSC 和 SDK 的 MCUXpresso(日文博客) 启动VS Code后,从左侧面板中选择MCUXpresso ,然后从快速启动面板中单击“打开 MCUXpresso 安装程序” 。 安装程序将启动。选择MCUXpresso 配置工具,然后单击右上角的“安装” 。 (这篇博文介绍了 MCUXpresso 配置工具 v26.03 的安装过程。) 安装开始后,系统会提示您登录MyNXP 。 登录后,将显示许可协议。请阅读并同意其内容。 *安装完成后请重启VS Code。 问:如果安装失败怎么办? A. 请从以下网站下载适合您电脑操作系统环境的安装程序并进行尝试。 MCUXpresso 配置工具 | NXP 微控制器 (MCU) 软件开发 | NXP 半导体 安装过程中,初始屏幕上会出现以下界面。如果您没有看到任何相关信息,可以将其关闭。 要从VS Code访问配置工具,请安装SDK ,导入示例,然后右键单击您的项目。 “使用 MCUXpresso 配置工具打开”将出现;单击它。 *整个过程将在最终演示中详细解释,因此我们在此省略。 配置工具将在短时间内启动。 如果您使用的是 MCUXpresso IDE,则配置工具默认已集成,可以直接从顶部选项卡启动。 Minecraft 工具的屏幕配置 启动配置工具后,您可以使用屏幕右侧的面板在工具之间切换。 这次,我们将选择“时钟”。 时钟图(在更改时钟设置时经常用到)可以从屏幕左上角选择。 屏幕右下角的“问题”视图会显示与您的设置相关的任何错误或警告。 如果由于时钟设置不正确而出现错误,“问题”视图将显示错误的位置和原因。此外,时钟图上的相关区域将以红色突出显示,以便您直观地识别问题。 例如,如果将 CPU 时钟设置为超过指定的最大值,则会显示错误消息(如下所示)。 时钟工具使用基本术语 本节阐明了使用时钟工具时时钟图上显示的基本术语。 时钟树 这是一个配置图(树状图),展示了时钟的生成位置、分配和选择方式,以及如何将它们提供给每个模块。时钟工具允许您在查看此时钟树的同时配置设置。 时钟源 这是作为时钟起始点的信号源。它包括内部RC时钟、外部晶体(振荡器)和外部时钟输入,位于时钟树的上游。 在 MCX N947 中,默认情况下使用内置的48MHz RC时钟(FIRC)作为时钟源。 PLL(锁相环) 该电路以时钟源为输入,产生稳定的高频时钟。 通过设置倍频器和分频器可以调节输出频率,从而为 CPU 和高速总线灵活地创建时钟。 这里,基于48MHz输入时钟(即时钟源)生成300MHz时钟(48MHz/8*50=300MHz) 。 除号 (DIV ) 此功能允许您对时钟频率进行分频和调整。 CPU 、总线和每个外围设备都有分频设置,用于调整到所需的运行频率。 在以下示例中,由 PLL0 生成的 300MHz 时钟生成 150MHz 时钟(300MHz/2=150MHz)。 多路复用器(Mux ) 该机制允许您从几个可选时钟中切换使用哪个时钟。 切换选择项会改变下游提供的时钟信号。 在下图所示的电路中,有两个多路复用器;左边的多路复用器从内部RC时钟中选择48MHz时钟,右边的多路复用器选择150MHz时钟除以DIV(PLL0_PDIV) 。 演示:更改 CPU 核心时钟设置并改变LED闪烁速度。 在这里,我们将使用时钟工具实际改变提供给CPU 的时钟,看看评估板上的LED闪烁速度是否会发生变化。 硬件准备 本文使用的评估板是 FRDM-MCXN947 安装 SDK 在VS Code左侧面板中选择MCUXpresso 图标,然后单击“导入存储库”。 接下来,点击左侧第二个选项“远程存档”,然后在“软件包”部分搜索“ FRDM-MCXN947 ”。输入“ 947 ”后, FRDM-MCXN947 将立即显示为建议。 您可以根据需要设置名称、位置和“创建 Git”复选框。 *对于名称和位置名称,最好只使用小写字母数字字符和下划线(_)或连字符(-) ,并避免使用符号( \、/、:、*、?、"、、| 、规范符号)(这可能会导致程序故障)。 最后,勾选“我同意”复选框,然后点击“导入”开始安装SDK 。请稍候片刻。当屏幕右下角显示“存储库导入成功”时,安装即完成。 导入示例代码 SDK安装完成后,即可导入示例代码。 点击左侧面板中的“从存储库导入示例”。 在右侧显示的每个选项卡中,“存储库”下,选择您刚刚导入的SDK 。 请为“主板”选择FRDM-MCXN947 。 在这个“模板”演示中,我们将改变LED的闪烁速度。 尝试输入“ led ”,然后选择出现的“ driver_examples/gpio/gpio_led_output_cm33_core0 ”。 接下来,选择工具链并点击“导入” 。 打开配置工具 右键单击导入的示例,然后选择“使用 MCUXpresso 配置工具打开”。稍等片刻,配置工具将启动。 配置工具打开后,首先查看右侧面板中的概览。在本例中, “时钟”和“引脚”均显示为绿色(开启) ,表示这两个工具均已启用。 现在,让我们来看一下时钟图。 150MHz 的主时钟由48MHz时钟源FIRC 通过PLL (PLL0) 、 DIV (PLL0_PDIV)和MUX (SCSSEL)生成。 接下来,向下滚动一点,可以看到提供给CPU 的时钟。在本示例应用程序中,“ System_clock”对应于CPU 核心时钟。 主时钟频率为 150MHz ,中间经过一个分频器(分布式变量),但仍然以150MHz的频率提供给系统时钟。稍后,我们将改变这个分频器的值,从而改变输入到系统时钟的时钟信号,并观察LED闪烁速度的变化。 检查 CPU 时钟频率设置为 150MHz 时的 LED 闪烁速度。 首先,我们来看看 CPU 时钟频率设置为150MHz且不做任何更改时的 LED 闪烁速度。关闭配置工具并打开VS Code 。 在组装之前,将电路板( FRDM-MCXN947)连接到电脑。 连接建立后,调试导入的示例(构建、写入和运行应用程序)。 调试过程完成后,程序将在断点处停止,因此请点击屏幕顶部的“|▶”图标。 如视频所示,红色LED灯将开始闪烁。这是时钟频率为150MHz (默认设置)时的闪烁速度。 (function() { var wrapper = document.getElementById('lia-vid-6395306957112w304h540r825'); var videoEl = wrapper ? wrapper.querySelector('video-js') : null; if (videoEl) { if (window.videojs) { window.videojs(videoEl).ready(function() { this.on('loadedmetadata', function() { this.el().querySelectorAll('.vjs-load-progress div[data-start]').forEach(function(bar) { bar.setAttribute('role', 'presentation'); bar.setAttribute('aria-hidden', 'true'); }); }); }); } }})(); (显示我的视频) 要停止,请点击方形图标(即使停止调试后,程序仍会在板上继续运行,因此 LED 会继续闪烁,但请暂时忽略这一点) 。 将 CPU 时钟频率改为 50MHz,并检查 LED 闪烁速度。 接下来,我们将使用ClocksTool将 CPU 核心时钟从 150MHz 更改为50MHz 。 再次打开配置工具中的时钟工具。在时钟图中向下滚动一点,然后更改连接到系统时钟的DIV(AHBCLKDIV) 。更改时,单击要更改的 DIV 中的数字,然后从下拉菜单中进行选择。此处选择1/3会将系统时钟更改为50MHz 。 *更改时钟设置时请注意,更改靠近时钟源的上游时钟设置可能会影响下游的多个时钟设置。 现在,我们将重写示例代码。首先,单击“配置工具”屏幕左上角的“更新代码” 。在出现的对话框中,选择“确定”。 在此状态下返回VS Code后,屏幕顶部会出现三个复选框。请确保选中它们,然后单击“确定” 。稍等片刻,时钟工具中所做的更改将应用到VS Code中的示例代码。 如果成功,屏幕右下角将显示以下消息。 再次运行调试测试,完成后,使用“|▶”运行示例应用程序。 LED灯将开始闪烁。这是50MHz时钟频率下的闪烁速度。显然,它比150MHz时钟频率下的闪烁速度要慢。 (function() { var wrapper = document.getElementById('lia-vid-6395308518112w304h540r707'); var videoEl = wrapper ? wrapper.querySelector('video-js') : null; if (videoEl) { if (window.videojs) { window.videojs(videoEl).ready(function() { this.on('loadedmetadata', function() { this.el().querySelectorAll('.vjs-load-progress div[data-start]').forEach(function(bar) { bar.setAttribute('role', 'presentation'); bar.setAttribute('aria-hidden', 'true'); }); }); }); } }})(); (显示我的视频) 演示到此结束。感谢各位的参与。 奖励 1 - 时钟设置已作为预设提供。 之前的步骤需要使用DIV 函数更改时钟,而时钟工具则预配置了多种时钟设置。在配置工具中选择时钟工具,然后从屏幕顶部选择所需的时钟:FRO 12MHz / FRO HF 48MHz / FRO HF 144MHz… 例如,如果您选择“BOARD_BootClockPLL_100M ” ,您会发现时钟源、 PLL和DIV都与之前不同。例如,时钟源是24MHz 的外部时钟(SOSC) 。 附加题 2 - 用于自动生成初始化代码的设置在哪里? 我们将研究如何使用时钟工具自动更新时钟设置(更新代码),以及这如何在实际初始化代码中体现。 检查导入示例的项目文件中的 C 源文件 (gpio_led_output.c)。 如果你查看C源文件,你会发现初始化引脚、时钟和调试控制台的代码。 右键单击BOARD_InitHardware();然后单击“转到定义”以查看更多详细信息。 代码中包含初始化 引脚 、 时钟 和 调试控制台的 功能。 右键单击 BOARD_InitBootClocks(); 并选择“ 转到定义”(或“fn + F12”) 以查看更多详细信息。 目标文件(clock_config.c)是 FRDM-MCXN947这是定义启动时钟配置的生成代码。 向下滚动页面,您会看到,如前所述,有多种时钟配置( FRO 12MHz / FRO HF 48MHz / FRO HF 144MHz / PLL 150MHz / PLL 100MHz )作为预设选项。下图显示的是PLL150MHz的默认值。 例如,如果您将此部分更改为BOARD_BootClockFROHF48M 初始化将使用FRO HF 48M时钟配置执行,该配置已准备就绪。 接下来,我们来看看在保持FRO HF 48M不变的情况下,直接在时钟工具中修改DIV 值时,时钟配置和代码会发生怎样的变化。红色框内的文本和设置将会改变。 此外,如果您将时钟工具中连接到系统时钟的DIV更改为1/2 ,即从48MHz更改为 24MHz,然后运行更新代码,您将看到由于 DIV 的变化,红色帧发生了变化。   您还可以使用时钟工具查看更改前后的差异。 更改时钟设置后,点击“更新代码”将显示如下所示的对话框。存在差异的文件,其文件名右侧会显示“更改”字样。点击此字样即可查看差异。 clock_config.c我们来检查一下区别。左侧(新生成)显示的是修改后的文件,右侧(磁盘上)显示的是原始文件。您应该能够看到系统时钟存在差异。 出现差异的区域用不同的颜色突出显示,使其在视觉上很容易被发现。   由于微控制器和处理器的功能集成度不断提高,其内部时钟树变得极其复杂。如果没有像这样的时钟可视化工具,设计和评估此类系统几乎是不可能的,所以请务必使用它。   =========================​ 我们目前无法 回复 此帖子“ 评论”部分留下的评论。 对于由此造成的不便,我们深表歉意,但 在进行咨询时, 请 参考“ NXP 技术问题 - 如何联系我们 ( 日语博客 ) ” 。 (如果您已经是 恩智浦的 分销商或 与 恩智浦 有合作关系 ,您可以直接咨询您的代表。) 本指南重点介绍 MCUXpresso 配置工具中的“时钟工具”,解释其基本原理和设置时钟的方法。内容涵盖从在 VS Code 环境中安装到演示 CPU 时钟变化引起的 LED 闪烁等各个方面。 (预计耗时:10 分钟 *假设已安装 MCUXpresso for VSC(Visual Studio Code)SDK) MCUXpresso MCX SW | 下载 日本博客
查看全文
MCUXpresso Config Tools : Clocks Toolの使い方 (日本語ブログ) 目次 はじめに Clocks Toolはどのような場面で活用するのか Config Toolsのインストール Clocks Toolの画面構成 Clocks Toolを使うための基本用語 デモンストレーション:CPUコア・クロック設定を変更し、LEDの点滅速度を変更する おまけ1 - 既にプリセットとして、クロック設定が準備されている おまけ2 - 自動で初期化コードを生成した設定値はどこに はじめに  MCUXpressoは、NXPが提供するマイコン開発用ソフトウェアプラットフォームで、MCUXpresso IDEに加えて、MCUXpresso for VSC (Visual Studio Code)や、 ペリフェラル設定を支援するConfig Toolsも提供しています。  Config Toolsは、ピン設定を行う「Pins Tool」や、クロック構成を設定する「Clocks Tool」などで構成されており、マイコン周辺の初期設定をGUI上で直感的に分かりやすく行える点が特長です。本記事では、この中から クロック設定を担当する「Clocks Tool」 に焦点を当てて解説します。 クロック設定は、マイコンの性能・消費電力・各ペリフェラルの動作に直結する重要な要素です。一方で、クロックツリーは構成が複雑で、「どのクロックがどこで使われているのか分かりにくい」と感じる方も多いのではないでしょうか。Clocks Toolを使うことで、クロックソースや分周設定、各ペリフェラルへのクロック供給状況を可視化しながら設定・確認できます。また設定内容に応じた初期化コードを自動生成することもできます。 MCUXpresso IDEをインストールした場合には、Config Toolsも一緒にインストールされるため、IDEに内蔵された機能として利用可能です。一方、近年組み込み開発においても利用が広がっている Visual Studio Code(VSC)環境では、MCUXpresso関連の拡張機能をインストールすることで、同様にConfig Tools(Clocks Toolを含む)を利用できます。Config Toolsの機能自体は、IDE版とVSC版で大きな違いはありません。 本記事では、VS Code環境におけるConfig Toolsのインストール方法から、ツールの使い方を説明し、最後にFRDM-MCXN947を用いて、実際にClocks Tool内でCPUクロック設定を変更し、LEDの点滅速度を変えるデモンストレーションを紹介します。 Clocks Toolはどのような場面で活用するのか? 既存の内部クロック設定(クロック・ツリー)を確認したいとき 各モジュールへの動作周波数を調整・最適化したいとき 低消費電力を意識して、クロック周波数を落とす構成を検討したいとき Config Toolsのインストール VS Code環境におけるConfig Toolsのインストール方法について解説します。 ※MCUXpresso for VS Codeのインストールがお済みでない方はこちらのブログをご参照ください。 MCUXpresso for VSCとSDKのインストール (日本語ブログ) VS Codeを起動後、左側のパネルからMCUXpressoを選択し、Quick Start PanelよりOpen MCUXpresso Installerをクリックしてください。 Installerが立ち上がりますので、MCUXpresso Configuration Toolsを選択し、右上のInstallをクリックしてください。 (今回のブログではMCUXpresso Config Tools v26.03 をInstallしています) インストールの開始と同時にMyNXPへのログインを求められます。 ログインの後、License Agreementが表示されますので内容をご確認のうえ同意してください。 ※インストール後は、VS Codeを再起動してください。 Q. もしインストールに失敗した場合は? A. 以下ウェブサイトからのご自身のPC OS環境に応じたインストーラーをダウンロードして、試してください。 MCUXpresso Config Tools | NXPマイクロコントローラ (MCU) 向けソフトウェア開発 | NXP Semiconductors) インストールを進めると初期画面で以下のような画面が表示されますが、該当がなければ閉じて問題ありません。 VS CodeからConfig Toolsを呼び出すにはSDKをインストールし、サンプルをインポート後、プロジェクトを右クリックすると Open with MCUXpresso Config Toolsが現れますので、こちらをクリックしてください。 ※この一連のプロセスは最後のデモンストレーションで詳細に説明するので、ここでは割愛します。  しばらくするとConfig Toolsが起動します。 なおMCUXpresso IDEを使用している場合、Config Toolsは標準で統合されており、上部タブから直接起動できます。 Clocks Toolの画面構成 Config Tools起動後、画面右側のパネルでツールの切り替えが可能です。 今回は「Clocks」を選択します。 クロック設定を変更する際によく使用するClocks Diagramは、画面左上から選択することができます。 画面右下のProblemビューには、設定内容に関するエラーや警告が表示されます。 クロック設定に誤りがあり、エラーが発生するとProblemビューにはエラーの発生箇所と原因が表示されます。またClock Diagram上にも該当箇所が赤色でハイライト表示されるため、問題箇所を視覚的に特定できます。 例えば、CPUクロックが規定の最大値を超えるような設定を行った場合、その旨のエラー(下記)が表示されます。 Clocks Toolを使うための基本用語 ここではClocks Toolを使用するうえで、Clock Diagram上に表示される基本用語を整理します。 Clock Tree (クロック・ツリー) クロックがどこで生成され、どのように分配・選択され、各ブロックへ供給されるかを示した構成図(ツリー図)です。Clocks Toolでは、このClock Treeを視覚的に確認しながら設定を行います。 Clock Source (クロック供給源) クロックの起点となる信号源です。内蔵RCクロックや外部クリスタル(振動子)、外部クロック入力などが該当し、クロックツリーの上流に配置されます。 MCX N947では、標準で48MHzの内蔵RCクロック(FIRC)がClock Sourceとして使用されます。 PLL (Phase Locked Loop) Clock Sourceを入力として、安定した高周波クロックを生成する回路です。 倍率設定や分周設定によって出力周波数を調整でき、CPUや高速バス向けのクロックを柔軟に作ることができます。 ここでは、Clock Sourceである48MHzの入力クロックをもとに300MHzのクロック(48MHz/8*50=300MHz)を生成しています。 DIV (Divider : 分周器) クロック周波数を分割して調整するための機能です。 CPU、バス、各ペリフェラルごとに分周設定が用意されており、必要な動作周波数に調整するために使用されます。 以下では、PLL0で生成された300MHzのクロックから150MHzのクロック(300MHz/2=150MHz)を生成しています。 Mux (Multiplexer:マルチプレクサ) 複数のクロック候補の中から、どのクロックを使用するかを切り替えるための機構です。 選択を切り替えることで、下流に供給されるクロックが変わります。 下図では、2つのMUXが存在し、左側は内蔵RCクロックからの48MHzのクロックを選択、右側はDIV(PLL0_PDIV)により分周された150MHzを選択しています。 デモンストレーション:CPUコア・クロック設定を変更し、LEDの点滅速度を変更する ここでは実際にClocks Tool上でCPUに供給されるクロックを変更し、評価ボード上のLEDの点滅速度が変更するかを見ていきます。 ハードウェアの準備 本稿で使用する評価ボード ・FRDM-MCXN947 SDKのインストール VS Code内の左側のパネルからMCUXpressoのアイコンを選択した状態で「Import Repository」をクリックしてください。 その後、左から2番目の「REMOTE ARCHIVE」をクリックし、Packageにて「FRDM-MCXN947」を検索してください。「947」と打ち込むとすぐにFRDM-MCXN947が候補として表示されます。 Name名、Location名、Create Gitへのチェックは任意に設定して下さい。 ※NameおよびLocation名については、「小文字の英数字」「アンダースコア(_)またはハイフン(-)」のみを使用し、(\, /, :, *, ?, ", <, >, |、スペック)などの記号(プログラムの動作不良の原因になりうる)を避けるのが無難です。 最後に「I agree」にチェックを入れた後、「Import」をクリックするとSDKのインストールが開始しますので、しばらくお待ちください。画面右下に"Repository successfully imported"が表示されたら完了です。 サンプルコードのインポート SDKのインストールが完了したら、サンプルコードのインポートへと進みます。 左側のパネルから「Import Example From Repository」をクリックしてください。 右側に表示された各タブ内で、「Repository」では先ほどインポートしたSDKを選択、 「Board」はFRDM-MCXN947を選択してください。 「Template」では、今回はLEDの点滅速度を変えるデモンストレーションですので、 「led」と打ち込んで表示される「driver_examples/gpio/gpio_led_output_cm33_core0」で試してみます。 その後、Toolchainを選択して「Import」をクリックしてください。 ConfigToolsを開く インポートしたサンプル上で右クリックして、「Open with MCUXpresso Config Tools」を選択してください。少し待つとConfig Toolsが立ち上がります。 Config Toolsが開いたらまずは右側のパネルにあるOverviewを確認します。このサンプルにおいては、ClocksとPinsの2つが緑色(ONの状態)になっており、2つのツールが有効であることを示しています。 では、Clock Diagramを見てみましょう。 Clock SourceであるFIRC 48MHzからPLL(PLL0)、DIV(PLL0_PDIV)、MUX(SCSSEL)を経由して、MAIN Clock 150MHzが生成されています。 続いて、少し下にスクロールダウンしてCPUに供給されるクロックを見てみます。今回のサンプル・アプリケーションでは、「System_clock」がCPUコア・クロックに該当します。 MAIN Clock 150MHzは途中でDIVを経由しますが、System Clockに150MHzのまま供給されています。後ほど、この途中に存在するDIVの値を変更し、System Clockに入力されるクロックを変更することでLEDの点滅速度の変化を見ます。 CPU Clock 150MHzの状態のLEDの点滅速度を確認する 先ずは、何の変更もしていない150MHzの状態でLEDの点滅速度を見てみましょう。一旦Config Toolsを閉じて、VS Codeを開きます。 ビルドの前にボード(FRDM-MCXN947)とPCを接続します。 接続が完了したらインポートしたサンプルをデバッグ(ビルド&書き込み&アプリケーションの実行)します。 デバッグのプロセスが完了したら、プログラムがブレイクポイントで止まっているので、画面上部のアイコン内の"|▶"をクリックします。 動画のように赤色のLEDが点滅を開始します。これがクロック150MHz時(デフォルト設定)の点滅速度です。 (function() { var wrapper = document.getElementById('lia-vid-6395306957112w304h540r825'); var videoEl = wrapper ? wrapper.querySelector('video-js') : null; if (videoEl) { if (window.videojs) { window.videojs(videoEl).ready(function() { this.on('loadedmetadata', function() { this.el().querySelectorAll('.vjs-load-progress div[data-start]').forEach(function(bar) { bar.setAttribute('role', 'presentation'); bar.setAttribute('aria-hidden', 'true'); }); }); }); } }})(); (マイビデオを表示) 停止はアイコンの□をクリックします(デバッグ停止後も、ボード上ではプログラムが実行され続けるため、LEDは点滅を続けますが一旦無視してください)。 CPU Clockを50MHzに変更してLEDの点滅速度を確認する 続いて、Clocks Toolを用いてCPUコア・クロックを150MHzから50MHzへと変更します。 再度Config ToolsのClocks Toolを開いてください。Clocks Diagramを少し下にスクロールダウンして、System ClockにつながるDIV(AHBCLKDIV)を変更します。変更の際には変更したいDIVの内の数字をクリックするとプルダウンで選択することができます。ここで1/3を選択するとSystem Clockが50MHzに変化します。 ※クロック設定を変更する際には、Clock Sourceに近い上流のクロック設定を変更すると、下流に存在する複数のクロック設定に影響を及ぼす可能性があるので注意してください。 この状態でサンプルコードを書き換えます。まずはConfig Toolsの画面左上にあるUpdate Codeをクリックしてください。表示されるダイアログで「OK」を選択してください。 この状態でVS Codeに戻ると、画面上部にチェックボックスが3つ並んで表示されますので、チェックが入った状態でOKをクリックしてください。少し待つと、Clocks Toolでの変更がVS Code上のサンプルコードに適応されます。 成功すると画面右下に以下のメッセージが表示されます。 もう一度デバッグの実行し、完了したら"|▶"でサンプルアプリケーションを実行してください。 LEDが点滅を開始します。こちらがクロック 50MHz時の点滅速度です。150MHz時の速度と比べて明らかに遅くなりました。 (function() { var wrapper = document.getElementById('lia-vid-6395308518112w304h540r707'); var videoEl = wrapper ? wrapper.querySelector('video-js') : null; if (videoEl) { if (window.videojs) { window.videojs(videoEl).ready(function() { this.on('loadedmetadata', function() { this.el().querySelectorAll('.vjs-load-progress div[data-start]').forEach(function(bar) { bar.setAttribute('role', 'presentation'); bar.setAttribute('aria-hidden', 'true'); }); }); }); } }})(); (マイビデオを表示) 以上でデモンストレーションは完了です。お疲れ様でした。 おまけ1 - 既にプリセットとして、クロック設定が準備されている なお、これまでの手順ではDIVを使ってクロックの変更をしましたが、Clocks Toolにはあらかじめ複数のクロック設定がプリセットとして用意されています。Config ToolsにてClocks Toolを選択し、画面上部からFRO 12MHz / FRO HF 48MHz / FRO HF 144MHz…と任意のクロックを選ぶことができます。 たとえば「BOARD_BootClockPLL_100M」を選んでみると、Clock Source、PLL、DIV、それぞれが先ほどと異なることがわかります。例としてClock Sourceは24MHzの外部クロック(SOSC)となっています。 おまけ2 - 自動で初期化コードを生成した設定値はどこに? Clock Toolsを用いてクロック設定を自動更新(Update Code)した後、実際の初期化コードにどのように反映されるのかを見てみます。 インポートしたサンプルのProject FilesからCソースファイル(gpio_led_output.c)を確認します。 Cソースファイルの中身を見ていくと、Pin、Clock、Debug consolの初期化を実行するコードが存在します。 BOARD_InitHardware(); 上で右クリックし、Go to Definition をクリックするとさらに詳細を見ることができます。 Pin、Clock、Debug consolのそれぞれ初期化を実行するためのコードがあります。BOARD_InitBootClocks(); で右クリックし「Go to Definition(もしくは"fn + F12")」を選択し、さらに詳細を見てみます。 遷移先のファイル(clock_config.c)は、FRDM‑MCXN947 の起動時クロック構成を定義する生成コードです。 スクロールダウンしていくと先ほど説明した通り、複数のクロック構成(FRO 12MHz / FRO HF 48MHz / FRO HF 144MHz / PLL 150MHz / PLL 100MHz)がプリセットとして用意されていることがわかります。下記画像では規定値である PLL150Mとなっていますが、 例えばこの部分をBOARD_BootClockFROHF48Mに変更すると プリセットとして準備されているFRO HF 48Mのクロック構成にて初期化が実行されます。 次にFRO HF 48Mのまま、Clocks Tool上で直接DIVの変更を行うとクロック構成およびコードがどのように変化するか見てみます。赤枠で囲んだテキスト&設定部分が変更されます。 更に、Clocks Tool上でSystem ClockへとつながるDIVを1/2、つまり48→24MHzへ変更し、Update Codeを行うと、DIVの変更により赤枠が変わったことがおわかりいただけると思います。   なお、Clocks Tool側でも変更前後の差分を確認することができます。 クロック設定を変更後、Update Codeをクリックした際に以下のようなダイアログが表示されます。差分が生じたファイルにはファイル名の右側に change と表示されます。これをクリックすると差分を見ることができます。 clock_config.c の差分を確認します。左側(Newly generated)が変更後のファイル、右側(On disk)が変更前のファイルです。System Clockに差分が生じているのが確認できると思います。 差分が生じた箇所は色が変更しているので視覚的にわかりやすいです。   マイコン、プロセッサには、機能集約が進んでいるため、内部のクロックツリーも非常に複雑化しています。このようなクロック可視化ツールがないと、現実的に設計・評価は難しいと思いますので、是非ご活用ください。   =========================​ 本投稿の「Comment」欄にコメントをいただいても、現在返信に対応しておりません。​ お手数をおかけしますが、お問い合わせの際には「NXPへの技術質問 - 問い合わせ方法 (日本語ブログ)」をご参照ください。​ (既に弊社NXP代理店、もしくはNXPとお付き合いのある方は、直接担当者へご質問いただいてもかまいません。) MCUXpresso Config Toolsの中から「Clocks Tool」にフォーカスし、クロック設定の基本および設定方法を解説します。VS Code環境での導入方法から、CPUクロック変更によるLED点滅デモまで紹介します。 (作業時間:10分 *MCUXpresso for VSC (Visual Studio Code), SDKをインストールしている前提) MCUXpresso MCX SW | Downloads 日本語ブログ
查看全文
S32G_Howto_Boot_MiniLinux_from_QSPI この記事では、S32Gプラットフォーム上でQSPI Norのみを使用して最小限のLinuxシステムを起動する方法について説明します。主な目的は、Linuxの緊急モード、アップグレードモード、テストモード、または高速起動を有効にすることです。 目次 1. 背景と情報... 2. 1.1 背景情報... 2 1.2 必要書類…2 2. S32G QSPI Norミラーレイアウトの説明... 3. 2.1 S32G Linux BSPによるQSPI Norブートのサポート... 3 2.2 S32G Yocto fsl-image-flashメカニズムの解析... 5 2.3 S32G QSPI Norブートのイメージレイアウトとターゲット変更... 7 3. 画像の変更と編集... 8 3.1 ミラーの変更... 8 3.2 Yoctoコンパイル方法... 10 3.3 スタンドアロンコンパイル方式... 11 4. Linuxカーネルイメージのサイズを縮小する方法... 12 5. 最小限のルートファイルシステムを作成する方法。12 5.1 既存のルートファイルシステムを直接縮小する... 12 5.2 その他の方法... 14 6つのテスト...14 6.1 プログラミング方法...14 6.2 ログを実行します。16 7. ルートファイルシステムにアプリケーションを追加する方法... 17 7.1 Yocto環境にメソッドを追加する... 17 7.2 その他の方法... 17 7.3 テスト結果...17 8. 添付ファイル...17
查看全文
S32G_Howto_Boot_MiniLinux_from_QSPI 本文说明在S32G上如何只用QSPI Nor启动一个最小Linux,最主要的作用是:Linux的紧急/升级/测试模式,或快速启动 目录 1    背景与资料说明... 2 1.1  背景说明... 2 1.2  所需资料说明... 2 2    S32G QSPI Nor镜像布局说明... 3 2.1  S32G Linux BSP对QSPI Nor启动的支持情况... 3 2.2  S32G  Yocto fsl-image-flash机制分析... 5 2.3  S32G QSPI Nor启动的镜像布局和修改目标... 7 3    镜像修改与编译... 8 3.1  镜像修改... 8 3.2  Yocto编译方法... 10 3.3  Standalong编译方法... 11 4    如何缩小Linux内核镜像... 12 5    如何制造最小Rootfs. 12 5.1  基于现有rootfs直接缩小... 12 5.2  其它方法... 14 6    测试... 14 6.1  烧写办法... 14 6.2  运行log. 16 7    如何在Rootfs加入应用... 17 7.1  Yocto环境中加入方法... 17 7.2  其它方法... 17 7.3  测试结果... 17 8    附件... 17
查看全文
S32G_Howto_Boot_MiniLinux_from_QSPI This article explains how to boot a minimal Linux on the S32G using only QSPI Nor, for the most important purposes: emergency/upgrade/test mode for Linux, or fast booting catalogs 1 Background and Information Note... 2 1.1 Background note... 2 1.2 Description of the information required... 2 2 S32G QSPI Nor Mirror Layout Description... 3 2.1 S32G Linux BSP Support for QSPI Nor Boot... 3 2.2 S32G Yocto fsl-image-flash mechanism analysis... 5 2.3 Mirror Layout and Modification Targets for S32G QSPI Nor Boot... 7 3 Image modification and compilation... 8 3.1 Mirror image modification... 8 3.2 Yocto compilation methods... 10 3.3 Standalong compilation method... 11 4 How to shrink a Linux kernel image... 12 5 How to Make Minimum Rootfs. 12 5.1 Direct shrink based on existing rootfs... 12 5.2 Other methods... 14 6 Testing... 14 6.1 Burning Approach... 14 6.2 Running log. 16 7 How to add apps to Rootfs... 17 7.1 Adding methods to the Yocto environment... 17 7.2 Other methods ... 17 7.3 Test results... 17 8 Annexes... 17
查看全文
S32k396 -BGA -DC1 ScH 55517 RevB2 not flashing my evaluation board is not flashing ,  i am using micro usb port,  , i did check the Jtag connections actually , ,,,, The manual says J17 ,16 , 18 and 19 should all b at 2-4 position connector shorted , but if i place them there  reset Led turns on D15. abort or retry window appears , if J17, J18, J16, J19 have 1-2 position shorted this error message comes Connection from "127.0.0.1" via 127.0.0.1. Connection from port "62565" to 6224 Connection from "127.0.0.1" via 127.0.0.1. Connection from port "62570" to 7224 Telnet server running on 127.0.0.1:51794 Requesting next symbol pxCurrentTCB Symbol pxCurrentTCB not found. Requesting next symbol pxReadyTasksLists Symbol pxReadyTasksLists not found. Requesting next symbol xDelayedTaskList1 Symbol xDelayedTaskList1 not found. Requesting next symbol xDelayedTaskList2 Symbol xDelayedTaskList2 not found. Requesting next symbol xPendingReadyList Symbol xPendingReadyList not found. Requesting next symbol uxCurrentNumberOfTasks Symbol uxCurrentNumberOfTasks not found. Requesting next symbol uxDeletedTasksWaitingCleanUp Symbol uxDeletedTasksWaitingCleanUp not found. Requesting next symbol xSuspendedTaskList Symbol xSuspendedTaskList not found. Requesting next symbol xSchedulerRunning Symbol xSchedulerRunning not found. Requesting next symbol FreeRTOSDebugConfig Symbol FreeRTOSDebugConfig not found. Requesting next symbol _tx_thread_current_ptr Symbol _tx_thread_current_ptr not found. Requesting next symbol _tx_thread_created_ptr Symbol _tx_thread_created_ptr not found. Requesting next symbol _tx_thread_created_count Symbol _tx_thread_created_count not found. Requesting next symbol _tx_thread_system_state Symbol _tx_thread_system_state not found. Unable to load libusb0.dll Copyright 2025 P&E Microcomputer Systems,Inc. Command Line :C:\NXP\S32DS.3.5\eclipse\plugins\com.pemicro.debug.gdbjtag.pne_6.0.3.202506131845\win32\pegdbserver_console -device=NXP_S32K3xx_S32K396 -startserver -singlesession -serverport=7224 -gdbmiport=6224 -interface=USBMULTILINK -speed=5000 -port=U„ PEmicro Interface detected - Flash Version 10.98 CMD>RE Initializing. INFO: DAP IDCODE = 0x6BA02477 INFO: DAP successfully powered up. DP CTRL/STAT = 0xF0000000 Target has been RESET and is active. CMD>CM C:\NXP\S32DS.3.5\eclipse\plugins\com.pemicro.debug.gdbjtag.pne_6.0.3.202506131845\supportFiles_ARM\NXP\S32K3xx\nxp_s32k396_1x32x1524k.arp Initializing. INFO: DAP IDCODE = 0x6BA02477 INFO: DAP successfully powered up. DP CTRL/STAT = 0xF0000000 Initialized. ;version 1.01, 12/11/2023, Copyright 2023 P&E Microcomputer Systems, www.pemicro.com [S32K396] ;device nxp, s32k396, 1x32x1524k, ;begin_cs device=$00400000, length=$005F4000, ram=$20400000 Loading programming algorithm ... Done. Programming sequency is : erase, blank check, program, and verify {default} CMD>VC Verifying object file CRC-16 to device ranges ... block 00400000-00417EE7 ... Error! CRC Command Timed Out Current content of flash does not match application to be programmed CMD>EM Command is inactive for this .ARP file. Error Erasing flash of device Error occured during Flash programming. INFO: DAP IDCODE = 0x6BA02477 INFO: DAP successfully powered up. DP CTRL/STAT = 0xF0000000 Starting reset script (C:\NXP\S32DS.3.5\eclipse\plugins\com.pemicro.debug.gdbjtag.pne_6.0.3.202506131845\supportFiles_ARM\NXP\S32K3xx\S32K396.mac) ... REM Disable Watchdog REM Enable clocks for selected cores in MC_ME module (the sequence below enables all clocks). REM MC.ME Partition 0 configured, enabling clocks for Partition 1 Delaying for 50mS ... Done. Delaying for 50mS ... Done. Delaying for 50mS ... Done. REM Initialize RAM and DMA: REM Initialize DMA TCD: REM Copy valid executable code to RAM for each core to be used. REM Enable required cores in MC_ME: Delaying for 1000mS ... Done. Delaying for 1000mS ... Done. Delaying for 1000mS ... Done. INFO: DAP IDCODE = 0x6BA02477 INFO: DAP successfully powered up. DP CTRL/STAT = 0xF0000040 Warning: Unable to go to background. Core is running Warning: Unable to go to background. Core is running Warning: Unable to go to background. Core is running Warning: Unable to go to background. Core is running Warning: Unable to go to background. Core is running Warning: Unable to go to background. Core is running Warning: Unable to go to background. Core is running Warning: Unable to go to background. Core is running Warning: Unable to go to background. Core is running Warning: Unable to go to background. Core is running Warning: Unable to go to background. Core is running Reset script (C:\NXP\S32DS.3.5\eclipse\plugins\com.pemicro.debug.gdbjtag.pne_6.0.3.202506131845\supportFiles_ARM\NXP\S32K3xx\S32K396.mac) completed. PEmicro GDB Launch Failure : Error during flash programming. Terminating debug session. PE-ERROR: Error downloading to the device. Terminating debug session. Disconnected from "127.0.0.1" via 127.0.0.1. Disconnection by port "62565" from 6224 Disconnected from "127.0.0.1" via 127.0.0.1. Disconnection by port "62570" from 7224 INFO: DAP IDCODE = 0x6BA02477 Target Disconnected.   Please help Me out Re: S32k396 -BGA -DC1 ScH 55517 RevB2 not flashing Hi Did you refer to the section "2.7 Program the Code Into the Board" of Getting Started With S32K396-BGA-DC1 Evaluation Board? Since you mentioned "I am using a micro USB port," then configure the jumper according to "2. Using on board OpenSDA debugger" specifically "Change debugger selection jumpers to use OpenSDA ( J16 ,  J17 ,  J18 ,  J19  position 1-2)" Please refer to "3.1 Set Jumpers in the S32K396-BGA-DC1". Although J10 and J11 are not mentioned here, it is recommended that you Short J10 and Open J11 to make the FS26 PMIC work in debug mode. On my S32K396-BGA-DC1, LEDs D1, D2, D3, D4, and D30 are lit up green, and D11 is lit up red. I can successfully debug and download Siul2_Port_Ip_Example_S32K396_RTD600 in S32DSv3.6.1. What project did you download before? Did you modify the debug pins to other functions, such as GPIO? If so, please refer to the following: S32K344 RTD, PORT/DIO and Debugging Best Regards, Robin ------------------------------------------------------------------------------- Note: - If this post answers your question, please click the "ACCEPT AS SOLUTION" button. Thank you! - We are following threads for 7 weeks after the last post, later replies are ignored Please open a new thread and refer to the closed one, if you have a related question at a later point in time. -------------------------------------------------------------------------------
查看全文
在基于 NXP 的 SoM(Layerscape SoC)上调用 DDR 在我公司的几个月内,我们将准备好推出新的SoM(建立在恩智浦 LS1028 SoC 之上)。因此,我想向您--更有经验的开发人员--请教一些知识,您是如何进行 DDR 更新的?使用什么工具?如何进行 DDR 初始化?您要执行哪些步骤?关于 DDR 有哪些常见误区?我应该注意什么? Re: DDR bring-up on NXP based SoM (Layerscape SoC) 关于 DDR 验证,请遵循《QCVS_DDR_用户指南》。 成功完成 QCVS 验证后,点击"Generate processor expert code" 的图标,在 \ \Generated_Code\ddr_init1.c,then将优化的计时参数集成到 ATF ddr_init.c 中。   QCVS DDR 是 codewarrior Developer Suite Level 的一个工具。 您还可以从以下链接下载 codewarrior Developer Suite Level Evaluation Edition。 https://www.nxp.com/design/software/development-software/codewarrior-development-tools/codewarrior-network-applications/codewarrior-development-suites-for-networked-applications:CW-DS-NETAPPS 评估版可免费使用,但有时间限制。   调试工具用于连接 LS1028A 客户板和 codewarrior 开发者套件级别,请在以下链接中找到该工具: https://www.nxp.com/design/design-center/development-boards-and-designs/CW_TAP CodeWarrior TAP 高性能探针基础单元,支持以太网和 USB(单独订购提示)。 cwh-ctp-base-he CWH-CTP-CTX10-YE Layerscape 处理器(Coretex 10 引脚)   DDR 布局应遵循 AN5097 AN5097,DDR4 同步动态随机存取存储器(SDRAM) 内存接口的硬件和布局设计注意事项
查看全文
[S32DS 3.6.7]S32K1xx RTD 3.0.0创建新项目时未检测到 大家好 我在使用 S32 Design Studio 3.6.7 和 S32K1xx RTD Drivers 3.0.0 版本时遇到了问题。 当前设置: S32 Design Studio 版本:3.6.7 设备:S32K1xx 系列 RTD 驱动程序版本: 3.0.0 操作系统:Windows 11 创建新项目时,SDK 选项中未显示 RTD。 是否有人遇到过同样的问题或找到了解决方案? 非常感谢你们的支持。 安东尼奥 Re: [S32DS 3.6.7] S32K1xx RTD 3.0.0 not detected when creating new project 你好,胡利安、 你是对的,问题在于 S32DS 附带了 GCC 11。我安装了 GCC 10.2,现在一切正常。 感谢您的帮助。 Re: [S32DS 3.6.7] S32K1xx RTD 3.0.0 not detected when creating new project 你好,@antonio_esal、 安装 RTD 软件包时,您是否确定安装了正确的恩智浦 GCC 版本?开箱即用,S32DS 3.6.0及以上版本配备 NXP GCC 11.4,但 S32K1 RTD 3.0.0已使用恩智浦GCC 10.2构建和测试(如版本说明中所述): 创建新的 S32DS 应用程序时,请确保选择了正确的工具链: 如果这不是问题的根本原因,请共享您的安装详细信息(Help> Installation Details),以便我确认是否已安装 S32K1 RTD 的所有必要依赖项。 致以最诚挚的问候, Julián
查看全文
S32K344 Mini-EVB 上的以太网引脚冲突 您好,团队、 我正在使用S32K344 Mini-EVB进行以太网连接活动。从用户手册中我可以看到,PTD16 引脚用于 MDC,PTD17 引脚用于 MDIO。但当我在 S32DS 中进行以太网引脚配置时,我看到 PTD16 只能路由到 MDIO,而 PTD17 则路由到 MDC,而且我还从 S32K344_IOMUX 中验证了这一点,从该 excel 中我还可以看到 PTD16 --> MDIO 和 PTD17 --> MDC。 那么,用户手册文件中是否有错误,如果有,是否会影响以太网通信。 Re: Ethernet Pin Conflict on S32K344 Mini-EVB 你好@MySterio_1、 是的,你说得对。引脚 MDC 和 MDIO 对调。我已经报告过——它将在下一个版本的 UM12406 中修复——发布日期尚不清楚。 请随时参考我与此主板相关的 LwIP 示例:示例 S32K344 EMAC LWIP Fre eRTOS miniEVB S32DS 3.6.1 RTD 6.0.0   顺祝商祺! 帕维尔
查看全文
官能团特性问题 你好,Nxp 专家、 我打开了几个示例,发现功能组是这样的:PortContainer_0_VS_0 和一些示例中的功能组是这样的:PortContainer_0_BOARD_InitPeripherals. 功能组的目的是什么,是否可以手动修改?   谢谢!   Re: functional group properties question 你好@cszhang 虽然有关此主题的可用文档比较有限,但在多个社区主题中都有讨论。我建议您参考 "了解 S32 Design Studio for S32 Platform IDE 中功能组的资源"主题,因为它提供了有用的见解,可以帮助您更好地了解功能组在 S32DS 中的工作原理。 BR、VaneB
查看全文
使用 Jlink-Segger 脚本下载 HSE 固件 你好 我需要将 FW 下载到 S32k310 中 目前,我使用的是移植到 s32k310 上的恩智浦演示程序 HSE_FW_INSTALL。 我注意到 Trace32 练习脚本可用于此目的。 有可能为此创建一个 Segger Jlink 脚本吗? 需要采取哪些步骤? 我需要一个更快的批量生产流程。 顺祝商祺! 法比奥
查看全文
NTM88およびMKW01用スターターパッケージのダウンロード こんにちは。以前はFXTHとMKW01を使用していましたが、現在はNTM88に移行しました。NTM88とMKW01用のスターターパッケージをダウンロードしたいと考えています。圧縮フォルダを探してみたところ、どこにも「利用できません」と表示されています。どこからダウンロードできるか教えていただけますか?NTM88とNCKのスターターパッケージは既にダウンロード済みですが、FRDM KW01ボードしか持っていないので、それを使い続けたいと思っています。ありがとう。 Re: Starter Package for NTM88 and MKW01 download サポートありがとうございます。ご報告いただきありがとうございます。近いうちに利用可能になることを願っています。私もSTに連絡してみます。大変感謝いたします。よろしくお願いいたします Re: Starter Package for NTM88 and MKW01 download こんにちは、 @mnicolae さん。 投稿ありがとうございます。NXP SemiconductorsのTPMSソフトウェアで「NTM88およびMKW01用スターターパッケージ」を見つけました。 しかし、このリンクは機能しません。この問題をウェブチームに報告しました。進展があり次第、すぐにお知らせします。 さらに、NXPのMEMSセンサ製品は2026年2月からSTマイクロエレクトロニクスに移行されているため、STマイクロエレクトロニクスに問い合わせてみるのも良いでしょう。 BR セレステ
查看全文
emac_mii_rmii_tx クロックに関する質問 スクリーンショットはlwip_baremetal_s32k344.mexからのものですが、emac_mii_rmii_txはスイッチMII_TX_CLKからのものですか? Re: emac_mii_rmii_tx clock question こんにちは、 lwip_baremetal_s32k344 の例では、xMII インターフェースを RMII モードに設定し、emac_mii_rmii_tx が入力として使用され、50MHz の基準クロックを期待するようにします (そのため、/2 分周器があります)。 SJA1110のようなスイッチでは、RMII REF_CLK機能はMIIx_RX_CLKまたはMIIx_TX_CLKピンで利用可能であり、柔軟性を高めるためにソフトウェアで選択できます。 BR、ペトル
查看全文
S32K344 モデルベース設計ツールボックス - FreeRTOS コンパイルエラー こんにちは、 現在、S32K344マイクロコントローラを使用したプロジェクトを開発中です。FreeRTOSをモデルに統合しようとすると、FreeRTOS.hに関するコンパイルエラーが連続して発生します。ファイルが見つかりません。私のシステムにインストールされているツールボックスの現在のバージョンは以下のとおりです。 BMSシリーズ向けモデルベース設計ツールボックス:v1.1.0 S32K3xxシリーズ向けモデルベース設計ツールボックス:v1.4.2 私が使用しているBMS Toolboxのバージョンは、この特定のバージョンのS32K3xx Toolboxとのみ互換性があります。したがって、S32K3xxツールボックスをアップグレードすることは、BMSツールボックスのサポートを損なうことになるため、私にとっては選択肢になりません。現在のツールボックスのバージョンを維持したまま、FreeRTOSを正常に組み込むために、このパスまたは依存関係の問題を手動で解決するにはどうすればよいですか?何かご助言いただければ大変ありがたいです。 @mariuslucianand
查看全文
Starter Package for NTM88 and MKW01 download Hi, i was using a FXTH with MKW01 but now I have moved to NTM88 and I am looking to download the Starter Package for NTM88 and MKW01. It seems the anywhere I can find the for the zipped folder says it is not available. Can you please suggest from where this can be downloaded? I have already downloaded the starter package for NTM88 and NCK but I only have the FRDM KW01 board and I would like to stick to to it. Thanks. Re: Starter Package for NTM88 and MKW01 download Thank you for your support. Glad you reported and hopefully will became available soon, on my side will contact ST as well. Much appreciated. Regards Re: Starter Package for NTM88 and MKW01 download Hello @mnicolae , Thanks for your post. I found the "Starter Package for NTM88 and MKW01" in the TPMS Software | NXP Semiconductors. However, this link doesn't work. I have reported this issue to the web team. I will keep you updated as soon as there is any progress. In addition, you can also try to contact STMicroelectronics because NXP MEMS sensor products have been transitioned to them since February 2026. BR Celeste
查看全文
S32K344 基于模型的设计工具箱 - FreeRTOS 编译错误 您好, 我目前正在使用 S32K344 微控制器开发一个项目。当我尝试将 FreeRTOS 集成到我的模型中时,我遇到了一系列编译错误,指出 FreeRTOS.H找不到文件。安装在我的系统上的工具箱的当前版本如下: 电池管理系统 系列的基于模型的设计工具箱:v1.1.0 S32K3xx 系列基于模型的设计工具箱:v1.4.2 我使用的电池管理系统工具箱版本仅与这个特定版本的 S32K3xx 工具箱兼容。因此,升级 S32K3xx 工具箱对我来说不是一个选择,因为这会中断电池管理系统工具箱支持。如何手动解决这个路径或依赖性问题,以便在保留当前工具箱版本的情况下成功包含 FreeRTOS?如能得到任何指导,将不胜感激。 @mariuslucianand
查看全文
[S32DS 3.6.7] S32K1xx RTD 3.0.0 not detected when creating new project Hello everyone, I am having issues with S32 Design Studio 3.6.7 and the S32K1xx RTD Drivers version 3.0.0. Current setup: S32 Design Studio version: 3.6.7 Device: S32K1xx family RTD Drivers version: 3.0.0 OS: Windows 11 The RTD does not appear in the SDK selection when creating a new project. Has anyone experienced the same issue or found a solution? Thank you very much for your support. Antonio Re: [S32DS 3.6.7] S32K1xx RTD 3.0.0 not detected when creating new project Hi Julián, You were correct — the issue was that S32DS comes with GCC 11. I installed GCC 10.2, and everything is working properly now. Thank you for your help. Re: [S32DS 3.6.7] S32K1xx RTD 3.0.0 not detected when creating new project Hi @antonio_esal, When installing the RTD packages, have you made sure the correct NXP GCC version has been installed? Out of the box, S32DS 3.6.0 and up comes with NXP GCC 11.4, however, S32K1 RTD 3.0.0 has been built and tested with NXP GCC 10.2 (As noted in the release notes): When creating a new S32DS application, make sure the correct toolchain is selected: If this is not the root cause of your issue, please share your installation details (Help > Installation Details) so I can confirm all of the required dependencies for S32K1 RTD are installed. Best regards, Julián
查看全文