Multi Source Translation Content

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

Multi Source Translation Content

Discussions

Sort by:
LPC177x_8x u-boot端口 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 该项目解释了如何使用 LPC177x_8x 设备为平台构建和部署 u-boot。要构建 u-boot,您需要运行 Linux 操作系统的系统、适用于 Linux 操作系统的最新 CodeSourcery GNU 工具、u-boot 源代码以及适用于 LPC1788 的 u-boot 补丁。 已实现的功能 -------------------------------------------------------------------------------- 支持带有 32 位 DRAM(32MB)的 EA1788 主板 支持EA1788板的NAND FLASH 支持LPC177x_8x内部FLASH 以太网支持 有限的 MPU 支持 u-boot 已知问题 -------------------------------------------------------------------------------- 问题:“重置”命令导致电路板崩溃 解决方法:改用“cmreset”命令 问题:“boot”命令导致主板崩溃 解决方法:使用环境变量和 go 命令编写脚本 问题:bootvx 命令导致主板崩溃 解决方法:无,但没有理由使用此命令 未实现的功能 -------------------------------------------------------------------------------- FLASH“保护”命令和功能未实现(易于实现) 未实现中断/NVIC 支持(易于实现) 可能的改进 -------------------------------------------------------------------------------- Systick 可以代替 LPC1788 匹配定时器 重定位代码已被“绕过”,并且未正确实施 针对设备特定 IRQ 的宏文件,即需要包含弱链接 在启动文件中(特定于架构的设备覆盖) 有一个基本的 MPU 驱动程序,似乎可以工作,但可以改进 以太网驱动程序和 PHY 设置是“特定于板的”,但可以移动 到驱动程序区域,可以使用通用 PHY 支持 u-boot 启动操作概述 -------------------------------------------------------------------------------- 以下是 u-boot 如何在 LPC1788 上启动的概述。 - LPC1788 启动 ROM 将控制权转移到内部 FLASH 中的 u-boot 代码 每个 CM3 启动过程的地址 0x0 - u-boot 代码首先设置 MPU - 引脚复用、时钟和 DRAM 均已初始化 - 代码和数据从 FLASH 迁移到 DRAM - DRAM 中的 BSS 段被清除 - 控制权转移到 DRAM 中的 u-boot 代码 - 调用 u-boot board_init_f() 进行初始 u-boot 设置 - board_init_r() 用于稍后的 u-boot 设置 - u-boot 在 DRAM 之外正常运行 移植文件的位置 -------------------------------------------------------------------------------- arch/arm/cpu/cortex-m3 - Cortex M3 特定文件(mpu、启动等) arch/arm/cpu/cortex-m3/lpc1788 - LPC1788 特定文件(计时器、串行等) arch/arm/include/asm/arch-cortex-m3 - Cortex M3 头文件 arch/arm/include/asm/arch-lpc17xx - LPC177x_8x 特定的头文件 board/nxp - 使用 NXP 设备的电路板专用区域 board/nxp/ea1788 - EA1788 板特定文件(设置、nand 等) include/configs/ea1788.h - EA1788 板特定配置文件
View full article
i.MX 上的 wxWidgets <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 组装 wxWidgets 版本 2.8。使用 TinyX。由 4 英寸 - 8 英寸的触摸屏供电。
View full article
chromium-ozone-waylandのコンパイル中にビルドが失敗しました こんにちは、 YoctoでIMX8MPボード用にchromium-ozone-waylandをコンパイルしようとしていますが、以下のエラーでコンパイルが失敗します: | デバッグ: Python 関数 extend_recipe_sysroot が完了しました | デバッグ: シェル関数 do_configure を実行中 | エラー //.gn:150:5: 代入が無効でした。 | build_dotfile_settings.exec_script_allowlist + | ^--------------------------------------------- ここで変数「exec_script_allowlist」を設定しましたが、以前は使用されていませんでした。 対象外です。 警告: シェルコマンドからの終了コードが 1 です。 エラー:タスク(/home/admin/Dharmik/IMX8M-Plus/sources/meta-browser/meta-chromium/recipes-browser/chromium/chromium-ozone-wayland_138.0.7204.157.bb:do_configure)終了コード「1」で失敗しました 注:タスクの概要:2814個のタスクが試行され、そのうち2800個は再実行の必要がなく、1個が失敗しました。 conf/local.conf に CORE_IMAGE_EXTRA_INSTALL += "chromium-ozone-wayland" を追加しました。 以下は私のヨクト設定です。 ビルド構成: BB_VERSION = "2.16.0" BUILD_SYS = 「x86_64-linux」 NATIVELSBSTRING = 「ユニバーサル」 TARGET_SYS = "aarch64-poky-linux" MACHINE = "imx8mp-lpddr4-evk" ディストリビューション = "fsl-imx-wayland" DISTRO_VERSION = 「6.18-whinlatter」 TUNE_FEATURES = "aarch64 armv8a crc crypto" ありがとうございます ダルミック Re: Build failed while compiling chromium-ozone-wayland 過去のChromiumバージョンでもこのエラーを見たことがあり、そのビルド状況で私の場合うまくいったのはこのファイルの変更でした。 \tmp\work\armv8a-mx8-poky-linux\chromium-ozone-wayland\117.0.5938.132\chromium-117.0.5938.132\media\gpu\sandbox\BUILD.gn if (current_cpu != "s390x" && current_cpu != "ppc64" && is_linux && ozone_platform_x11 && !is_castos) { # For DRI_DRIVER_DIR. configs += [ "//build/config/linux/dri" ] } このファイルの下部のプラットフォームリストに「&& ozone_platform_x11 」を追加したことで問題は解決しました。 Chromium v138がすでに追加されているか確認してもらえますかozone_platform_x11? よろしくお願いいたします。 ダイアナ Re: Build failed while compiling chromium-ozone-wayland PREFERRED_VERSION_gn-native = "0+git" の変更を追加した後、以下のエラーが発生します。 |DEBUG: Python関数extend_recipe_sysroot完了しました |DEBUG:シェル関数の実行do_configure |//build/config/linux/dri/BUILD.gn:11:20でのエラー:スクリプトがゼロでない終了コードを返しました。 |dri_driver_dir = exec_script(pkg_config_script, |^---------- |現在の編集名: /home/admin/Dharmik/IMX8M-Plus/build-imx8mp/tmp/work/armv8a-mx8mp-poky-linux/chromium-ozone-wayland/138.0.7204.157/sources/chromium-138.0.7204.157/out/Release/ |コマンド: python3 /home/admin/Dharmik/IMX8M-Plus/build-imx8mp/tmp/work/armv8a-mx8mp-poky-linux/chromium-ozone-wayland/138.0.7204.157/sources/chromium-138.0.7204.157/build/config/linux/pkg-config.py --dridriverdir dri |1枚返品して印刷しました: | |pkg-configからのエラーです。 | |スタール: | |pkg-configの検索パスにはdriパッケージが見つかりませんでした。 |おそらく「dri.pc」を含むディレクトリを追加したほうがいいかもしれません |PKG_CONFIG_PATH環境変数に |パッケージの「ドリ」は見つかりませんでした | |//media/gpu/sandbox/BUILD.gn:31:18:を参照し、これがファイルが含まれた原因となりました。 |configs += [ "//build/config/linux/dri" ] |^------------------------- |警告:シェルコマンドからコード1を終了してください。 ありがとうございます ダルミック Re: Build failed while compiling chromium-ozone-wayland こんにちは、ダルミックさん。 local.confにchromiumパッケージ以外にもう一つ追加してみてはどうでしょうか? PREFERRED_VERSION_gn-native = "0+git" 問題が解決しない場合はお知らせください。 よろしくお願いいたします。 ダイアナ
View full article
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イントラレジスタ値を教えてもらえますか? 結果を教えてください。 よろしくお願いします、 パブロ
View full article
MC33774 无响应 MC33774 无响应 MC33665+MC33774 的当前 DEMO 例程实现了 665 初始化、774 初始化以及电压和温度采集功能。实验台的布置如图所示。1. 当 S32K314 主控单元使用 JLINK 连接到 SWD 调试端口进行调试和仿真时,33774 和 33665 都能正常响应,返回回复帧并获取正确的单元电压和 GPIO 端口数据。台式上电顺序为“采样从板上电 -> MC33665A 上电 -> MCU 主板上电”。通信初始化请求读取寄存器消息显示为 MC33774_FIRST(其中 CAN 类型消息为 MC33665 回复帧)。2. 当仿真器断开连接且整个平台断电一段时间后,按“采样从板上电 -> MC33665A 上电 -> MCU 主板上电”的顺序再次上电时,MC33774 没有响应,只有 MC33665A 可以返回响应帧。通过开关机重新初始化MCU主板没有效果;只有在使用J-Link进行调试时才能与MC33774正常通信。消息如 MC33774_SECOND 所示。我想知道在排查故障时可以采取哪些步骤。 当前MC33665+MC33774的DEMO例程实现665初始化、774初始化以及电压温度采集功能,台架构成如图: 1.当S32K314主控部分使用JLINK链接SWD调试口进行调试仿真时,33774和33665均能正常响应返回应答帧并采集正确的适配器电压和GPIO端口数据。台架上电顺序为“采样从主板上电->MC33665A上电->MCU模块上电”。通讯初始化至请求读取读取报文如MC33774_FIRST所示(其中CAN报文类型为MC33665回复帧) 2.当断开仿真器并且将台架全部下电后等待一段时间,重新按照“采样从主板上电->MC33665A上电->MCU主板上电”顺序上电后,MC33774无响应,则MC33665A能返回响应帧。重新将MCU主板上下电进行初始化也无效,只有用JLINK调试时才正常与MC33774通讯。报文如MC33774_SECOND所示。 我想知道排查的方向有哪些? Re: MC33774 is unresponsive MC33774无响应 亲爱的嵌入式新手: MC33665 包含内部通信管理功能,不具备透明桥接功能。 当 MC33665 RESET 而 MC33774 仍保持通电状态时,TPL 链路将失去同步,导致设备处于 SPI 通信工作但 TPL 转发未启用的状态。 执行两次初始化可以有效地清除内部状态并重新建立链路同步,这就是它解决问题的原因。 建议的解决方案是确保正确重新初始化 TPL 或同步 RESET 两个设备。 最诚挚的问候, 约瑟夫 Re: MC33774 is unresponsive MC33774无响应 通过实验,我发现问题是由 MC33665 断电引起的。当我的 MC33774 保持通电状态,而 MC33665 断电重启,MCU 也断电重启时,尽管软件逻辑重新初始化了 MC33665,但它似乎处于无法转发 TPL 数据的状态。这是因为我的消息表明 MC33665 可以发送回复帧。因此,MC33665 一定处于某种状态,导致它无法转换 TPL 信号并将其发送到 33774。目前,我可以通过在软件逻辑中执行两次相同的 MC33665 初始化来避免这种现象。但是,我不清楚为什么 MC33665 会出现这种行为。你有什么想法吗? 我通过实验发现是由于MC33665下电导致的,当我的MC33774保持上电,MC33665下电重启,因为MCU也下电重启后,虽然软件逻辑上到MC33665重新初始化,但是此时MC33665似乎无法转发TPL数据的状态,我的报文中可以看出MC33665能够发出状态回复帧,所以MC33665应该有某种原因导致无法转换TPL信号不断出现33774。我当前在软件逻辑中进行两次相同的MC33665初始化就能够避免这种现象。但是我并并MC33665为什么会这样。请问您有什么办法吗? Re: MC33774 is unresponsive MC33774无响应 亲爱的嵌入式新手: 这个问题很可能是由启动时序依赖性引起的。当使用 J-Link 调试系统时,MCU 执行会被延迟,从而给 MC33774 足够的时间完成其内部初始化。在正常上电情况下,MCU 会立即启动并在 MC33774 准备就绪之前发送通信请求,导致没有响应。 建议在第一次通信之前引入延迟(例如 50-200 毫秒),实施重试机制,并确保 MC33665 在寻址 MC33774 之前正确初始化并唤醒 TPL 通信链。此外,还应验证 MC33774 的 RESET 和电源斜坡条件。 最诚挚的问候, 约瑟夫
View full article
当 PN7160 设置为 LPCD 模式时,不能使用 2×2 厘米天线从 LPCD 模式激活它。 使用 “NFC 天线工具”,我们为 PN7160 设计了一个 2 cm × 2 cm 的板载天线,Q 系数为 20,目标阻抗为 11 Ω。由于这是一个小型天线,我们根据 "PN7160 常见问题 [AN13892]"启用了 PN7160 的 DPC。 在这种情况下,如果我们不启用 PN7160 的 LPCD 模式,两台 PN7160 设备可以通过 P2P 进行正常通信。但是,如果我们启用 PN7160 的 LPCD 模式,PN7160 将无法从 LPCD 模式唤醒。不过,使用相同的驱动器,我们可以用 2 厘米 × 4 厘米的天线从 LPCD 模式激活它。 来自 2 厘米 × 2 厘米天线的 LPCD TRACE 信息如下: D (6358097) PN7160_I2C:NCI<< 0x6f 0x13 0x04 0x80 0x83 0x80 0x03 D (6358597) PN7160_I2C:NCI<< 0x6f 0x13 0x04 0x80 0x83 0x80 0x03 D (6359107) PN7160_I2C:NCI<< 0x6f 0x13 0x04 0x80 0x83 0x80 0x03 D (6359617) PN7160_I2C:NCI<< 0x6f 0x13 0x04 0x80 0x83 0x80 0x03 有关天线设计参数,请参阅附件。 并将 CORE_SET_CONFIG_CMD 设置为 : uint8_t NxpNci_CORE_CONF_EXTN[]={0x20, 0x02, 0x6B, 0x05, /* CORE_SET_CONFIG_CMD */ 0xA0, 0x40, 0x01, 0x81、 /* TAG_DETECTOR_CFG */ 0xA0, 0x41, 0x01, 0x10, /* TAG_DETECTOR_THRESHOLD_CFG */ 0xA0, 0x42, 0x01, 0x0F、 /* TAG_DETECTOR_PERIOD_CFG */ 0xA0, 0x43, 0x01, 0x00, /* TAG_DETECTOR_FALLBACK_CNT_CFG */ 0xA0, 0x0B, 0x57, 0xE5, 0x05, 0x90, 0x6E, 0x0F, 0x4E, /* DPC_CONFIG*/ 0x00, 0x40, 0x95, 0xB7, 0xAA, 0x40, 0x9F, 0xA7, 0x99、 0x53, 0x9F, 0x97, 0x99, 0x5D, 0x9F, 0x97, 0x99, 0x5F, 0x9F, 0x97, 0x00, 0x68, 0x9F, 0x07, 0x00, 0x6A, 0x1F, 0x07, 0x00, 0x74, 0x1F, 0x07, 0x00, 0x78, 0x1F, 0x07, 0x00, 0x7F, 0x1F, 0x07, 0x00, 0x81, 0x1F, 0x07, 0x00、 0x8B, 0x1F, 0x04, 0x00, 0x8C, 0x1F, 0x04, 0x00, 0x96, 0x1F, 0x04, 0x00, 0x98, 0x1F, 0x04, 0x00, 0xA1, 0x1F、 0x02、0x00、0xA9、0x1F、0x00、0x00、0xAF、0x1F、0x00、 0x00、0xB8、0x1F、0x00、0x00、0xC2、0x1F、0x00、0x00 }; 这个问题是由天线匹配还是寄存器设置引起的? Re: When the PN7160 is set to LPCD mode, it cannot be activated from LPCD mode using a 2×2 cm antenn 您好,感谢您对我们的产品感兴趣。 您的设置有一些局限性,我想谈谈。 尽管可以使用 2x2 厘米的天线,但建议尝试使用尺寸稍大的天线。 我还想澄清一点,NFC 论坛不推荐使用 P2P,我们强烈建议使用 HCE 和读/写模式。 启动器的天线尺寸很可能太小,不会导致目标失调。 您是否尝试过用普通的 PICC(如卡片)唤醒 LPCD 读取器?这样做的结果是什么? 请分享史密斯手推车和原型图,以便进一步审查。 Re: When the PN7160 is set to LPCD mode, it cannot be activated from LPCD mode using a 2×2 cm antenn 您能测量天线的阻抗吗? 似乎相对较低。 Re: When the PN7160 is set to LPCD mode, it cannot be activated from LPCD mode using a 2×2 cm antenn 非常感谢您的答复,但我现在没有 VNA。如果还是不能解决问题,我就去买一个。您还有其他建议吗? Re: When the PN7160 is set to LPCD mode, it cannot be activated from LPCD mode using a 2×2 cm antenn 非常感谢您的回复。 目前,我们使用 P2P 是为了兼容性而做出的妥协。我们重新优化了天线形状和 PCB 布局,但问题依然存在。附件中的第一张图片是天线原理图,其中包含使用 "NFC 天线工具 "生成的参数;第二张图片是 PN7160 及其外围电路的原理图;第三和第四张图片显示了 PCB 布局的顶视图和底视图;第五张图片显示了我们输入 NFC 天线工具的参数。 根据 AN13219(PN7160 天线设计和匹配指南)第 23 页,我们将非对称和对称调谐方案的 Q 值、目标阻抗、fEMC 截止频率和 L0 分别设置为 20、13 Ω、22 MHz 和 20、11 Ω、14.6 MHz。但是,在这两种情况下,LPCD TRACE 的通知信息仍然是: D (564760) PN7160_I2C:NCI<< 0x6f 0x13 0x04 0x80 0x83 0x80 0x03。 无论我们用手指还是金属物体靠近天线,测量结果都不会改变。 Re: When the PN7160 is set to LPCD mode, it cannot be activated from LPCD mode using a 2×2 cm antenn 我们还参考了 "PN7160 天线设计与匹配指南",并使用该程序读取了 AGC 值: 无效 Get_AGC(SemaphoreHandle_t Semaphore_PN7160_IRQ) { uint8_t 获取[] ={0x2F, 0x3D, 0x04, 0x02, 0xC8, 0x60, 0x03}; uint8_t 答案[255]; uint16_t 答案大小; 虽然(1)     { printf("\n");   NxpNci_HostTransceive(Semaphore_PN7160_IRQ, 获取, sizeof(获取), 答案, 大小(答案), &答案大小); 如果((答案[0] != 0x4F) ||(答案[1] != 0x3D) ||(答案[3] != 0x00)) { printf("错误,无法获取参数值\n");      } 不然 { printf("\n"); printf("测量的 AGC 值 (LSB)= %.2Xh", 答案[4]); printf("\n"); printf("测量的 AGC 值 (MSB)= %.2Xh", 答案[5]); printf("\n");      }    } }   不过,我们得到的结果很奇怪,它并没有列在 UM11495 号文件的 TEST_ANTENNA_RSP 返回值列表中。我们读取的值是 0x06: (7600) PN7160_I2C:NCI>> 0x2f 0x3d 0x04 0x02 0xc8 0x60 0x03 D (7600) PN7160_I2C:NCI<< 0x4f 0x3d 0x01 0x06 但 UM11495 只提到四种可能的结果: 0x00: STATUS_OK 0x01: 拒绝执行测试(PN7160 处于错误状态) 0x04: STATUS_TEST_EXEC_FAILED 0x09: STATUS_INVALID_PARAM 其他:RFU
View full article
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 协议栈? 顺祝商祺! 帕维尔
View full article
Fuse Read and Write tool in Linux Userspace for i.MX 9 series Introduction. OEMs need to access fuse values during functional tests and product manufacturing as well, they will fix Ethernet MAC addresses, fix boot mode, enable secure boot and more, There is a tool that is enabled across all i.MX processors, it runs in U-boot and is the command '=> fuse ', some customers are required to write and read fuses in Linux Userspace and this is where different processors have different OTP structures. In this article, you will download a C-written file, using NXP BSP enabled functions to access processor's fuses. i.MX 9 Series manages fuses through EdgeLock Secure Enclave (ELE), which would make this tool easy to adapt for other processors, this release is focused on i.MX91 and i.MX93. 1. Hardware Setup. FRDM-i.MX91. Power supply connected to P1, USB type-C debug cable to P16 Ethernet cable connected to network router and P4, for source code copying. SD/eMMC flashed with Yocto Linux Factory LF_6.12.49, if needed, you can flash it with USB type-C host cable to J31.   2. Documentation Setup. Download reference manual from i.MX 91 Documentation. It contains the attachment i.MX91_Fusemap.xlsx   3. Software Setup. Download and build process. user@host:~$ scp fuse_test.c root@ :~ root@imx91evk:~# gcc -Wall fuse_test.c -o fuse_test Tool features. Uses NXP BSP pread and pwrite functions. Based on Bank * 8 + Word formula, if you are using fusemap attachment, Word would be defined as Word % 8. Defines minimum and maximum bank and word indexes according to i.MX93/i.MX91 fusemap. Requires customer to specifically input 4 arguments: fuse_test read|write . 4. Demonstration. Read Device Unique ID [31:0] from fuses. a. Stop at U-boot for UID fuse reference value. u-boot=> fuse read 1 7 Reading bank 1: Word 0x00000007: 03fc7ef1 u-boot=> boot b. Run tool for read operation. root@imx91evk:~# ./fuse_test read 1 7 ret: 0 fd : 3 READ Bank: 1, Word: 7, Offset: 15 SUCCESS: pread operation resp_len = 4 resp_buf[0] = |f1| resp_buf[1] = |7e| resp_buf[2] = |fc| resp_buf[3] = |3| c. Run tool for write operation. This article explores a simple writing to OEM General Purpose Fuse 2 GPR2_CFG0, located in bank 47; word 376. root@imx91evk:~# ./fuse_test read 47 0 ret: 0 fd : 3 READ Bank: 47, Word: 0, Offset: 376 SUCCESS: pread operation resp_len = 4 resp_buf[0] = |0| resp_buf[1] = |0| resp_buf[2] = |0| resp_buf[3] = |0| This fuse is protected by General Purpose 2 Fuse Lock GPR2_LOCK [2:0] in Packed_FuseIndex 291. Calculate word bits from AN14954 section 3.2 Devices with ELE-AP. root@imx91evk:~# ./fuse_test read 1 1 ret: 0 fd : 3 READ Bank: 1, Word: 1, Offset: 9 SUCCESS: pread operation resp_len = 4 resp_buf[0] = |93| resp_buf[1] = |34| resp_buf[2] = |0| resp_buf[3] = |0| This way, GPR2_LOCK [2:0] = 010, it means that it's in Over-ride Protect and you can burn the fuse. root@imx91evk:~# ./fuse_test write 47 0 ret: 0 fd : 3 READ Bank: 47, Word: 0, Offset: 376 SUCCESS: pread operation resp_len = 4 resp_buf[0] = |5| resp_buf[1] = |0| resp_buf[2] = |0| resp_buf[3] = |0| INFO: Fuse previous valueWRITE Bank: 47, Word: 0, Offset: 376 Enter fuse value (e.g. 0xAA1234BB): 0x4A4F5345 You entered: 0x4A4F5345 (1246712645 decimal) SUCCESS: pwrite operation INFO: Please reset the device for fuse read confirmation 0x4A 0x4F 0x53 0x45 are the uppercase 4 first letters of Joseph. u-boot=> fuse read 47 0 Reading bank 47: Word 0x00000000: 4a4f5345 Conclusion. This tool is capable of reading and burning fuses from i.MX 93 and i.MX 91, it's scalable to i.MX 9 series. iMX95 Latest ELE firmware release, does not support programming SRK values from user space. Required runtime firmware enabling this functionality is planned for next release. This tool is provided by SW and support teams, as is, they were developed under LF6.12.49. Under the BSD-3 license. Please confirm bank and word, if needed create a support ticket, this post is not responsible incorrect usage. Tested in FRDM-i.MX91 Written in C LF-6.12.49
View full article
RT1170 USB CDC は、実行されていないコードにブレークポイントを設定しても kStatus_USB_Busy で停止します。 こんにちは、 私は i.MX RT1170 (M7 コア) で以下の作業を行っています: SDKバージョン25.09 FreeRTOS USB CDC (仮想COM) CAN-FDの並列実行 初期化は正常です。 USB 列挙が正常に完了しました。 通常実行中は、CAN-FD と USB 通信は両方とも正常に動作します。 通常の状態でのシステムの動作: CAN-FDはデータを正しく受信します USB CDCはPC(Tera Term)にデータを正常に送信します USB_DeviceCdcAcmSend() は期待通りに動作します USBコールバックが実行され、ビジーフラグが適切にクリアされます 問題: プロジェクトの任意の場所にブレークポイントを配置すると、現在実行されていないコード内であっても (たとえば、初期化後の main() 内や関連のない関数内)、システムは実行を継続しますが、USB CDC は最終的に停止してしまいます。 重要な観察事項: ブレークポイントはヒットしていません。 コードは正常に実行され続けます。 FreeRTOS タスクは実行を継続します。 CAN-FD は正常に動作し続けます。 USB CDC のみが機能を停止します。 この現象が発生すると、次のようになります。 USB_DeviceCdcAcmSend() は kStatus_USB_Busy を返します USB転送コールバックが呼び出されない ビジーフラグが消えない ボードをリセットするまでUSB通信は永久に停止します 実行時に printf() を使用した場合でも、同様の動作が引き起こされることがあります。 構成: #define configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY 2 #USB_DEVICE_INTERRUPT_PRIORITY (6U) を定義します。 USBタスクスタックサイズ: #APP_TASK_STACK_SIZE を 8000L と定義します スタックオーバーフローは発生しません。 システムはクラッシュしません。 USB CDC 通信のみが停止します。 質問: 実行されていないコードにブレークポイントが設定されている場合でも、USB CDC が停止するのはなぜですか? デバッガーは、USB HS タイミングに影響を与えるような方法で M7 コアを一時的に停止しますか? USB 割り込みの遅延サービスにより、CDC ドライバが永続的に kStatus_USB_Busy 状態のままになる可能性はありますか? これは、CPU が停止したときの USB HS コントローラ (EHCI) の予想される動作ですか? 転送の破損を起こさずに RT1170 上の USB CDC をデバッグするための推奨方法は何ですか? どのようなご指導でもいただければ幸いです。 よろしくお願いします。 USB Re: RT1170 USB CDC stuck in kStatus_USB_Busy even when breakpoint is placed in non-executing code こんにちは@Harisha 弊社の製品にご興味をお持ちいただき、またコミュニティをご利用いただき誠にありがとうございます。 問題に関しては、次の調整を試すことをお勧めします。 1:USB がタイムリーな割り込みサービスを確実に受信できるように、USB 割り込み優先度を FreeRTOS が管理できる最高の優先度に設定します。 2:他のモジュール(アプリケーション内の CAN-FD など)の割り込み優先度を下げて、USB プロセッシングが停止しないようにします。 これらの変更を試して、もう一度テストしてください。   よろしくお願いいたします。 メイリュー  
View full article
链接文件 我试图将 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.
View full article
PFE MCAL driver receiver processing may have reentrancy issue Hi Team From PFE MCAL driver 1.6.0, the receiver processing may have reentrancy issue. The call relationship of function pfe_hif_drv_process_rx_frames() is shown as the following figure.  The _Receive, TxConfirmation and MainFunction will call pfe_hif_drv_process_rx_frames when driver works in polling mode. If the callers are in different tasks, pfe_hif_drv_process_rx_frames has a risk of reentrancy. Should we add exclusive protection for pfe_hif_drv_process_rx_frames ? Regards, Ryder PFE PFE MCAL Re: PFE MCAL driver receiver processing may have reentrancy issue Hello @Ryder_Gong, The PFE team has picked up the case, also who is the customer that reported this? Best regards,  Radu Re: PFE MCAL driver receiver processing may have reentrancy issue Hi, The original issue is from Mobileye, actually software team has involved by a debug call. Re: PFE MCAL driver receiver processing may have reentrancy issue Hello Ryder.  Thank you for finding the race condition. It was confirmed as cause of the "Rx stops working" issue and bug ticket ANET-1032 was created to fix it. It will be fixed by adding an exclusive area protection as you have proposed. The bug affects all versions of the PFE MCAL driver, in polling mode, and it will be fixed in version 1.8.0.
View full article
DDR4 calibration issues on LS1046 custom board Good day! We are trying to bring up our custom LS1046-based board up and stucked with DDR4 calibration procedure. SPD data of the modules is red successfully, calibration process starts successfully too, but after that it fails with this reason(log from CodeWarrior 😞  ############################### Run 1 Result for: wrlvl_searcher  ###################################### Test result: [ ============================================================ Updated: WRLVL_CNTL = 0x8655F605, WRLVL_CNTL_2 = 0x00000000, WRLVL_CNTL_3 = 0x00000000, SDRAM_CLK_CNTL = 0x02800000 ============================================================ Updated: WRLVL_CNTL = 0x8655F60A, WRLVL_CNTL_2 = 0x0B0B0C0F, WRLVL_CNTL_3 = 0x0F10110D, SDRAM_CLK_CNTL = 0x02800000 ============================================================ Updated: WRLVL_CNTL = 0x8655F60A, WRLVL_CNTL_2 = 0x0B0B0C0F, WRLVL_CNTL_3 = 0x0F101115, SDRAM_CLK_CNTL = 0x02800000 ============================================================ Updated: WRLVL_CNTL = 0x8655F60A, WRLVL_CNTL_2 = 0x0B0B0C0F, WRLVL_CNTL_3 = 0x0F10111D, SDRAM_CLK_CNTL = 0x02800000 Write Leveling start values are correct and require no further modification, but the test failed due to other issues. Most common failure causes: -incorrect values configured in DDR4 DQn_MAP registers -incorrect ODT values -incorrect driver strength selected -incorrect timing values selected for Timing Configuration 0 properties (TIMING_CFG_0 register) < > {{Write Leveling start values are correct and require no further modification, but the test failed due to other issues.}} Err. capture registers: 0xE20, 0xDEADBEEF 0xE24, 0xDEADBEEF 0xE28, 0x00000000 0xE40, 0x00000000 0xE44, 0x00000000 0xE48, 0x0000001D 0xE4C, 0x60FF2001 0xE50, 0x00001FC0 0xE54, 0x00000000 0xE58, 0x00010000  ############################################ DQ mapping seems to be OK - we have 1:1 mapping from CPU to DDR slot, so we use DQ mappings from DDR module SPD without changing. What can be the problem?  Re: DDR4 calibration issues on LS1046 custom board Is there available RCW on the customer board? Has the ASLEEP led turned on and off? What's the frequency of the DDR clock? Thanks Re: DDR4 calibration issues on LS1046 custom board DDR calibration is performed using a hardcoded RCW. System clock - 100 MHz  DDR bus clock - 800 MHz, DDR data rate - 1600 mt/s Memory module - non-ECC. One interesting thing - from timer to time the 1 st stage of calibration (wrtlvl search) is successfully passed. For example: Test result: [ ================================================= Updated: WRLVL_CNTL = 0x8655F605, WRLVL_CNTL_2 = 0x00000000, WRLVL_CNTL_3 = 0x00000000, SDRAM_CLK_CNTL = 0x02800000 ============================================================ Updated: WRLVL_CNTL = 0x8655F609, WRLVL_CNTL_2 = 0x0A0B0C0E, WRLVL_CNTL_3 = 0x0F10110D, SDRAM_CLK_CNTL = 0x02800000 ============================================================ Updated: WRLVL_CNTL = 0x8655F609, WRLVL_CNTL_2 = 0x0A0B0C0E, WRLVL_CNTL_3 = 0x0F101115, SDRAM_CLK_CNTL = 0x02800000 ============================================================ Updated: WRLVL_CNTL = 0x8655F609, WRLVL_CNTL_2 = 0x0A0B0C0F, WRLVL_CNTL_3 = 0x0F10111D, SDRAM_CLK_CNTL = 0x02800000 < > Err.capture registers: 0xE20, 0x00000000 0xE24, 0x00000000 0xE28,0x00000000 0xE40,0x00000000 0xE44,0x00000000 0xE48, 0x0000001D 0xE4C, 0x00000000 0xE50,0x00000000 0xE54,0x00000000 0xE58, 0x00010000 Dump: 0xF00,0x00000000 0xF04, 0x00000002 0xF08, 0x0000000F 0xF0C,0x14000C20 0xF10, 0x00000000 0xF14, 0x00000000 0xF18, 0x00000000 0xF1C, 0x00000000 0xF20, 0x00000000 0xF24, 0x2F003000 0xF28, 0x32003400 0xF2C, 0x39003B00 0xF30, 0x3C003E00 0xF34, 0x00005000 0xF38, 0x00000000 0xF3C, 0x00000000 0xF40, 0x00000000 0xF44, 0x00000000 0xF48, 0x00000001 0xF4C, 0xD4000000 0xF50, 0x13001500 0xF54, 0x17001900 0xF58, 0x1D001F00 0xF5C, 0x21002200 0xF60, 0x3A000000 0xF64, 0x00009000 0xF68, 0x00000020 0xF6C, 0x00000000 0xF70, 0x0070006F 0xF74, 0x00000000 0xF78, 0x00000000 0xF7C, 0x00000000 0xF80, 0x00000000 0xF84, 0x00000000 0xF88, 0x00000000 0xF8C, 0x00000000 0xF90, 0x00000000 0xF94, 0x80000000 0xF98, 0x00000000 0xF9C, 0x34043104 0xFA0, 0x35043304 0xFA4, 0x31043304 0xFA8, 0x2F043104 0xFAC, 0x04040000 0xFB0, 0x00000003 0xFB4, 0x1F1E1F21 0xFB8, 0x1E1C1F1D 0xFBC, 0x1F1B1D1E 0xFC0, 0x1C1B1C1C 0xFC4, 0x1F1E1F22 0xFC8, 0x1F1F2120 0xFCC, 0x1F1E1F20 0xFD0, 0x1C1D201F 0xFD4, 0x1F1B1B1E 0xFD8, 0x1F1D1E1C 0xFDC, 0x1F1F1D1F 0xFE0, 0x1F1D1E1C 0xFE4, 0x1F1C191A 0xFE8, 0x1C1D1C1A 0xFEC, 0x1F1E1C1E 0xFF0, 0x1E1F1E1A 0xFF4, 0x1F1F1F1F 0xFF8, 0x1F1F1F1F 0xFFC, 0x1F000000 Data: 0x00000009 0x0000000a 0x0000000b 0x0000000c 0x0000000f 0x0000000f 0x00000010 0x00000011 0x0000001d   Just after that I start calibration process again(without any changes in settings) and get a fail: ########## Result for: wrlvl_searcher ######  Test result: [ Updated: WRLVL_CNTL = 0x8655F605, WRLVL_CNTL_2 = 0x00000000, WRLVL_CNTL_3 = 0x00000000, SDRAM_CLK_CNTL = 0x02800000 ============================================================ Updated: WRLVL_CNTL = 0x8655F609, WRLVL_CNTL_2 = 0x0A0B0C0E, WRLVL_CNTL_3 = 0x0F10110D, SDRAM_CLK_CNTL = 0x02800000 ============================================================ Updated: WRLVL_CNTL = 0x8655F609, WRLVL_CNTL_2 = 0x0A0B0C0E, WRLVL_CNTL_3 = 0x0F101115, SDRAM_CLK_CNTL = 0x02800000 ============================================================ Updated: WRLVL_CNTL = 0x8655F609, WRLVL_CNTL_2 = 0x0A0B0C0E, WRLVL_CNTL_3 = 0x0F10111D, SDRAM_CLK_CNTL = 0x02800000 Write Leveling start values are correct and require no further modification, but the test failed due to other issues. Most common failure causes:   - incorrect values configured in DDR4 DQn_MAP registers  - incorrect ODT values  - incorrect driver strength selected  - incorrect timing values selected for Timing Configuration 0 properties (TIMING_CFG_0 register) < > {{Write Leveling start values are correct and require no further modification, but the test failed due to other issues.}} Err. capture registers: 0xE20, 0xDEADBEEF     0xE24, 0xDEADBEEF     0xE28, 0x00000000     0xE40, 0x00000000      0xE44, 0x00000000     0xE48, 0x0000001D     0xE4C, 0x60FF2001     0xE50, 0x00001FC0      0xE54, 0x00000000     0xE58, 0x00010000      Dump: 0xF00, 0x00000000     0xF04, 0x00000002     0xF08, 0x0000000E     0xF0C, 0x14000C20      0xF10, 0x00000000     0xF14, 0x00000000     0xF18, 0x00000000     0xF1C, 0x00000000      0xF20, 0x00000000     0xF24, 0x2F003100     0xF28, 0x33003400     0xF2C, 0x3A003A00      0xF30, 0x3C003E00     0xF34, 0x00005000     0xF38, 0x00000000     0xF3C, 0x00000000      0xF40, 0x00000000     0xF44, 0x00000000     0xF48, 0x00000001     0xF4C, 0xD4000000      0xF50, 0x13001500     0xF54, 0x17001900     0xF58, 0x1D001F00     0xF5C, 0x21002200      0xF60, 0x3A000000     0xF64, 0x00009000     0xF68, 0x00000020     0xF6C, 0x00000000      0xF70, 0x0070006F     0xF74, 0x00000000     0xF78, 0x00000000     0xF7C, 0x00000000      0xF80, 0x00000000     0xF84, 0x00000000     0xF88, 0x00000000     0xF8C, 0x00000000      0xF90, 0x00000000     0xF94, 0x80000000     0xF98, 0x00000000     0xF9C, 0x31022F02      0xFA0, 0x33023102     0xFA4, 0x30023102     0xFA8, 0x2E022F02     0xFAC, 0x02020000      0xFB0, 0x10000003     0xFB4, 0x46444650     0xFB8, 0x45445142     0xFBC, 0x51445052      0xFC0, 0x46454544     0xFC4, 0x45434651     0xFC8, 0x44455045     0xFCC, 0x46455051      0xFD0, 0x45455146     0xFD4, 0x52505052     0xFD8, 0x52505246     0xFDC, 0x50464546      0xFE0, 0x51465042     0xFE4, 0x53464650     0xFE8, 0x52515145     0xFEC, 0x50454546      0xFF0, 0x45505142     0xFF4, 0x46464646     0xFF8, 0x52515350     0xFFC, 0x00000000        Data:  0x00000009 0x0000000a 0x0000000b 0x0000000c 0x0000000e 0x0000000f 0x00000010 0x00000011 0x00000025  ######################################################## Also I' ve noticed that Lane 8 is probed during calibration process, despite to that fact that ddr module is non-ecc and ecc is disabled in project settings.   Re: DDR4 calibration issues on LS1046 custom board 1.The QCVS does not support hardcoded RCW official, valid RCW has to be presented in the RCW source flash or SD card. Would you kindly program the RCW into the flash first, and then do the QCVS DDR validation. 2.Run the command below in the CCS: (bin) 42 % delete all (bin) 43 % config cc cwtap (bin) 44 % show cc (bin) 45 % ccs::config_chain {ls1043a dap sap2} (bin) 46 % display ::ccs::get_config_chain (bin) 47 % ccs::reset_to_debug Send the logs to me. 3.would you kindly share the schematics and confirm the layout follow the AN5097, Hardware and Layout Design Considerations for DDR4 SDRAM Memory Interfaces Thanks Re: DDR4 calibration issues on LS1046 custom board The problem was solved by updating to new version of QCVS(4.27.0)
View full article
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
View full article
こんにちは、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 を使用してアプリケーションにデプロイするためのガイドです。
View full article
Freed Buffer out of Range Issue in Ethernet for RT1170 Hi, I am trying to execute basic ethernet testing from custom project on custom board. As a part of this project (which integrates different modules like SD card, CAN ,GPIO,ADC, Ethernet and EEPROM) basic ethernet send and receive is to be verified. But I am facing "freed buffer out of range error" before ping send. I have done all the basic initializations and configurations related to ethernet. I see the error is observed because of line  LWIP_ASSERT("Freed buffer out of range", ((idx >= 0) && (idx < ENET_RXBUFF_NUM))); in function "ethernetif_rx_free" (enet_ethernetif_kinetis.c) where the idx value I am getting it in negative. This complete functionality is working on EVK kit. What could be missing? Kindly suggest. Re: Freed Buffer out of Range Issue in Ethernet for RT1170 Hi, All The issue happens to me too on my RT1024 customer board, it is likely to happen when i put a breakpoint somewhere and it stops here, and then resume to normal running is more likely  ends up this error. Regards! Ping Re: Freed Buffer out of Range Issue in Ethernet for RT1170 If the example project is working fine in your custom board, seems the problem is on SW side. You are not using FreeRTOS right? Seems there is something interfering with the behavior of the example, probably some configurations are missing or just the example flow is being affected due the rest of the application. I would recommend you to try to use the latest SDK release which is 2.15.000. If your issue still occurs with this release, then I’m afraid there is something wrong with the flow of your application. Regards, Daniel. Re: Freed Buffer out of Range Issue in Ethernet for RT1170 Hi, Yes, the issue appears when implementing the merged source code in custom board. But, the individual source of Ethernet_ping,which was not merged with remaining interfaces is working fine in Custom board. Problem arises when the individual source of Ethernet is merged with remaining interfaces. Re: Freed Buffer out of Range Issue in Ethernet for RT1170 If I am understanding correctly, when you run the SDK example it works. But when you add your custom application, the issue appears. Can you confirm? Regards, Daniel. Re: Freed Buffer out of Range Issue in Ethernet for RT1170 Hi, Actually the individual source code of Ethernet is working fine in Custom board. When I'm trying to integrate the code then Ethernet is not working. I observed that EIR register's 25th (RXF), 26th (TXB), and 27th (TXF) bits are set to 0, and the RDAR register's 24th bit is updated to 0. But in working code of Ethernet this registers are set to '1'.  I suspect that these register updates are handled by interrupts, but I am unable to locate the specific handler responsible for these updates in my custom project codebase. Kindly help me. Re: Freed Buffer out of Range Issue in Ethernet for RT1170 Could you please double check if there are any peripheral changes (i.e. peripheral instances) needed in your project in order to make the EVK example work in your custom hardware? In case you already verified this, seems the problem is on the HW side. By any chance have you already verified your design with the HDG? Regards, Daniel. Re: Freed Buffer out of Range Issue in Ethernet for RT1170 Hi, I am using SDK version 11.6.1. I'm trying to test lwip_ping_bm_cm7 example. It is working fine in EVK. But it is not working in custom board when tried to interface all the source codes with Ethernet. What might be the issue if we are facing "Freed Buffer out of range" occurs. Please help me with this. Re: Freed Buffer out of Range Issue in Ethernet for RT1170 Hi, What SDK version are you using? What is the SDK example you are using to test this? If I understood correctly, the application works fine in an EVK, am I right? Regards, Daniel.
View full article
T4240から間違ったIDCODEを読み取ったため、USB-TAP経由でダウンロードできません T4240 (T4240RDB に類似) をベースにしたボードをデバッグしています。私の問題は、Codewarrior で USB-TAP 経由でコードをダウンロードできないことです。 1.ハードコードされた RCW をテストしたところ、T4240 は電源投入後約 10 ミリ秒以内に RESET_REQ をアサートすることがわかりました。 2. Codewarrior によって「JTAG チェーンを正しく構成できませんでした」というエラー メッセージが表示され、コンソールに表示されるチップ IDCODE は、QorIQ T4240 リファレンス マニュアルに記載されている 0x0022001d ではなく、0x1022001d になります。 3. Codewarrior のコンソールの出力メッセージには、「エラー メッセージ: T4240: トランザクション中に HRESET が発生しました」と表示されました (以下に添付)。 4. 電源とクロックをすべて測定しましたが、問題ないようです。 誰かこの問題を解決するのを手伝ってくれませんか? ---------------------------------------------------------------------------- ccs_open ipaddr = 127.0.0.1 ポート = 41475 タイムアウト = 15 サーバーh = 0 ccs_open; ccs_error = 0 ccs_get_connection_count サーバーh = 0 カウント = 1 ccs_get_connection_count; ccs_error = 0 ccs_available_connections サーバーh = 0 カウント = 1 ccs_available_connections; ccs_error = 0 ccs_available_connections サーバーh = 0 カウント = 1 ccs_available_connections; ccs_error = 0 ccs_cc_バージョン サーバーh = 0 cc = 0 バージョン.メジャー = 1 バージョン.マイナー = 3 ccs_cc_version; ccs_error = 0 ccs_set_timeout サーバーh = 0 タイムアウト = 15 ccs_set_timeout; ccs_error = 0 ccs_available_connections サーバーh = 0 カウント = 1 ccs_available_connections; ccs_error = 0 ccs_config_server サーバーh = 0 cc = 0 サーバー構成 = 0 値 = 4040 ccs_config_server; ccs_error = 0 ccs_config_chain サーバーh = 0 cc = 0 device_list: (サイズ = 1) デバイス[0]:: core_type=テストコア(20) ccs_config_chain; ccs_error = 0 ccs_jtag_ロック サーバーh = 0 cc = 0 ccs_jtag_lock; ccs_error = 0 JTAG診断   プローブ テスト時の始動電力... テスト結果: 合格   IR スキャン テストを開始しています... テスト結果: 合格   バイパス スキャン テストを開始しています... テスト結果: 合格   任意の TAP 状態移動テストを開始しています... テスト結果: 合格   検出されたJTAG IDコード: OK デバイス0 IDコード: 0x1022001D   ccs_jtag_unlock サーバーh = 0 cc = 0 ccs_jtag_unlock; ccs_error = 0 ccs_config_chain サーバーh = 0 cc = 0 device_list: (サイズ = 1) デバイス[0]:: core_type=T4240(206) ccs_config_chain; ccs_error = 39 エラーメッセージ: T4240: トランザクション中に HRESET が発生しました ccs_get_subcore_error サーバーh = 0 cc = 0 エラー = 60 チェーン位置 = 0 ccs_get_subcore_error; ccs_error = 0; 期間=2ミリ秒 ccs_close サーバーh = 0 ccs_close; ccs_error = 0 Re: Wrong IDCODE read from T4240 and cannot download via USB-TAP こんにちは、 CW の問題のスクリーンショットを共有してください。RCW が間違っている可能性があります。RCWは SB_EN ビットが設定されたターゲットにロードされましたか? 他のボードでもこの問題は発生しますか? WCTAP が他のデバイスで正しく動作していることを確認できますか? Re: Wrong IDCODE read from T4240 and cannot download via USB-TAP サポートありがとうございます。スクリーンショットを以下に添付します。ハードコードされた RCW を使用しており、この場合 SB_EN は無効になっています。私は 5 つのボードを持っていますが、すべて同じ問題で動作しています。現時点では、USB-TAP をテストできるリファレンス ボードがありません。 Re: Wrong IDCODE read from T4240 and cannot download via USB-TAP こんにちは、 RCW が有効でないか、JTAG クロック速度が速いことが原因である可能性があります。JTAGクロック速度を下げて試してください。
View full article
S32N55: ストリームゲートを無効にするRTD API こんにちは、チームの皆さん S32N55 リファレンス マニュアルによると、1588 タイマーの TMROFF_H/L を変更する前に、ストリーム ゲート インスタンスを無効にする必要があります。 現在、RTD のストリーム ゲート機能を無効にする API があるかどうか教えてください。 BR、 ブリジット RTD Re: S32N55: RTD API to disable the Stream Gate こんにちは、 ユーザーマニュアルを再度確認して確認します Re: S32N55: RTD API to disable the Stream Gate こんにちは@Bridget S32N_RTD_R21-11_1.8.0_CD07 のユーザー マニュアルによると、ストリーム ゲートを有効/無効にするには、構成ツール (EB Tresos) で設定します。 EthCtrlConfigEnableStreamGating = FALSE 設定 Re: S32N55: RTD API to disable the Stream Gate こんにちは、クオンさん。 gPTP 同期中など、場合によっては、実行時に TMROFF_H/L の値を更新する必要がある場合があります。S32N55 リファレンス マニュアルによると、1588 タイマーの TMROFF_H/L を変更する前に、Stream Gate インスタンスを無効にする必要があります。 このような状況では、Stream Gate 機能を無効/有効にする API が必要であると考えます。あなたが言及した EB の構成では、このシナリオを処理できないようです。 現在、RTD にストリーム ゲート機能を無効/有効にする API があるかどうか教えてください。 BR、 ブリジット
View full article
MCXN647との接続問題(Ee(42)エラー) こんにちは、 FRDM-MCXN947に問題があります。プロジェクトをデバッグまたはフラッシュしようとすると、次のエラーが発生します。 関係があるかどうかはわかりませんが、while(1) ループのこの行を変更して頻度を上げたときに発生しました: SDK_DelayAtLeastUs( 30000 , SystemCoreClock); -> SDK_DelayAtLeastUs( 10000 , SystemCoreClock); 問題が発生する前にアップデートしていなかったのですが、その後LinkFlashをアップデートしても何も解決しませんでした。 すでに SPT 消去を試しましたが、機能しませんでした。(多分、やり方が間違っていたのでしょう。) SPT では、ISP モードを有効にした後、「イメージの構築」および「イメージの書き込み」操作を実行できましたが、消去はまだ機能しません。 ご協力をよろしくお願いいたします。 追伸: 英語と専門用語が下手で申し訳ありません。私は工学部でこのプロジェクトを始めたばかりです。 ブートROM|ブート|フラッシュ クロック|タイマー MCX N USB Re: Connection problem with MCXN647 (Ee(42) error) こんにちは@Peter-D SPT ツール内のフラッシュ プログラマーを使用して、blinky SDK デモを消去およびプログラムし、正常に動作するかどうかを確認してください。詳細は添付の動画をご参照ください。 これらの手順がうまく機能しても、オンボード デバッガーでデバッグできない場合は、外部デバッガーを使用してテストしてください。 まだ問題がある場合は、お気軽にお問い合わせください。 よろしくお願いします。 BR アリス Re: Connection problem with MCXN647 (Ee(42) error) こんにちは@Alice_Yang 、 ご返信ありがとうございます。 ビデオの指示に従いましたが、その方法で LED が点滅しました。 ただし、MCUXpresso IDE からデバッガーに戻ると、同じエラーが発生します。 問題がオンボード デバッガーから発生している場合、特に私が使用しているボードは学校で貸与されたものなので、PEMicro や SEGGER J-Link (それが言及されている場合) などの外部デバッガーを購入するつもりはありません。 解決策が見つからない場合は、私のプロジェクトでも機能するフラッシュ プログラマーを引き続き使用し、教授に外部デバッガーがあるかどうかを尋ねます。 よろしくお願いいたします。 ピーター Re: Connection problem with MCXN647 (Ee(42) error) こんにちは@Peter-D あなたのボード上のデバッガーが実際に壊れているかどうかはわかりません。次の手順に従って、デバッガー ファームウェアを更新してください: https://docs.nxp.com/bundle/UM12018/page/topics/Updating_MCU_Link_firmware.html 更新後、ボードの電源を入れ直し、MCUXpresso IDE で新しいワークスペースを作成し、新しい SDK デモをインポートして、再度デバッグを試みます。 ビデオを撮って私と共有していただけると嬉しいです。確認をお手伝いします。 よろしくお願いします。     BR アリス Re: Connection problem with MCXN647 (Ee(42) error) こんにちは@Alice_Yang ご返信よろしくお願いします。 提案されたとおりに LinkServer を更新しましたが、問題が発生した後にすでに更新されていたと思います。とにかくもう一度アップデートを試み、ボードの電源を入れ直し、新しいワークスペースを作成し、デモ プロジェクトをインポートしましたが、デバッグしようとすると同じ Ee(42) エラーが発生します。 プロセスを示す短いビデオを録画したので添付します。 ご協力ありがとうございました。良い新年をお迎えください。 よろしくお願いします、 ピーター Re: Connection problem with MCXN647 (Ee(42) error) こんにちは@Peter-D ビデオをありがとう。 .launch ファイル (下の画像) を削除して、ボードを再度消去してください。 デバッグを開始するには、下の図に示すデバッグ ボタンを使用します。 それでも動作しない場合は、ボードを交換することをお勧めします。 ちなみに、私は正月休みを頂き、1月5日に復帰します。もしご不明な点がございましたら、当日にお問い合わせください。 ご理解のほどよろしくお願いいたします。新年あけましておめでとうございます。 BR アリス
View full article
Unable to flash S32K146EVB-Q144 board as D1 glowing red I have a S32K146EVB-Q144 evaluation board which was working fine initially. During a debug session where I had implemented Lin stack, it stopped working. When i reset my controller i see a continuous Red light on D1 and other two green lights are still there. I've used J10 and J107 at position 2-3 to select power from USB source and J104 at position 2-3 to select OpenSDA app flash mode. Now my controller is not getting detected at all by S32DS. I tried following the steps mentioned in below post as symptom seems exactly same. Re: S32K144 D2 RED LED is ON always - NXP Community Here I was able to halt the processor in OpenSDA using P&E Kinetics Recovery Tool but still not able to flash any new application. Even if halt is achieved, i am not able to flash it again and red light is still on. Controller is able to go into bootloader mode as well by adjusting jumper J104 and i was actually able to flash ne bootloader app in it as well. But somehow I am not able to write the flash again, and if i try flashing any example .srec file, D2 keeps on flashing periodically (usually in successful flashing it blinks once and then app starts running). So in a nutshell : -Controller is not able to reach main or getting continuous resets -Controller is not able to write the flash again (could be security issue). I did tried mentioned techniques in above thread except the one involving SEGGER-JLINK as I dont have that debug probe. I do have a PE Multilink Universal with me but its not able to recover/erase the flash as well. Here are the details of board : Board Name is: S32K146EVB-Q144 MicroBoot Kernel Version is: 1.08 Bootloader Version is: 1.13 Installed Application: PEMicro EVB-S32K144 Mass Storage/Debug App Application Version is: 1.25 DUID is: 39A33939-91818199-37539805-F97AE678 EUID is: 4141A238-1BDB8733-1854BA22-D38368D6 TUID is: 74823938-47328196-8576CC9B-0242983E TOA is: 86B6E505-56F042E0-79B2A114-62BA758F TOA2 is: 86B6E505-EB1A8A7C-AF6E54B6-43532420 SUID is: 86B6E505-5BA18877-37239804-8003EC65 Is MCU locked permanently ? If not how can i recover my board ? Is there any h/w failure I am looking at ? (Just FYI D2 and D3 glows green which i think means my 5V and 3.3V power rails are working fine) Is there a physical way to mass erase ? (Cant use S32DS emergency kinetics option as board is not detectable there at all).  Can grounding any pin of OpenSDA chip leads to erase of flash memory ? Re: Unable to flash S32K146EVB-Q144 board as D1 glowing red Please note that during the Christmas holiday period, our support response times may be longer than usual. In some cases, your request might be addressed after the New Year. Thank you for your understanding. Re: Unable to flash S32K146EVB-Q144 board as D1 glowing red Hi After the P&E Recovery Utility halt MCU, close the tool. Then follow the Step 3 or Step 4 to reprogram the S32K146. I'm not sure if this is due to the Application Version is: 1.25 . Please press and hold the reset button SW5, then insert the USB cable and place MSD-DEBUG-S32K146EVB-Q144_Pemicro_v121.SDA into the BOOTLOADER drive. This will update the Application Version to 1.21. I've also attached lpit_periodic_interrupt_s32k146.srec. By the way, you don't need external Segger J-Link. If you follow Step6:Inserting J7 while holding down SW5 puts OpenSDA into BOOTLOADER mode. And then drop SEGGER J-Link application firmware into it(OpenSDA_V1.bin).  The onboard debugger will then become J-Link.  Best Regards, Robin ------------------------------------------------------------------------------- Note: - If this post answers your question, please click the "ACCEPT AS SOLUTION" button. Thank you! - We are following threads for 7 weeks after the last post, later replies are ignored Please open a new thread and refer to the closed one, if you have a related question at a later point in time. ------------------------------------------------------------------------------- Re: Unable to flash S32K146EVB-Q144 board as D1 glowing red Hello Robin, Thank you for your prompt response, well I tried rolling it back to MSD-DEBUG-S32K146EVB-Q144_Pemicro_v121.SDA,  Its behaving the same way, bootloader app is flashed but D1 still glowing red and I am not able to flash .srec file after halting it using kinetis recovery tool. I see that controller is trying to flash the srec but fails since D2 blinks periodically(usually it blinks only 3-4 times and app is flashed). I then tried switching the bootloader to  OpenSDA_V1.bin, I tried attempting connection using J-Link commander afterwards and I see following logs : SEGGER J-Link Commander V8.94 (Compiled Dec 10 2025 14:50:47) DLL version V8.94, compiled Dec 10 2025 14:49:54 Connecting to J-Link via USB...O.K. Firmware: J-Link OpenSDA compiled Jan 31 2023 13:42:36 Hardware version: V1.00 J-Link uptime (since boot): 0d 00h 00m 28s S/N: 621000000 VTref=3.300V Type "connect" to establish a target connection, '?' for help J-Link>connect Please specify device / core. : S32K146 Type '?' for selection dialog Device>S32K146 Please specify target interface: J) JTAG (Default) S) SWD T) cJTAG TIF>SWD Specify target interface speed [kHz]. : 4000 kHz Speed>100 Device "S32K146" selected. Connecting to target via SWD ConfigTargetSettings() start ConfigTargetSettings() end - Took 22us InitTarget() start SWD selected. Executing JTAG -> SWD switching sequence. Timeout while halting CPU. InitTarget() end - Took 392ms Found SW-DP with ID 0x2BA01477 DPv0 detected CoreSight SoC-400 or earlier Scanning AP map to find all available APs AP[2]: Stopped AP scan as end of AP map has been reached AP[0]: AHB-AP (IDR: 0x24770011, ADDR: 0x00000000) AP[1]: JTAG-AP (IDR: 0x001C0000, ADDR: 0x01000000) Iterating through AP map to find AHB-AP to use AP[0]: Core found AP[0]: AHB-AP ROM base: 0xE00FF000 CPUID register: 0x410FC241. Implementer code: 0x41 (ARM) Found Cortex-M4 r0p1, Little endian. FPUnit: 6 code (BP) slots and 2 literal slots CoreSight components: ROMTbl[0] @ E00FF000 [0][0]: E000E000 CID B105E00D PID 000BB00C SCS-M7 [0][1]: E0001000 CID B105E00D PID 003BB002 DWT [0][2]: E0002000 CID B105E00D PID 002BB003 FPB [0][3]: E0000000 CID B105E00D PID 003BB001 ITM [0][4]: E0040000 CID B105900D PID 000BB9A1 TPIU Initializing 126976 bytes work RAM @ 0x1FFF0000 Reset type: NORMAL (https://kb.segger.com/J-Link_Reset_Strategies) Reset: Halt core after reset via DEMCR.VC_CORERESET. Reset: Reset device via AIRCR.SYSRESETREQ. Reset: S_RESET_ST never gets cleared. CPU seems to be kept in reset forever. Reset: Using fallback: Reset pin. Reset: Halt core after reset via DEMCR.VC_CORERESET. Reset: Reset device via reset pin Reset: VC_CORERESET did not halt CPU. (Debug logic also reset by reset pin?). Reset: Reconnecting and manually halting CPU. Found SW-DP with ID 0x2BA01477 DPv0 detected CoreSight SoC-400 or earlier AP map detection skipped. Manually configured AP map found. AP[0]: AHB-AP (IDR: Not set, ADDR: 0x00000000) AP[0]: Core found AP[0]: AHB-AP ROM base: 0xE00FF000 CPUID register: 0x410FC241. Implementer code: 0x41 (ARM) Found Cortex-M4 r0p1, Little endian. CPU could not be halted Reset: Core did not halt after reset, trying to disable WDT. Reset: Halt core after reset via DEMCR.VC_CORERESET. Reset: Reset device via reset pin Reset: VC_CORERESET did not halt CPU. (Debug logic also reset by reset pin?). Reset: Reconnecting and manually halting CPU. Found SW-DP with ID 0x2BA01477 DPv0 detected CoreSight SoC-400 or earlier AP map detection skipped. Manually configured AP map found. AP[0]: AHB-AP (IDR: Not set, ADDR: 0x00000000) AP[0]: Core found AP[0]: AHB-AP ROM base: 0xE00FF000 CPUID register: 0x410FC241. Implementer code: 0x41 (ARM) Found Cortex-M4 r0p1, Little endian. CPU could not be halted Reset: Failed. Toggling reset pin and trying reset strategy again. Found SW-DP with ID 0x2BA01477 DPv0 detected CoreSight SoC-400 or earlier AP map detection skipped. Manually configured AP map found. AP[0]: AHB-AP (IDR: Not set, ADDR: 0x00000000) AP[0]: Core found AP[0]: AHB-AP ROM base: 0xE00FF000 CPUID register: 0x410FC241. Implementer code: 0x41 (ARM) Found Cortex-M4 r0p1, Little endian. Reset: Halt core after reset via DEMCR.VC_CORERESET. Reset: Reset device via AIRCR.SYSRESETREQ. Reset: S_RESET_ST never gets cleared. CPU seems to be kept in reset forever. Reset: Using fallback: Reset pin. Reset: Halt core after reset via DEMCR.VC_CORERESET. Reset: Reset device via reset pin Reset: VC_CORERESET did not halt CPU. (Debug logic also reset by reset pin?). Reset: Reconnecting and manually halting CPU. Found SW-DP with ID 0x2BA01477 DPv0 detected CoreSight SoC-400 or earlier AP map detection skipped. Manually configured AP map found. AP[0]: AHB-AP (IDR: Not set, ADDR: 0x00000000) AP[0]: Core found AP[0]: AHB-AP ROM base: 0xE00FF000 CPUID register: 0x410FC241. Implementer code: 0x41 (ARM) Found Cortex-M4 r0p1, Little endian. CPU could not be halted Reset: Core did not halt after reset, trying to disable WDT. Reset: Halt core after reset via DEMCR.VC_CORERESET. Reset: Reset device via reset pin Reset: VC_CORERESET did not halt CPU. (Debug logic also reset by reset pin?). Reset: Reconnecting and manually halting CPU. Found SW-DP with ID 0x2BA01477 DPv0 detected CoreSight SoC-400 or earlier AP map detection skipped. Manually configured AP map found. AP[0]: AHB-AP (IDR: Not set, ADDR: 0x00000000) AP[0]: Core found AP[0]: AHB-AP ROM base: 0xE00FF000 CPUID register: 0x410FC241. Implementer code: 0x41 (ARM) Found Cortex-M4 r0p1, Little endian. CPU could not be halted CPU could not be halted CPU could not be halted ****** Error: Failed to halt CPU. Memory zones: Zone: "Default" Description: Default access mode Cortex-M4 identified. J-Link> Re: Unable to flash S32K146EVB-Q144 board as D1 glowing red Please use an oscilloscope to observe the waveform of the reset pin, send me the waveform and tell me the reset period and high-level width. In some cases, it may be impossible to recover, and you may have to replace the S32K1 chip.   Connection strategies & recovery steps: Goal: give the debugger a chance to halt the core and neutralize problematic firmware. A. Lower SWD speed + “connect under reset” In 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 If it still fails, use manual connect‑under‑reset: Hold RESET_b low externally, power the board. Run connect in Commander. Release reset and immediately: J-Link> r J-Link> h J-Link> halt Try several times, especially with 100 kHz SWD speed—timing can be critical. B. Change J‑Link reset strategy Different Reset Strategy values behave differently. In Commander (exact IDs may vary by version): 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 Alternatively, try selecting "Connect under reset" in J-Link Commander. Re: Unable to flash S32K146EVB-Q144 board as D1 glowing red According to the S32K146EVB-SPF-29844-RB.pdf: J104 1-2 Reset signal from OpenSDA J10 2-3 P5V0 If you have an external 9V or 12V power supply, you can also try connecting J107 1-2 P5V_SBC. If you happen to have an external debugger, such as PEMicro Multilink, try using it to see if it can download programs for the S32K146. What was the last project downloaded? Is CSEc enabled? Please answer my previous questions and provide me with the reset signal measured using an oscilloscope.
View full article
SAF - ASIL Certification Hi Support, Customer is using S32K31 with SW32K3_SAF_1.0.5_D2503.  They are asking for our SAF ASIL certificates, or any document to show it is ASIL "ready/compliance". Regards, Marcus Safety_SW Re: SAF - ASIL Certification Hi Support, Any updates? Re: SAF - ASIL Certification Hi Marcus, for every premium SAF package there is possible to download Safety SW Assessment Summary report. For SAF 1.0.5 I can see that on Flexera available as well: S32K3_SAF_1.0.5_Safety_SW_Assessment_Summary.pdf Kind Regards, Radoslav Re: SAF - ASIL Certification Hi @marcuslim , It is now technically and legally restricted to share files with customers, only legal way is via sales force I think. Anyway, I wanted screenshot from nxp.com from SAF product page, same as I have shared, to see that is really missing. How does customer get the release? Safety Assessment should be there, everybody else can see that. I'm attaching here internally the report and let you find the way how to legally share the file with the customer. But please try to explain the customer proper way how to get it nxp.com=>Software accounts=>Automotive SW - S32K3 Premium Software=>Automotive SW - S32K3 - Safety Software Framework Kind Regards, Radoslav Re: SAF - ASIL Certification Thanks Radoslav! The customer has found the document.  We can close this thread. Regards, Marcus
View full article