Multi Source Translation Content

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

Multi Source Translation Content

Discussions

Sort by:
FLEXIO_CTRL[DBGE] 的含义是什么? DBGE 上的参考手册措辞有点短 "在调试模式下启用 FLEXIO 操作" 如果禁用它并调试代码会发生什么? 试图弄清楚在使用 FLEXIO 和调试 FLEXIO 驱动程序时,哪些调试操作是安全的。 我想,让调试器在接收模式下读取 SHIFTBUFn 或任何其他具有读取副作用的硬件寄存器都是不安全的,即使在调试器中不小心碰了一下也不行。 Re: What is the meaning of FLEXIO_CTRL[DBGE] 你好,@Henrik-Wires 如果"Enable FLEXIO operation in debug mode" 被禁用,当调试器停止 CPU 时,FLEXIO 模块也会停止。冻结所有 FIexIO 活动,直到执行恢复。 下面的主题也讨论了这个问题:这是否意味着 flexio 无法在调试模式下工作? BR、VaneB Re: What is the meaning of FLEXIO_CTRL[DBGE] 你好,@Henrik-Wires 正如 S32K3 参考手册中所述,当设置了相应的 SHIFTSTAT [SSF] 标志时,必须只读取 ShiftBufn 寄存器。 Re: What is the meaning of FLEXIO_CTRL[DBGE] 这是否也意味着,如果禁用 DBGE,使用调试器访问 FLEXIO 寄存器也是安全的,或者使用调试器读取 SHIFTBUFn 会扰乱移位状态标志 SHIFTSTAT[SSF] ? Re: What is the meaning of FLEXIO_CTRL[DBGE] 能否以某种方式阻止 S32DS 尝试访问寄存器?只有短暂访问 SHIFTBUFn 的指针,调试器才会通过清除 SHIFTSTAT[SSF]来访问该值,从而扰乱 FLEXIO 状态。 Re: What is the meaning of FLEXIO_CTRL[DBGE] 你好,@Henrik-Wires 能否请您说明一下这将用于什么目的,或者您想实现什么样的分析? Re: What is the meaning of FLEXIO_CTRL[DBGE] 你好,@Henrik-Wires 集成开发环境本身不会阻止对寄存器的访问。这种保护可以通过 MPU 或 XRDC 来实现;不过,我认为这种方法与您想要实现的目标是一致的。 相反,你可以监测何时设置 SHIFTSTAT [SSF],然后验证相应的 ShiftBufn 寄存器是否包含预期值。 Re: What is the meaning of FLEXIO_CTRL[DBGE] 我正在探索、编写和调试一个定制的低级 FLEXIO 驱动程序。 调试时出现了奇怪的结果,我怀疑是由于 S32DS 在通过驱动程序步进时获取 SHIFTBUFn 寄存器的值,干扰了 SHIFTSTAT[SSF] 状态,导致事件丢失。 Re: What is the meaning of FLEXIO_CTRL[DBGE] 该驱动程序显然会监测 SHIFTSTAT 并相应地访问 ShiftBufn。 我的问题是,使用 S32DS 跳过驱动程序代码可能会触发信号对 SHIFTSTAT 的调试读取,这似乎会干扰该寄存器中的状态。例如,当鼠标指向 SHIFTSTAT 指针时。 如果我小心避免用调试器接触任何此类指针,那么驱动程序就能正常工作。 我曾希望禁用 DBGE 可以让调试器访问 SHIFTSTAT,而不会干扰 **bleep**FSTAT 寄存器的状态,但从你的回复来看,情况并非如此。 Re: What is the meaning of FLEXIO_CTRL[DBGE] 你好,@Henrik-Wires 禁用 DBGE 位并不能防止调试器干扰 SHIFTSTAT 等寄存器,因为 DBGE 并不控制调试读取行为。相反,DBGE 可控制外设是否在内核停止运行时继续运行。
View full article
如何禁用 QSPI 1 上的 MGC 访问控制? 我正在努力使用自定义驱动程序让 QSPI 在 S32E2 评估板上运行。我正在使用 JTAG 加载代码并耗尽内存,因为我们正在从 EMMC 启动切换到从 QSPI 启动。评估板将 QSPI 闪存连接到 QSPI1 B。我在写入某些寄存器(主要是 SFAR)时遇到了问题。SFAR 似乎受 MGC 保护,因此我想通过清除第 31 位(GVLD)来禁用访问控制。 但是,根据参考手册,只能由总线主机 0x1F 访问 MGC,这是 HSE 核心。看起来 QPSI0 有一种以 HSE_QSPI0_DAT0 为形式的旁路机制,它允许更改可以访问 QSPI0 上这些寄存器的总线主机,但我一直找不到 QSPI1 的等效机制。 谁能帮帮我? Re: How do you disable MGC access control on QSPI 1? 你好,@AdamH_work、 感谢您联系恩智浦技术支持。关于您的问题,我需要一些时间来寻找访问您提到的寄存器的正确方法。 现在,我建议你看看我们在 S32ZE RTD 2.0.1 中提供的 qspi_ip_example_s32z2xx_r52 或 memacc_example_s32e2xx_r52 示例项目,尽管它使用了 RTD,但它可以让你了解在 S32Z/E 系列中使用 QSP I 所需的步骤。 谢谢! Re: How do you disable MGC access control on QSPI 1? 你好,@AdamH_work、 对不起,我的回复晚了。 另请查看第 65.1.6 节 QuadsPi_0 与网络安全寄存器之间的相互作用中的表格 [第 3349 页,S32Z2 参考手册,第 5 修订版,2025-01-28],第 121.2.1. 5 节 QuadsPi_0 数据 0(HSE_QSPI 0_DAT0)[第 6674 页]。在表的第一行中,它说明了如何配置可以访问MGC寄存器的主ID,具体取决于HSE_QSPI0_DAT0的值 。 请告诉我您是否解决了这个问题 Re: How do you disable MGC access control on QSPI 1? 我已经看到了这部分内容,但它似乎只涉及 QuadSPI 0,而我正试图在 QuadSPI 1 上实现这一点。 在此期间,我想出了如何对 MDAD 和 FRAD 寄存器进行编程,以允许所有访问通过,而且 SFAR 似乎在我启动 IP 命令时被填入,但现在它卡在忙状态,所以我可能不需要禁用 MGC 中的所有功能。 Re: How do you disable MGC access control on QSPI 1? 你好,@AdamH_work、 很抱歉造成您的困惑。现在,我的理解是,你们克服了最初的问题,对吗? 要检查发送 IP 命令的最佳流程,请查看示例项目MemAcc_Example_S32E2XX_R52,特别是请查看函数Qspi_Ip_StatusType Qspi_Ip_IpCommand(),以及静态 Qspi_Ip_StatusType Qspi_Ip_InitReset ()和Qspi_Ip_StatusType Qspi_Ip_RunCommand ()如何调用该函数。 如果您有更多问题,请告诉我。 Re: How do you disable MGC access control on QSPI 1? 在设置 MDAD/FRAD 和 LUT 编程后,我现在可以启动 IP 命令了。 作为闪存通信的第一步,我正在尝试在我的 S32E288-975EVB 评估板上读取美光 MT25QL256ABA8E12 的串行闪存发现参数。我已经在插槽 8 中设置了以下 LUT 序列: CMD PAD1 0x5A ADDR PAD1 24 DUMMY PAD1 8 读取 PAD1 16 停止 PAD1 0 似乎是启动了序列,但又陷入了无限繁忙状态。 SFAR 设置为 0x100000000(配置的起始地址),IPCR 设置为 0x08000008(插槽 8,8 字节)。我将 BUFXCR 寄存器设置所有大小均为 0,缓冲区 3 除外,我已经为所有主服务器设置了缓冲区 3(值 0x80004000)。星期五,我能够用示波器探测CS0/D0/D1引脚,我看到启动IP命令时CS处于钳位状态,但从未取消过钳位。命令和地址似乎已发送,随后是哑周期,然后 D1 进入活动状态,响应数据。 但是,它似乎从未完成读取,只是不停地将数据时钟输入,D1 上显示出重复模式,因为(我猜测)闪存芯片在其 SFDP 缓冲区中循环往复。 当我暂停执行时,我看到了这个: AdamH_work_0-1769442418001.png 我不知道是什么原因导致读取无法完成。 我阅读了数据手册中有关 QSPI 读取的部分,但没有找到任何可以解释这种行为的内容。 我尝试降低时钟(从比特时序来看,最初似乎在 100MHz 左右,但后来我在 CGM 中添加了一个 /10 分频器,它减慢了 D1 的比特模式,但没有改变繁忙的行为)。 Re: How do you disable MGC access control on QSPI 1? 你好,@AdamH_work、 根据我在内存数据表中看到的信息,SFDP (0x5A) 并非 "正常 "操作,它要求控制器故意停止通信流: alejandro_e_0-1769482047806.png 这也可以解释为什么读取的信息总是不完整。在我看来,QSPI 外围设备是正常工作的,至少它在通信,所以目前的问题可能是操作类型。您能否尝试更简单的操作?例如,您可以在我提到的示例中找到以下 LUT 序列、 MemCfg_0_SPI3ByteAddress_paInitOperations_0和 MemCfg_0_SPI3ByteAddress_paLutOperations_0在Qspi_Ip_Cfg.c 中、关于初始化操作,请查看 Qspi_Ip.c 中的 Qspi_Ip_InitOperation()。 如果您能执行另一项操作,并显示出不同的行为,请告诉我 谢谢! Re: How do you disable MGC access control on QSPI 1? 问题最终出在我没有正确设置 DLL 上。 我按照 S32DS 示例完成了 DLL 旁路模式初始化序列,并在我的代码中重新实现了它,现在它能正确完成读取操作。 下一个挑战是写入操作,但这个问题可以标记为已解决。
View full article
IMX8M PLUS LPDDR4 2G compatibility We try to implement an ISSI IS43LQ32512A-046BLI 2GB RAM. After Calibration the RAM fails during the  memcpy SSN armv8_x32 test with 2000MHz configured. If I configure the RAM to 1500MHz it pass all the tests. Has anybody implement this LPDDR4 RAM? Is it in general compatible with IMX8M PLUS? i.MX 8 Family | i.MX 8QuadMax (8QM) | 8QuadPlus i.MX 8M | i.MX 8M Mini | i.MX 8M Nano Re: IMX8M PLUS LPDDR4 2G compatibility Hi @TMpieye  Are you using DDR config tool run the Calibration? If yes,. please share your configuration page and fail log file. B.R Re: IMX8M PLUS LPDDR4 2G compatibility The IS43LQ32512A-046BLI (ISSI 2GB LPDDR4X SDRAM) is generally compatible with the NXP i.MX 8M Plus processor, as long as it adheres to JEDEC standards for LPDDR4/LPDDR4X memory. However, your issue with the memcpy SSN armv8_x32 test failing at 2000MHz (but passing at 1500MHz) is not uncommon and likely stems from configuration, board design, or calibration challenges rather than fundamental incompatibility. Compatibility Confirmation The i.MX 8M Plus supports LPDDR4/LPDDR4X memory up to 4266 MT/s (2133MHz clock), and the IS43LQ32512A-046BLI operates at up to 2133MHz (4266 MT/s data rate), which aligns with NXP's specifications. NXP's community forums confirm that similar ISSI LPDDR4X parts (e.g., IS46LQ32512A-046BLA2, which is an automotive variant of your model) are compatible with the i.MX 8M Plus, provided they follow JEDEC specs. Users have successfully implemented them without issues when properly configured. Potential Reasons for Your Test Failure at 2000MHz Based on similar reports in NXP and embedded forums: Timing/Configuration Mismatch: The i.MX 8M Plus DDR controller requires precise timing parameters (e.g., CAS latency, tRCD, tRP) from the RAM's SPD/ datasheet. At 2000MHz, your calibration might not fully optimize for the ISSI part's specs (e.g., CL=32, RL=14 at higher speeds). Lowering to 1500MHz reduces stress and passes, but this indicates suboptimal tuning. Board Design Issues: Signal integrity problems like trace length mismatch, impedance errors, or insufficient power decoupling can cause failures at higher speeds. Check for reflections or noise on DQ/DQS lines using an oscilloscope. Calibration Limitations: The i.MX 8M Plus uses NXP's DDR Tool for calibration. If your script or settings are based on Micron/ Samsung references (common in EVKs), they may not match ISSI's characteristics. Re-run calibration with ISSI-specific parameters. Power/Temperature: At 2000MHz, higher current draw could cause voltage droop or overheating, failing memcpy tests (which stress sequential reads/writes). Has Anyone Implemented This RAM? Yes, there are documented implementations: In NXP community threads, users have integrated similar ISSI LPDDR4X (e.g., IS46LQ series) on custom i.MX 8M Plus boards for industrial applications, achieving stable operation up to 2133MHz after fine-tuning. Embedded Linux/BSP developers report success with ISSI parts in Yocto-based builds, but often with custom DDR init scripts to handle the 512M x 32 organization (16Gbit density). Recommendations to Fix Your Issue Verify Datasheet Alignment: Download the ISSI datasheet (IS43/46LQ32512A series) and compare timing params with NXP's i.MX 8M Plus RM (Reference Manual, Section 13.5 DDR Controller). Key specs for your RAM: 2133MHz max clock, LVSTL interface, 1G x 16 organization (dual-channel x32 total). Re-Run Calibration: Use NXP's DDR Test Tool or SCFW DDR Config Tool with ISSI-specific stress tests. Start at 1600MHz, gradually increase to 2000MHz while monitoring eye diagrams. If using U-Boot/Linux, update the device tree (.dtb) with correct timings (e.g., mx8mp-ddrc-devfreq.dtsi). Board-Level Checks: Ensure VDDQ = 1.1V, VDD2 = 0.6V, with clean decoupling (capacitors close to pins). Use a signal integrity simulator (e.g., HyperLynx) to verify traces. Test with lower temperatures or better cooling to rule out thermal throttling. If Still Fails: Contact NXP support via their community or ticket system — provide your calibration logs and board schematics. Consider switching to validated RAM like Micron MT53E512M32D2NP (NXP EVK default) for comparison. Overall, the RAM is compatible, but your 2000MHz failure is likely a setup issue. If you share more details (e.g., calibration logs or board schematic snippets), I can help troubleshoot further! I suggest contacting +8526583 (7594) via the messaging app; obtain the EOL document from him and then make a recommendation. He can help you Re: IMX8M PLUS LPDDR4 2G compatibility On the used board we have sucsesslully runing 3GB (MT53E768M32D2ZW-046 WTC) and 4GB (MT53E1G32D2FW-046 AAT:B) Micron LPDDR4 on 2000MHz. Re: IMX8M PLUS LPDDR4 2G compatibility Thanks for your support. In Attachments i send you the configuration .xls and the test log. Re: IMX8M PLUS LPDDR4 2G compatibility Hello @pengyong_zhang , Same result with the config Tool V 13.1. Maybe our configuration is wrong for the IS43LQ32512A-046BLI? Can you provide the correct configuration (*.ds file)? Our hardware desing is a 1:1 copy of the eval board regarding the LPDDR4 interface.  Kind Regards Tobias Re: IMX8M PLUS LPDDR4 2G compatibility Hi @TMpieye Please use the below link download our DDR Config Tool and run the ddr test wIth configure 2GB dram.  https://www.nxp.com/design/design-center/development-boards-and-designs/i-mx-evaluation-and-development-boards/config-tools-for-i-mx-applications-processors:CONFIG-TOOLS-IMX B.R Re: IMX8M PLUS LPDDR4 2G compatibility Hi @TMpieye  Please use below setting run the DDR test. pengyong_zhang_0-1769394027487.png B.R Re: IMX8M PLUS LPDDR4 2G compatibility Thanks for your Config Exaple. Its the same I already tryed with this RAM and still get the error. Re: IMX8M PLUS LPDDR4 2G compatibility Hi @TMpieye  It's strange. Please share your DDR Config Tool v25.12 fail log B.R Re: IMX8M PLUS LPDDR4 2G compatibility hHi @pengyong_zhang  for stresstest we use the Mscale DDR Tool 3.31. I will do it with the other config tool Re: IMX8M PLUS LPDDR4 2G compatibility Hello @pengyong_zhang , here is the log of the stresstest. We have the same Problem wirth an 4GB ISSI IS43LQ32K01S2A-046BLI.  Re: IMX8M PLUS LPDDR4 2G compatibility Hi @TMpieye  Did you run the stress test with our DDR Config Tool? From your log file, it seems not from the Config Tool output. Also use out latest tool version v25.12. B.R Re: IMX8M PLUS LPDDR4 2G compatibility Hello @pengyong_zhang , I run the tes in the config tool and and its passed. So it seems to be a tool problem with the MSCALER tool. Many thanks for your great support!
View full article
s32k3 eMIOS IMP 模式 你好、 我目前正试图在 s32k3 微型计算机上使用 eMIOS IPM 模式读取输入信号频率。在等待状态寄存器告诉我它已捕获测量值后,我先读取 A 寄存器,然后读取 B 寄存器,并对两种情况(正常情况和溢出情况)执行周期计算。但是,计算结果给出的是"High Time" 或"Low time" ,而不是信号的周期。看来IPM模式给我的是高/低占空比,而不是周期。有什么好办法解决这个问题吗?我已确认控制寄存器使用了正确的模式。 谢谢! Re: s32k3 eMIOS IMP Mode @VaneB你好, ,我也遇到了类似的问题,你能分享一下我如何配置 EMIOS 来测量频率吗? Re: s32k3 eMIOS IMP Mode 你好@jfranklin 如果可能的话,能否与我们分享一下您的配置? Re: s32k3 eMIOS IMP Mode 你好,这是我们自己的软件。我们的目标是不使用提供的图形界面。基本上,我只是想读取频率输入的周期。尽管 IPM 模式应该只在上升沿或下降沿更新,但它似乎在上升沿和下降沿都更新。 Re: s32k3 eMIOS IMP Mode 你好@jfranklin 您使用的是 RTD 控制器还是定制软件?能否提供有关您申请的更多信息? BR、VaneB
View full article
Getting Started with FRDM-A-S32K312 Using Model-Based Design Toolbox (MBDT) Table of Contents 1. Introduction 2. Requirements 2.1 Software Required 2.2 Hardware Required 3. NXP Account Login 4. Installation 4.1 PEmicro Driver Installation 4.2 FreeMASTER Installation 4.3 MATLAB® Installation 4.4 MATLAB® Add-Ons Installation 4.5 MBDT for S32K3 v1.8.0 Installation 5. Running a Demo from the MBDT Examples for S32K3 6. Running a Motor Control Demo using MBDT 7. Conclusion 1. Introduction This article aims to help new users prepare and install the necessary software and hardware to use the FRDM Automotive S32K312 with the latest  Model-Based Design Toolbox for S32K3 version 1.8.0. Note: These steps can also be followed with any NXP Evaluation Board from the supported list referenced in the toolbox documentation. S32K312MINI‑EVB Renamed to FRDM‑A‑S32K312: Now part of the FRDM Automotive Ecosystem under its new name, the board keeps the same hardware and adds full ecosystem compatibility for flexible, scalable development. FRDM-A-S32K312-Details.png     2. Requirements   2.1 Software Required MATLAB® R2023b or later, with the following Add-ons: AUTOSAR Blockset Embedded Coder Support Package for ARM Cortex-M Processors Motor Control Blockset NXP_Support_Package_S32K3 Stateflow NXP Model-Based Design Toolbox for S32K3 version 1.8.0 FreeMASTER Run-Time Debugging Tool PEmicro Hardware Interface Drivers   2.2 Hardware Required FRDM-A-S32K312 Development Board MCSPTE1AK344 Motor Control Kit, which includes: Sunrise motor  DEVKIT-MOTORGD  12V power supply USB Type-C cable   3. NXP Account Login Open Software Licensing: Support, make sure you are logged into your NXP Account, and select: Click on My NXP Account. Select Software Licensing and Support. stefanvlad_4-1766413667183.png Then click on View accounts: stefanvlad_5-1766413890382.png These steps will ensure that you are properly authenticated with your NXP Account before proceeding with step 4.5 MBDT for S32K3 v1.8.0 Installation. Keep the page open for the login to persist.   4. Installation Note: Before proceeding, make sure you have full access to your PC or Laptop. Some installers require local admin rights. Contact your IT department to assist you with installation. 4.1 PEmicro Driver Installation After downloading the PEmicro Hardware Interface Drivers: Open the installer package and select the default Destination Folder: stefanvlad_1-1766419738640.png Click on Install and then wait for it to finish successfully. Connect the USB cable to your PC and the FRDM Automotive S32K312 board: FRDM-A-S32K312-Connect.png Open Device Manager to check OpenSDA and the COM port number. OpenSDA - CDC Serial Port → note this COM port number: stefanvlad_2-1766420223283.png Note: The COM port number may differ on your system.   4.2 FreeMASTER Installation Download the  FreeMASTER Run-Time Debugging Tool: stefanvlad_3-1766420635579.png Open the installer FMASTERSW32.exe Click Next, then select all available products: stefanvlad_3-1766483372281.png Use the default installation path: C:\NXP\FreeMASTER 3.2 stefanvlad_5-1766483553297.png Wait for the installation to complete.   4.3 MATLAB® Installation First, check whether MATLAB® R2023b or later is already installed. If so, you can skip this section. For this tutorial, MATLAB® R2025b is downloaded from MathWorks®: stefanvlad_1-1765986670126.png Download the matlab_R2025b_Windows.exe (246 MB) file. A MathWorks® Account login is required. stefanvlad_0-1765989175448.png After signing in, select the installation directory; the default is C:\Program Files\MATLAB\R2025b For minimum requirements, install the following products: MATLAB® Simulink® AUTOSAR Blockset Embedded Coder MATLAB® Coder Motor Control Blockset Simulink® Coder Stateflow By default, Select All is enabled during install: stefanvlad_1-1765989395916.png Wait for the installation to finish. stefanvlad_0-1765990977949.png After installation, open MATLAB® and change the default Add-ons path to a shorter path such as C:\MathWorks . stefanvlad_0-1766410047823.png   4.4 MATLAB® Add-Ons Installation Open Add-On Explorer and install: Embedded Coder Support Package for ARM Cortex-M Processors stefanvlad_0-1766412311420.png NXP Support Package for S32K3 (NXP_Support_Package_S32K3) stefanvlad_0-1766411567825.png   4.5 MBDT for S32K3 v1.8.0 Installation After installing the support package, run the following command in MATLAB®: sp_s32k3.nxp.setup(); stefanvlad_0-1766413223525.png Select version 1.8.0; the installer will check prerequisites: stefanvlad_1-1766413310659.png If any toolboxes are missing, install them before continuing. Click Download to proceed. stefanvlad_2-1766413441318.png The Download button opens the Software Terms and Conditions dialog; if the page is not loading properly, follow the steps in 3. NXP Account Login. stefanvlad_6-1766414096051.png After reading, click I Agree. Download the SW32_MBDT_S32K3_1.8.0_D2512.mltbx file (approx. 1.6 GB): stefanvlad_7-1766414190914.png Once the download completes, browse to the location of the SW32_MBDT_S32K3_1.8.0_D2512.zip file: stefanvlad_0-1766414656239.png Click Install to proceed and accept the license agreement. stefanvlad_1-1766414793231.png After a few minutes, the dialog will display: Installation successfully completed! Click Next. stefanvlad_0-1766415122676.png Select an option such as Open S32K3 Root Folder. stefanvlad_1-1766415182502.png MATLAB®'s current folder will change to the root of the toolbox. stefanvlad_2-1766415288611.png Click Finish to close the installer. The current folder in MATLAB® is now C:\MathWorks\Toolboxes\NXP_MBDToolbox_S32K3 : stefanvlad_3-1766415419643.png   5. Running a Demo from the MBDT Examples for S32K3 Navigate to C:\MathWorks\Toolboxes\NXP_MBDToolbox_S32K3\S32K3_Examples\demos\s32k3xx_uart_leds_s32ct Open the model s32k3xx_uart_leds_s32ct.mdl . stefanvlad_4-1766415657531.png Click on Hardware Settings: stefanvlad_0-1766419685798.png Go to Hardware Board Settings → Hardware → Select Configuration Project Template: stefanvlad_0-1766421790798.png For the FRDM-A-S32K312 select Custom: S32K312MINI-EVB S32 Config Tool. A Warning Dialog will appear; click OK. stefanvlad_2-1766421922797.png Wait for the configuration update to complete. stefanvlad_3-1766421986052.png Click on Apply and close the Configuration Parameters window. Press Build, Deploy & Start (CTRL+B) to generate the code: stefanvlad_4-1766422124406.png After the build completes successfully, the executable is downloaded to the board. stefanvlad_0-1766482772353.png Open a terminal application and connect to the board's COM port at 115200 baud: stefanvlad_1-1766483002529.png Pressing r, g, or b on the keyboard toggles the corresponding RGB LED on the board.   6. Running a Motor Control Demo using MBDT Navigate to C:\MathWorks\Toolboxes\NXP_MBDToolbox_S32K3\S32K3_Examples\mc\PMSM Open the folder s32k312_mc_pmsm_2sh_s32ct : stefanvlad_0-1766489966607.png Open the model s32k312_mc_pmsm_2sh_s32ct.mdl : stefanvlad_1-1766494271242.png Press Build, Deploy & Start (CTRL+B) to generate the code. After the executable file is downloaded to the board: Disconnect the FRDM-A-S32K312 board from the PC. Insert the DEVKIT-MOTORGD on top of the FRDM-A-S32K312, ensuring proper pin alignment. Plug in the 12V power supply to the DEVKIT-MOTORGD. Reconnect the USB Type-C cable to the FRDM-A-S32K312.  K312_MC_KIT.png The RGB LED and User Buttons are on the top side, the Reset Button is on the left side, while the 12V power, Motor Phases, and USB Type-C are on the right side.  K312_MC_KIT_TOP_A.JPG   Open FreeMASTER s32k312_mc_pmsm_2sh_s32ct.pmpx : stefanvlad_4-1766495406118.png Press GO to connect at 115200 baud. In the App Control tab, press On and set Speed Required to 1000 RPM: stefanvlad_5-1766495532076.png Apply a small mechanical load to the motor (friction force to the motor shaft) and observe the iABC currents. stefanvlad_6-1766495622758.png Here is a short video with the steps above explained: (function() { var wrapper = document.getElementById('lia-vid-6397308123112w960h540r525'); 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'); }); }); }); } }})(); (view in My Videos)   7. Conclusion These steps conclude the Getting Started with FRDM Automotive S32K312 using the Model-Based Design Toolbox guide. For more details, refer to: s32k312_mc_pmsm_2sh_s32ct_example_readme.html The corresponding example_readme.html for the selected model. Thank you for your time, Stefan V.
View full article
S32 Design Studio debug watch register? How  to watch the register change or not, in S32 Design Studio? Re: S32 Design Studio debug watch register? kxliu_0-1767943509829.png Hello, my S32DS Peripheral Registers  why is the right-click option grayed out in my interface Re: S32 Design Studio debug watch register? Thank your very much. Re: S32 Design Studio debug watch register? Hello, Which S32 Design Studio are you using and which version? What NXP device are you developing your application for? The answer to your question may vary some depending on the answers to these questions. Also, we have many HOWTO articles for each of our S32 Design Studio editions. Please check the articles posted to this community as the topics covered may help to answer your questions. Best Regards, Mike Re: S32 Design Studio debug watch register?  Can you tell me how to download the program to MCU  with  S32 Design Studio ,    and  how to make sure download is successful ? Thanks. Re: S32 Design Studio debug watch register? Hello, To setup the watch register, first start a debug session, then go to the Peripherals view and right-click on the desired register and select 'Watch Registers(s)'. Next, go to the Watch registers view and see the values change within the register as you step through the code. image.png Best Regards, Mike
View full article
从默认项目模板 - 将 *CAN FD* 转换为 *CAN* 大家好, 我正在研究 MR-CANHUBK344-S32。 我可以运行该教程: https://community.nxp.com/t5/NXP-Model-Based-Design-Tools/Communicating-over-the-CAN-Bus/ta-p/1758456 但是,我无法使用所需的硬件观察 CAN0 和 CAN1 之间交换的 CAN 消息。我必须使用 Kvaser Leaf Light v2,并且必须以“标准 CAN”格式(限制为 1000Kbps 的“旧”版本 CAN)获取这些消息,而不是更新更快的“CAN-FD”。 我尝试了几种方法,但我不知道该怎么做: 使用 500Kbps 的“旧”CAN 协议获得相同的工作示例。 我尝试取消选中此框: Aris__0-1742494052992.png 我尝试将 CAN FD 波特率设置为 500Kbps,或者干脆删除整个部分“0”,但都没有成功。 我现在有点迷茫了。我确信解决这个问题非常简单,但我对 S32CT 还不够熟悉。 提前感谢您的帮助。 阿里斯 回复:从默认项目模板 - 将 *CAN FD* 转换为 *CAN* 你好@Aris_ , 很高兴听到它有效! 问候, 罗伯特五世 回复:从默认项目模板 - 将 *CAN FD* 转换为 *CAN* 完美的!有用 回复:从默认项目模板 - 将 *CAN FD* 转换为 *CAN* 你好@Aris_ , 首先要澄清一些事情,您在配置中取消选中的选项不用于启用或禁用 CanFD,而是用于选择它使用的协议(ISO CanFD 或非 ISO CanFD): robertv_0-1742555084252.png 就发送普通 Can 帧(不是 FD)而言,只需打开 Can_Write 块并取消选中“Can FD Message”选项即可实现,您可以在此处看到: robertv_1-1742555157815.png 如果您觉得这有帮助并且您开始在 Kvaser Leaf Light v2 上看到 Can 框架,请告诉我。 问候, 罗伯特五世
View full article
Hello NPU! Running a TFLite model on i.MX 9 The following is a guide on training a simple model in Pytorch and Tensorflow and deploying it on an application using the i.MX93 Ethos-65 Neural Processing Unit (NPU). After following this guide you will accomplish: Training a simple CNN on the MNIST dataset Convert the model to tflite, quantize it and compile it for the i.MX93 NPU (Ethos-65). Run a simple application where a digit can be drawn and identified by our model. Prerequisites To follow this guide you will need: Yocto image, GTKMM3 support is needed for the C++ example, for the python example a pre-built image can be used. An i.MX93 board Running Python example The application implementation is provided in both Python and C++, if using the python application, pre-built full image can be used instead, simply copy the python scripts to the target and execute as follows: # Running quantized example on the CPU ./run.py -m cnn_tf_quant.tflite # Running example on the Ethos NPU ./run.py -m cnn_tf_quant_vela.tflite -d /usr/lib/liblitert_ethosu_delegate.so Pre-built models are provided in the attachment however steps and scripts used to train and generate the models are also included (see below). Building image with GTKMM3 support (C++ example only) The GUI application used for demonstration has been written in GTKMM3 (C++ wrapper of the GTK library) therefore an image with GTKMM3 support is needed, luckily there is already a recipe we can use to easily integrate this into our yocto image. To build the image simply follow the instructions in the Yocto User's guide, as of the time of this writing the latest BSP is 6.12.49_2.2.0 so we will use that. Once you have setup all the requirements in your host and installed repo, you can setup your build enviroment as follows: repo init -u https://github.com/nxp-imx/imx-manifest -b imx-linux-walnascar -m imx-6.12.49-2.2.0.xml repo sync Depending on your target you can now setup your build directory, we will use wayland graphics with X11 support, and the iMX93 Freedom board as example: DISTRO=fsl-imx-xwayland MACHINE=imx93-11x11-lpddr4x-frdm source imx-setup-release.sh -b 93-frdm-xwayland Simply select the MACHINE configuration that matches your board. Now we're almost ready to start the build, we still need to add GTKMM3 support to our image, simply modify your local.conf file under conf/local.conf and add the following: IMAGE_INSTALL:append = " gtkmm3" Make sure the space in front of gtkmm3 is there to avoid issues on the build. Since the build is very resource intensive out of memory issues can arise during the build, to limit the amount of concurrent recipes attempted to build at once it is recommended to add the following as well: BB_NUMBER_THREADS="8" PARALLEL_MAKE="-j8" BB_PRESSURE_MAX_CPU ?= "50000" BB_PRESSURE_MAX_IO ?= "100000" BB_PRESSURE_MAX_MEMORY ?= "25000" After this your local.conf should look similar to this: Screenshot from 2025-12-30 13-00-44.png  NOTE: Make sure to have plenty of storage available on your machine since the build requires upwards of 500GB to complete. The build can now start, if you want to build the GTKMM application from source it is required to have an available SDK create it as follows: bitbake imx-image-full -c populate_sdk And to create the image simply do: bitbake imx-image-full We require the full image since it contains all the Tensorflow Lite libraries and different examples. After the build completes the toolchain can be installed and the image flashed onto the board. To install the toolchain: ./tmp/deploy/sdk/fsl-imx-xwayland-glibc-x86_64-imx-image-full-armv8a-imx93-11x11-lpddr4x-frdm-toolchain-6.12-walnascar.sh And afterwards every time you want to use the toolchain: source /opt/fsl-imx-xwayland/6.12-walnascar-full-gtkmm3/environment-setup-armv8a-poky-linux To flash the image to an SD card: zstdcat imx-image-full-imx93-11x11-lpddr4x-frdm.rootfs.wic.zst | sudo dd of=/dev/mmcblk0 bs=1M conv=fsync And now you are ready to build the application, train some models and deploy them. Building the GTKMM3 application (C++) The source for the application can be found here, a prebuilt binary is also provided and attached here.  The application contains a drawing area where one can simply draw a digit with the mouse or touch display, and two buttons one to clear the drawing area and one to trigger the execution of the model and predict the digit. window_example.png To build from scratch CMake is required, as well as a toolchain with support for GTKMM3 (see above), the following steps can be followed to build the project: sudo apt install cmake git clone https://github.com/ManRod2982/drawing_window_imx cd drawing_window_imx/drawing_window_cpp/ source /opt/fsl-imx-xwayland/6.12-walnascar-full-gtkmm3/environment-setup-armv8a-poky-linux cmake -B build -DCMAKE_TOOLCHAIN_FILE=$OECORE_NATIVE_SYSROOT/usr/share/cmake/OEToolchainConfig.cmake cmake --build build After this a binary called window will be created under the build directory, now it can be simply copied to the target SD card. If using linux the filesystem will be mounted, so you can simply copy the binary to the root directory: sudo cp build/window /media/user/root/root/ SCP can also be used if a connection to the board is already established: scp build/window [email protected]:/root And after this on the target the application can be started as follows: ./window -m model_path [optional] -d delegate_path [optional] -v Three parameters are accepted by the application: Path to the model: -m or --model_path [Optional] Path to the delegate if any: -d or --delegate_path, if none is provided the model will be attempted to be run on the CPU using the XNN delegate [Optional] Verbosity flag, if present the model will output more information Now we need a model to run. Training a simple CNN model Looking at the Machine Learning User's guide for this release. The following is the support for the different frameworks with respect to the available compute engines in each device: Screenshot from 2025-12-30 16-24-57.png Tensorflow Lite and LiteRT (latest release of Tensorflow Lite and the only one moving forward) are the frameworks that are widely supported for most compute engines in the i.MX9 family, this guide will use Tensorflow lite since the example uses C++ and the current release of LiteRT only supports Python, however the interface and process it's pretty much the same. Setting up the environment The example repository contains different python scripts used to train the models and convert them to the tflite format. In order to follow the next steps a python3 installation is necessary. It is recommended to setup a virtual environment: python3 -m venv myenv source myenv/bin/activate pip install -r requirements.txt This will install all the required packages for both Tensorflow and Pytorch. Training a model with Tensorflow Tensorflow allows an straightforward path to quantize and convert the model to Tensorflow Lite, our Convolutional Neural Network (CNN) architecture looks as follows: model = tf.keras.models.Sequential([ tf.keras.layers.Input(batch_shape=(1, 28, 28, 1)), tf.keras.layers.Conv2D(16, 5, padding='same', activation='relu'), tf.keras.layers.Conv2D(32, 3, activation='relu'), tf.keras.layers.Dropout(0.2), tf.keras.layers.MaxPool2D(2, strides=(2,2)), tf.keras.layers.Flatten(), tf.keras.layers.Dense(100, activation='relu'), tf.keras.layers.Dropout(0.2), tf.keras.layers.Dense(10, activation='softmax') ]) We can train the model by running the script train_tf.py, it takes around 2min to train on a normal laptop and achieves 99.05% accuracy on the test dataset. For details on the framework please refer to the official Tensorflow documentation. After running the script we can visualize our model using the eIQ toolkit model visualizer or the Netron.app: cnn_tf.keras (1).png The i.MX93 features an ARM Ethos-65 NPU which requires the weights, biases and inputs to be integers and our current model uses float32, therefore we need to quantize the model, to achieve this we can run tf2quant_tflite.py which will quantize the model and convert it to tflite: cnn_tf_quant.tflite.png Which we can now see takes integer inputs and outputs, the weights and biases have also been quantized and we can easily see the difference in size of the files: Screenshot from 2025-12-30 17-46-15.png The quantized model is 555kB whereas the float32 model is 2.2MB, since float32 requires 4 bytes to store each weight and bias, whereas the quantized model requires only one byte. You now have a model than can be used on the target, however as it is right now it will be run on the CPU using the XNN delegate, to run the model simply do: ./window -m cnn_tf_quant.tflite We can now compile our quantized model for the ARM Ethos NPU. The eIQ toolkit will be used. Open the model through the model tool: 2025-12-30_17-53.png Navigate to the folder with your quantized model, cnn_tf_quant.tflite in this case and open it, you should be able to visualize the model, now we can click on the options menu to select convert: 2025-12-30_17-55.png We select the i.MX93 converter, we will prompted to select the destination folder as well: 2025-12-30_17-56.png After selecting the destination folder if all goes well the conversion finalizes and we should be able to visualize the model optimized to be run on the Ethos, any operations not supported by the NPU will be shown and carried out by the CPU, in the case of this simple example all the operations are carried out by the NPU: cnn_tf_quant_vela.tflite.png And we can now run the model on the target as follows: ./window -m cnn_tf_quant_vela.tflite -d /usr/lib/libethosu_delegate.so Training a model with Pytorch The repository contains a sample model using Convolutional Neural Networks to train on the MNIST data set, the model structure is as follows: NeuralNetwork( (cnn): Sequential( (0): Conv2d(1, 16, kernel_size=(5, 5), stride=(1, 1), padding=(2, 2)) (1): ReLU() (2): Conv2d(16, 32, kernel_size=(3, 3), stride=(1, 1)) (3): ReLU() (4): Dropout(p=0.2, inplace=False) (5): MaxPool2d(kernel_size=2, stride=2, padding=0, dilation=1, ceil_mode=False) (6): Flatten(start_dim=1, end_dim=-1) (7): Linear(in_features=5408, out_features=100, bias=True) (8): ReLU() (9): Dropout(p=0.2, inplace=False) (10): Linear(in_features=100, out_features=10, bias=True) ) ) Pytorch models can be easily converted to Tensorflow lite (without quantization) to be run on the CPU, as well as the Open Neural Network Exchange  model (ONNX) however Executorch has recently been released, which is an inference model for pytorch models on embedded devices, support for it is currently in the works. The Pytorch model is defined under pytorch_model.py: #!/usr/bin/env python3 import torch from torch import nn # Define model class NeuralNetwork(nn.Module): def __init__(self): super().__init__() self.cnn = nn.Sequential( # Input 28x28x1, after padding 32x32x1, output 28x28x16 nn.Conv2d(in_channels=1, out_channels=16, kernel_size=5, padding=2), nn.ReLU(), # Input 28x28x16, output 26x26x32 nn.Conv2d(in_channels=16, out_channels=32, kernel_size=3), nn.ReLU(), nn.Dropout(p=0.2), # Input 26x26x32, output 13x13x32 nn.MaxPool2d(kernel_size=2, stride=2), nn.Flatten(), nn.Linear(13*13*32, 100), nn.ReLU(), nn.Dropout(p=0.2), nn.Linear(100, 10) ) def forward(self, x): logits = self.cnn(x) return logits  And the training is carried out by executing train_pytorch.py, the training achieves 99.3% accuracy on the test dataset and it takes around 7 min to complete on a normal laptop. For details on the framework itself and the training process refer to the official pytorch documentation. The pytorch model is then saved under pytorch_model.pth however pytorch does not save the graph information only the weights and biases, if we visualize the saved model on netron or the eIQ toolkit model visualizer we can observe the disconnected weight and biases: pytorch_model.pth.png To better visualize our model we can simply convert it to the ONNX format by using the script pytorch2onnx.py, and now we can visualize the graph of our model on Neutron: pytorch_cnn.onnx.png NOTE: ONNX might also provide a way to quantize and convert the quantized model to tflite however in my tests of onnx-tf the tool seemed to be out of sync with the latest Tensorflow framewok, it was easier to create a similar model on Tensorflow and then quantize and export. We can now export our model to tflite, since the model is not quantized it will be run on the CPU (XNN delegate), to export it we run pytorch2tflite.py and we can now visualize the exported model: pytorch_cnn.tflite.png And we can run this model on the target as follows: ./window -m pytorch_cnn.tflite Deploying and running the model We now have an application where we can draw the digits, a model capable of detecting those digits, but our application needs to be able to execute that model and get the results, this is our next step. In order to be able to run the model on the target we need to: Load the model Create a tflite interpreter Load external delegates if any Allocate the tensors C++ example A minimal example is provided here, however it doesn't include the loading of the external delegate, which we will need in order to be able to run our model on the NPU. The required headers are the following: #include "tensorflow/lite/delegates/external/external_delegate.h" #include "tensorflow/lite/interpreter.h" #include "tensorflow/lite/interpreter_builder.h" #include "tensorflow/lite/kernels/register.h" #include "tensorflow/lite/model_builder.h" We can now load our model as follows using the TFLite API: std::unique_ptr<:flatbuffermodel> model = tflite::FlatBufferModel::BuildFromFile(model_path); An interpreter needs to be created now, for this an operation resolver is needed as well as our model: tflite::ops::builtin::BuiltinOpResolver resolver; std::unique_ptr<:interpreter> interpreter; tflite::InterpreterBuilder(*model, resolver)(&interpreter);  If a delegate is required we now need to create it and update our execution graph so that the interpreter knows to call the delegate on the supported operations: // Create external delegate option and pass the delegate library TfLiteExternalDelegateOptions external_delegate_options = TfLiteExternalDelegateOptionsDefault(delegate_path); // Create the External Delegate. This will load the delegate. TfLiteDelegate *external_delegate = TfLiteExternalDelegateCreate(&external_delegate_options); // Add External Delegate into TFLite Interpreter to automatically delegate nodes. if (interpreter->ModifyGraphWithDelegate(external_delegate) != kTfLiteOk) { std::cerr << "Failed to add delegate" << std::endl; } We can now allocate the tensors for our model: // Allocate tensors for the model if (interpreter->AllocateTensors() != kTfLiteOk) { std::cerr << "Failed to allocate tensors" << std::endl; } And at this point we are ready to run the inference using our model! The last step is to fill the input buffers with our data, invoke the interpreter and retrieve the results from the output buffer, in the following example with a float model: // Fill input buffers // Note: The buffer of the input tensor with index `i` of type T can // be accessed with `T* input = interpreter->typed_input_tensor (i);` float *input_tensor = interpreter->typed_input_tensor (0); std::memcpy(input_tensor, input.data(), input.size() * sizeof(float)); // Run inference if (interpreter->Invoke() != kTfLiteOk) { std::cerr << "Failed to invoke Interpreter!" << std::endl; return {}; } // Read output buffers // Note: The buffer of the output tensor with index `i` of type T can // be accessed with `T* output = interpreter->typed_output_tensor (i);` float *output_tensor = interpreter->typed_output_tensor (0); std::memcpy(output, output_tensor, output.size() * sizeof(float)); In our example application the interpreter creating and inference calling is wrapped in a class called NnModel, it's implementation can be seen on the repository but it can handle both the float models and int8 models without any modification. The class is instantiated inside the main routine and the inference is called every time the predict button is clicked. // Create model with parsed parameters NnModel nn(model_path, delegate_path, verbose); void Window::on_predict_clicked() { // Save screen to file std::cout << "Predict clicked!" << std::endl; // Call inference on NnModel depending on the type // the model expects int number; auto data_type = nn_.get_dtype(); switch (data_type) { case kTfLiteFloat32: { std::vector drawing = mouse_drawing.export_to_vector (28, 28, 255.0); std::vector output_vec_f = nn_.infer (drawing); number = get_max_index (output_vec_f); break; } case kTfLiteInt8: { std::vector drawing = mouse_drawing.export_to_vector (28, 28, 255.0); std::vector output_vec_int = nn_.infer (drawing); number = get_max_index (output_vec_int); break; } default: std::cerr << "Cannot handle input type: " << std::to_string(data_type) << std::endl; break; } std::string display = "You drew a: " + std::to_string(number); std::cout << display << std::endl; text_view.set_text(display); } Python example The process for creating an interpreter in Python is pretty similar, we still need to load a delegate if any is used and load the model as well as allocate the tensors. In this example LiteRT is used instead however the API remains the same, the only change needed is where the interpreted is imported from. The following minimal code can be used to load the model and any external delegates: from ai_edge_litert.interpreter import Interpreter # Create interpreter if delegate_path is not None: # attempt to load external delegate if provided (platform specific) try: from ai_edge_litert.interpreter import load_delegate delegate = load_delegate(delegate_path) self.interpreter = Interpreter(model_path=model_path, experimental_delegates=[delegate]) except Exception as e: raise RuntimeError(f"Failed to load delegate: {e}") else: self.interpreter = Interpreter(model_path=model_path) self.interpreter.allocate_tensors() We now have an interpreter we can use, we just need to fill the input tensors, invoke the interpreter and retrieve the output tensors with the results from our model: # Set input input_details = self.interpreter.get_input_details()[0] self.interpreter.set_tensor(input_details['index'], input_data) # Run inference self.interpreter.invoke() # Get results out_details = self.interpreter.get_output_details()[0] output_data = self.interpreter.get_tensor(out_details['index']) These steps are contained in a wrapper class under nn_model.py.  Benchmarking the models A prebuilt benchmarking tool is provided in the release it generates random inputs and measures the time it takes to run the inference on the model, the following are the results running the different models on the i.MX93: ./benchmaark_model --graph=model --num_threads=num_cores   CPU 1 core CPU 2 cores NPU pytorch_cnn.tflite 1559.61 us 1023.22 us NA cnn_tf_quant.tflite 585.37 us 379.69 us NA cnn_tf_quant_vela.tflite NA NA 221.84 us This is of course a toy example but it can be observed how running on the dedicated hardware provides a significant improvement on inference speed. The following is a guide on training a simple model in Pytorch and Tensorflow and deploying it on an application using the i.MX93 Ethos-65 Neural Processing Unit (NPU) and the i.MX95 eIQ Neutron NPU.
View full article
LS1046ARDB DDR 校准 作为一个教程项目,我尝试在 ls1046ardb 板上使用 CodeWarrior 工具用上市并通过 DDR 校准。 我创建了一个 QoriQ 配置项目->LS1046A->DDR 内存控制器控制器配置。 成功读取 mta18adf2g72az-3g2r1 模块的 SPD。之后我用上市了 " Centering the clock 测试 "。 第一阶段顺利通过: #################### Result for: wrlvl_searcher ###### Run 1 ###################################### 测试结果:[ ============================================================ 已更新:WRLVL_CNTL = 0x86550605,WRLVL_CNTL_2 = 0x00000000,WRLVL_CNTL_3 = 0x00000000,SDRAM_CLK_CNTL = 0x02800000 ============================================================ Updated:WRLVL_CNTL = 0x86550608, WRLVL_CNTL_2 = 0x0A0B0C0F, WRLVL_CNTL_3 = 0x100A0B0D, SDRAM_CLK_CNTL = 0x02800000 ============================================================ Updated:WRLVL_CNTL = 0x86550608, WRLVL_CNTL_2 = 0x0A0B0C0F, WRLVL_CNTL_3 = 0x1012130D, SDRAM_CLK_CNTL = 0x02800000 <> 呃......捕获寄存器: 0xE20、0x00000000 0xE24、0x00000000 0xE28、0x00000000 0xE40、0x00000000 0xE44、0x00000000 0xE48、0x0000001D 0xE4C、0x00000000 0xE50、0x00000000 0xE54、0x00000000 0xE58、0x000000000 0xE58、0x 00010000 转储: 0xF00, 0x00000000 0xF04, 0x00000002 0xF08, 0x0000000A 0xF0C, 0x14000C20 0xF10, 0x00000000 0xF14, 0x00000000 0xF18, 0x00000000 0xF1C, 0x00000000 0xF20、0x00000000 0xF24, 0x3B003E00 0xF28, 0x41004200 0xF2C, 0x4A004D00 0xF30, 0x4E005100 0xF34, 0x45007000 0xF38, 0x00000000 0xF3C, 0x00000000 0xF40、0x00000000 0xF44, 0x00000000 0xF48, 0x00000001 0xF4C, 0xD4000000 0xF50, 0x11001400 0xF54, 0x16001800 0xF58, 0x1F002100 0xF5C, 0x24002700 0xF60、0x1A000000 0xF64, 0x00009000 0xF68, 0x00000020 0xF6C, 0x00000000 0xF70, 0x0060007B 0xF74, 0x00000000 0xF78, 0x00000000 0xF7C, 0x00000000 0xF80、0x00000000 0xF84, 0x00000000 0xF88, 0x00000000 0xF8C, 0x00000000 0xF90, 0x00000000 0xF94, 0x80000000 0xF98, 0x00000000 0xF9C, 0x2A002B00 0xFA0、0x2D002C00 0xFA4, 0x2E002D00 0xFA8, 0x2A002E00 0xFAC, 0x2D000000 0xFB0, 0x00000003 0xFB4, 0x1E1B1A1C 0xFB8, 0x1D1B1C1A 0xFBC, 0x1E1C1B1D 0xFC0、0x1D1C1D1A 0xFC4, 0x1E1C1D1E 0xFC8, 0x1B1D1E1C 0xFCC, 0x1E1C1B1D 0xFD0, 0x1C1A1D1B 0xFD4, 0x1F1D1C1E 0xFD8, 0x1D1E1D1B 0xFDC, 0x1E1E1B1E 0xFE0、0x1D1F1D1C 0xFE4, 0x1E1C1A1D 0xFE8, 0x1D1D1C19 0xFEC, 0x1F1E1D20 0xFF0, 0x1D1E1F1D 0xFF4, 0x1E1D1B1E 0xFF8, 0x1D1E1E1C 0xFFC, 0x1F000000 数据: 0x00000008 0x0000000a 0x0000000b 0x0000000c 0x0000000f 0x00000010 0x00000012 0x00000013 0x0000000d ] 但下一阶段(clk_adj)失败: #################### Result for: wrc ###### Run 1 ################################################# 测试结果:[ < > {{DDR initialization failed: D_INIT was not cleared by hardware!}} 呃......捕获寄存器: 0xE20、0x00000000 0xE24、0x00000000 0xE28、0x00000000 0xE40、0x00000080 0xE44、0x00000000 0xE48、0x0000001D 0xE4C、0x00000000 0xE50、0x00000000 0xE54、0x00000000 0xE58、0x 00010000 转储: 0xF00, 0x00000000 0xF04, 0x00002100 0xF08, 0x0000000A 0xF0C, 0x14000C20 0xF10, 0x00000000 0xF14, 0x00000000 0xF18, 0x00000000 0xF1C, 0x00000000 0xF20、0x00000000 0xF24, 0x10101010 0xF28, 0x10101010 0xF2C, 0x10101010 0xF30, 0x10101010 0xF34, 0x10104000 0xF38, 0x00000000 0xF3C, 0x00000000 0xF40、0x00000000 0xF44, 0x00000000 0xF48, 0x00000001 0xF4C, 0x11000000 0xF50, 0x00000000 0xF54, 0x00000000 0xF58, 0x00000000 0xF5C, 0x00000000 0xF60、0x00000000 0xF64, 0x00009000 0xF68, 0x00000020 0xF6C, 0x00000000 0xF70, 0x0060007B 0xF74, 0x00000000 0xF78, 0x00000000 0xF7C, 0x00000000 0xF80、0x00000000 0xF84, 0x00000000 0xF88, 0x00000000 0xF8C, 0x00000000 0xF90, 0x00000000 0xF94, 0x80000000 0xF98, 0x00000000 0xF9C, 0x00000000 0xFA0、0x00000000 0xFA4, 0x00000000 0xFA8, 0x00000000 0xFAC, 0x00000000 0xFB0, 0x00000000 0xFB4, 0x00000000 0xFB8, 0x00000000 0xFBC, 0x00000000 0xFC0、0x00000000 0xFC4, 0x00000000 0xFC8, 0x00000000 0xFCC, 0x00000000 0xFD0, 0x00000000 0xFD4, 0x00000000 0xFD8, 0x00000000 0xFDC, 0x00000000 0xFE0, 0x00000000 0xFE4, 0x00000000 0xFE8, 0x00000000 0xFEC, 0x00000000 0xFF0, 0x00000000 0xFF4, 0x00000000 0xFF8, 0x00000000 0xFFC, 0x00000000 ] 假设校准是在全新的、完全组装的参考 ls1046ardb 板上进行的,而不是在定制主板上进行的,那可能有什么问题。 Re: ls1046ardb ddr calibration 你好 能否分享问题的截图? Re: ls1046ardb ddr calibration 我创建了一个新的 DDR 配置项目。将 SYSCLOCK 更改为 100 Mhz。 clocking.png 之后,我阅读了模块的 SPD。已成功读取 SPD。 spd_mappings_ddr.png CodeWarrior 所描述的 DDR 的 DQ 映射: dq mapping cpu.png 之后我启动校准。第一阶段顺利通过: write_leveling_start_values_test_ok.png 下一阶段(时钟调整)失败: clck_adj_fail.png 在失败阶段的日志中,我 clk_adj_fail_log.png 起初我以为 DQ 映射出错了,但现在看来映射是正确的,否则第一阶段也会失败。 对这种情况有什么建议吗? Re: ls1046ardb ddr calibration 您的板能够使用预编译映像在主机上启动和打印 u-boot 日志吗?还请您分享一下日志。 Re: ls1046ardb ddr calibration 不幸的是,我现在无法提供来自 uboot 的日志(在纽约假期之后是可能的),但我可以说 Uboot 和 Linux 一切都很好 —— 它们在我的 ls1046ardb 上启动和运行得非常完美。唯一的问题是 DDR 校准过程失败。 Re: ls1046ardb ddr calibration 日安 继续进行 ls1046ardb 失败的 DDR 校准。 这是成功的 uboot 日志: uboot_ok.png 这是 linux 启动日志: further_boot_ok.png 可以看出,Uboot和Linux的正常启动。我认为这意味着硬件和 DDR 模块一切正常,但 DDR 校准过程仍在上述相同步骤中失败。 Re: ls1046ardb ddr calibration 板按预期启动,因此 ddr 已正确校准,问题可能与使用该工具时的测试配置错误有关。 Re: ls1046ardb ddr calibration 日安奥斯瓦格 请说明测试配置中可能存在哪些错误? 让我展示一下我在做什么: 我的 CodeWarrior 版本 ddr_about.png 1) 首先我创建一个 DDR 配置项目并从 RDB 板读取 SPD 数据: ddr1.png 2) 成功读取 SPD 后,我将项目默认系统时钟从 66.7 Mhz 改为 100 Mhz ddr2.png 3) 在这里,我们可以看到完整的项目设置:   ddr3.png ddr4.png ddr5.png ddr6.png ddr7.png ddr8.png 4) 测试设置: ddr9.png ddr10.png ddr11.png 5) 之后,我开始测试: 第一次测试成功通过。 ddr13.png 下一次测试(CLK_ADJ)失败,结果如下: ddr15.png ddr16.png 那么问题出在哪里呢? Re: ls1046ardb ddr calibration 使用适用于 Windows 的 CodeWarrior 开发工作室可以解决这个问题。Windows 版本要比 Linux 下的二手垃圾喷气机好用得多。
View full article
关于 S32K314 上 "Adc_Sar_Ip_DoCalibration "函数初始化失败的问题 chaofan_0-1766735753554.png 使用的微控制器是 S32K314,使用的 SDK 版本是 5.0.0 chaofan_1-1766735798094.png chaofan_2-1766735817414.png chaofan_3-1766735842230.png ADC 时钟源频率为 160MHz,使用 " 元器件 " 组件。 我想在初始化后对 ADC 执行自校准,但功能反馈全部失败。 chaofan_0-1766736198671.png 错误位置已在此处找到,这不是超时问题。 我想知道解决方案是什么,ADC 自校准失败的原因可能是什么? Re: Regarding the issue of failed initialization of the “Adc_Sar_Ip_DoCalibration” function on S32K3 在自校准失败的情况下,采样值会变小并偶尔波动。这种现象是否与自校准失败相对应?而当电压值小于某一特定值(如 0.5V 左右)时,采样值为 4 或 5(满刻度为 16383)。
View full article
imx95 低電力モード 私は Linux 6.12 (Yocto ベース) を実行するカスタム i.MX95 ボードに取り組んでいます。USB3 ホスト コントローラに関連する RAM へのサスペンド (ディープ スリープ) 障害が発生しています。echo mem > /sys/power/state を実行すると、システムは xhci-hcd: WARN: xHC CMD_RUN タイムアウト、続いて PM: 非同期サスペンドに失敗しました: エラー -110 でサスペンドを中止します。USB ホスト モードが有効になっている場合、アクティブな USB トラフィックがない場合でも、この問題が継続的に発生します。私は GPIO によって制御される固定 5V VBUS レギュレータを使用しており、USB3 コントローラ、PHY、クロック、および電源ドメインは DTS (添付) で定義されています。私の要件は、システムが正常にディープスリープに入ることができるようにしながら、低電力モード中に USB VBUS の電源を完全にオフにすることです。参考までに、完全なサスペンド/再開 dmesg ログと関連する USB 関連の DTS ノードを添付しました。i.MX95 で xHCI サスペンド タイムアウトを回避するために必要な正しい DTS および/またはドライバ側の処理に関するガイダンスを希望します。 Re: imx95 low power mode CANを使ってEVKボードで再現するための詳細な手順を教えていただけますか?ありがとう Re: imx95 low power mode カスタム ボードでは fusb302 を使用していますが、usb3.0 としては有効になっていないため、usb2.0 として使用しています。 しかし、ディープスリープに入ると ( echo mem > /sys/power/state )、xhci-hcd ドライバでエラーが発生します。 テストのセットアップ: • SoC: i.MX95 • OS: Yocto Linux (カーネル 6.x、NXP BSP) • USBモード: ホスト (xHCI、USB3) • コネクテッドデバイス: USBフラッシュドライブ(大容量ストレージ) ボードを通常通り起動します。 USB ストレージ デバイスを USB3 ホスト ポートに接続します。 lsusb を使用して列挙を確認し、デバイスにアクセスできることを確認します。 次を使用して低電力モードに入ります: エコーメモリ > /sys/power/state このステップ自体の後にはエラーが表示されます。 設定されたウェイクアップ ソース (電源ボタン/ GPIO) を使用してシステムを再開します。 再開後、USB デバイスが次のいずれかの状態であることを確認します。 検出されない、または dmesgにxHCI / DWC3関連のエラーが表示される、または 再び動作させるには USB を再度差し込む必要があります。 エラーログ: エコーメモリ > /sys/power/state [ 117.057281] PM: 進入を一時停止(深部) [ 117.066009] ファイルシステムの同期: 0.005秒 [ 117.071209] ユーザー空間プロセスのフリーズ [ 117.076800] ユーザー空間プロセスの凍結が完了しました(経過時間 0.001秒) [ 117.083781] OOMキラーが無効になりました。 [ 117.087011] 残りの凍結可能なタスクを凍結しています [ 117.132725] 残りの凍結可能なタスクの凍結が完了しました(経過時間 0.041 秒) [ 117.140164] printk: コンソールを一時停止しています (デバッグするには no_console_suspend を使用してください) [ 117.156868] sd 0:0:0:0: [sda] SCSIキャッシュを同期しています [ 117.267552] xhci-hcd xhci-hcd.2.auto: 警告: xHC CMD_RUN タイムアウト [ 117.267611] xhci-hcd xhci-hcd.2.auto: PM: dpm_run_callback(): platform_pm_suspend は -110 を返します [ 117.267631] xhci-hcd xhci-hcd.2.auto: PM: 非同期サスペンドに失敗しました: エラー -110 [ 117.267702] PM: 一部のデバイスがサスペンドに失敗したか、早期ウェイクイベントが検出されました [ 117.268017] ハブ 1-0:1.0:hub_ext_port_status が失敗しました (err = -108) [ 117.268044] usb usb1-port1: 無効にできません (err = -108) [ 117.516365] PM: デバイスの再開に0.248秒かかりました [ 117.570639] OOMキラーが有効になりました。 [ 117.573777] タスクを再起動しています...完了しました。 [ 117.575261] sd 0:0:0:0: [sda] テストユニット準備失敗: 結果: ホストバイト=0x01 ドライババイト=DRIVER_OK [ 117.578423] ランダム: システム再開時にcrngが再シードされました [ 117.587117] sda: 容量が 120164352 から 0 に変更されたことを検出しました [ 117.598136] PM: 一時停止終了 -sh: echo: 書き込みエラー: 接続がタイムアウトしました Re: imx95 low power mode こんにちは@kannappanさん、 さて、元旦は休みになります。オフィスに戻ったら、ボードで試してみて、ご返答させていただきます。 良い一日をお過ごしください よろしくお願いいたします。 リタ Re: imx95 low power mode こんにちは@Rita_Wang 、 上記の問題に対する返答はありますか。 よろしくお願いします カンナパン Re: imx95 low power mode こんにちは@kannappanさん、 今週は忙しすぎて申し訳ありませんが、来週テストして結果を共有します。 良い一日をお過ごしください よろしくお願いいたします。 リタ
View full article
无法将 S32K146EVB-Q144 板闪烁为 D1 发光的红色 我有一个 S32K146EVB-Q144 评估板,起初运行良好。 在我实施 Lin 栈的一次调试过程中,它停止工作了。 当我RESET控制器时,我看到 D1 上持续出现红灯,另外两个绿灯还在那里。 我在 2-3 号位置使用 J10 和 J107 选择 USB 电源,在 2-3 号位置使用 J104 选择 OpenSDA 应用程序闪存模式。 现在,S32DS 完全检测不到我的控制器。 我按照下面帖子中提到的步骤进行了尝试,症状似乎完全相同。 关于S32K144 D2 红色 LED 始终亮起 - NXP Community 在这里,我使用 P&E Kinetics 恢复工具在 OpenSDA 中停止了处理器,但仍无法闪存任何新应用程序。 即使实现了停止,我也无法再次闪光,红灯仍然亮着。 通过调整跳线 J104,控制器也能进入启动加载器模式,实际上我也能在其中闪存 ne 启动加载器应用程序。但不知何故,我无法再次写入闪存,如果我尝试闪存任何示例 .srec文件,D2 保持周期性闪烁(通常在成功闪烁时闪烁一次,然后应用程序开始运行)。 简而言之: -控制器无法到达主控制器或无法连续RESET -控制器无法再次写入闪存(可能是网络安全问题)。 除了涉及 SEGGER-JLINK 的技术外,我尝试了上述主题中提到的技术,因为我没有这种调试探针。我有一个 PE Multilink Universal,但它也无法恢复/擦除闪存。 以下是板的详细信息:主 板名称是:S32K146EVB-Q144 MicroBoot 内核版本为:1.08 引导 加载程序版本为:1.13 安装的应用程序: peMicro EVB-S32K144 海量存储/调试 应用程序 版本为:1.25 DUID 是: 39A33939-91818199-37539805-F97AE678 EUID 是:4141A238-1BDB8733-1854BA22-D38368D6 TUID 是: 74823938-47328196-8576CC9B-0242983E TOA 是 :86B6E505-56F042E0-79B2A114-62BA758F TOA2 是:86B6E505-EB1A8A7C-AF6E54B6-43532420 SUID 是:86B6E505-5BA18877-37239804-8003EC65 MCU 是否永久锁定? 如果不是,我该如何找回我的板? 我是否发现有任何硬件/软件故障?(仅供参考,D2 和 D3 发出绿光,我认为这意味着我的 5V 和 3.3V 电源轨工作正常) 是否有物理方法进行批量擦除?(无法使用 S32DS 紧急动力学选项,因为那里根本无法检测到板)。 OpenSDA 芯片的任何引脚接地都会导致闪存擦除吗? Re: Unable to flash S32K146EVB-Q144 board as D1 glowing red 请注意,在圣诞假期期间,我们的支持响应时间可能会比平时长。在某些情况下,您的请求可能会在新年后得到处理。感谢您的理解。 Re: Unable to flash S32K146EVB-Q144 board as D1 glowing red HI P&E恢复实用程序停止 MCU 后,关闭工具。 然后按照步骤 3 或 步骤 4 对 S32K146 重新编程。 我不确定这是否是由于 应用程序版本为: 1.25 .请按住 RESET 按钮 SW5,然后插入 USB 线并将 MS D-DEBUG-S32K146EVB-q144_pemicro_v121.sda 放入 BOOTLOADER 驱动器中。这将把 应用程序版本更新为 1.21。 我还附上了 lpit_periodic_interrupt_s32k146.srec。 顺便说一下,您不需要外接 Segger J-Link。如果按步骤 6 :插入 J7,同时按住 SW5,OpenSDA 就会进入 BOOTLOADER 模式。然后 将世纪佳缘 J-Link 应用程序固件 (如 OpenSDA_V1.bin然后,板载调试器将变为 J-Link。 祝好, Robin ------------------------------------------------------------------------------- 注: - 如果本帖回答了您的问题,请点击"ACCEPT AS SOLUTION" 按钮。谢谢! - 我们会在最后一次发帖后的 7 周内跟踪主题,之后的回复将被忽略 如果您以后有相关问题,请另开新主题,并参考已关闭的主题。 ------------------------------------------------------------------------------- Re: Unable to flash S32K146EVB-Q144 board as D1 glowing red 您好,Robin, ,感谢您的及时回复,我试着将其回滚到MSD-DEBUG-S32K146EVB-Q144_Pemicro_v121.SDA, ,其行为方式相同,启动加载器应用程序已闪烁,但 D1 仍闪烁红光,我无法闪烁 .srec使用 Kinetis 恢复工具停止运行后的文件。我看到控制器正在尝试闪烁 srec,但失败了,因为 D2 会周期性闪烁(通常只闪烁 3-4 次,应用程序就会被闪烁)。 然后,我尝试将引导加载器切换到OpenSDA_V1.bin,之后尝试使用 J-Link 指令器进行连接,结果看到以下日志 : SEGGER J-Link Commander V8.94 (Dec 10 2025 14:50:47 编译) DLL 版本 V8.94, Dec 10 2025 14:49:54 编译 通过 USB 连接 J-Link... 没问题 固件:J-Link OpenSDA 于 2023 年 1 月 31 日编译 13:42:36 硬件版本:V1.00 J-Link 正常运行时间(自启动以来):0d 00h 00m 28s S/N:621000000 vtref=3.300V 键入 " connect " 建立目标连接,'?'如需帮助 J-Link > connect 请指定设备/内核。 : S32K146 类型 '?'用于选择对话框 设备 > S32K146 请指定目标接口: J) JTAG(默认) S) SWD T) cjTag TIF > SWD SWD TIF SWD 指定目标接口速度 [kHz]。 : 4000 kHz 速度 > 100 设备 " S32K146 " 已选中。 通过 SWD 连接目标 ConfigTargetSettings() 开始 ConfigTargetSettings() 结束 - 用时 22us InitTarget() 开始 SWD 已选定。执行 JTAG -> SWD 切换序列。 停止 CPU 时超时。 InitTarget() end - Took 392ms 发现 SW-DP,ID 为 0x2BA01477 检测到 DPv0 CoreSight SoC-400 或更早版本 扫描 AP 映射以查找所有可用 AP AP[2]:由于已到达 AP 地图的尽头,因此停止 AP 扫描 AP[0]:AHB-AP (IDR: 0x24770011, ADDR: 0x00000000) AP[1]:JTAG-AP (IDR: 0x001C0000, ADDR: 0x01000000) 正在遍历 AP 映射以查找要使用的 AHB-AP, AP[0]:找到内核 AP[0]:AHB-AP ROM base:0xE00FF000 CPUID 寄存器:0x410FC241。实现者代码:0x41 (ARM) 找到了 Cortex-M4 r0p1,小端节序。 FPUnit:6 个代码 (BP) 插槽和 2 个文字插槽 CoreSIGHT 组件: romTBL [0] @ E00FF000 [0] [0]:E000E000 CID B105E00D PID 000BB00C SCS-M7 [0] [1]:E0001000 CID B105E00D 003BB002 PID DWT [0] [2]:E0002000 CID PID B105E00D 002BB003 FPB [0] [3]:D PID T PIU 正在初始化 126976 字节的工作内存 @ 0x1FFF0000 重置类型:正常 (https://kb.segger.com/J-Link_Reset_Strategies) E0000000 B105E00D 003BB001 E0040000 B105900D 000BB9A1 RESET:通过 DEMCR.VC_CORERESET RESET 后暂停内核。 RESET:通过 AIRCR.SYSRESETREQ 重置设备。 RESET:S_RESET_ST 永远不会被清除。CPU 似乎永远处于 RESET。 RESET:使用备用:重置密码。 RESET:通过 DEMCR.VC_CORERESET 重置后暂停内核。 RESET:通过重置引脚重置设备 RESET:VC_CORERESET 未停止 CPU。(调试逻辑也可以通过RESET引脚重置?)。 RESET:重新连接并手动关闭 CPU。 发现 ID 为 0x2ba01477 的 SW-DP DP v0 检测到 CoreSIGHT SoC-400 或更早版本的 AP 地图检测已跳过。 找到手动配置的 AP 映射。 AP[0]:AHB-AP (IDR: Not set, ADDR: 0x00000000) AP[0]:找到内核 AP[0]:AHB-AP ROM base:0xE00FF000 CPUID 寄存器:0x410FC241.实现者代码:0x41 (ARM) 找到了 Cortex-M4 r0p1,小端节序。 CPU 无法暂停 RESET:重置后核心未停机,尝试禁用 WDT。 RESET:通过 DEMCR.VC_CORERESET 重置后暂停内核。 RESET:通过RESET引脚RESET设备 RESET:VC_CORERESET 未停止 CPU。(调试逻辑也可以通过RESET引脚重置?)。 RESET:重新连接并手动关闭 CPU。 发现 ID 为 0x2ba01477 的 SW-DP DP v0 检测到 CoreSIGHT SoC-400 或更早版本的 AP 地图检测已跳过。 找到手动配置的 AP 映射。 AP[0]:AHB-AP (IDR: Not set, ADDR: 0x00000000) AP[0]:找到内核 AP[0]:AHB-AP ROM base:0xE00FF000 CPUID 寄存器:0x410FC241.实现者代码:0x41 (ARM) 找到了 Cortex-M4 r0p1,小端节序。 CPU 无法暂停 RESET:失败。切换RESET引脚并再次尝试RESET策略。 发现 ID 为 0x2BA01477 的 SW-DP 检测到 DPv0 CoreSight SoC-400 或更早版本 跳过 AP 映射检测。找到手动配置的 AP 映射。 AP[0]:AHB-AP (IDR: Not set, ADDR: 0x00000000) AP[0]:找到内核 AP[0]:AHB-AP ROM base:0xE00FF000 CPUID 寄存器:0x410FC241.实现者代码:0x41 (ARM) 找到了 Cortex-M4 r0p1,小端节序。 RESET:通过 DEMCR.VC_CORERESET RESET 后暂停内核。 RESET:通过 AIRCR.SYSRESETREQ 重置设备。 RESET:S_RESET_ST 永远不会被清除。CPU 似乎永远处于 RESET。 RESET:使用备用:RESET pin。 RESET:通过 DEMCR.VC_CORERESET RESET 后暂停内核。 RESET:通过重置引脚RESET设备 RESET:VC_CORERESET 未停止 CPU。(调试逻辑也可以通过RESET引脚重置?)。 RESET:重新连接并手动关闭 CPU。 发现 ID 为 0x2ba01477 的 SW-DP DP v0 检测到 CoreSIGHT SoC-400 或更早版本的 AP 地图检测已跳过。 找到手动配置的 AP 映射。 AP[0]:AHB-AP (IDR: Not set, ADDR: 0x00000000) AP[0]:找到内核 AP[0]:AHB-AP ROM base:0xE00FF000 CPUID 寄存器:0x410FC241.实现者代码:0x41 (ARM) 找到了 Cortex-M4 r0p1,小端节序。 CPU 无法暂停 RESET:重置后核心未停机,尝试禁用 WDT。 RESET:通过 DEMCR.VC_CORERESET 重置后暂停内核。 RESET:通过RESET引脚RESET设备 RESET:VC_CORERESET 未停止 CPU。(调试逻辑也可以通过RESET引脚重置?)。 RESET:重新连接并手动关闭 CPU。 发现 ID 为 0x2ba01477 的 SW-DP DP v0 检测到 CoreSIGHT SoC-400 或更早版本的 AP 地图检测已跳过。 找到手动配置的 AP 映射。 AP[0]:AHB-AP (IDR: Not set, ADDR: 0x00000000) AP[0]:找到内核 AP[0]:AHB-AP ROM base:0xE00FF000 CPUID 寄存器:0x410FC241.实现者代码:0x41 (ARM) 找到了 Cortex-M4 r0p1,小端节序。 CPU 无法停止运行 CPU 无法停止运行 CPU 无法停止运行 ****** Error:Failed to halt CPU. Memory zones: Zone:"默认" 说明:默认访问模式 Cortex-M4 已识别。 J-Link> Re: Unable to flash S32K146EVB-Q144 board as D1 glowing red 请使用示波器观察RESET引脚的波形,将波形发送给我,并告诉我RESET周期和高级宽度。在某些情况下,可能无法恢复,必须更换 S32K1 芯片。   连接策略& 恢复步骤: 目标:让调试器有机会停止内核并中和有问题的固件。 答:降低 SWD 速度 + “RESET 时连接” 在 J‑Link Commander 中: J-Link> device S32K146 J-Link> if SWD J-Link> speed 1000 ; start at 1 MHz; if still failing, drop to 100 kHz J-Link> connect 如果仍然失败,请使用手动重置下连接: 在外部将 RESET_B 保持在低电平,为板供电。 在命令行中运行连接。 释放RESET并立即: J-Link> r J-Link> h J-Link> halt 多试几次,尤其是在 100 kHz SWD 速度下,计时至关重要。 B. 更改 J‑Link RESET 策略 不同的 RESET 策略值的行为不同。在 Commander 中(具体 ID 可能因版本而异): J-Link> SetResetType = 3 ; a common “connect under reset / halt after reset”; Try 2 / 4 / 12 etc. depending on your J-Link version J-Link> r J-Link> halt 或者,尝试在 J-Link Commander 中的 RESET " 下选择 " Connect。 Re: Unable to flash S32K146EVB-Q144 board as D1 glowing red 根据 S32K146EVB-SPF-29844-RB.pdf: J104 1-2 来自 OpenSDA J 10 2-3 P5V0 的 RESET 信号。 如果你有外部 9V 或 12V 电源,也可以尝试连接 J107 1-2 P5V_SBC。如果您恰好有一个外部调试器,例如 PEMicro Multilink试试能否下载 S32K146 的程序。 最近下载的项目是什么?是否启用了 CSEc? 请回答我之前的问题,并向我提供使用示波器测量的RESET信号。
View full article
支持 S32K314 的 ADC 自检(方波检查 你好 在 UM Square Check 文档中,提到了一个 ADC 自检机制。但是,在审查功能安全机制时,ADC 自检被标记为 “无”,我们也无法在 S32K314 软件包的方格检查 (sCheck) 配置中找到此选项。 请告知如何 启用或配置该功能 ? 优先级:高 SAFETY_SW Re: ADC Self-Test (Square Check) Support for S32K314 你好,团队、 是否有任何更新? 谢谢! Re: ADC Self-Test (Square Check) Support for S32K314 你好,团队、 是否有任何更新? 谢谢! Re: ADC Self-Test (Square Check) Support for S32K314 你好,拉多斯拉夫、 S32K3E 和 S32Kxx 有什么不同? 它们似乎都是 S32K396、S32K394、S32K376、S32K374、S32K366 和 S32K364 的组群? 你能否指出在哪里可以找到 S32K3E 专用 RM 和硬件功能安全手册? 谢谢! Re: ADC Self-Test (Square Check) Support for S32K314 你好 @JasonTsengSG , 我的理解是这些新的 K3 衍生产品,具有更高的性能,并额外支持牵引反向器和电机控制 (eTPU):S32K3E_SW_Architecture.docx 您可以通过内联网找到 RM 和 SM,例如这里(有时你可以只使用特定的 K396 衍生名称来称呼这个 K3 子组): Zebra - 文档 - S32K396 - 所有文档 汽车功能安全软件 - Release_1.0.6 - 所有文件 谢谢, 拉多斯拉夫 Re: ADC Self-Test (Square Check) Support for S32K314 谢谢你,拉多斯拉夫,解释得很清楚。
View full article
S32K3XX的drivers配置 您好,我想请教一下,S32K3XX系列芯片新建设工程,在使用drivers时,每一个driver(1所对应位置的每一种driver类型)对应的配置界面中每一项配置(3所示位置),有没有文档或者教程说明? 在实际工程应用中,我可以依据哪些资料来进行配置,我每次设置都是看设置项名称猜测其功能,并决定是配置成什么,感觉缺乏官方依据,让我觉得我的每一个设置很没有确定性和依据。 Re: S32K3XX的drivers配置 Hi@Aaron_LL AN13435下面的章节中有各组件的一些描述 Senlent_0-1766973809123.png 并且在官网中有很多外设的配置培训教程,你可以在官网找到这些外设的培训教程。 https://www.nxp.com/products/S32K3 Senlent_1-1766973935410.png
View full article
寻找兼容的压力传感器 大家好 我正在寻找一个兼容的压力传感器来替换原来的 125pc05d1。 125pc05d1 是原装压力传感器,属于压差型。 我附上了原压力传感器的外形图和技术规格。 125pc05d1 的灵敏度约等于 Δmv/Δp ≈ 70mv/5psi ≈ 14,由于后续放大电路复杂,我不知道如何调整。如果有与之兼容的具有相同灵敏度的新型压力传感器,那就再好不过了。 有关更详细的测试,请参阅下面的链接。 https://www.eevblog.com/forum/repair/replacing-the-pressure-sensor-requires-assistance/ 感谢您的帮助。 Re: Seeking a compatible pressure sensor 你好 请考虑使用 MPX10DP,因为它在外形和功能上都最接近原装 125pc05d1。如果您需要更宽的压力范围或更高的输出电压以获得更高的分辨率,请考虑 MPX5010DP,尽管它需要额外的信号调节。 BRs, Tomas Re: Seeking a compatible pressure sensor 谢谢!
View full article
IMX8MP 处理器出现 HAB 错误 亲爱的大家,正在尝试验证 i.MX8MP 板上的 HAB 签名我遇到了这些错误 HAB配置:0xf0,HAB状态:0x66 --------- HAB 事件 1 ----------------- 事件数据: 0xdb 0x00 0x14 0x45 0x33 0x0f 0xc0 0x00 0xbe 0x00 0x0c 0x00 0x03 0x17 0x00 0x00 0x00 0x00 0x00 0x50 STS = HAB_FAILURE (0x33) RSN = HAB_INV_INDEX (0x0F) CTX = HAB_CTX_COMMAND (0xC0) ENG = HAB_ENG_ANY (0x00) --------- HAB 事件 2 ----------------- 事件数据: 0xdb 0x00 0x14 0x45 0x33 0x0c 0xa0 0x00 0x00 0x00 0x00 0x00 0x42 0x5a 0x00 0x00 0x00 0x00 0x00 0x20 STS = HAB_FAILURE (0x33) RSN = HAB_INV_ASSERTION (0x0C) CTX = HAB_CTX_ASSERT (0xA0) ENG = HAB_ENG_ANY (0x00) --------- HAB 事件 3 ----------------- 事件数据: 0xdb 0x00 0x14 0x45 0x33 0x0c 0xa0 0x00 0x00 0x00 0x00 0x40 0x40 0x00 0x00 0x00 0x00 0x00 0x04 STS = HAB_FAILURE (0x33) RSN = HAB_INV_ASSERTION (0x0C) CTX = HAB_CTX_ASSERT (0xA0) ENG = HAB_ENG_ANY (0x00) 它们来自这个开发环境 U-Boot SPL 2023.04-lf_v2023.04+g1e5b6c6bf2 谁能就这个问题给我点建议?预先致谢 Re: HAB Error on IMX8MP processor 你有没有可能解决这个问题,我也遇到了同样的问题,当我试图从 Srk1 转到 Srk2 时。 Re: HAB Error on IMX8MP processor 您好, RSN = HAB_INV_INDEX (0x0F) 表示给定索引中的密钥错误,或已安装密钥的目标索引不可用。检查 csf 文件。 请参阅 HAB API,您可以在其中找到有关这些错误的更多详细信息。API 与您下载的 CST 工具一起用于签名。 此致 哈维
View full article
i.mx93:使用 J-Link 和 SYSRESETREQ RESET Cortex-M33 不起作用 你好 我正在尝试使用 Segger J-Link 和 gdb 调试 i.MX93 上的 Cortex-M33 固件。我使用恩智浦的 J-Link 软件补丁建立了 SWD 连接,可以停止处理器、读取寄存器和内存等。 我的问题是,RESET处理器不起作用。寄存器的内容没有变化,所以我认为RESET被忽略了: (gdb) 监测 regs R0 = 40D000C0,R1 = 2001EFE3,R2 = 40D000C0,R3 = 00000000 R4 = 00000000,R5 = 00000000,R6 = FFFFFFFF,R7 = 2001EEE8 R8 = FFFFFFFF,R9 = FFFFFFFF,R10= 2000F000,R11= 00000000 R12= FFFFFFFF,R13= 2001EEE8,MSP= 2001EEE8,PSP= 00000000 R14(LR) = 0FFE219D,R15(PC) = 0FFE2248 XPSR 49000003,APSR 48000000,EPSR 01000000,IPSR 00000003 CFBP 00000000,CONTROL 00,FAULTMASK 00,BASEPRI 00,PRIMASK 00 网络安全扩展规则: MSP_S = 2001EEE8,MSPLIM_S = 00000000 PSP_S = 00000000,PSPLIM_S = 00000000 MSP_NS = 00000000,MSPLIM_NS = 00000000 PSP_NS = FFFFFFFC,PSPLIM_NS = 00000000 CONTROL_S 00,FAULTMASK_S 00,BASEPRI_S 00,PRIMASK_S 00 CONTROL_NS 00,FAULTMASK_NS 00,BASEPRI_NS 00,PRIMASK_NS 00 (gdb) 显示器重置 重置目标 (gdb) 监视器 规则 R0 = 40D000C0,R1 = 2001EFE3,R2 = 40D000C0,R3 = 00000000 R 4 = 00000000,R5 = 00000000,R6 = FFFFFFF,R7 = 2001EEE8 R8 = FFFFFFF,R9 = 2000F000,R11= 00000000 R12= FFFFFF,R7 = R 8 = FFFFFFF,R9 =,R11= 00000000 R12= FFFFFF,R7 = = FFFFFFF,R9 =,R11= 00000000 R 12= FFFFFF,R7= = FFFFFFF 13= 2001EEE8,MSP= 2001EEE8,PSP= 00000000 R14 (LR) = 0FFE219D,R15 (PC) = 0FFE2248 XPSR 49000003、APSR 48000000、EPSR 01000000、IPSR 01000000、IPSR 00000003 CFBP 00000000、控制 00、故障掩码 00、BASEPRI 00、PRIMASK 00 网络安全扩展规则: MSP_S = 2001EEE8,MSPLIM_S = 00000000 PSP_S = 00000000,PSPLIM_S = 00000000 MSP_NS = 00000000,MSPLIM_NS = 00000000 PSP_NS = FFFFFFFC,PSPLIM_NS = 00000000 CONTROL_S 00,FAULTMASK_S 00,BASEPRI_S 00,PRIMASK_S 00 CONTROL_NS 00,FAULTMASK_NS 00,BASEPRI_NS 00,PRIMASK_NS 00 J-Link的RESET策略是使用SYSRESETREQ而不是RESET信号,因为应该只RESET Cortex-M33内核。调试控制器是否可能没有写入 SYSRESETREQ 位所需的网络安全权限? 使用 J-Link 执行 Cortex-M33 的正确 RESET 方法是什么? 问候, Malte Re: i.MX93: Cortex-M33 Reset using J-Link and SYSRESETREQ not working 您好, ,能否也分享一下 [email protected] 的详细信息? 这个话题已经过去一年多了,问题依然如故。 谢谢。 Re: i.MX93: Cortex-M33 Reset using J-Link and SYSRESETREQ not working 感知上,它起作用了,我再也没有丢失过处理器,但是执行时间受到了严重影响,我不明白为什么。 每次操作都要多花 10 倍的时间。 执行冷RESET,但默认情况下在ROM中有一些代码(与恩智浦建议的没有SD卡的建议相反),然后将调试器连接到正在进行的程序并覆盖内存,这样做有感知吗? Re: i.MX93: Cortex-M33 Reset using J-Link and SYSRESETREQ not working 你好 可以使用这个 JLink 脚本吗? https://kb.segger.com/images/8/86/Example_Reset_CortexM_Normal.JLinkScript 这是 CortexM 的标准策略。 此致 Re: i.MX93: Cortex-M33 Reset using J-Link and SYSRESETREQ not working 你好 能否分享一下您的解决方案?我目前也面临着同样的情况。 Re: i.MX93: Cortex-M33 Reset using J-Link and SYSRESETREQ not working 你好,克日什托夫、 如上所述,我确实设法想出了一种使用 J-Link 在 i.MX93 中进行 RESET Cortex-M33 的方法。如果这正是您想要的,我很乐意与您分享细节。请告诉我您的电子邮件地址或其他直接联系您的方式。 问候, Malte Re: i.MX93: Cortex-M33 Reset using J-Link and SYSRESETREQ not working 嗨,我刚刚发现这个话题,想知道是否有人最终找到了一些可靠的解决方案,可以将 M33 与 A55 分离。最近,我开始为即将到来的项目创建开发环境,并在触发信号软件RESET时很快遇到了同样的麻烦。自话题打开以来已经有一段时间了,SEGGER现在(v8.10)为软件提供了内置IMX目标,尽管似乎仍然无法执行单核RESET。我用 SCB(SYSRESETREQ)和 SCR 寄存器做了一些试验,但就是无法达到稳定的效果。我还快速测试了适用于 VSCode 的 MCUXpresso 插件,但没有注意到任何自定义、有效的 RESET 策略的实现。 此致, 克日什托夫 Re: i.MX93: Cortex-M33 Reset using J-Link and SYSRESETREQ not working 嗨,马尔凯,我对解决方案非常感兴趣,因为我也遇到了同样的问题。 能否将您的解决方案或建议发给我?非常感谢。[email protected] 顺祝商祺! 君书 Re: i.MX93: Cortex-M33 Reset using J-Link and SYSRESETREQ not working 你好,马尔特 非常感谢。我的邮箱是[email protected] 顺祝商祺! 尼尔斯 Re: i.MX93: Cortex-M33 Reset using J-Link and SYSRESETREQ not working 嗨,尼尔斯 多亏了恩智浦的技术支持,我终于找到了解决这个问题的办法。 如果您告诉我您的电子邮件地址或任何其他直接与您联系的方式,我将很乐意为您提供帮助。 亲切的问候, Malte Kaiser Re: i.MX93: Cortex-M33 Reset using J-Link and SYSRESETREQ not working 你好@Sanket_Parekh 我的情况和原作者完全一样。看来恩智浦提供的jLink脚本实际上并没有执行RESET M33内核,而只是暂停了它。这使寄存器和处理器状态保持不变,如果遇到故障,如果不先通过Linux RESET 内核,我将无法继续正常调试。 除了使用jLink调试器之外,有什么办法可以触发信号RESET M33内核吗? 顺祝商祺! 尼尔斯 Re: i.MX93: Cortex-M33 Reset using J-Link and SYSRESETREQ not working 你好,桑凯特-帕雷赫、 (1) 在哪里可以获得 i.MX93 Cortex-M33 的恩智浦 J-Link 脚本补丁? (2) 据 Segger 称,目前还没有在 J-Link 中支持 i.MX93 的路线图。但它会在第一/第二季度到来。还有其他调试 Cortex-M33 的可能性吗? BR Re: i.MX93: Cortex-M33 Reset using J-Link and SYSRESETREQ not working 你好@malkai、 希望你一切都好。 "恩智浦打算在i.MX93中RESET Cortex-M33内核的程序是什么?" -> 系统重置控制器 (SRC) 负责生成所有系统复位信号和启动参数锁定。 -> 它的主要功能如下: • 处理来自其他模块的所有全局系统 RESET 源并生成全局系统 RESET。 - 负责 MIX(片)的功率门控及其内存低功耗控制。 -> SRC 从 PAD 和熔丝位中获取 POR_B 以完成启动顺序,并提出 GPC 低功耗请求以 完成掉电/开机顺序。 请参阅第 33 章系统 RESET 控制器 (SRC)。 https://www.nxp.com/webapp/Download?colCode=IMX93RM 谢谢& , Sanket Parekh Re: i.MX93: Cortex-M33 Reset using J-Link and SYSRESETREQ not working 你好,@Sanket_Parekhm、 谢谢您的答复。然而,这些信息无助于问题的解决。众所周知,i.MX93 中的 Cortex-M33 内核采用 Armv8-M 架构,该架构的 AIRCR 寄存器中没有 VECTRESET 位(参见 https://developer.arm.com/documentation/ddi0553/latest/ 中的 D1.2.3 ) 。因此,唯一可用的RESET请求是SYSRESETREQ,Cortex-M33内核和整个系统都不会对此做出任何反应。为什么会这样? 我已经研究过J-Link使用的RESET策略。问题是,恩智浦的修补程序只是用停止 CPU 来代替这些,就像我告诉你的那样。而且这里不能使用RESET线,因为它会RESET整个 SoC。 因此,问题仍然存在:恩智浦打算采用什么程序来RESET i.MX93中的Cortex-M33内核? 谢谢并致以诚挚的问候, Malte Kaiser Re: i.MX93: Cortex-M33 Reset using J-Link and SYSRESETREQ not working 你好@malkai, 希望你一切都好。 -> RESET选择控制目标设备的RESET操作。所有RESET选项都适用于基于 Cortex-M 处理器的设备,在 JTAG 和 SWD 模式下可用,并在RESET后停止 CPU。 -> Core-只能通过设置 VECTRESET 位来执行 Cortex-M 内核的 RESET。片上外设未RESET。对于某些 Cortex—M 设备,这种 RESET 方法是重置它们的唯一方法。但是,在大多数情况下,不推荐使用这种方法,因为大多数目标应用程序依赖于某些外围设备(PLL、外部存储器接口等)的RESET状态,如果启动后可能会混淆,但外设已经配置好了。 -> resetPin-J-Link 将其 RESET 引脚拉低以重置内核和外围设备。通常,这也会导致设备的 CPU RESET 引脚变低,从而导致 CPU 和外围设备 RESET。如果目标设备的RESET引脚未拉至低电平,则此复位方法将失败。 请参阅以下链接中的RESET策略部分。 https://community.nxp.com/ pwmxy87654/attachments/ pwmxy87654/kinetis/28743/1/ UM08001_JLink.pdf 谢谢& , Sanket Parekh Re: i.MX93: Cortex-M33 Reset using J-Link and SYSRESETREQ not working 你好,@Sanket_Parekh、 谢谢您的答复。遗憾的是,这些信息无助于解决我的问题。在此期间,我发现了很多事情: 1.恩智浦在i.MX93补丁中提供的J-Link脚本未实现RESET。它取代了重置 CPU,而只是停止 CPU。 2. 通过调试器手动将 AICR.SYSRESETREQ 写入 1 来请求 RESET 不会导致 Cortex-M33 内核 RESET。 所以,我最初的问题仍然是:通过调试器RESET Cortex-M33的可能性有多大? 感谢和问候, Malte Re: i.MX93: Cortex-M33 Reset using J-Link and SYSRESETREQ not working 你好,@malkai、 希望你一切都好。 请参考此链接,它将对您有所帮助。 https://community.nxp.com/t5/ i-MX-Processors-Knowledge- Base/all-boards-jtag/ta-p/ 1106822 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ------------------------------ ------------------------------ ------------------------------ ----------------------------- Thanks& Regards, Sanket Parekh
View full article
需要澄清 MK70 DDR 控制寄存器 21 规范 大家好, 我在 MK70FX512VMJ12 控制旧版板上的 DDR 时遇到了问题。 我们正在使用 MQX。问题来自引导加载程序中的以下一行: ddr->CR21 = 0x00060232; 我假设该行将 DDR_CR21 寄存器(如 K70 参考手册第 34.4.22 节所述)设置为 0x00060236。 参考手册指出,注册字段分为 2 个字段。 31–16 MR1DAT0 Data to program into memory mode register 1 for chip select . 15–0 MR0DAT0 Data to program into memory mode register 0 for chip select . 大多数 DDR 制造商将这些寄存器称为模式寄存器(MR 或 MRS)和扩展模式寄存器(EMR1、EMR2、EMR3)。我是否应该假定,字段 15-0 的数据将由状态机写入 DDR 的 MR(模式寄存器),字段 31-16 的数据将写入 EMR? 我怀疑,无论 DDR_CR21 中设置的值是多少,状态机都会发出必要的控制信号,这一点需要得到支持工程师的确认。这是因为考虑到我在 DDR_CR21 (0x0006) 的第 31-16 位写入的数据为 3 个 MSB 位分配了 000,为了正常运行,这些位应按照 DDR 规范的要求设置为 001。 DDR 规格说明:"写入扩展模式寄存器的方法是将 CS#、RAS#、CAS#、WE#、BA1 置低,将 BA0 置高,同时控制地址引脚 A0 ~ A12 的状态。" dodocolby_0-1765462377582.png BA2、BA1 和 BA0 所需的设置为 "001",而我写入 DDR_CR21 的值为 "000"。 DDR 同步动态随机存取存储器(SDRAM) 控制器是否会将在 DDR_CR21 中设置的值覆盖为正确的值? 谢谢, dodocolby Re: Clarification needed for MK70 DDR control register 21 specification 你好@dodocolby、 感谢您使用我们的社区。我注意到了你的问题。 我需要一些时间进行研究,然后再给您答复。如果在此期间有任何更新,请随时与我们分享。 BR 西莱斯特 Re: Clarification needed for MK70 DDR control register 21 specification 你好@dodocolby、 能否请您告诉我芯片的掩码集? 据我所知,掩膜组 3N96B 零件有勘误表e10521。   另外,您使用的是哪个版本的 MQX?我知道 MQX 4.x 存在与 SIM_MCR DDRDQSDIS RESET 状态有关的问题,这一点需要清除。   虽然 MQX 已不再受支持,但我注意到在以前的案例中,它们都使用了 ddr->CR21 = 0x00040232;而不是您提到的值: 0x00060232.   例如,随着温度升高,K70 DDR2 读取失败 - NXP Community K70 DDR2 温度影响读取数据 - NXP Community   这就是我提出上述问题的原因。   BR 西莱斯特 Re: Clarification needed for MK70 DDR control register 21 specification 你好, ,我使用的是MQX 4.2 和 5N96B。 dodocolby_0-1765990752157.jpeg 随着温度的升高,我们实现了 " K70 DDR2 读取失败——恩智浦社区 K70 DDR2 温度会影响读取数据——恩智浦社区 ",看来该设备对温度不再敏感了。 谢谢   Re: Clarification needed for MK70 DDR control register 21 specification 你好@dodocolby、 是的,我之所以引用这两个链接,是因为我注意到他们提到的代码使用 ddr->CR21 = 0x00040232 而不是 60232 。我只是想确认这一点,因为我这边无法访问 MQX 代码,它已不再受支持。此外,我已经联系了内部团队,以帮助进一步解决您的问题。一有回音,我就告诉你们。感谢您的理解。 BR 西莱斯特 Re: Clarification needed for MK70 DDR control register 21 specification 你好@dodocolby、 抱歉让您久等了。我还没有收到我们内部团队的任何更新,可能是因为圣诞假期的缘故。 请注意,由于欧洲、中东和非洲地区以及 AMEC 时区的假期,我们的回复时间可能会比平时长。我也将从明天开始休假,直到 1 月 5 日。 如果此事很紧急,您可以考虑创建一个新的案例并提及此链接。其他同事将能通过此案例找到我的内部联系人,您有可能在 1 月 5 日之前收到更新信息。 如果不紧急,我回去后会继续跟进。我们衷心感谢您的理解和耐心。 祝您愉快 BR 西莱斯特 Re: Clarification needed for MK70 DDR control register 21 specification 你好@dodocolby、 希望你一切顺利。对不起,我的回复晚了。请参阅我们内部团队的答复: " 由于 DDR 控制器可支持多种不同内存大小和配置,且地址引脚总数各不相同,因此加载到 MRnDATA 字段的模式寄存器数据不应包括组地址值。控制器将自动驱动正确的银行地址值(以及模式寄存器写入命令的其他控制信号)。寄存器值只需包括地址行部分。 " 希望对你有所帮助。如果您有其他问题,请告诉我。 BR 西莱斯特 Re: Clarification needed for MK70 DDR control register 21 specification 感谢您的确认。
View full article
MCUXpresso IDE 上的 ITM 与 UART 打印。 1. 简介 在嵌入式系统开发中,调试和日志输出对于确保代码正确性和优化性能至关重要。通过实时监控系统状态、捕获异常行为并记录关键数据,开发人员能够快速发现问题并验证功能。在资源受限的嵌入式环境中,选择合适的调试工具和方法显著影响开发效率。 MCXN947 是恩智浦上市的高性能微控制器,提供多种调试和记录解决方案,其中最常用的是ITM(仪器跟踪宏单元)和UART打印。ITM 利用 Cortex-M 内核的调试功能,通过调试接口高速传输数据,使其适用于具有严格实时要求的场景。UART 打印则通过 UART 外设输出日志,具有很强的通用性,适合生产环境。 本文解释了如何在MCUXpresso IDE 中使用这两种输出方法,以提高开发效率和系统可靠性。 2. ITM 和 UART 打印的原理和特点 2.1 ITM – 原理与特点 工作原理: ITM(Instrumentation Trace Macrocell)是 Cortex-M 内核提供的一项调试功能。它通过调试接口(例如 SWD/JTAG)使用 SWO 实时传输数据。开发人员可以使用 ITM_SendChar() 函数将调试信息发送到 ITM端口,然后由调试器捕获并显示在 IDE 的调试控制台中。 优势: 高速传输:ITM 利用调试接口的带宽,速度远超 UART(通常超过 10 Mbps)。 低 CPU 占用: ITM 由硬件处理,几乎不消耗 CPU 资源。 无额外外设: 不依赖 UART 或其他外设,节省硬件资源。 劣势: 调试器依赖: 需要连接调试器(如 MCU-Link、J-Link),不能直接用于生产环境。 配置复杂:需要正确的 ITM 端口和调试器设置,这对初学者来说可能具有挑战性。 2.2 UART 打印——原理和特点 工作原理: UART 打印通过 UART 外设将调试信息发送到串行终端。开发人员通常将 printf 函数重定向到UART,从而使标准库函数用于日志输出。数据通过 TX/RX 引脚传输,可以使用串行工具(例如 PuTTY、Tera Term)在 PC 上查看。MCUXpresso IDE 还内置了一个用于 UART 调试的终端。 优势: 高度通用:几乎所有嵌入式板都支持UART,使其广泛适用。 生产就绪:不需要调试器,可以直接在生产环境中使用。 易于实施:配置简单,非常适合初学者和快速原型制作。 劣势: 低速: 受限于 UART 波特率,导致传输效率降低。 外围资源使用: 占用 UART 外设和引脚,可能影响其他功能。 实时性能差: 由于中断延迟和波特率限制,不适合高实时场景。 2.3 对比总结 下表总结了 ITM 与 UART 打印的主要特点: 特性 ITM UART 打印 传输速度 高(10 Mbps 或更高) 低(通常为 115200 bps) CPU 开销 低 更高 外围依赖 无 需要 UART 外设和引脚 调试器依赖 需要 不需要 生产适用性 不合适 合适 配置复杂性 复杂 Simple 实时性能 高 低 使用场景: ITM: 非常适合开发阶段调试,且实时需求高(如电机控制、信号处理)。 UART 打印: 适合生产日志、初学者友好的设置以及一般调试需求。 3. 在 MCUXpresso IDE 中的实施步骤 3.1 使用 ITM 打印 硬件需求: 确保芯片的 SWO 引脚连接到调试器的 SWO 接口。 Alice_Yang_0-1764645814612.png 软件配置: 1)创建新项目时,选择“Redirect printf/scanf to ITM”以将 printf/scanf 重定向到 ITM。   Alice_Yang_2-1764645837570.png 2) 配置跟踪时钟: Alice_Yang_3-1764645858437.png /*!< Switch TRACE to TRACE_DIV */ CLOCK_AttachClk(kTRACE_DIV_to_TRACE); /*!< Set up dividers */ /*!< Set TRACECLKDIV divider to value 3 */ CLOCK_SetClkDiv(kCLOCK_DivTraceClk, 3U);   3)在 MCUXpresso 集成开发环境中,打开 SWO ITM 控制台,配置核心时钟和跟踪时钟设置。   Alice_Yang_6-1764646048650.png  Alice_Yang_7-1764646056186.png Alice_Yang_8-1764646066673.png Alice_Yang_9-1764646097086.png Alice_Yang_10-1764646101638.png 4)在 ITM 控制台中查看输出结果。 Alice_Yang_11-1764646126756.png 3.2 使用 UART 打印 1)创建新项目时,选择 SDK 调试控制台为 UART,设置 DebugConsole 使用 UART。          Alice_Yang_12-1764646136052.png 2)使用 MCUXpresso IDE 的外设工具配置 DebugConsole-UART。 Alice_Yang_13-1764646149103.png  Alice_Yang_14-1764646156564.png 3)使用引脚工具配置 UART TX/RX 引脚。 Alice_Yang_15-1764646165004.png 4)连接串行硬件,并在终端中查看输出结果。 Alice_Yang_16-1764646174816.png 4. 结论 ITM 和 UART 打印各有其优势。开发人员应根据项目需求选择合适的方法。ITM 更适合在开发过程中进行高实时调试,而 UART 打印则更适合生产环境和一般调试。
View full article
Imx95 verdin EVK、Aquantia10gbps 接口在 udp 上的速度限制为 1.2gbps 你好 我正在尝试通过两个 Imx95 verdin EVK A1 Silicon 版本板的 Aquantia 10 Gbps 接口在它们之间建立通信。两块板均运行 Debian 12(linux 内核 6.12.3),使用恩智浦安装程序(aquantia-firmware-utility/aq_api_2_9_7 at master 的 aquantia-firmware-utility/aq_api_2_9_7)正确安装了 aquantia10 G 固件(aqr-g4_v5.6.d-aqr_Marvell_noswap_xfi_id44834_ver2068.cld)aquantia-固件实用程序·GitHub)。它们使用 Cat6a 以太网电缆进行物理连接。 当我使用 iperf3 进行性能测试时,即使指定的目标带宽为 7 Gbps,我也能获得约 5 Gbps 的 TCP 带宽和 1.2 Gbps 的 UDP 带宽,损耗率为 0% : # TCP 在第一块板上测试 iperf3-s # iperf3-c < Server_IP >-t 30 # 在第二块板上测试 iperf3-s # # UDP 测试 iperf3 -s iperf3 -c -u -b 7G -t 30 当我尝试使用 ip link set dev enp1s0 mtu 9000 激活巨型帧时,却得到一个错误提示,说我超出了限制(10Gbps 接口不接受巨型帧,这很奇怪)。 我还尝试增加 UDP 缓冲区的大小,但得到的是相同的位帧 当我在两侧运行 iperf3 时,CPU 负载不超过 40% 为了达到最大吞吐量(接近 10 Gbps),是否需要应用特定的 n 配置或安装额外的工具?Aquantia FW 版本是否良好?Linux 内核版本?FW 安装程序版本? 有人尝试在该目标机上使用 10Gbps 接口吗? 此致, Abdelmonaem Re: Imx95 verdin EVK, Aquantia10gbps interface limited on 1.2gbps on udp 您好, 感谢您的反馈, 应用您的配置: cpufreq-set -g performance sysctl -w net.core.rmem_max=26214400 sysctl -w net.core.wmem_max=26214400 sysctl -w net.core.netdev_max_backlog=250000 sysctl -w net.ipv4.tcp_rmem='409687380 16777216' sysctl -w net.ipv4.tcp_wmem='409665536 16777216' 现在,我在发射端仅使用 iperf 而不是 iperf3,就能达到 10Gbps 的速度,有时甚至能达到 8,8 或 9,8Gbps 的速度,而在接收端,我只能达到 5.59Gbps 的速度,丢失帧数为 36% ,您能帮助解决这个问题吗? Re: Imx95 verdin EVK, Aquantia10gbps interface limited on 1.2gbps on udp 1.尝试在两个系统上配置以下设置: cpufreq-set -g performance sysctl -w net.core.rmem_max=26214400 sysctl -w net.core.wmem_max=26214400 sysctl -w net.core.netdev_max_backlog=250000 sysctl -w net.ipv4.tcp_rmem='409687380 16777216' sysctl -w net.ipv4.tcp_wmem='409665536 16777216' 2。如果可能的话,使用不同的参考系统作为 iperf 服务器(例如英特尔至强) 3. iperf3 本身对每个测试流都是单线程的,请尝试使用 -P 选项: ,例如iperf3 -c -u -b 10G -t 30 -P 6 (6 条流) 4.检查正向和反向液流 (-R) iperf3 -c 192.168.1.1 -t 10 -b 10G -u -R Re: Imx95 verdin EVK, Aquantia10gbps interface limited on 1.2gbps on udp 它将是一个小版本升级到 6.12.49 顺便提一下,您可能还需要考虑 DPDK 或 AF_XDP,以获得更好的吞吐量? Re: Imx95 verdin EVK, Aquantia10gbps interface limited on 1.2gbps on udp => TCP 与 UDP 的发送性能对比 使用 iperf3 发送 TCP 数据包时,每个 TCP 数据包为 128KB,数据包将被 ENETC 硬件的 LSO 功能分片。因此,你会看到更高的 TCP 传输性能。 iperf3 在创建 UDP 套接字时没有启用 UDP_SEGMENT。因此: -每个 UDP 数据包的大小约为 MTU(约 1500 字节)。 - 在数据量相同的情况下,UDP 需要比 TCP 发送更多的数据包。 更多数据包→更多内核处理→与带 LSO 的 TCP 相比性能降低。 => 为什么 TCP 的接收比发送低很多? - 在 Linux 内核中,TX 和 RX 路径并不对称,因此内核中每个 RX 数据包和每个 TX 数据包的处理时间是不同的。 - RSC 在内核中默认未启用;我们需要禁用 TCP 时间戳,这样 ENETC 的 RSC 才能正常工作。目前,i.MX95 的 RSC 默认为禁用。 a) 启用 i.MX95 的 RSC(接收端): ethtool -K eth1 large-receive-offload on b) 禁用 TCP 时间戳(发送端): sysctl -w net.ipv4.tcp_timestamps=0 sysctl -p /etc/sysctl.conf 启用 RSC 后,接收端的 TCP 性能将会提高。 此外,您还可以尝试使用巨型帧来获得更高的吞吐量。(希望你运行的是最新版本)。 # 将两侧的 MTU 更改为 9000 ip link set dev eth1 mtu 9000 # 更改以太网驱动程序中的 RX 缓冲区长度。 ethtool -G eth1 rx-buf-len 16384 在多数据流模式下,我们可以看到 8 到 10 Gbps 的 UDP RX/TX。 Re: Imx95 verdin EVK, Aquantia10gbps interface limited on 1.2gbps on udp 你好, ,我目前只对 UDP 感兴趣,对 TCP 不感兴趣,而且我认为卸载 机制不适用于 UDP ,我试图通过将 mtu 设置为 9000 来激活巨型帧,但我收到了一个错误,提示我超出了 1500 的限制(我使用的内核版本是 6.12.3)。 问候, Abdelmonaem Re: Imx95 verdin EVK, Aquantia10gbps interface limited on 1.2gbps on udp 好吧,我试试看,然后告诉你我得到了什么, 你能精确地指出 LF-Q4 的 Linux 内核版本吗?正如我告诉你的那样,我现在使用的是 6.12.3,我不能升级到更高版本,因为我的硅片版本是 A1,我需要知道我是否必须升级到 B0 版本。 Re: Imx95 verdin EVK, Aquantia10gbps interface limited on 1.2gbps on udp RSC 设置还能提高 UDP 性能。 ENETC 中巨型帧的更改/修复将在两周后发布的 LF-Q4 版本中发布。 Re: Imx95 verdin EVK, Aquantia10gbps interface limited on 1.2gbps on udp 使用 iperf 时,我的速度可以达到 10Gbps,有时甚至可以达到 9.8Bps;在并行数据流中,只有一个数据流的速度可以达到 5Gbps,但最大的问题是 Udp,在单个数据流中,我的速度可以达到 2Gbps,没有丢帧现象;但在并行数据流中,我的速度可以达到 5.5Gbps,丢帧率为 42% 。 Re: Imx95 verdin EVK, Aquantia10gbps interface limited on 1.2gbps on udp 我不认为 AF_XDP 或 DPDK 有助于将 46% 的丢失减少到 0% ,我还验证了 IRQ 亲和性,我可以看到 10G 接口上有 6 个 IRQ,每个 IRQ 都影响到一个 CPU,而且在测试过程中我没有看到任何 CPU 负载问题,1 个 CPU 的最大 CPU 负载为 40% 、我仍然不明白为什么总是丢帧,也许是因为使用的内核版本不支持巨型帧, ,您是否在您的系统(NXP)中对 10G 接口进行了性能测试,我认为您应该在您的系统中进行测试,看看是否存在与我相同的问题。 Re: Imx95 verdin EVK, Aquantia10gbps interface limited on 1.2gbps on udp AF_XDP 或 DPDK 不使用内核网络协议栈。 DPDK 专门有一个不同的驱动程序,只能在用户空间工作。它针对网络和数据包处理进行了高度优化。 它可以为所有 IP 数据包提供真正的快速性能。 您可以登录 第 10 章:https://www.nxp.com/docs/en/reference-manual/RM00293.pdf Re: Imx95 verdin EVK, Aquantia10gbps interface limited on 1.2gbps on udp 此测试是在哪个硅修订版 A1 还是 B0 上进行的? 您是否确认用于此测试 6.12.49 的内核版本仅适用于 B0 或者可能适用于 A1?? 我在你的电路板支持包交付中看不到这个内核版本,最后一个是 6.12.34 https://www.nxp.com/pages/alpha-beta-bsps-for-microprocessors:IMXPRERELEASES Re: Imx95 verdin EVK, Aquantia10gbps interface limited on 1.2gbps on udp 新的内核树和变更可从以下网址获取: https://github.com/nxp-imx/linux-imx/commits/lf-6.12.49-2.2.0 较新的 LF 版本中已取消对 A1 的支持。 您有以下选项 1。只需独立编译内核,仅在版本中替换内核即可。(可能有效) 2。请您的营销联系人将您的板替换为 B0,这样您就可以发布 LF-Q4'2025 版本。 Re: Imx95 verdin EVK, Aquantia10gbps interface limited on 1.2gbps on udp 我不明白这几行的意思: Single UDP Stream send (1500 MTU): 2 Gbps(在单数据流中,MTU 为 1500 的 tx 速率似乎为 2Gbps) Multi UDP Stream send (1500 MTU).10Gbps(在多数据流中,MTU 为 1500 的 tx 速率似乎为 10Gbps):10Gbps(在多数据流中使用 MTU 1500 发送时,速率为 10Gbps) 单 UDP 数据流发送(MTU 为 9000):8.2 Gbps(在单数据流中,使用 MTU 900 的 tx 速率为 8.2 Gbps) 接收单 UDP 数据流(MTU 为 9000):3.9 Gbps(在多数据流中,使用 MTU 1500 的 tx 速率为 10Gbps):3.9Gbps(在单数据流中使用 MTU 为 9000 的接收端,速度为 3.9Gbps) 多 UDP 数据流接收(MTU 为 9000):10Gbps(在多数据流中,使用 MTU 9000 的 Rx 速率为 2Gbps) 我没有看到: 单 UDP 数据流接收(1500 MTU) 多 UDP 数据流接收(1500 MTU) Re: Imx95 verdin EVK, Aquantia10gbps interface limited on 1.2gbps on udp 好的,我明白了,但为了确保万无一失,您能否在接收端 MTU = 1500 的情况下进行测试,我想知道您在这个新版本上的测试结果是否与我相同,另外,我看到您在测试中将发送端设置为 1500,接收端设置为 9000,但这并没有改变任何情况,就好像您在两端都设置为 1500,如果您需要测试巨型帧,您需要在两端都设置为 9000,请使用以下配置重新进行测试: 1- RX/TX,MTU = 1500,两端均为单声道和多声道流 2- RX/TX,MTU = 9000,两端均为单声道和多声道流 谢谢您的帮助。 Re: Imx95 verdin EVK, Aquantia10gbps interface limited on 1.2gbps on udp 是的,结果就是这样检验出来的。 所有情况下,双方的 MTU 都相同(都是 1500 或都是 9000) Re: Imx95 verdin EVK, Aquantia10gbps interface limited on 1.2gbps on udp 见附件、 请注意,我也是在 A1 SOC 上运行的。 UBOOT 日志:- U-Boot 2025.04-g8c1de2e1deca(May 09 2025 - 15:29:26 +0000) CPU:1800MHz 时的 i.MX95 rev1.1 CPU:30 摄氏度时的汽车温度等级(-40 摄氏度至 125 摄氏度) LM 启动原因:sw,起源:2,错误:1 LM 关机原因:sw,起源:2,错误:1 型号:恩智浦 i.MX95 19X19 板 动态随机存取存储器(DRAM):15.8GiB --- SM 日志 >$ info SM 版本 = 版本 633,Commit c37b26da SM Config = mx95evk,mSel=0 板 = i.MX95 EVK,attr=0x00000000 硅 = i.MX95 A1 启动模式 = 普通 引导设备 = MMC1 启动阶段 = primary 启动集 = 1 ECID = 0x6E5F04BA0000000500041D0899123F81 PMIC 0 (0x08) = 0x20,0x09,0x10,0x00,0x01 PMIC 1 (0x2A) = 0x54,0x22,0x00,0x0B PMIC 2 (0x29) = 0x55,0x22,0x00,0x0A 编译器 = gcc 14.2.1 20241119
View full article