Multi Source Translation Content

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Multi Source Translation Content

ディスカッション

ソート順:
フリースケール・カップ2015 EMEAチーム一覧 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 2014年11月17日現在、159チームがThe Freescale Cup 2015 EMEA に登録しています( 添付資料を参照) INNOVで始まるチーム名は、イノベーションチャレンジチームです フリースケール・カップ予選イベントが開催されていない国のチームは、選択した場所に自由に参加できます。Flavio Stiffanに連絡して、選択が記録されることを確認してください。
記事全体を表示
blhost を使用して LPC54(S)0xx フラッシュをプログラム/消去します 注:このドキュメントでは、フラッシュローダーに関する簡単な説明を提供し、フラッシュローダーの詳細については、 SDK_2.5.0_LPCXpresso54S018\middleware\mcu-boot\doc にある LPC540xxフラッシュローダーユーザーズGuide.pdf 入門を参照してください。 LPC54S0xx SDKをダウンロードします。 フラッシュローダープロジェクトをコンパイルしてflashloader.binを生成します プロジェクトはsdk \ boards \ lpcxpresso54s018 \ bootloader_examples \ flashloaderにあります dfu-util.exe または IDE を使用して、flashloader.bin を RAM にロードします。 dfu-util は http://dfu-util.sourceforge.net/releases/ からダウンロードできます。 ISPピンを構成してから、チップをリセットして、チップをUSB1 DFUブートモードにします。 ブート・モード ISP2の PIO0_6ピン ISP1 PIO0_5ピン ISP0 PIO0_4ピン 形容 USB1 DFUブート LOW LOW HIGH USB DFUクラスは、USB1高速ポートを介してSRAMにイメージをダウンロードするために使用されます。 LPC54S0xxデバイスUSB1高速ポートとPCをUSBで接続します。以下は、flashloader.binをロードするコマンドラインです。 dfu-util.exeドル –D flashloader.bin   blhost を使用して LPC540xxM/LPC54S0xxM フラッシュをプログラム/消去 フラッシュローダバイナリがダウンロードされ、LPC54S0xxプラットフォーム上で実行が開始され、LPC54S0xxプラットフォーム USB1(High-Speed) とホストの間に物理的なUSB接続が残ると、フラッシュローダはコマンドを受信する準備が整います。 blhost -u 0x1fc9,0x01a2 -- プロパティ 12 を取得 blhost -u 0x1fc9,0x01a2 -- メモリいっぱい 0x2000d000 4 0xc0000004 blhost -u 0x1fc9,0x01a2 -- configure-memory 0xa 0x2000d000 blhost -u 0x1fc9,0x01a2 -- プロパティ取得 25 0xa blhost -u 0x1fc9,0x01a2 -t 100000 -- フラッシュ消去領域0x10000000 0x100000 blhost -u 0x1fc9,0x01a2 -t 100000 -- 書き込みメモリ 0x10000000 xxx.bin 注:xxx.bin フラッシュにダウンロードする必要があるターゲットファイルです。 著者: ハオ・リュウ  Hao Liuさん、ありがとうございました。
記事全体を表示
FTF-ACC-F1247 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 本次会议将涵盖当前变更管理面临的各种主题,包括产品变更通知 (PCN) 对飞思卡尔客户的重要性(特别是在降低成本方面)以及产品和制造流程的质量改进。本次会议还将讨论从金线到铜线转变的几个方面,包括这一转变的技术细节、飞思卡尔为实现这一转变所做的工作、按产品系列进行的推出时间审查以及客户批准的重要性。FTF-ACC-F1247 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 本次会议将涵盖当前变更管理面临的各种主题,包括产品变更通知 (PCN) 对飞思卡尔客户的重要性(特别是在降低成本方面)以及产品和制造流程的质量改进。本次会议还将讨论从金线到铜线转变的几个方面,包括这一转变的技术细节、飞思卡尔为实现这一转变所做的工作、按产品系列进行的推出时间审查以及客户批准的重要性。FTF-ACC-F1247
記事全体を表示
i.MX 上的 wxWidgets <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 组装 wxWidgets 版本 2.8。使用 TinyX。由 4 英寸 - 8 英寸的触摸屏供电。
記事全体を表示
FRDM-i.MX95 上的外部 JTAG 调试器连接未输出预期的 JTAG 信号 你好, 我正在尝试将外部 JTAG 调试器连接到 FRDM-i.MX95 板。 根据板原理图,JTAG/DAP 信号似乎被连接到 PCB 上的测试点,一些相关元器件被标记为 DNP。 基于此,我对电路板进行了如下修改: 连接测试点的 JTAG 信号 安装与 JTAG/DAP 信号路径相关的 DNP 电阻器 添加了外部调试器的连接器 将 VTref、GND、TCK、TMS、TDI、TDO 和 RESET 连接到外部调试器 但是,我无法从调试器/电路板端观察到预期的 JTAG 信号输出。 例如,在调试器连接序列期间,TCK/TMS/TDI 没有按预期出现。 请您确认以下几点? 上述修改方法是否适用于将外部 JTAG 调试器连接到 FRDM-i.MX95 板? 要启用外部 JTAG/DAP 接口,是否需要额外的电阻器、跳线、焊桥或板修改? 外部调试器开始驱动 JTAG 信号之前,VTref 电压等级或电源时序是否有任何要求? FRDM-i.MX95 上的 i.MX95 在 JTAG/DAP 接口可访问之前是否需要任何启动模式、熔丝设置、网络安全设置或软件初始化? 外部 JTAG 调试器能否直接访问该板上的 Cortex-A55、Cortex-M33 和 Cortex-M7 内核,还是需要引导加载程序/固件进行额外的初始化? 在使用 FRDM-i.MX95 时,是否有推荐的连接器引脚分配或参考修改指南,以便将外部调试器与 FRDM-i.MX95 配合使用? 如果您能提供在 FRDM-i.MX95 板上启用外部 JTAG 调试的任何指导、原理图参考或所需修改细节,我将不胜感激。 顺祝商祺! Re: External JTAG debugger connection on FRDM-i.MX95 does not output expected JTAG signals 1. 你的修改方法是否正确? 原则上,是的。 如果 FRDM 原理图显示: TCK TMS TDI TDO nTRST 或 RESET VTREF GND 通过测试点和 DNP 填充选项,然后将这些信号路由到连接器通常是正确的方法。 但是,由于搜索结果中没有返回原理图,因此我无法确认所有必需的 DNP 电阻器是否都已安装到位。用户手册中不包含 JTAG 电路图。 2. 为什么检测不到 TCK/TMS/TDI 活性? 通常情况下,当连接 JTAG 探针时: TCK/TMS/TDI 由调试器驱动。 目标板不会生成它们。 如果您在 TCK/TMS 上完全看不到任何切换: 最常见原因 1:未检测到 VTref 许多探针(Lauterbach、J-Link、PE Micro、ULINK 等)只有在 VTref 存在且在有效范围内时才会驱动 JTAG 引脚。 检查: 连接器处的 VTref 电压。 共用接地连接。 探针软件会报告目标电压。 对于 FRDM-i.MX95,DAP I/O 电源似乎与 3.3 V 功能域 (NVCC_CCM_DAP) 有关。板文档显示该功能域由VDD_3V3供电。 最常见原因二:电路板未通电 大多数调试器仅使用 VTref 进行检测。 它们不会为目标提供动力。 核实: 电路板由 J25 供电。 PMIC启动。 VDD_3V3 存在。 电路板上的LED指示灯亮起。 该板需要外部PD电源。 最常见原因#3:缺少信号路由重构 如果 JTAG 路径包含: 0Ω DNP电阻器 隔离电阻器 其他馅料选择 即使缺少一个电阻,也可能导致 TCK/TMS 断开连接。 由于搜索结果中没有原理图,我无法核实电阻器的确切配置。 最常见原因#4:引脚映射错误 用欧姆表验证: 探针引脚 → 连接器引脚 → 电阻器 → 测试点 → i.MX95 球。 不要假设测试点标签与标准的 ARM 20 引脚顺序一致。 3. 是否需要特殊的启动模式? 对于不安全的设备: 观察 JTAG 时钟活动不应该需要启动模式。 一旦调试器检测到 VTref 并开始扫描序列,TCK/TMS 就应该切换。 启动开关会影响: eMMC启动 SD启动 序列号下载器 这与调试器是否生成 TCK 无关。 4. 是否涉及安全设置/熔丝? 有可能。 i.MX95 实现了认证调试和调试访问控制。[i.MX95RM_Rev4 | PDF] 、 [i.MX95RM_Rev2 | PDF] 、 [i.MX95 Sec...2026-final | PowerPoint] 然而: 网络安全设置通常会阻止成功的调试访问。 它们通常不会阻止调试器生成 TCK/TMS 本身。 由于您报告完全没有 TCK 活性,我首先会调查以下问题: VTREF 探针配置 电缆引脚排列 缺失的人口选项 在怀疑网络安全之前。 5. A55、M33 和 M7 可以调试吗? i.MX95调试架构支持: Cortex-A55 Cortex-M33 Cortex-M7 通过 CoreSight/DAP 基础设施。[i.MX95RM_Rev2 | PDF] , [i.MX95RM_Rev5 | PDF] 所以从硅芯片的性能角度来看,是的。 所有功能域是否立即可见取决于: 系统状态, 网络安全配置, 支持调试器。 但调试器通常不需要额外的引导加载程序初始化即可检测到 DAP 本身。 推荐测量方法 在进一步修改电路板之前,我会检查以下几点: 电源 VTref = ?V VDD_3V3 存在 板正常启动 连续性 TCK 连接器 ↔ SoC 路径 TMS连接器↔SoC路径 TDI 连接器 ↔ SoC 路径 TDO 连接器 ↔ SoC 路径 RESET 连接器 ↔ SoC 路径 探针侧 调试软件是否报告目标电压? 它是否显示“检测到目标”? 它是否报告尝试进行 JTAG 链扫描? 示波器 直接探测: 调试器连接器引脚 SoC侧测试点 连接尝试期间。 如果调试器连接器处存在 TCK,但 SoC 测试点处不存在 TCK,则问题几乎肯定出在电路板返工上。 Re: External JTAG debugger connection on FRDM-i.MX95 does not output expected JTAG signals 感谢您的支持。 我们检查了外部 JTAG 调试器连接,发现 问题是由FRDM-i.MX95板和电路板之间的线路长度引起的。 外部 JTAG 调试器。 缩短并重新排列 JTAG 信号线后,调试器…… 能够正确检测到目标,并观察到了JTAG信号。 预期的。 因此,通过改进JTAG接线方式,这个问题已经得到解决。 长度和连接质量。 再次感谢您的帮助。 Re: External JTAG debugger connection on FRDM-i.MX95 does not output expected JTAG signals @kuni1你好,请问你能否提供一些关于如何附加调试器的最新进展或信息?你是如何将 RESET 线连接到电路板上的?你使用的是哪种调试连接器?(J-Link、MCU-Link 等) 我目前也遇到了同样的问题,无法将调试器连接到我的FRDM板,非常感谢您的帮助。 谢谢
記事全体を表示
RT1160(外部SDRAMおよびウェイトピン付きSRAM搭載) 私はRT1160を外部16ビットSDRAMと16ビットSRAM(FPGA通信用)と組み合わせて使用しています。SRAMインターフェースは、待機ピン付きのSRAM読み書き操作(SRAM)として非同期モードとして構成されます。待機信号がSDRAMのリフレッシュタイミングと競合して何らかの問題を引き起こすのではないかと考えています。SDRAMにコードを書き込んで、SRAM ASYNC書き込み時にwaitピンを約10ms以上ローレベルに保つようにテストしましたが、時々約1msで終了してしまうことがあり、その理由はわかりません。 SDRAMとSRAMの両方を使う場合に制限があるのでしょうか?ご協力いただきありがとうございます。 Re: RT1160 with external SDRAM and SRAM with wait pin こんにちは 約1ミリ秒で終了するとおっしゃっていますが、具体的に何を指しているのでしょうか?SRAMへの書き込みはエラーを返すのか、それともハードフォルトに入るのか?これはどのくらいの頻度で起こりますか? 以下のテストを手伝ってもらえますか? 1. 内部メモリ(SDRAMではない)からコードを実行し、長時間かかる非同期SRAM書き込みを繰り返します。 2. 内部メモリからコードを実行したまま、同じテストを再度実行しますが、今回はSDRAMを有効にした状態でアイドル状態にします。 3. 最初に述べたとおりにテストを実行しますが、SRAM待機信号をアクティブに保持します。 さらに、上記の検査を含めて、以下の点を確認してもらえますか? 転送中にSRAM信号を監視できますか? 各テストのSTEMCイントラレジスタ値を教えてもらえますか? 結果を教えてください。 よろしくお願いします、 パブロ
記事全体を表示
MCX N947 TFLM Modelrunner Inference of Neutron Converted Models I want to benchmark a bunch of tflite models (<500KB in size) on my FRDM MCXN947 (CPU vs. NPU) via the TFLM modelrunner using HTTP. The problem: CPU inference does not work for all models and NPU inference not at all. hardware: - FRDM-MCXN947 development board (connected to my windows machine via USB and Ethernet) software and tool setup: - host: windows 11 machine - eIQ Neutron SDK: eiq-neutron-sdk-windows-3.0.1 - MCUXpresso SDK: SDK_26_03_00_FRDM-MCXN947 - Project from SDK: frdmmcxn947_tflm_modelrunner_cm33_core0 ML models for CPU inference: - ad01_int8.tflite - kws_ref_model.tflite - pretrainedResnet_quant.tflite - vww_96_int8.tflite ML models neutron converted with Neutron Converter (part of eIQ Neutron SDK) for NPU inference: eiq-neutron-sdk-windows-3.0.1\bin neutron-converter --target mcxn94x --input ad01_int8.tflite --output ad01_int8_converted_3_0_1.tflite - ad01_int8_converted_3_0_1.tflite - kws_ref_model_converted_3_0_1.tflite - pretrainedResnet_quant_converted_3_0_1.tflite - vww_96_int8_converted_3_0_1.tflite Steps performed 1. Update eIQ Projects with the Latest eIQ Neutron SDK Libraries Copy from: eiq-neutron-sdk-windows-3.0.1\target\mcxn94x\common\include\NeutronErrors.h eiq-neutron-sdk-windows-3.0.1\target\mcxn94x\driver\include\NeutronDriver.h eiq-neutron-sdk-windows-3.0.1\target\mcxn94x\mcxn\libNeutronDriver.a eiq-neutron-sdk-windows-3.0.1\target\mcxn94x\mcxn\libNeutronFirmware.a to: frdmmcxn947_tflm_modelrunner_cm33_core0\include\NeutronErrors.h frdmmcxn947_tflm_modelrunner_cm33_core0\driver_include\NeutronDriver.h frdmmcxn947_tflm_modelrunner_cm33_core0\mcxn\libNeutronDriver.a frdmmcxn947_tflm_modelrunner_cm33_core0\mcxn\libNeutronFirmware.a 2. Build and flash the project "frdmmcxn947_tflm_modelrunner_cm33_core0" with vscode 3. Run inference via HTTP using the flashed TFLM Modelrunner Command: curl -X PUT http://192.168.178.75:10818/v1 -F "block_content=@C:\ \ad01_int8.tflite" Output via Serial Monitor: .... run ms: 6.167000 Command: curl -X PUT http://192.168.178.75:10818/v1 -F "block_content=@C:\ \vww_96_int8.tflite" Output via Serial Monitor: .... run ms: 182.042000 For any of the other models it doesnt work Output:  a) No inference after flashing: FLASH 0x104000 Erased, Program at 104000: 16384 bytes == FLASH 0x108000 Erased, Program at 108000: 16384 bytes == FLASH 0x10c000 Erased, Program at 10c000: 16384 bytes == FLASH 0x110000 Erased, Program at 110000: 16384 bytes == FLASH 0x114000 Erased, Program at 114000: 16384 bytes == FLASH 0x118000 Erased, Program at 118000: 16384 bytes == FLASH 0x11c000 Erased, Program at 11c000: 16384 bytes == FLASH 0x120000 Erased, Program at 120000: 16384 bytes == FLASH 0x124000 Erased, Program at 124000: 16384 bytes == FLASH 0x128000 Erased, Program at 128000: 16384 bytes == FLASH 0x12c000 Erased, Program at 12c000: 16384 bytes == FLASH 0x130000 Erased, Program at 130000: 16384 bytes == FLASH 0x134000 Erased, Program at 134000: 16384 bytes == FLASH 0x138000 Erased, Program at 138000: 544 bytes == b) no flashing process at all c) Error HardFault_Handler Line 343: ldr r0,=HardFault_Handler in  SDK_26_03_00_FRDM-MCXN947\mcuxsdk\devices\MCX\MCXN\MCXN947\gcc\startup_MCXN947_cm33_core0.S stopped by debugger Any hints are highly appreciated! MCXN Re: MCX N947 TFLM Modelrunner Inference of Neutron Converted Models Hi @Laurens26  I think the problem is more likely a mix of version alignment, rather than a pure “model size” issue. I think you can refer to this link. How to Update eIQ Projects with the Latest eIQ Neutron SDK Libraries BR Harry
記事全体を表示
S32K146 FLEXCAN RJW 配置 在 S32K146 中,FLEXCAN 的 RJW 配置与 PSEG2 相比会有什么影响吗? Re: S32K146 FLEXCAN RJW config 您好@SaLan 这是我的失误;我以为出现了错误信息,表明 RJW 设置有误。 RJW 表示在重新同步期间 PESG1 段的延长时间和 PSEG2 段的缩短时间。PSEG2 段的缩短意味着采样点将向后移动,如果移动幅度过大,则会导致采样误差。 因此,CAN 位定时要求规定,重新同步跳转宽度不能超过 4 个时间片,也不能超过 PHASE_SEG1 段中的时间片数量。 Re: S32K146 FLEXCAN RJW config 如图所示,我将 RJW 设置为 3,并使其大于 PSEG2,但我没有收到任何“不可行的”警告。 如果可以的话,能否告诉我这样配置寄存器会产生什么影响? Re: S32K146 FLEXCAN RJW config 您好@SaLan 当您使用 S32 DS 配置 FlexCan 时,它会明确地告诉您这是不可能的。 Re: S32K146 FLEXCAN RJW config 根据 CAN 协议,SJW ≤ PSEG2 ≤ PSEG1,且 SJW ≤ 4 Tq。 如果将 FLAXCAN 寄存器中的 SJW 配置为大于 PSEG2,这会有任何影响吗? Re: S32K146 FLEXCAN RJW config 您好@SaLan 对于 S32K146 FlexCAN,PSEG2 会影响标称比特时间和采样点,而 RJW 仅限制重新同步调整,不属于标称比特率计算的一部分。 Re: S32K146 FLEXCAN RJW config RJW 值高于 PSEG2 值会产生影响吗?
記事全体を表示
VS code extension update broke RTOS viewer Hello, Until now we were using vscode tool version 1.9.20 (old), and we were using https://marketplace.visualstudio.com/items?itemName=mcu-debug.rtos-views to view the status of freertos threads (RT1189). After the update the tool no longer works and just shows "RTOS detection did not finish. It will be resumed on the next halt."  Any suggestions? Thanks Re: VS code extension update broke RTOS viewer Hi, MCUXpresso for VS Code has own RTOS viewer for a long time. Please check https://mcuxpresso.nxp.com/mcux-vscode/latest//html/RTOS-Details.html  Also, old change, the extension migrated from using Microsoft C/C++ Debug Adapter to own debug adapter based on Cortex-Debug. You have to create a new Debug Configuration that will automatically create one based on our debug adapter (you'll notice "mcuxpresso-debug" as type). PS. Please be aware that if you are using Segger debug probe, this requires special enablement for RTOS support (see https://mcuxpresso.nxp.com/mcux-vscode/latest//html/Debug-Views.html#enabling-rtos-awareness) Regards, Cristian Re: VS code extension update broke RTOS viewer Ok I got it working, we where compiling with -Og flag in debug and changing that to -O0 made the viewer work. But I guess the tool needs improvement as Og shall be default for standard edit-debug process?. Unrelated to this, I also see this warning in debug console "warning: could not convert ' \Main.cpp' from the host encoding (CP1252) to UTF-32. This normally should not happen, please file a bug report." Thanks Re: VS code extension update broke RTOS viewer Thanks, In fact the message is coming from MCUXpresso RTOS view itself (I incorrectly referred a different plugin).  I have attached the launch.json and custom device script (it is same as MIMXRT1180-EVK.json for Linkserver 26.3.123, but the "connect-script" is "RT1180_reset.scp".  Our app runs in hyperram and uses SDK 2.16. Freertos variables are correctly set. I can debug an step through our app, but RTOS Details view still shows "RTOS detection did not finish. It will be resumed on the next halt."  Thanks Re: VS code extension update broke RTOS viewer @cristiantepus any updates on this? Re: VS code extension update broke RTOS viewer Today I found that MCUXpresso RTOS viewer does not work in release mode, and does not show anything. But https://marketplace.visualstudio.com/items?itemName=mcu-debug.rtos-views works with -Og and in release modes, but cannot work with current mcuxpresso vscode plugin (gets disabled?). Is there a way to bring that back? Re: VS code extension update broke RTOS viewer Hi @arunkumar_g, The RTOS details view we offer is relying on the existence of some symbols inside the ELF file (e.g. "FreeRTOSDebugConfig", "pxCurrentTCB", "uxCurrentNumberOfTasks", and many more). I agree that the "RTOS detection did not finish. It will be resumed on the next halt." does not guide on what went wrong and we'll make sure to make this clearer. Regarding the results you obtained for "debug" vs. "release", I'd say this is the result of compiler/linker optimizations -- required symbols are stripped-out so any consumer will not find these. In this case, not only the RTOS Details view will fail but the low-level GDB Thread Awareness (LinkServer, J-Link, PEmicro) will be unable to show and debug FreeRTOS tasks in Call Stack view. In this case, I can only suggest you make sure you update the code so that you ensure the presence of the required symbols in both, "debug" and "release" build modes. We'll make sure to update the documentation and the information from the tool to make it clear what symbols are required but are missing -- thus making the views unable to show data. You also mentioned that MCU Debug RTOS view is working in this particular case. Could be, but the last time I checked there was no support any kind of versioning support (version is found by inspecting "FreeRTOSDebugConfig"). And keep in mind that the FreeRTOS data structures are really specific to the RTOS version. To enable MCU Debug views you could ask the maintainers how to add the "mcuxpresso-debug" debug adapter (MCUXpresso specific) in the supported list. Given that you're using a project based on an old SDK 2.16, I'd also suggest switching to the latest MCUXpresso SDK based on CMake & Kconfig.   Some useful links: - RTOS Details: RTOS Details — MCUXpresso for VS Code 26.04 documentation - MCUXpresso SDK: MCUXpresso SDK Documentation — MCUXpresso SDK Documentation   Thanks, Adrian
記事全体を表示
RDBESSK358BMU 以太网配置 我目前正在开发恩智浦的 RDBESSK358BMU,该主板有 S32K358 和 GMAC 连接到 Marvell Alaska 88e1510 收发器,还有一个以太网千兆端口(附有硬件方案)。 我想知道,在这种配置下,我是否可以使用带有 lwip_baremetal 示例的 tcpip 协议栈。 使用 Gmac_Loopback 的示例起作用了,但是 lwip_baremetal_example 在 Gmac_initDMA 上失败了,就像我在其他文章中看到的那样,这是一个时钟参考问题,但我正在使用的主板上有外部时钟,所以我不明白如何使这个示例适应我的硬件。有人能提供帮助吗?谢谢!   Re: RDBESSK358BMU Ethernet configuration 你好@gferretts、 是的,我就是这么发现的。你更快 您可以从 RTD 5.0.0 复制缺失的定义: #define DCM_GPR_DCMRWF1_MAC_TX_RMII_CLK_LPBCK_EN_MASK (0x80000000U) #define DCM_GPR_DCMRWF1_MAC_TX_RMII_CLK_LPBCK_EN_SHIFT (31U) #defineDCM_GPR_DCMRWF1_MAC_TX_RMII_CLK_LPBCK_EN_WIDTH (1U) #define DCM_GPR_DCMRWF1_MAC_TX_RMII_CLK_LPBCK_EN(x) (((uint32_t)(((uint32_t)(x)))) << dcm_gpr_dcmrwf1_mac_tx_rmii_clk_lpbck_en_shift)) & dcm_gpr_dcmrwf1_mac_tx_rmii_clk_lpbck_en_mask) ......只是注意到 RTD 的解决方法使用了 |= 关于 Eth_T_InitPhys()--是的,这也是正确的模式--这个例程值得深入检查。 顺祝商祺! 帕维尔 Re: RDBESSK358BMU Ethernet configuration 非常感谢@PavelL!我注意到 GMAC 速度仍为 100 米,因此将其设置为 1G,以匹配 125MHz 时钟,现在它可以在端口 7 上正常 ping 和 TCP echo! 我还注释了"Eth_T_InitPhys();" ,因为我的 PHY 不在 PHY 列表中,它是通过频带配置的。     Re: RDBESSK358BMU Ethernet configuration 你好@PavelL,感谢您的回复。我在使用 lwip 时仍然遇到问题,我也有 s32k3x8evb-q289 但我没有 TJA 子板所以我需要在 S32K358BMU 上测试以太网。 我使用的是"TCPIP STACK 1.0.3 版 RTD3.0.0D2306", 我附上我的 .mex我尝试复制你显示的内容(时钟配置、GMAC 外设和引脚排列)的配置文件和 " 设备.c "用引脚上的 ETH_RESET。 因为我的 RTD 没有环回定义,所以我也尝试手动复制您的 RTD 回转: void device_init(void) { uint16 pitPeriod; /* 为 DCM 模块中的 EMAC 设置 RMII 配置 */ //ip_dcm_gpr->dcmrwf1 = (ip_dcm_gpr->dcmrwf1& ~dcm_gpr_dcmrwf1_emac_conf_sel_mask) | dcm_gpr_dcmrwf1_emac_conf_sel(1u); /* 手动 RTD 转换 */ IP_DCM_GPR->DCMRWF1 = 0x80000040; IP_DCM_GPR->DCMRWF3 = 0x2000; ....}   在这种配置下,示例能够在不超时的情况下实现 Gmac_Ip_InitDMA,并到达主环路,但从我的电脑上 ping 192.168.0.200 结果却是无法连接主机和 ping 超时。 我用示波器验证了 RXC 的存在(当 Phy 协商 100Mbps 时为 25MHz 或 1Gbps 时为 125MHz),因此有一些流量来自 ETH 端口。同时在 TXC 上我现在也能看见 125MHz 但是 TXD0,1 从未被触发。 我希望你们能找到问题所在。   Re: RDBESSK358BMU Ethernet configuration 你好@gferretts、 对于延迟回复,我深表歉意。 遗憾的是,我没有 RD-BESSK358BMU,因此无法为您改编 lwip 示例。总之,我为 S32K358EVB-Q289 和 RGMII 100Mbps 修改了 lwip 示例,没有出现任何问题。让我分享一下我在采用过程中使用的基本步骤(请注意,某些细节可能与 S32K3 RTD / TCPIP 版本有关): 配置工具 - 引脚 采用引脚来适应板的接线 将回转速率设置为最快设置(如适用 应为 RGMII 输出 TX_CLK 配置工具 - 时钟 GMAC 时钟应该是这样的(注意 GMAC 1Gbps:25MHz -> 125MHz;50MHz -> 250MHz)。 配置工具 - GMAC 驱动程序 ETH_MAC_LAYE_TYPE_XGMII, REDUCED, 设置正确的速度 ETH_MAC_LAYER_SPEED_xxx 源代码-设备.c 在 device_init() 的第一行添加 RTD 解决方法 /* 设置 DCM 模块中 GMAC0 的 RGMII 模式配置 */ IP_DCM_GPR->DCMRWF1 |= DCM_GPR_DCMRWF1_MAC_CONF_SEL(0x01) | DCM_GPR_DCMRWF1_MAC_TX_RMII_CLK_LPBCK_EN_MASK; /* 设置 RGMII RX_CLK 直接从 DCM 模块中 GMAC 的 RX_CLK 引脚到达 */ IP_DCM_GPR->DCMRWF3 |= DCM_GPR_DCMRWF3_MAC_RX_CLK_MUX_BYPASS(0x01); 源代码 - test.c 或者,注释掉在一段时间后关闭 TCP/IP 协议栈的部分 这部分比较简单。 从原理图上看,您需要定义 GPIO PTC1 以向 PHY 提供有效的 RESET 脉冲信号,并等待一段时间再初始化 GMAC。PHY 通常在非托管模式下独立工作,只是通过引脚绑扎进行配置。有时,PHY 需要通过 SMI 进行管理。 您使用的是哪个版本的 S32K3 RTD 和哪个版本的 TCP/IP 协议栈? 顺祝商祺! 帕维尔
記事全体を表示
链接文件 我试图将 HCS12 控制器的代码从 cosmic 移植到 CodeWarrior 5.2,当我试图使用 #pragma CODE_SEG PAGE_32 在 PAGE 32 部分下创建一个函数时,只有部分在映射文件中更新,起始地址保持不变。 Re: Linker file 你好,@Aswin_5232、 您没有说明 MCU 的部件编号。 改用类似的方法: 链接器 SEGMENTS PAGE_32 = READ_ONLY 0x8000 TO 0xBFFF PAGE 32; END PLACEMENT MyPage32Funcs INTO PAGE_32; END   主要 #pragma CODE_SEG MyPage32Funcs void MyFunc(void) { ... } #pragma CODE_SEG DEFAULT 此致, 丹尼尔 Any support, information, and technology (“Materials”) provided by NXP are provided AS IS, without any warranty express or implied, and NXP disclaims all direct and indirect liability and damages in connection with the Material to the maximum extent permitted by the applicable law. NXP accepts no liability for any assistance with applications or product design. Materials may only be used in connection with NXP products. Any feedback provided to NXP regarding the Materials may be used by NXP without restriction.
記事全体を表示
S32K376 VCU – How to implement SPI-based DIO (MSDI) in S32DS? I am working on an S32K376 VCU POC board where an MSDI device is connected over SPI. From the schematic, the following MSDI-related signals are used: SPI signals: MSDI_CS, MSDI_SCLK, MSDI_MOSI, MSDI_MISO Control/status signals: MSDI_INTB, MSDI_WAKEB Analog / mux signal: MSDI_AMUX MSDI SGx / SPx pins used for digital inputs and outputs I want to implement this using MBDT (Simulink) with S32 Configuration Tools (S32CT), but I am not clear on the correct software approach. Specifically, I need guidance on: How to configure and use the SPI pins in S32CT so that they work with an external MSDI device How MSDI_INTB it MSDI_WAKEB should be configured (DIO vs ICU/EXTI) and handled in MBDT How MSDI digital inputs/outputs (SGx / SPx) are expected to be accessed in software Is there any MCAL support pattern? Or should this be implemented as custom SPI commands + application-level abstraction? How MSDI_AMUX should typically be handled (ADC path / usage expectation) I do not have a working reference or example showing this flow using MBDT + S32CT for S32K376/96 VCU & BMS Example POC project. Could you please suggest the recommended implementation approach (step-by-step or block-level) Re: S32K376 VCU – How to implement SPI-based DIO (MSDI) in S32DS? Hi @mariuslucianand  could you please comment on this? Thanks in advance. BR, Petr Re: S32K376 VCU – How to implement SPI-based DIO (MSDI) in S32DS? Hello everyone, Since no one replied, I tried multiple things on my end and found while working on the same VCU POC board using S32K396, where an external MSDI device is connected over LPSPI3. However, SPI initialization fails during runtime with a BusFault. Observed issue During execution of Lpspi_Ip_Init(), the code faults at: Base->CFGR1 = PhyUnitConfigPtr->Cfgr1; Debugger observation: Instance = 3 Base address = 0x40364000 The register reads: VERID = 53248 PARAM = 53249 CR = 53249 SR = 53249 Followed by: BusFault: imprecise data access error HardFault escalation: This happens on the register access to LPSPI3. Please help with: Which exact configuration/settings (refer to the attached) are incorrect? or What additional settings/MBDT Blockset are required to correctly access MSDI I/O pin data? Re: S32K376 VCU – How to implement SPI-based DIO (MSDI) in S32DS? Hello, Please check the following article to get help regarding the configuration of the SPI peripheral to retrieve data from the MC33CD1030 IC: How to: MSDI MC33CD1030 on S32K396BMS-EVB using NXP MBDT  Note that the article is focused on the SPI configuration to send and receive data from the MC33CD1030 IC. For further information about the CD1030, please consult its datasheet. Best regards, Sorin Bancila
記事全体を表示
IMX8MP 远程核心共享内存驱动程序 日安 我正在尝试使用 DDR 缓冲区实现内核间的数据交换,以处理大量数据。我在 IMX8MP 上使用的是 Verdin devkit。内核版本 5.15我已经使用"/dev/rpmsg_ctrl0 "通过 RPMSG 实现了通信。 现在,我想从 CMA 空间分配 DDR 中的内存,并通过 RPMSG 消息将地址发送给 CortexM。为此,我使用了恩智浦的 "低功耗音频应用 - AN12195SW "示例。我从补丁中提取了 "rmtcore_shm "驱动程序代码,并通过 devshell 在内核环境中进行了编译。 然后,我在系统中安装了模块 "rmtcore-shm.ko"。 root@verdin-imx8mp-14762892:~# insmod ./rmtcore-shm.ko [ 235.945223] RMTCORE module started! root@verdin-imx8mp-14762892:~# 但是新设备 “/dev/rmtcore_shm” 没有出现在系统中。而当我试图打开它时,却出现了错误: rmtcore_shm_fd = open(RMTCORE_SHM_DEV, O_RDWR); ******************* "Unable to open device /dev/rmtcore_shm" ******************* 我可能需要更改设备文件。现在,我的 RPMSG 覆盖图是这样的: /dts-v1/; /plugin/; #include / { compatible = "toradex,verdin-imx8mp"; rmtcore_shm { compatible = "fsl,rmtcore-shm"; status = "ok"; }; }; &{/} { imx8mp-cm7 { compatible = "fsl,imx8mp-cm7"; clocks = <&clk IMX8MP_CLK_M7_DIV>; mbox-names = "tx", "rx", "rxdb"; mboxes = <μ 0 1 μ 1 1 μ 3 1>; memory-region = <&vdevbuffer>, <&vdev0vring0>, <&vdev0vring1>, <&rsc_table>, <&m7_reserved>; rsc-da = <0x55000000>; syscon = <&src>; fsl,startup-delay-ms = <500>; }; }; &i2c3 { status = "disabled"; }; &pwm4 { status = "disabled"; }; &resmem { #address-cells = <2>; #size-cells = <2>; m7_reserved: m7@0x80000000 { no-map; reg = <0 0x80000000 0 0x1000000>; }; vdev0vring0: vdev0vring0@55000000 { no-map; reg = <0 0x55000000 0 0x8000>; }; vdev0vring1: vdev0vring1@55008000 { no-map; reg = <0 0x55008000 0 0x8000>; }; vdevbuffer: vdevbuffer@55400000 { compatible = "shared-dma-pool"; no-map; reg = <0 0x55400000 0 0x100000>; }; rsc_table: rsc_table@550ff000 { no-map; reg = <0 0x550ff000 0 0x1000>; }; }; &sai3 { status = "disabled"; }; &sdma3 { status = "disabled"; }; μ { status = "okay"; }; &uart4 { status = "disabled"; }; 请告诉我需要做哪些更改,才能使 /dev/rmtcore_shm 出现在系统中,并能访问 DDR 中的内存分配?如果有人已经遇到过这种解决方案和示例。 感谢您的帮助。 Re: IMX8MP Remote core share memory driver 你好@Stan88 你查清楚了吗? 谢谢! 安迪 Re: IMX8MP Remote core share memory driver 是的,我也试过了 - 我在内核中编译了它,在内核菜单配置中看到了它 -"Remote Core Share Memory Driver" ,并激活了它。编译并部署了内核,构建了镜像并将其安装在板上。 lsmod无法显示该驱动程序,因为它不是动态加载的,而是内置模块。 dmseg也不包含有关该驱动程序的任何信息。尝试卸载模块时会出现错误,提示系统中存在此类模块: root@verdin-imx8mp-14762892:~# modprobe -r rmtcore-shm modprobe: FATAL: Module rmtcore_shm is builtin. Re: IMX8MP Remote core share memory driver 你好 如果你编译模块,你必须编译内核本身才能使其正常运行,并在 dmseg 输出中查看。 此致 Re: IMX8MP Remote core share memory driver 您需要: rmtcore_shm { compatible ="fsl,rmtcore-shm"; status ="ok"; }; 如果有其他人想要 FRDM_IMX8MPLUS 的这个版本,请在这里查看: https://github.com/AndrewCapon/rmtcore-shm/tree/main
記事全体を表示
Unable to Debug dio_ToggledLED_S32K144 Example – Debug Error After Flashing Hi, I am working with S32K144 using S32 Design Studio 3.4. I tried debugging the dio_ToggledLED_S32K144 example project. The code flashes successfully, and I can see the LED toggling output initially. However, after some time, an error window appears, and after that, I am not able to continue debugging. Due to this issue, I am unable to debug the application properly. Could you please help with the following: What could be the possible reason for this debug error appearing after flashing? Is this related to debugger connection (J-Link / PEMicro), watchdog, or clock configuration? Are there any known issues with the dio_ToggledLED_S32K144 example in S32 Design Studio 3.4? What are the recommended steps to resolve this issue and debug the project correctly? Any guidance to resolve this issue would be very helpful. Thank you for your support. Re: Unable to Debug dio_ToggledLED_S32K144 Example – Debug Error After Flashing Hi Julián, Thank you for your response. Please find the details below: The issue appears after running the project for a few seconds to about one minute. Initially, the code runs correctly and the LED toggles, but after some time, a debug error window appears, and the debug session stops. When the issue occurs, I am not able to continue debugging. In some cases, I need to terminate the debug session and restart S32 Design Studio to flash the MCU again. I will recheck and confirm the PEmicro driver version. Currently, I am using the default PEmicro version installed with S32 Design Studio 3.4. To clarify, this issue is not only with the Dio example code. I created a separate user application (custom GPIO project) from scratch. In this user-created project, I enabled the following MCAL components: Mcu Port Dio Dem Ecuc In the Dio configuration, I selected RED LED (Dio channel 15). When I debug this user-created GPIO application, I face the same debug issue, similar to the one shown in the attached image. Based on this, the problem seems to be related to the debug configuration or PEmicro connection, rather than the Dio example logic itself. Please let me know if you need any additional details or logs from my side. Re: Unable to Debug dio_ToggledLED_S32K144 Example – Debug Error After Flashing Hi @KAVIN7, No, there should not be any problems with the Dio example, as the project only toggles a LED. Could you provide a bit more information about how to reproduce your issue? 1. How long are you running the project before the issue appears? 2. When the issue happens, are you able to reload the debug session and flash the MCU again? 3. Can you confirm you have the latest Pemicro version available? 4. Have you modified the project in any way? This issue seems to point to PEmicro drivers or debug configuration, as the Dio example does not configure anything related to watchdog or power modes. Best regards, Julián Re: Unable to Debug dio_ToggledLED_S32K144 Example – Debug Error After Flashing Hi @KAVIN7, Looking through your configuration, I can see you do not have any pins configured in the "UnTouchedPortPin" container. In order to be able to use the debug capabilities, the JTAG and Reset pins need to be configured in the Port driver using mechanism B. This means that the following pins/functionalities need to be added in the UnTouchedPortPin list: 4, 5, 10, 68 & 69. This may not be your root cause, since your issue appears after running the project for some time, but it does not hurt to try. Like I've said in my previous response, you can also try updating your SW. Latest versions are: S32DS: 3.6.5 S32K1 RTD: 3.0.0 Pemicro: 6.1.7  Lastly, please try sharing a log form the debug interface, as well as debug configuration, as it is very difficult to pinpoint an issue like this, as it cannot be reproduced on my side. Here is my debug configuration which seems to work correctly: Best regards, Julián Re: Unable to Debug dio_ToggledLED_S32K144 Example – Debug Error After Flashing Hi, Thank you for the information. However, I believe the issue discussed in this thread (Unable to Debug dio_ToggledLED_S32K144 Example — Debug Error…) is not the exact problem I’m facing. My issue is described in this other ticket instead, where I’m getting a PE Micro Connection Assistant error due to missing port configuration: https://community.nxp.com/t5/S32K/PE-Micro-Connection-Assistant-Error-Due-to-Missing/m-p/2303757#M56494 In my case: I created a custom GPIO application for LED toggle. I enabled only the RED LED pin in Dio/Port configuration. I did not enable the “UntouchedPortPin” debug pins (JTAG/RESET/XTAL/EXTAL). This results in the PE Micro connection failure, as shown in the attached image in that ticket. I believe the issue is related to missing port pin configuration required for debug interfaces (JTAG/RESET/XTAL/EXTAL), and not a problem with the dio example itself. I need this resolved because I cannot proceed with further implementation until the basic debug connection works. Could someone please review the linked ticket and advise on the correct pin configuration or steps to fix the debug connection issue? Thank you.
記事全体を表示
RT1040 ADCの問題 IMXRT1040RMに従い、ADC入力信号のGPIOキーパーを無効にします。 ADC 入力 gpio が NC の場合、ADC 読み取り値は異常であり、NC 入力ピンはマルチメーターで測定して 0V になります。 NTC 温度センサにコネクテッドされた別の ADC チャネルがあります。ADC 読み取り値は正常です。 ADC GPIOピン構成をデフォルトに設定すると( IOMUXC_SetPinConfig(ADC_PIN、0x10B0U))、これはキーパー有効をデフォルトで設定し、NC である入力チャネルの ADC 読み取り値はほぼゼロになります。今回は仕事です。 SO、ADC 入力信号の GPIO の Keeper 機能を無効にする必要がありますか? アナログ(ADC、CMP、DAC、オペアンプ) Re: RT1040 ADC issues こんにちは、メイ: モジュールがコネクテッドではない場合、ADC はフローティングになるように設計されています。モジュールはオプションです。 「ECKMIMXRT1040_ADC_12B1MSPS_SAR_POLLING」に従って、GPIO_AD_B1_04 の ADC 入力ピンをキーパー機能が無効に設定されます。 NC ADC 入力ピンは 0V として測定されますが、キーパーが無効になっている場合、ADC 読み取り値は 0.6 または 0.7V になります。 キーパーがデフォルトで有効になっている場合、ADC の読み取り値はほぼ 0V になります。この方法により、ADCの読み取り値をモジュール検出として使用することができます。 では、キーパーを有効にするとどのような副作用があるのでしょうか。 オプション モジュールの自動検出が必要なので、NC である ADC 入力ピンを読み取るにはどうすればよいですか? Re: RT1040 ADC issues こんにちは@Xiao_Liuさん 弊社の製品にご興味をお持ちいただき、またコミュニティをご利用いただき誠にありがとうございます。 ご質問に関してですが、   はい。ADC 入力ピンの場合、キーパー機能を無効にする必要があります。 NXP SDK デモ PIN 設定を参照してください。   ADC チャネルは浮いたままにしないでください。ピンが NC の場合、変換結果は未定義になります。 キーパーを有効にすると、読み取りが安定しているように見えますが、信頼できる解決策ではなく、推奨される解決策でもありません。   お役に立てれば幸いです よろしくお願いいたします。 メイリュー Re: RT1040 ADC issues こんにちは@Xiao_Liuさん 最新情報をありがとうございます。 ADC ピンでキーパーを有効にすることはお勧めしません。キーパーは最後の状態を保持するため、ADC の読み取りが不正確になり、モジュール検出の信頼性が低下する可能性があります。 安定した正確な結果を得るには、ADC が接続されていないときに明確なデフォルト レベルを設定するために外部抵抗を追加することをお勧めします。 よろしくお願いいたします。 メイリュー Re: RT1040 ADC issues こんにちは、メイ わかった。ADC が接続されていない場合は外部プルアップを使用します。 ご協力いただきありがとうございます。 Re: RT1040 ADC issues こんにちは@Xiao_Liuさん 最新情報をありがとうございます。 この投稿があなたの質問への回答である場合は、「解決策として承認」ボタンをクリックしてください。ありがとう! よろしくお願いいたします。 メイリュー
記事全体を表示
8CH-DMIC board configuration, flashing and testing on MIMXRT685-EVK Hi, I’m trying to run the dmic_multi_channel CM33 demo on EVK-MIMXRT685 with the 8-DMIC array board. Per the demo documentation, enabling the 8-DMIC board on J31 requires moving several resistors (e.g. R379, R380, R384, R389, R390, R391, R392 to 2–3). After doing this, FlexSPI Octal Flash (U19) becomes inaccessible: - LinkServer flashing fails - ROM ISP (blhost) connects, but FLEX-SPI-NOR shows Sector Size = 0 / Page Size = 0 - Flash erase/write is impossible My questions: Is this demo expected to run without Octal Flash (RAM-only workflow)? Is there an official flashing/boot procedure after the resistor changes? Are all resistor changes required, or can some remain in the default state to keep FlexSPI flash working? Right now it looks like the required DMIC hardware setup prevents normal flash programming/boot. How can I test and run the demo? Thanks for any guidance. MIMXRT685-EVK 8CH-DMIC  i.MXRT 600 Re: 8CH-DMIC board configuration, flashing and testing on MIMXRT685-EVK Hi @mlkezarev , Thank you so much for your interest in our products and for using our community. Q1:  Is this demo expected to run without Octal Flash (RAM-only workflow)? A1:   Yes. This demo is designed to run from SRAM only and does not require Octal Flash. Q2:Is there an official flashing/boot procedure after the resistor changes? A2: After the resistor changes are applied, the external Flash is physically disconnected. Therefore, flashing or booting from Flash is not supported in this hardware configuration. Q3:Are all resistor changes required, or can some remain in the default state to keep FlexSPI flash working? A3: If you want to enable 8 DMICs, all the specified resistor changes are required. I have post a pin configuration screenshot for your reference. Q4: Right now it looks like the required DMIC hardware setup prevents normal flash programming/boot. How can I test and run the demo? A4: You can run on SRAM, just like the SDK demo "evkmimxrt685_dmic_multi_channel_cm33" Best Regards MayLiu
記事全体を表示
こんにちは、NPU!i.MX 9でTFLiteモデルを実行 以下は、Pytorch と Tensorflow でシンプルなモデルをトレーニングし、i.MX93 Ethos-65 ニューラル プロセッシング ユニット (NPU) を使用してアプリケーションにデプロイするためのガイドです。 このガイドに従うと、次のことが達成されます。 MNISTデータセットでシンプルなCNNをトレーニングする モデルを tflite に変換し、量子化して i.MX93 NPU (Ethos-65) 用にコンパイルします。 モデルによって数字を描画および識別できる簡単なアプリケーションを実行します。 前提条件 このガイドに従うには次のものが必要です: Yocto イメージ、C++ の例では GTKMM3 のサポートが必要ですが、Python の例では事前にビルドされたイメージを使用できます。 i.MX93ボード Pythonの例を実行する アプリケーションの実装は Python と C++ の両方で提供されます。Pythonアプリケーションを使用する場合は、代わりに事前に構築された完全なイメージを使用できます。Python スクリプトをターゲットにコピーして、次のように実行するだけです。 # 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 添付ファイルには事前に構築されたモデルが提供されていますが、モデルのトレーニングと生成に使用される手順とスクリプトも含まれています (以下を参照)。 GTKMM3 サポート付きのイメージのビルディング (C++ の例のみ) デモンストレーションに使用される GUI アプリケーションはGTKMM3 ( GTKライブラリの C++ ラッパー) で記述されているため、GTKMM3 をサポートするイメージが必要ですが、幸いなことに、これを Yocto イメージに簡単に統合できるレシピが既にあります。 イメージをビルドするには、 Yocto ユーザー ガイドの指示に従うだけです。この記事の執筆時点では最新の BSP は 6.12.49_2.2.0 なので、これを使用します。 ホストとインストールされたリポジトリですべての要件を設定したら、次のようにビルド環境を設定できます。 リポジトリ init -u https://github.com/nxp-imx/imx-manifest -b imx-linux-walnascar -m imx-6.12.49-2.2.0.xml リポジトリ同期 ターゲットに応じてビルド ディレクトリを設定できるようになりました。例として、X11 をサポートする Wayland グラフィックスとiMX93 Freedomボードを使用します。 ディストリビューション=fsl-imx-xwayland マシン=imx93-11x11-lpddr4x-frdm ソース imx-setup-release.sh -b 93-frdm-xwayland ボードに合った MACHINE 構成を選択するだけです。 これでビルドを開始する準備がほぼ整いました。まだイメージに GTKMM3 サポートを追加する必要があります。conf/local.conf の下にある local.conf ファイルを変更し、次のコードを追加するだけです。 IMAGE_INSTALL:append = "gtkmm3" ビルド時に問題が発生しないように、gtkmm3 の前にスペースがあることを確認してください。ビルドはリソースを大量に消費するため、ビルド中にメモリ不足の問題が発生する可能性があります。一度にビルドを試みる同時レシピの数を制限するために、以下も追加することをお勧めします。 BB_NUMBER_THREADS="8" PARALLEL_MAKE="-j8" BB_PRESSURE_MAX_CPU ?= "50000" BB_PRESSURE_MAX_IO ?= "100000" BB_PRESSURE_MAX_MEMORY ?= "25000" その後、local.conf は次のようになります。 注意:ビルドを完了するには 500 GB 以上必要なので、マシンに十分なストレージ容量があることを確認してください。 これでビルドを開始できます。GTKMM アプリケーションをソースからビルドする場合は、利用可能な SDK が必要であり、次のように作成します。 bitbake imx-image-full -c populate_sdk 画像を作成するには、次のようにするだけです。 bitbake imx-image-full すべての Tensorflow Lite ライブラリとさまざまな例が含まれているため、完全なイメージが必要です。 ビルドが完了したら、ツールチェーンをインストールし、イメージをボードにフラッシュできます。 ツールチェーンをインストールするには: ./tmp/deploy/sdk/fsl-imx-xwayland-glibc-x86_64 -imx-image-full-armv8a-imx93-11x11-lpddr4x-frdm-toolchain-6.12-walnascar.sh その後、ツールチェーンを使用するたびに次の操作を実行します。 ソース /opt/fsl-imx-xwayland/6.12-walnascar-full-gtkmm3/environment-setup-armv8a-poky-linux イメージを SD カードにフラッシュするには: zstdcat imx-image-full-imx93-11x11-lpddr4x-frdm.rootfs.wic.zst | sudo dd of=/dev/mmcblk0 bs=1M conv=fsync これで、アプリケーションを構築し、いくつかのモデルをトレーニングしてデプロイする準備が整いました。 GTKMM3 ビルディング アプリケーション (C++) アプリケーションのソースはここにあります。また、ビルド済みのバイナリも提供されており、ここに添付されています。 アプリケーションには、マウスまたはタッチ ディスプレイを使用して数字を簡単に描画できる描画領域と、描画領域をクリアするためのボタンと、モデルの実行をトリガーして数字を予測するためのボタンの 2 つのボタンが含まれています。 最初からビルドするには、CMake と、GTKMM3 をサポートするツールチェーン (上記参照) が必要です。プロジェクトをビルドするには、次の手順に従ってください。 sudo apt install cmake git クローンhttps://github.com/ManRod2982/drawing_window_imx cd drawing_window_imx/drawing_window_cpp/ ソース /opt/fsl-imx-xwayland/6.12-walnascar-full-gtkmm3/environment-setup-armv8a-poky-linux cmake -B ビルド -DCMAKE_TOOLCHAIN_FILE=$OECORE_NATIVE_SYSROOT/usr/share/cmake/OEToolchainConfig.cmake cmake --build ビルド この後、ビルド ディレクトリの下に window というバイナリが作成され、それをターゲットの SD カードに簡単にコピーできるようになります。 Linux を使用している場合はファイルシステムがマウントされるので、バイナリをルート ディレクトリにコピーするだけです。 sudo cp build/window /media/user/root/root/ ボードへの接続がすでに確立されている場合も SCP を使用できます。 scp ビルド/ウィンドウ [email protected]:/root そして、この後、ターゲット上でアプリケーションを次のように起動できます。 ./window -m model_path [オプション] -d delegate_path [オプション] -v アプリケーションでは次の 3 つのパラメータが受け入れられます。 モデルへのパス: -m または --model_path [オプション] デリゲートへのパス(存在する場合): -d または --delegate_path。指定されていない場合は、 XNN デリゲートを使用して CPU 上でモデルの実行が試行されます。 [オプション] 詳細フラグ。存在する場合、モデルはより多くの情報を出力します。 ここで、実行するモデルが必要です。 シンプルなCNNモデルのトレーニング このリリースの機械学習ユーザーガイドを見てみましょう。各デバイスで利用可能なコンピューティング エンジンに関するさまざまなフレームワークのサポートは次のとおりです。 Tensorflow Lite とLiteRT (Tensorflow Lite の最新リリースであり、今後リリースされる唯一のもの) は、i.MX9 ファミリのほとんどのコンピューティング エンジンで広くサポートされているフレームワークです。このガイドでは、例として C++ を使用し、LiteRT の現在のリリースでは Python のみがサポートされているため、Tensorflow Lite を使用しますが、インターフェースとプロセスはほぼ同じです。 環境の設定 サンプル リポジトリには、モデルをトレーニングして tflite 形式に変換するために使用されるさまざまな Python スクリプトが含まれています。次の手順を実行するには、python3 のインストールが必要です。 仮想環境を設定することをお勧めします。 python3 -m venv myenv ソース myenv/bin/activate pip インストール -r 要件.txt これにより、Tensorflow と Pytorch の両方に必要なすべてのパッケージがインストールされます。 Tensorflowでモデルをトレーニングする Tensorflow を使用すると、モデルを量子化して Tensorflow Lite に変換するための簡単なパスが可能になり、畳み込みニューラル ネットワーク (CNN) アーキテクチャは次のようになります。 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') ]) train_tf.pyスクリプトを実行してモデルをトレーニングすることができます。通常のノートPCでトレーニングするには約 2 分かかり、テスト データセットで 99.05% の精度を達成します。フレームワークの詳細については、公式のTensorflow ドキュメントを参照してください。 スクリプトを実行した後、 eIQ ツールキットモデル ビジュアライザーまたはNetron.app を使用してモデルを視覚化できます。 i.MX93 には、重み、バイアス、入力が整数である必要があるArm Ethos-65 NPUが搭載されており、現在のモデルは float32 を使用しているため、モデルを量子化する必要があります。これを実現するには、モデルを量子化して tflite に変換する tf2quant_tflite.py を実行します。 整数の入力と出力を取り、重みとバイアスも量子化されており、ファイル サイズの違いが簡単に確認できます。 量子化モデルは 555 KB ですが、float32 モデルは 2.2 MB です。これは、float32 では重みとバイアスをそれぞれ保存するのに 4 バイトが必要なのに対し、量子化モデルでは 1 バイトしか必要ないからです。 これで、ターゲットで使用できるモデルができました。ただし、現状では、XNN デリゲートを使用して CPU 上で実行されます。モデルを実行するには、次のようにするだけです。 ./window -m cnn_tf_quant.tflite これで、Arm Ethos NPU 用に量子化モデルをコンパイルできるようになりました。eIQ ツールキットが使用されます。モデル ツールを使用してモデルを開きます。 量子化されたモデル(この場合は cnn_tf_quant.tflite)があるフォルダーに移動して開きます。モデルを視覚化できるはずです。オプション メニューをクリックして変換を選択します。 i.MX93 コンバータを選択すると、保存先フォルダも選択するように求められます。 宛先フォルダを選択した後、すべてがうまくいけば変換が完了し、Ethos で実行できるように最適化されたモデルを視覚化できるようになります。NPU でサポートされていない操作はすべて CPU によって表示および実行されます。この単純な例では、すべての操作は NPU によって実行されます。 そして、次のようにしてターゲット上でモデルを実行できるようになりました。 ./window -m cnn_tf_quant_vela.tflite -d /usr/lib/libethosu_delegate.so Pytorchでモデルをトレーニングする リポジトリには、畳み込みニューラル ネットワークを使用して MNIST データ セットをトレーニングするサンプル モデルが含まれています。モデル構造は次のとおりです。 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 モデルは、Tensorflow lite (量子化なし) に簡単に変換して CPU 上で実行できます。また、 Open Neural Network Exchange モデル (ONNX)も同様です。ただし、最近リリースされたExecutorchは組み込みデバイス上の Pytorch モデル用の推論モデルであり、現在そのサポートが進められています。 Pytorch モデルは 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 トレーニングは train_pytorch.py を実行して実行され、テスト データセットで 99.3% の精度を達成し、通常のノートPCで完了するまでに約 7 分かかります。フレームワーク自体とトレーニング プロセスの詳細については、公式のpytorch ドキュメントを参照してください。 その後、pytorch モデルは pytorch_model.pth に保存されますが、pytorch はグラフ情報ではなく重みとバイアスのみを保存します。保存したモデルをnetronまたはeIQ ツールキットモデル ビジュアライザーで視覚化すると、分離された重みとバイアスを観察できます。 モデルをより良く視覚化するために、スクリプトpytorch2onnx.pyを使用してONNX形式に変換するだけです。そして、Neutron 上でモデルのグラフを視覚化できるようになりました。 注: ONNX は量子化して量子化されたモデルを tflite に変換する方法も提供している可能性がありますが、onnx-tf のテストではツールが最新の Tensorflow フレームワークと同期していないようでした。Tensorflow で同様のモデルを作成し、量子化してエクスポートする方が簡単でした。 これでモデルを tflite にエクスポートできるようになりました。モデルは量子化されていないため、CPU (XNN デリゲート) 上で実行されます。エクスポートするには、 pytorch2tflite.py を実行し、エクスポートされたモデルを視覚化できるようになりました。 そして、次のようにしてこのモデルをターゲット上で実行できます。 ./window -m pytorch_cnn.tflite モデルのデプロイと実行 これで、数字を描画できるアプリケーションと、それらの数字を検出できるモデルができましたが、アプリケーションはそのモデルを実行して結果を取得できる必要があります。これが次のステップです。 ターゲット上でモデルを実行できるようにするには、次のことが必要です。 モデルをロードする tfliteインタープリターを作成する 外部デリゲートがある場合はロードする テンソルを割り当てる C++の例 ここでは最小限の例が提供されていますが、NPU でモデルを実行するために必要な外部デリゲートの読み込みは含まれていません。 必要なヘッダーは次のとおりです。 #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" TFLite APIを使用して次のようにモデルをロードできるようになりました。 std::unique_ptr<:flatbuffermodel> model = tflite::FlatBufferModel::BuildFromFile(model_path); ここでインタープリターを作成する必要があります。そのためには、モデルだけでなく操作リゾルバーも必要です。 tflite::ops::builtin::BuiltinOpResolver resolver; std::unique_ptr<:interpreter> interpreter; tflite::InterpreterBuilder(*model, resolver)(&interpreter); デリゲートが必要な場合は、それを作成して実行グラフを更新し、インタープリターがサポートされている操作でデリゲートを呼び出すことを認識できるようにする必要があります。 // 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; } これで、モデルにテンソルを割り当てることができます。 // Allocate tensors for the model if (interpreter->AllocateTensors() != kTfLiteOk) { std::cerr << "Failed to allocate tensors" << std::endl; } これで、モデルを使用して推論を実行する準備が整いました。 最後のステップは、入力バッファにデータを入力し、インタープリタを呼び出して、出力バッファから結果を取得することです。次の例では、float モデルを使用しています。 // 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)); 私たちのサンプル アプリケーションでは、インタープリターの作成と推論の呼び出しは NnModel というクラスにラップされています。その実装はリポジトリで確認できますが、変更なしで float モデルと int8 モデルの両方を処理できます。 クラスはメイン ルーチン内でインスタンス化され、予測ボタンがクリックされるたびに推論が呼び出されます。 // 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の例 Python でインタープリターを作成するプロセスはほぼ同じですが、デリゲートが使用されている場合はそれをロードし、モデルをロードしてテンソルを割り当てる必要があります。 この例では、代わりに LiteRT が使用されていますが、API は同じままで、必要な変更は解釈されたものがどこからインポートされるかだけです。 次の最小限のコードを使用して、モデルと外部デリゲートを読み込むことができます。 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() これで使用できるインタープリターができました。入力テンソルを入力し、インタープリターを呼び出して、モデルからの結果を含む出力テンソルを取得するだけです。 # 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']) これらの手順は、 nn_model.pyの下のラッパー クラスに含まれています。 モデルのベンチマーク リリースには、ランダムな入力を生成し、モデルで推論を実行するのにかかる時間を測定するための事前構築されたベンチマーク ツールが付属しています。以下は、i.MX93 でさまざまなモデルを実行した結果です。 ./benchmaark_model --graph=モデル --num_threads=コア数   CPU 1コア CPU 2コア NPU pytorch_cnn.tflite 1559.61米ドル 1023.22米ドル N/A cnn_tf_quant.tflite 585.37米ドル 379.69米ドル N/A cnn_tf_quant_vela.tflite N/A N/A 221.84米ドル これはもちろん単なる例ですが、専用ハードウェア上で実行すると推論速度が大幅に向上することがわかります。 以下は、Pytorch と Tensorflow でシンプルなモデルをトレーニングし、i.MX93 Ethos-65 ニューラル プロセッシング ユニット (NPU) と i.MX95 eIQ Neutron NPU を使用してアプリケーションにデプロイするためのガイドです。
記事全体を表示
i.MXRT1064 カスタム ボードをデバッグできません。 こんにちは、 デバッグ モードでコードを実行しようとすると、「アドレス "0x20d102" でブレークしましたが、デバッグ情報が利用できません」というメッセージが表示されます。 私は i.MXRT1064 カスタム ボードを使用し、LinkServer LPC-Link2 を使用してプログラミングしています。 このボードは以前は問題なく動作していましたが、突然このメッセージが表示されます。 リリースモードを試してみました。リリース コードを使用してボードを正常にフラッシュすることはできますが、その後プログラムが実行されないようです。シリアル端末からもディスプレイからも出力が表示されません。 また、Secure Provisioning Tool を使用してこのボードをプログラミングしようとしましたが、まだ動作しません。 この問題に関して、どこに焦点を当てるべきか、または何か手がかりとなるものについて、どなたか助言をいただけませんか? Re: Unable to debug i.MXRT1064 custom board. こんにちは、MayLiuさん。 ご返信ありがとうございます。 以前、ご提案いただいた設定を試しましたが、デバッグしようとすると IDEs でエラー (MI コマンドの実行に失敗しました: -target-download) が表示されました。参考までに、そのエラーのスナップショットを添付しました。 前のメッセージに戻って、現在のプログラムが実行されているアドレスをチェックしたところ、コードが ROM 領域 (アドレス 0x20E35A) にあることが示されていたことを付け加えておきます。SO、何らかの理由で、コードはアプリケーション コードに到達/起動できず、ROM 内で停止します。私の仮定は正しいでしょうか?そんなシナリオがあり得るのでしょうか? Re: Unable to debug i.MXRT1064 custom board. こんにちは@nxpsachveさん、 弊社の製品にご興味をお持ちいただき、またコミュニティをご利用いただき誠にありがとうございます。 1: 「アプリケーションを RAM にリンク」を選択して再度デバッグしてみてください。 アプリケーションが RAM から正常に実行できる場合は、ボードをシリアル ダウンローダー モードに設定し、セキュア プロビジョニング ツールを使用して UART1 または USB1 でボードをプログラムしてください。   アプリケーションの実行に失敗した場合は、オシロスコープを使用してボードの電源投入シーケンスを確認することをお勧めします。   お役に立てれば幸いです。 よろしくお願いいたします。 メイリュー Re: Unable to debug i.MXRT1064 custom board. こんにちは@nxpsachveさん、 MCUXpresso IDE は BOOT 構成を変更するとは思いません。NXP RT 上のブート動作は、ハードウェア ブート構成とブート モード ピンによって決まります。 シリアル ダウンローダー モードでターゲットを検出できるため、ROM がまだ正常に実行されていることがわかります。次のステップとして、次のことが考えられます。 チップ全体の消去を実行します。 ボードを内部ブートモードに切り替え、 デバッグのためにMCUXpresso IDEに再接続してみてください。 あるいは、MCUXpresso Secure Provisioning Tool を使用してアプリケーション イメージをプログラムすることもできます。 よろしくお願いいたします。 メイリュー Re: Unable to debug i.MXRT1064 custom board. こんにちは@nxpsachveさん、 最新情報をありがとうございます。 提供された情報に基づくと、CPU は現在、アプリケーション コードではなく、Boot ROM からのコードを実行している可能性があります。   BOOT CFG と BOOT モード ピンの設定をチェックして、デバイスがユーザー フラッシュから起動するように構成されていることを確認することをお勧めします。   ボードをシリアル ダウンローダー モードに設定し、J-Link 経由で接続して、デバッガーがターゲットを検出して通信できるかどうかを確認することもできます。   よろしくお願いいたします。 マトリウ Re: Unable to debug i.MXRT1064 custom board. こんにちは、MayLiuさん。 ご提案ありがとうございます。 MCUXpresso 内に、BOOT Conf を変更したり影響を与えたりするような設定や構成があるかどうかを確認したいのですが。IDE を除外するためです。 リンク サーバーは、シリアル ダウンロード モードのときにターゲットを検出できます。
記事全体を表示
How to download documents on chip-related resources Example: S32K3xx_interrupt_map.xlsx Re: 如何下载芯片的相关资源的文档 Hi@PQF Download the datasheet and instruction manual from the official website. You can find these documents you are looking for in the attachment to the instruction manual. https://www.nxp.com/products/S32K3
記事全体を表示
报告 K5 RTD 引脚配置 嗨,团队 我有一份报告与 K5 引脚配置有关。(0.8.0 CD3) GPIO 258 需要一些限制。 所以我用了下面的方法。 我认为这与下文有关。 顺便说一下,如果我使用 MCAL,它看起来会正常工作... 谢谢。 RTD 来源:恩智浦内部来源:恩智浦内部 Re: Report K5 RTD pin configuration 嗨,@Luke_Chun、 如果使用 Dio_WriteChannel 向 GPIO258 写入数据,则该函数将通过 GPDO 寄存器向 GPIO258 写入数据。 但 Siul2_Dio_Ip_WritePins() 函数将写入 PGPDO 寄存器。GPIO258 相当于 PGPDO16 寄存器,但硬件不包含该寄存器。因此,这可能是硬件问题,用户不能使用 Siul2_Dio_Ip_WritePins() 函数向 GPIO258 写入数据。在 Siul2_Ip 层中,我建议你可以使用 siul2_dio_IP_setGPDO 或 siul2_dio_IP_ClearGPDO 函数在 u8siul2Instance = 3 和 gpdoNum = 258 的情况下设置/清除 GPIO258(取自 RTD_DIO_UM.pdf 文件中的图 3.1 GPIO 分配)。 目前,RTD 驱动程序尚未通过有关此解决方法的验证,但我认为你可以尝试这样做 。 顺祝商祺! 丹
記事全体を表示