Multi Source Translation Content

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

Multi Source Translation Content

Discussions

Sort by:
DRM099アプリケーションノートに関連する追加資料 皆様、 私は電気工学を専攻する学生で、永久磁石同期機のスライディングモードオブザーバについて学ぶために、「MC56F8013を使用したコンプレッサ用センサレスPMSMベクトル制御(スライディングモードオブザーバ付き)」(文書番号DRM099)という文書を使用しています。これまでのところ、このドキュメントは非常に役立っており、NXPが提供してくれたことに本当に感謝しています! 文書の中で著者らは「PMSM_SL_DQSMOBemfSpedObservSclUniv32()」、「EstimProcessing()」といった関数について言及しており、それらのコードを確認することは私にとって非常に役立つだろう。このようにして、DRM099で説明されている概念をより深く理解し、dqフレームにおけるSMOの実装と調整という課題に取り組めることを期待しています。ですので、もし無理がなければ、これらの追加ファイルや資料にアクセスできないかと思いまして。どんなことでも共有していただけると大変ありがたいし、役に立ちます。 お時間を割いてご検討いただき、誠にありがとうございます!素敵な一日をお過ごしください。 よろしくお願いいたします。 ラファエル Re: Additional materials related to DRM099 application note こんにちは、 @Rafael1 さん。 投稿ありがとうございます。以下の情報が、あなたが探しているものだと思います。 RDDSCPMSMVCSMO:コンプレッサー向けセンサーレスPMSMベクトル制御リファレンスデザイン MC56F8013 https://www.nxp.com/search?keyword=pmsm_sensorlesscl&start=0 ダウンロードリンク: https://www.nxp.com/webapp/Download?colCode =PMSM_SENSORLESSCL_DQHREL&appType=license&location=null お役に立てば幸いです。 BR セレステ Re: Additional materials related to DRM099 application note 本当にありがとうございます、 @Celeste_Liu  .exeファイルをダウンロードして実行した後スライドモードのオブザーバーでモーター制御のCコードを入手できました。まさに私が探していたものだった。 お時間を割いていただき、ご検討いただきありがとうございます!良い1日を! Re: Additional materials related to DRM099 application note お役に立てて嬉しいです!他に質問があれば、新しい投稿を作成してください。
View full article
MPC5748G: ユーザーモードでペリフェラルにアクセスしようとする際にMachineCheck例外が発生する こんにちは、 OpenPicortoをPowerPCプラットフォームに移植したところ、問題が発生しました。 PBRIDGEの設定は正しくできているのに、ユーザーモードでペリフェラルにアクセスしようとするたびにMachineCheckの例外が出ます。 スーパーバイザーモードは問題なく動作しますが、私が求めているものではありません。ユーザー/スーパーバイザーモードのマネジメント(+MPU)と、ユーザーモードでペリフェラルにアクセスできるようにしたいです。 いろいろ試してみましたが、どれもうまくいきません。私が何か間違ったことをしているのか、それともそもそも不可能なことなのか分かりません。 現時点では、デモンストレーション目的で全てをスーパーバイザーモードにしています。現在のコードの状態は以下のとおりです。 - PBRIDGEの設定を試みた結果: https://github.com/jnaulet/OpenPicoRTOS/blob/v1.11.x/arch/powerpc/e200z4/mach-mpc574x/startup.S - 無効化されたユーザーモード(arch_save_first_contextでは): https://github.com/jnaulet/OpenPicoRTOS/blob/v1.11.x/arch/powerpc/e200z4/picoRTOS_portasm.S - このシステムのデバッグに使用している完全なデモ: https://github.com/jnaulet/OpenPicoRTOS/tree/v1.11.x/demo/devkit-mpc5748g どんなご協力でもありがたいです。 敬具。 Re: MPC5748G: MachineCheck exception hen trying to access peripherals in user mode こんにちは、 ユーザーモードアクセス拒否には複数の理由があります: おそらくPBRIDGEまたはMPU構成でしょう。 以下から確認を始めることができます: PBRIDGE PACR/OPACRの初期化。 すべてのペリフェラルスロットがユーザーアクセスに設定されているかどうか。 MPU領域の定義対象: 0xFxxxxxxx ペリフェラル空間 読み取り/書き込み権限 スーパーバイザー/ユーザー属性。 RTOSがユーザーモードに切り替わった後のMSR値。 故障を引き起こす正確なペリフェラルアドレス。 IVOR1入力時のMCSR/ESR/DEAR。 よろしくお願いいたします。 ピーター
View full article
S32K342 FOTAブートローダーアーキテクチャに関するガイダンスが必要(UARTベースのアップデート) NXPチームの皆様、こんにちは。 S32K342向けにカスタムファームウェア無線アップデート(FOTA)ソリューションを開発しており、推奨されるフラッシュアーキテクチャとブートフローについてアドバイスをいただきたいと考えています。 MCU詳細 装置:S32K342 PFlash: 2 MB バンク0:1MB バンク1:1MB DFlash: 128 KB 現状 私たちはファームウェアアップデートインターフェースとしてUARTを使用しています。 これまでに、私たちは以下のことに成功しました: UART経由でファームウェア(.binファイル)を受信する バイナリ全体をフラッシュメモリに保存する 受信した画像が正しく保存されていることを確認してください。 残された課題は、ブートローダーアーキテクチャとアプリケーションスイッチングの仕組みを実装することです。 以下の点についてご説明をお願いいたします。 1. 推奨されるFOTAフラッシュレイアウト S32K342デュアルイメージFOTA実装における推奨メモリレイアウトは何ですか? 具体的には、以下の場所について推奨される場所を知りたいです。 ブートローダ アプリケーションスロットA アプリケーションスロットB メタデータ/ブートフラグ バージョン情報 CRC ロールバック情報 アドレスを含むメモリマップの例があると非常に助かります。 2. 推奨ブートフロー NXPが推奨する完全な起動手順を誰か説明してもらえますか? 例: リセット ブートローダーが起動します ブートフラグを確認する アクティブアプリケーションを選択してください 画像の検証(CRC/署名) アプリケーションへジャンプ フロー図またはプロセス全体の説明をいただけると幸いです。 3. ブートローダーからアプリケーションジャンプへ S32K342の場合、標準的なCortex-M7ジャンプシーケンスで十分でしょうか? 例: アプリケーションベースアドレスからMSPを読み込みます Reset_Handlerをベース+4から読み込む MSPを設定する VTORをアップデート Reset_Handlerへジャンプ 制御を移管する前に、S32K342固有の要件や初期化手順はありますか? 4. デュアルアプリケーションイメージ もしアプリAとアプリBが異なるフラッシュアドレスにある場合: 各アプリケーションに独自のリンカースクリプトを持つべきでしょうか? それともデュアルスロットアプリケーションをビルディングするための推奨されるNXPのアプローチはありますか? 5. フラッシュバンクの使用 S32K342には1MBのPFlashバンクが2つあるため、 推奨されるアプローチは以下ですか? バンク0からブートローダーを実行する 新しいファームウェアをバンク1にプログラムする 検証成功後のスイッチ実行 2つのPFlashバンク間で、書き込み中の読み出しや消去/プログラミングに関する制限はありますか? 6. メタデータの保存 保管場所として最適な場所はどこですか? アクティブイメージフラグ 画像の妥当性 ファームウェアのバージョン CRC ロールバックステータス これらはどこに保管すべきでしょうか? 予約済みPFlash DFlash 別の専用地域ですか? 7. UARTベースのFOTA 当社のアップデートインターフェースはUARTなので、推奨されるワークフローを知りたいです。 以下の流れは正しいですか? PC │ UART │ ブートローダーは.binファイルを受け取ります │ ファームウェアを非アクティブなフラッシュスロットに保存します │ CRCの確認 │ 起動メタデータの更新 │ MCUをリセット │ ブートローダーが新しいイメージを選択する │ アプリケーションへジャンプ それともNXPは別のアプローチを推奨しているのでしょうか? 8. AB_SWAPとカスタムブートローダーの比較 S32K342で本番環境のFOTAを実施する場合、HSE AB_SWAPは必須ですか? それとも、デュアルアプリケーションスロットを備えた完全カスタムブートローダーもサポートされ、一般的に使われるアーキテクチャなのでしょうか? もしFOTA、UARTファームウェアアップデート、デュアルイメージブートローダーに関するアプリケーションノート、参考プロジェクト、ブートローダーの例、またはドキュメントなど、S32K342を網羅したものがあれば、ぜひご参考いただけると幸いです。 ごサポートありがとうございます。 S32K3 S32DS-ARM  Re: S32K342 FOTA Bootloader Architecture Guidance Required (UART-Based Update) こんにちは、 @bavinkumar_02さん 1.S32K342のCASE、AB_SWAPには一つのセットアップしか考えられません。「3.5.3.2」を参照HSE FirmwareリファレンスマニュアルのAB_SWAP」に掲載されたフラッシュメモリのレイアウトのイラストは、ドキュメントからダウンロード可能です -> Secure files: https://www.nxp.com/products/S32K3 あなたのCASE、最も便利で一般的なレイアウトは以下の通りです: HSEファームウェアのAB_SWAPバージョンをインストールする必要があります(スワップはHSEの機能であり、HSEファームウェアなしでは実行できません)。ファームウェアは両方のパーティションにインストールされており、図に示すように、両方のブロックで最後の176KBを占有しています。 ブロック全体が交換されるため、両方のブロックにブートローダーの正確なコピーが存在する必要がある。残りはアプリケーションに割り当てられます。 コードは常にアクティブブロックから動作しているため、ブートローダーやすべてのアプリケーションはアクティブブロック内のアドレスに合わせてコンパイルされます。 ブートローダーがアプリケーションを更新すると、そのアプリケーションは受動的なブロックにプログラムされるため、フラッシュプログラミング中の読み書き問題はありません。アプリケーションがプログラムされると、HSEサービスをHSE_SRV_ID_ACTIVATE_PASSIVE_BLOCK発動CAN。次回リセット後、パーティションはスワップされ、ブートローダーは通常通りアプリケーション(現在アクティブなブロックにある新しいアプリケーション)にジャンプします。 2. フローはアプリケーションに依存します。現代の自動車用途では、単純なCRCベースの検証はもはや十分とはみなされていません。ソフトウェアの整合性と真正性は通常、セキュアブート機構によって保証されます。S32K3デバイスでは、これはハードウェアセキュリティエンジン(HSE)によって処理され、暗号学的検証(例:署名ベース)ブート中に自律的に実行されます。量産型自動車システムは、CRCのみの検証に頼るのではなく、これらのハードウェアによるセキュリティ機能を活用することが期待されています。 セキュアブートのアプリケーションノート(デモプロジェクトを含む)を提供しています。ダウンロード可能: https://www.nxp.com/products/S32K3 アプリケーションノートはこちらでご覧いただけます: ドキュメント -> Secure Files -> Secure Boot アプリケーションノート v0.1.1.0(AN744511) 関連するデモプロジェクトはこちらからダウンロードできます: デザインリソース - > ソフトウェア - > Secure Files - > SecureBootAppNoteDemo(SW745310) セキュアブートの他の例はHSEデモ例で見ることができます: https://www.nxp.com/webapp/Download?colCode=S32K3_HSE_DemoExamples 3つのモードすべてに例があります — 高度なセキュアブート、ベーシックセキュアブート、そしてSHEセキュアブートです。高度なセキュアブートを推奨します。 すべてのプロジェクトに含まれている Readme.md ファイルを参照してください。 3. はい、それは標準的なジャンプシーケンスです。ジャンプする前に、ブートローダーによって初期化されたすべてのリソースを初期化解除することを強くお勧めします。 4. 前述の通り、コードは常にアクティブパーティションから実行されるため、アプリケーションは常に同じリンカーファイルを使用します。 5. 前述の内容です。 6.これはユーザー次第です。アプリケーションイメージの背後やデータフラッシュの背後にデータを保存できます。 7. 量産オートモーティブCASEユースケースでは、提案されたフローはデータ転送の観点から一般的に正しいですが、前述の通りCRCを主な検証メカニズムとして利用することはお勧めしません。 オートモーティブ用途では、受信画像は通常暗号的に保護されており、例えば画像は暗号化され、その真正性や完全性はCRCだけでなくデジタル署名によって検証されます。 また、HSE AB_SWAP機構を使用する場合、ブートローダーはリセット後にソフトウェアのメタデータで新しいイメージを選択するわけではありません。新しいイメージがパッシブパーティションにプログラムされ、正常に検証された後、アプリケーション/ブートローダーはHSEサービスHSE_SRV_ID_ACTIVATE_PASSIVE_BLOCKを呼び出します。これによりパッシブブロックが有効化され、リセット後は新たに起動したパーティションからデバイスが起動します。 8. HSE AB_SWAPは厳密に必須ではありませんが、S32K342の量産オートモーティブFOTAソリューションには強く推奨されます。 HSEなしでFOTAを導入すると、S32K3プラットフォームの主要な利点の一つを活かせないことになります。これらのデバイスの主な利点は、HSEが処理するA/Bスワップ(パーティションリマッピング)の組み込みサポートです。それがなければ、ブートローダーはすべてを手動で管理しなければならないだろう。 具体的には、HSE AB_SWAPなしの場合: A/B画像の選択には独自の仕組みを実装する必要があります アドレス空間を慎重に管理し、各アプリケーションを異なる固定場所にリンクする必要があります 画像の交換はハードウェアが自動的に行うのではなく、完全にソフトウェア内で行われます HSE ABスワップ機能以外に利用可能な代替ハードウェア対応のリマッピング機構はありません さらに、AB_SWAPと統合されたセキュアブートのシンプルさと堅牢性が失われます。HSEでは、画像の有効化、検証、パーティション間の切り替えが自動車のセキュリティ要件に沿った、より管理的かつ効率的に処理されます。 まとめると、HSEなしでこれを行うことは可能ですが、複雑さが大幅に増し、プラットフォームの重要な利点を失ってしまいます。 「S32K3XX HSE and OTA Advance トレーニング [TR744101]」はダウンロード可能です。ドキュメント - > Secure ファイル: https://www.nxp.com/products/S32K3 よろしくお願いいたします。 ルーカス
View full article
S32K358 + FS2633:MCU组装完成后,RSTB保持低电平;连接JTAG后,RSTB变为高电平。 我正在使用S32K358和FS2633 。当我只测试 FS2633 部分(移除 MCU)时, RSTB 被释放(高电平) ,并且3.3V 电源轨存在。 组装好 MCU 和所有元器件后, RSTB 保持低电平,MCU 无法启动。 如果我连接JTAG 调试器, RSTB 变为高电平,我可以成功地对 MCU 进行编程,应用程序也能正常运行。但是,一旦我断开 JTAG, RSTB 就会再次变为低电平,MCU 就会停止运行。 一个观察结果是, FS2633 RSTB 输出为 3.3 V 信号,而我的板上的 S32K358 RESET 线被拉高至 5 V。尽管存在这种电压差,但只要连接 JTAG 调试器,系统就能正常工作。RESET电压等级或调试器是否会影响RESET或上电顺序? 这个问题是否与上电顺序、RESET 时序、FS2633 启动配置或调试器相关行为有关?有没有人遇到过类似的问题?或者有什么调试建议吗? Re: S32K358 + FS2633: RSTB stays LOW with MCU assembled, but goes HIGH when JTAG is connected 你最好尝试将FS2633 RSTB 的电压拉高到 3.3V 进行测试,看看是否存在这个问题。
View full article
Winbond W664GG6RB-06 的 IMX-8M-MINI DDR 控制器时序 你好, 我们正在寻找 DDR4 时序设置不工作的原因。简而言之, DDR工具生成的时序数据通过了校准和压力测试,但导致了 Linux 内核在启动过程中偶尔崩溃,并出现“未定义指令”错误。 基本情况(原始数据): - 该SoC为i.MX8M Mini Solo(单核Cortex-A53),DDR4(Winbond W664GG6RB-06)。 1200 MHz (DDR4-2400),采用 1:2 DFI (DDR PHY 接口) 频率比模式,具有 单 x16 4 Gb 设备(512 MB,无 ECC)。 - 电路板支持包为 NXP L4.14.98_2.0.0(Linux 4.14.98,U-Boot 2018.03);DDR 配置为 使用 MSCALE DDR Tool v3.31(Windows 版本)和 PHY 训练固件生成 v201709。Yocto 也使用相同的固件来构建 U-Boot 启动映像。 我们正在为三条可互换的 4Gb x16 DDR4 内存条验证一套通用的时序集。 部件(Alliance AS4C256M16D4、ISSI IS43QR16256B、Winbond W664GG6RB-06),全部运行 频率为 1200 MHz。 - 为了满足最慢部件(Winbond)的 tRCD/tRP/tAA 要求(在 2400 像素档位下约为 14.16 ns),我们 设置 CL=17 (17-17-17),该工具将其编码为 MR0 = 0x0864,并与之匹配。 CL衍生寄存器(例如)DFITMG0 = 0x038C8207,DRAMTMG2 = 0x0609050D)。 - 动态随机存取存储器(DRAM) 以静态模式运行在 2400 设定点(设备中已禁用 DVFS/总线频率)。 因此,Linux 在运行时不会进行频率缩放。 观察结果: - 17-17-17 配置通过了 DDR 工具压力测试(约 24 小时)和 U-Boot mtest(约 1 小时)测试。 没有错误。 - 在 Linux 系统下(启动到 shell 提示符时),它也能通过 stressapptest+ 测试。 fio(经 crc32c 验证),即使在 Tj = 84 °C 下,也能持续超过一小时。 数据无错误。 然而,Linux 在启动过程中偶尔会崩溃,并显示“内部错误: 未定义的指令”(内核.text文件损坏),内核运行约 1.1 秒后,大约 5-7% 的冷启动(通过自动冷启动循环测量)。 - 该故障与芯片无关:CL=17 映像在一秒钟内以相同的方式崩溃 这些部分(ISSI),而 CL=16 镜像可以在同一个 ISSI 上可靠地启动 Linux。 部分。 - 两种 even-CL 配置都能可靠地启动 Linux:16-16-16(我们长期使用的生产环境配置) 时序)以及新版本的 18-18-18 内核(未观察到内核崩溃)——仅奇数 CL 17-17-17 失败。 - 故障配置和正常工作配置之间只有 CL 衍生寄存器不同 (MR0) CAS 位,DFITMG0 dfi_t_rddata_en,DRAMTMG2 读取延迟 / rd2wr,DFITMG2 rdcslat, ODTCFG rd_odt_delay)。 假设: 我们怀疑1:2 DFI比率下异常的CAS延迟是根本原因:读取数据 DFI 时钟的返回延迟为 CL/2——对于 CL=17,返回延迟为非整数 8.5,而对于整数 8.0,返回延迟为 8.0。 / CL=16 时为 9.0 / 18。由于读取 FIFO(由 DQS 写入,由控制器读取) 时钟(参考手册 §9.3.2.2.2)处理稳态和稳态应力 我们怀疑,边缘性会在读取突发到突发转换时显现出来,其中 奇怪的 CL 的半个 DFI 时钟偏移会触发 RM 不会触发的首尾节拍极端情况。 文档。 问题: 异常CAS延迟(例如)i.MX8M Mini DDR4 PHY 支持 CL=17,采用 1:2 DFI 模式。 模式,或者对于奇数CL是否存在已知的限制/勘误?特别是——DDR能否做到这一点 该工具生成了一种特殊的CL配置,虽然它通过了自身的压力测试,但性能却很差。 在实际启动流量下,是否有推荐的方法来限制读取操作? 奇数 CL 的突发间时序? 附件:内核崩溃控制台转储文件,CL=17 .dsDDR 工具的脚本,以及 生成了 ddr4_timing.c。 任何建议都将不胜感激。 Re: IMX-8M-MINI DDR Controller timings for Winbond W664GG6RB-06 抱歉,附件不知为何没有上传成功。以下是它们。 Re: IMX-8M-MINI DDR Controller timings for Winbond W664GG6RB-06 你好, 请尝试将 CL 值从 17 改为18,运行 DDR 测试并再次测试您的 Linux 系统,我建议您升级到更新的版本。 Re: IMX-8M-MINI DDR Controller timings for Winbond W664GG6RB-06 请检查以下各部分的时序参数,包括 CAS 延迟 tRCD(ns) 和 tRP(ns)。 Alliance AS4C256M16D4 DDR4-2400 17 14.1614.16 ISSI IS43QR16256B 2400Mbps 16-16-16 (-083R) Winbond W664GG6RB-06 DDR4-2400 17-17-17 IS43QR16256B 的第 3 个参数不同。所以您可能需要为这 3 个部分分别设置不同的参数,而不是使用一个参数来控制所有 3 个部分。看来这个问题只在冷启动时出现,对吗?
View full article
IMX-8M-MINI DDR Controller timings for Winbond W664GG6RB-06 Hello, We are looking for an explanation for a non-working DDR4 timing set. In short, the timings generated by the DDR Tool passed calibration and stress tests, but led to sporadic Linux kernel crashes during boot, with an "undefined instruction" error. Setup (raw facts): - The SoC is an i.MX8M Mini Solo (single Cortex-A53), DDR4 (Winbond W664GG6RB-06) at 1200 MHz (DDR4-2400) in 1:2 DFI (DDR PHY Interface) frequency-ratio mode, with a single x16 4 Gb device (512 MB, no ECC). - The BSP is NXP L4.14.98_2.0.0 (Linux 4.14.98, U-Boot 2018.03); the DDR config was generated with MSCALE DDR Tool v3.31 (Windows version) and PHY training firmware v201709. The same firmware is used in Yocto to build the U-Boot image. - We are qualifying one common timing set for three interchangeable 4 Gb x16 DDR4 parts (Alliance AS4C256M16D4, ISSI IS43QR16256B, Winbond W664GG6RB-06), all operated at 1200 MHz. - To meet the slowest part's (Winbond) tRCD/tRP/tAA (~14.16 ns at the 2400 bin) we set CL=17 (17-17-17), which the Tool encodes as MR0 = 0x0864 with the matching CL-derived registers (e.g. DFITMG0 = 0x038C8207, DRAMTMG2 = 0x0609050D). - The DRAM runs static at the 2400 setpoint (DVFS/busfreq disabled in the device tree), so there is no frequency scaling by Linux at runtime. Observations: - The 17-17-17 config passes the DDR Tool stress test (~24 h) and U-Boot mtest (~1 h) with no errors. - Under Linux (on boots that reach the shell prompt) it also passes stressapptest + fio (crc32c-verified), continuously and even at Tj = 84 °C, for over an hour with zero data errors. - Nevertheless, Linux sporadically crashes during boot with "Internal error: undefined instruction" (corrupted kernel .text), ~1.1 s into the kernel, on roughly 5–7 % of cold boots (measured with an automated cold power-cycle loop). - The failure is die-independent: the CL=17 image crashes the same way on a second of these parts (ISSI), while the CL=16 image boots Linux reliably on that same ISSI part. - Both even-CL configs boot Linux reliably: 16-16-16 (our long-standing production timing) and a newly built 18-18-18 (no kernel crashes observed) — only the odd-CL 17-17-17 fails. - Only the CL-derived registers differ between the failing and working configs (MR0 CAS bits, DFITMG0 dfi_t_rddata_en, DRAMTMG2 read latency / rd2wr, DFITMG2 rdcslat, ODTCFG rd_odt_delay). Hypothesis: We suspect odd CAS latency at the 1:2 DFI ratio is the root cause: the read-data return latency is CL/2 in DFI clocks — a non-integer 8.5 for CL=17 versus integer 8.0 / 9.0 for CL=16 / 18. Since the read FIFO (written by DQS, read by the controller clock, Reference Manual §9.3.2.2.2) handles the steady state and steady stress passes, we suspect the marginality surfaces at read burst-to-burst transitions, where odd CL's half-DFI-clock offset would hit a first/last-beat edge case the RM does not document. Questions: Is odd CAS latency (e.g. CL=17) supported on the i.MX8M Mini DDR4 PHY in 1:2 DFI mode, or are there known constraints/errata for odd CL? In particular — can the DDR Tool produce an odd-CL configuration that passes its own stress test yet is marginal under real boot traffic, and is there a recommended way to constrain read burst-to-burst timing for odd CL? Attached: kernel crash console dump, the CL=17 .ds script for the DDR Tool, and the produced ddr4_timing.c. Any advice will be appreciated. Re: IMX-8M-MINI DDR Controller timings for Winbond W664GG6RB-06 Sorry, somehow attachments didn't attach. Here are they. Re: IMX-8M-MINI DDR Controller timings for Winbond W664GG6RB-06 Hello,  Please try again by modifying from CL=17 to CL=18, run ddr test and test your linux again, I recommend you to upgrade to a newer release.  Re: IMX-8M-MINI DDR Controller timings for Winbond W664GG6RB-06 Please check the timing parameter for the parts below for  CAS Latency   tRCD(ns)  tRP(ns) Alliance AS4C256M16D4     DDR4-2400                                             17      14.16   14.16 ISSI IS43QR16256B                   2400Mbps                                            16-16-16 (-083R) Winbond W664GG6RB-06  DDR4-2400                                            17-17-17 The 3 parameter for IS43QR16256B is different. So you may need dedicated setting for 3 parts instead using one setting for all 3 part. It seems the issue only happened at cold boots, right?
View full article
[Zephyr ® Series] Part 4: Overview and Practical Applications of Kconfig and Device Trees (Japanese Blog)   From this point on, we'll be moving on to the advanced topics of Zephyr. This session will cover an overview of Kconfig and device trees, followed by hands-on programming exercises to help you utilize them effectively.   One of the key features of Zephyr RTOS, as mentioned previously, is its software scalability (reusability), which makes it easy to reuse software developed once in other projects or derivative products, enabling rapid development.   Furthermore, to support a wide range of hardware platforms, Zephyr employs a powerful configuration system called "Kconfig" and "Devicetree".   This allows you to port programs to different microcontroller boards simply by changing configuration files, without having to rewrite the source code in the same C/C++ language. This article explains the basic mechanisms of Kconfig and the device tree. As a practical application, we will modify the hardware-independent LED blinking program created in Part 3 to run on two different microcontroller boards: " FRDM-MCXA153 " and " FRDM-MCXN947 ".   To run the same application on different boards (microcontrollers and processors), we will explain practical programming methods using Kconfig and the device tree.     table of contents   Preparation Kconfig Basics Device tree fundamentals Best practices for improving software reusability Kconfig and the Device Tree in Practice Create a simple program (hands-on) 1. Program Specifications 2. Directory structure 3. Create Kconfig and prj.conf 4. Creating device tree overlays and board-specific settings 5. Hardware-independent common code (main.c) Create 6. Build and run summary Preparation   Hardware preparation   This article will primarily use the following boards to create and test programs. FRDM-MCXA153 (main use) Additionally, the following boards will be used as supplementary tools to verify the portability of the program you have created. FRDM-MCXN947   SW preparation   This guide assumes that you have already set up the Zephyr development environment (Zephyr SDK, West command, etc.). If you haven't set it up yet, please refer to the second article on environment setup. [Zephyr ® Series] Part 2: First Build and Testing (Japanese Blog)   We will be using the LED blinking program created in the third installment of the Zephyr series. If you haven't created it yet, we recommend creating it by referring to the previous article. [Zephyr ® Series] Part 3: First Steps in Blinking an LED and Software Reusability (Japanese Blog)   Kconfig Basics     Kconfig is a configuration system also used in the Linux kernel. In Zephyr, it is used to manage whether to "enable or disable" software features, or "what parameters to set," such as kernel functions, device drivers, subsystems, and application-specific settings. The following two files are important for Kconfig: The "Kconfig" file defines the selectable configuration items (symbols), their default values, and dependencies. "prj.conf" file *: This file is where application developers specify the values they want to set for items defined in "Kconfig" (such as enabling them with "y" or providing specific numerical values). Using Kconfig, you can exclude unnecessary code from compilation and optimize memory usage. Furthermore, the Kconfig and prj.conf files are all written in text format. How to enable the feature The prj.conf file enables features for the entire project. For example, the ADC, DAC, and OPAMP drivers are defined in Kconfig. When using the functions defined in Kconfig, you declare them by adding "CONFIG_" to the beginning of prj.conf. Kconfig:ADCの定義Kconfig: ADC definition prj.conf例prj.conf example   Device tree fundamentals   Devicetree例Example of a device tree   The device tree is a text file that describes what hardware (CPU, memory, peripherals, pin settings, etc.) a microcontroller supports, as well as the settings and configuration of that hardware. These settings and configurations are then expanded into macros.   Instead of directly writing hardware addresses into C code (hardcoding), information described in the device tree can be read through Zephyr macros, enabling hardware-independent programming. Nodes and Properties: Each element of hardware is represented as a "node" in a hierarchical structure, and register addresses, interrupt numbers, etc., are described as "properties." ".dts" and ".dtsi": Standard hardware configurations for each microcontroller and board are predefined within the Zephyr repository in ".dts" (Devicetree Source) and ".dtsi" (Include) files. dts: Described as the device tree of the board. dtsi: Describes the device tree of an SoC/microcontroller and is provided by the device manufacturer. ".overlay" file: This file is created when you want to override application-specific wiring (e.g., connecting an LED to a specific GPIO pin) or default settings.   Best practices for improving software reusability   To enhance software reusability in Zephyr, it is important to follow the following design principles: Separation of hardware-dependent and hardware-independent parts: C code (`main.c`) For example, avoid directly writing about specific microcontroller register operations or pin numbers. Leverage device tree aliases: Instead of directly referencing actual hardware nodes (e.g., `&red_led` or `&gpioa`), applications should reference abstract names defined in the `aliases` node (e.g., `led0`). This allows you to adapt to different boards simply by changing what the alias points to. Prepare a board-specific device tree (overlay) : When there are differences in some functions, such as in derivative products, you can overwrite (overlay) only the parts with hardware differences for each board. Switching features with Kconfig : Application behavior parameters and the on/off status of specific features are controlled using Kconfig symbols instead of C language "#define".   Kconfig and the Device Tree in Practice   From here, we will learn how to use Kconfig and the device tree by creating a simple program so that we can actually use them in practice .     Create a simple program (hands-on) The program will be created by modifying the LED blinking program we created last time, and will have the following specifications.   Here, as a practical exercise, we will create a common application that runs on both "FRDM-MCXA153" and "FRDM-MCXN947". 1. Program Specifications Source code : Use the code from "Part 3: Your First LED Blinking Program" and make the following modifications. LED blinking speed: The blinking interval can be set using Kconfig. Button Function (Enable/Disable): The button function can be enabled or disabled via Kconfig settings. When enabled, pressing the button will toggle between blinking and constant illumination of the LED. Outputting board name: At startup, the "device (board) name" configured in Kconfig will be output to standard output (terminal). 2. Directory structure   The project directory structure should be as follows:   Add the Kconfig file and boards folder to the "my_hello" folder of the LED blinking program you created last time. Any method of adding the files is fine. On Windows, use the PowerShell `ni` command or a text editor to create a new file and save it in the `my_hello` folder. In Linux, you can create a new, empty file using the `touch` command.   The files under "boards/" handle hardware differences and unique settings specific to each board.     my_hello/ ├── CMakeLists.txt ├── Kconfig <- 新規追加:アプリ独自のKconfig ├── prj.conf <- アプリの共通設定 ├── src/ │ └── main.c <- ハードウェア非依存の共通コード └── boards/ <- 新規作成フォルダ  ├── frdm_mcxa153.overlay <- 新規作成:FRDM-MCXA153用のデバイスツリー設定  ├── frdm_mcxa153.conf <- 新規作成:FRDM-MCXA153用のKconfig設定  ├── frdm_mcxn947_cpu0.overlay <- 新規作成:FRDM-MCXN947用のデバイスツリー設定  └── frdm_mcxn947_cpu0.conf <- 新規作成:FRDM-MCXN947用のKconfig設定   Note : By creating specific files within your application's directory, Zephyr's build system (West) will automatically recognize them and apply the settings. Adding Kconfig: You can add your own configuration symbols by placing a "Kconfig" file in your Applications folder. Board-specific settings ("boards/" directory): By creating a "boards" directory within your application and placing "[board name].overlay" or "[board name].conf" files there, the overlay and Kconfig overrides will be automatically applied only when building with that board as the target.   3. Create Kconfig and prj.conf First, create your own "Kconfig" in the application root directory and define application-specific parameters. my_hello/Kconfig   mainmenu "my LED blink" config CUSTOM_BLINK_RATE_MS int "LED blink rate in milliseconds" default 1000 help Set LED blink frequency. #LEDの点滅周期(ミリ秒)を設定します config ENABLE_BUTTON_TOGGLE bool "Enable button to toggle LED state" default y help Enable button to toggle LED state. # ボタン入力によるLEDの点滅/点灯状態>の切り替え機能を有効にします。 config BOARD_NAME_STRING string "Board Name String" default "Unknown Board" help Set board name for printf. # 標準出力に表示するボード名を設定します。 source "Kconfig.zephyr"     Next, as a common setting for the entire application, there is "prj.conf". This will be written. In this prj.conf file, use the Kconfig symbol you just created to configure it as follows: my_hello/prj.conf   # GPIOの有効化 CONFIG_GPIO=y # アプリケーションの共通設定 CONFIG_CUSTOM_BLINK_RATE_MS=500 CONFIG_ENABLE_BUTTON_TOGGLE=y   4. Creating device tree overlays and board-specific settings Create a directory called "boards" and prepare the necessary files for each board. Main board for FRDM-MCXA153     We map the button on the board (`sw2`) so that it can be accessed from the application using the standard alias `sw0`. `led0` is already in the board definition so it can be omitted here, but it can be explicitly overridden if needed.   my_hello/boards/frdm_mcxa153.overlay / { aliases { sw0 = &user_button_2; /* FRDM-MCXA153のユーザーボタン */ }; };   my_hello/boards/frdm_mcxa153.conf   CONFIG_BOARD_NAME_STRING="FRDM-MCXA153 Board"   By referencing the symbols in this .conf (board-specific Kconfig) within the application (main.c), it becomes possible to output the board name to standard output using the printf function. For FRDM-MCXN947 Similarly, we define "sw0" in the FRDM-MCXN947. This handles any differences in the hardware names of the buttons.   In fact, if the hardware names (which differ depending on the peripheral or instance) vary across boards, you assign the actual hardware to the alias node in the device tree. my_hello/boards/frdm_mcxn947_cpu0.overlay   / { aliases { sw0 = &user_button_3; /* FRDM-MCXN947のユーザーボタン */ }; };   my_hello/ boards/frdm_mcxn947_cpu0.conf   I'll try overriding the LED blinking speed to 250ms only when building with MCXN947.   CONFIG_BOARD_NAME_STRING="FRDM-MCXN947 Board" CONFIG_CUSTOM_BLINK_RATE_MS=250 The application code is the same for FRDM-MCXA153 and FRDM-MCXN947, but you can configure the blinking behavior of the LED separately here. 5. Hardware-independent common code (main.c) Create Write the following in "my_hello/src/main.c":   The LED control section reuses the hardware-independent code (using the "led0" alias) created in the previous article, and incorporates Kconfig and button control into it. my_hello/ src/main.c   #include #include #include /* Devicetreeのエイリアスを参照する */ /* どのボードでも、一番目のLEDは通常 "led0" と定義されています */ #define LED0_NODE DT_ALIAS(led0) #define SW0_NODE DT_ALIAS(sw0) /* エイリアスからGPIO仕様(ポート、ピン、フラグ)を取得 */ static const struct gpio_dt_spec led = GPIO_DT_SPEC_GET(LED0_NODE, gpios); /* ボタン機能がKconfigで有効化されている場合のみコンパイルされる部分 */ #ifdef CONFIG_ENABLE_BUTTON_TOGGLE static const struct gpio_dt_spec sw = GPIO_DT_SPEC_GET(SW0_NODE, gpios); static struct gpio_callback button_cb_data; static bool is_blinking = true; void button_pressed(const struct device *dev, struct gpio_callback *cb, uint32_t pins) { is_blinking = !is_blinking; if (!is_blinking) { /* 点滅オフ時はLEDを点灯させた状態にする */ gpio_pin_set_dt(&led, 1); } } #endif //CONFIG_ENABLE_BUTTON_TOGGLE int main(void) { int ret; /* Kconfigで設定されたボード名を出力 */ printf("Starting application on %s\n", CONFIG_BOARD_NAME_STRING); /* デバイスの準備確認 */ if (!gpio_is_ready_dt(&led)) { return -1; } /* ピンの設定 (Devicetreeで定義された初期状態などを考慮して設定) */ ret = gpio_pin_configure_dt(&led, GPIO_OUTPUT_ACTIVE); if (ret < 0) { return -1; } #ifdef CONFIG_ENABLE_BUTTON_TOGGLE if (!gpio_is_ready_dt(&sw)) { return -1; } ret = gpio_pin_configure_dt(&sw, GPIO_INPUT); if (ret < 0) { return -1; } ret = gpio_pin_interrupt_configure_dt(&sw, GPIO_INT_EDGE_TO_ACTIVE); if (ret < 0) { return -1; } gpio_init_callback(&button_cb_data, button_pressed, BIT(sw.pin)); gpio_add_callback(sw.port, &button_cb_data); #endif //CONFIG_ENABLE_BUTTON_TOGGLE while (1) { #ifdef CONFIG_ENABLE_BUTTON_TOGGLE if (is_blinking) { ret = gpio_pin_toggle_dt(&led); } #else /* ピンの状態を反転 (ボタン機能が無効な場合は常に点滅) */ ret = gpio_pin_toggle_dt(&led); #endif //CONFIG_ENABLE_BUTTON_TOGGLE /* Kconfigで設定された点滅間隔で待機 */ k_msleep(CONFIG_CUSTOM_BLINK_RATE_MS); } return 0; }     6. Build and run Now, let's actually test its functionality. Please refer to the previous article for instructions on setting up the build environment and enabling the west command. First, navigate to the directory of your installed zephyrproject repository as shown in the command instructions below, enable west, and then proceed. Operation confirmed with FRDM-MCXA153 (main) Build using the following command and write it to the FRDM-MCXA153.   ## ホームディレクトリからZephyrprojectディレクトリに移動 cd ~/zephyrproject ## west環境を有効化 source .venv/bin/activate ## zephyr v4.3をチェックアウトしていない場合は、前回(第3回 初めてのLチカとソフトウェアの再利用性)を参考にv4.3をチェックアウトしてください。 west build -b frdm_mcxa153 my_hello west flash     Execution result   コンソール出力Console output   LED点滅、点灯モード切り替えLED flashing and steady light mode switching   The message "Starting application on FRDM-MCXA153 Board" will appear in the terminal. The LED blinks at 500ms intervals ("prj.conf"). (Settings). Pressing SW2 ("custom-sw") will turn it on, and pressing it again will return it to blinking. Operation confirmed with FRDM-MCXN947 We'll build the project using the exact same C source code, only changing the board specification.   # -pオプションを使用し、frdm_mcxa153のビルド情報をクリーンしてビルドします。 west build -p -b frdm_mcxn947//cpu0 my_hello west flash   Execution result   The contents of "boards/frdm_mcxn947_cpu0.conf" will be automatically applied, and the terminal will display "Starting application on FRDM-MCXN947 Board". The LED blinks rapidly at 250ms intervals (configured in "prj.conf"). Pressing SW3 (the button mapped to "user_button_3" on the MCXN947) will similarly switch between LED illumination and blinking. While the FRDM-MCXA153 and FRDM-MCXN947 use different GPIOs for controlling LEDs and switch buttons, the device tree effectively absorbs these differences, demonstrating how cleanly the application program and hardware are separated.   summary     In this session, we learned the basics of Kconfig and device trees in Zephyr, and practiced techniques to separate hardware-dependent parts from C code by utilizing them.   I believe you've experienced a powerful mechanism for reusing the same source code across multiple different boards, where hardware settings are absorbed by the device tree overlay (".overlay"), application parameters can be flexibly changed and features can be easily enabled or disabled using board-specific Kconfig files (".conf").   ========================== We are currently unable to respond to comments left in the "Comment" section of this post. We apologize for the inconvenience, but please refer to "Technical Questions to NXP - How to Contact Us (Japanese Blog)" when making inquiries. (If you are already an NXP distributor or have a relationship with NXP, you may ask your representative directly.) This document provides an overview of the device tree and Kconfig, features designed to enhance Zephyr's software reusability. It then outlines the steps required to utilize these features in practice. After reading through this Zephyr series, from the first installment to the fourth, you will be able to write programs using the Zephyr RTOS. General Purpose Microcontrollers MCX Japanese Blog
View full article
[Zephyr®シリーズ] 第4回 Kconfigとデバイスツリーの概要と実践的活用法 (日本語ブログ)   今回からZephyrの応用編に突入していきます。 今回は、Kconfigとデバイスツリーの概要とそしてそれを活用できるようハンズオンによるプログラミングの実践を行っていきます。   Zephyr RTOSの特徴として前回紹介したソフトウェアのスケーラビリティ(再利用性)により一度開発したソフトウェアを別のプロジェクトや派生製品に再利用することが容易に行えるようになり迅速な開発が可能になります。   そして、幅広いハードウェアプラットフォームに対応するために、Zephyrには「Kconfig」 と 「デバイスツリー (Devicetree)」 という強力な構成システムを採用しています。   これにより、同じC/C++言語のソースコードを書き換えることなく、設定ファイルの変更だけで異なるマイコンボードにプログラムを移植することができます。 本記事では、Kconfigとデバイスツリーの基本的な仕組みを解説します。そして実践的な活用法として、第3回で作成したハードウェアに依存しないLチカプログラムを修正して、それを「FRDM-MCXA153」と「FRDM-MCXN947」という異なるマイコンのボードで動作するようにします。   異なるボード(マイコンやプロセッサ)で同じアプリケーションを動作させるため、Kconfigとデバイスツリーを使って実践的プログラミング方法を説明していきます。     目次   前準備 Kconfigの基礎 デバイスツリー(Devicetree)の基礎 ソフトウェアの再利用性を高めるためのベストプラクティス Kconfigとデバイスツリーの実践 簡単なプログラムを作成する(ハンズオン) 1. プログラムの仕様 2. ディレクトリ構成 3. Kconfig と prj.conf の作成 4. デバイスツリーオーバーレイとボード別設定の作成 5. ハードウェア非依存の共通コード (main.c) の作成 6. ビルドと実行 まとめ 前準備   HWの準備   本記事では、主に以下のボードを使用してプログラムの作成と動作確認を行います。 FRDM-MCXA153 (メインで使用) また、作成したプログラムのポータビリティ(移植性)を確認するための補足として、以下のボードも使用します。 FRDM-MCXN947   SWの準備   Zephyrの開発環境(Zephyr SDK, Westコマンドなど)がすでに構築されていることを前提とします。構築がまだの場合は、第2回の環境構築の記事を参照してください。 [Zephyr® シリーズ] 第2回 はじめてのビルドと実機動作(日本語ブログ)   Zephyrシリーズ第3回で作成したLチカプログラムを使用します。まだ作成していない方は、前回の記事を参考に作成することをおすすめします。 [Zephyr® シリーズ] 第3回 初めてのLチカとソフトウェアの再利用性(日本語ブログ)   Kconfigの基礎     Kconfigは、Linuxカーネルでも採用されている設定システムです。Zephyrでは、カーネル機能、デバイスドライバー、サブシステム、アプリケーションの固有設定など、ソフトウェア機能を「有効にするか無効にするか」、あるいは「どのようなパラメータを設定するか」を管理するために使用されます。 Kconfigには以下2つのファイルが重要になります。 「Kconfig」 ファイル: 選択可能な設定項目(シンボル)とそのデフォルト値、依存関係を定義します。 「prj.conf」 ファイル*: アプリケーションの開発者が、「Kconfig」 で定義された項目に対して実際に設定したい値(「y」 で有効化、あるいは具体的な数値など)を記述するファイルです。 Kconfigを使用することで、不要なコードをコンパイルから除外し、メモリ使用量を最適化することができます。 そして、Kconfigやprj.confファイルはすべてテキストで記述されています。 機能を有効にする方法 prj.confファイルではプロジェクト全体に対して機能の有効化を行っています。 例えば、ADCとDAC、そしてOPAMPドライバはKconfigで定義されています。このKconfigで定義されている機能を利用する場合に、prj.confに「CONFIG_」を先頭に追加して宣言します。 Kconfig:ADCの定義Kconfig:ADCの定義 prj.conf例prj.conf例   デバイスツリー(Devicetree)の基礎   Devicetree例Devicetree例   デバイスツリーは、マイコンがどのようなハードウェア(CPU、メモリ、周辺機器、ピン設定など)に対応しているか、それらのハードウェアの設定や構成を記述するテキストファイルです。 そして、こられ設定や構成はマクロに展開されます。   C言語のコードの中にハードウェアのアドレスを直接書き込む(ハードコーディングする)代わりに、デバイスツリーに記述された情報をZephyrのマクロを通じて読み込むことで、ハードウェア非依存のプログラミングが可能になります。 ノードとプロパティ: ハードウェアの各要素は「ノード」として階層構造で表現され、レジスタアドレスや割り込み番号などが「プロパティ」として記述されます。 「.dts」 と 「.dtsi」: マイコンやボードごとの標準的なハードウェア構成は 「.dts」 (Devicetree Source) や 「.dtsi」 (Include) ファイルでZephyrリポジトリ内にあらかじめ定義されています。 dts: ボードのデバイスツリーとして記述 dtsi: SoC・マイコンのデバイスツリーとして記述され、デバイスメーカーから提供されます。 「.overlay」 ファイル: アプリケーション固有の配線(例:特定のGPIOピンにLEDを繋いだ)や、標準設定に対して上書きを行いたい場合に作成するファイルです。   ソフトウェアの再利用性を高めるためのベストプラクティス   Zephyrでソフトウェアの再利用性を高めるためには、以下の設計原則に従うことが重要です。 ハードウェア依存部分と非依存部分の分離: Cコード(`main.c` など)には、特定のマイコンのレジスタ操作やピン番号を直接書かないようにします。 デバイスツリーの「エイリアス」を活用する: アプリケーションからは、実際のハードウェアノード(例:「`&red_led`」 や 「`&gpioa`」)を直接参照するのではなく、「aliases(エイリアス)」 ノードで定義した抽象的な名前(例:「`led0`」など)を参照するようにします。これにより、ボードが変わってもエイリアスの指す先を変更するだけで対応できます。 ボード別デバイスツリー(オーバーレイ)を準備する :派生製品など一部の機能に違いがある場合に、ボード別にハードウェアの差分がある部分のみ上書き(オーバーレイ)することができます。 Kconfigによる機能の切り替え : アプリケーションの動作パラメータや特定の機能のオン・オフは、C言語の 「#define」 ではなく Kconfig シンボルを使用して制御します。   Kconfigとデバイスツリーの実践   ここから、実際に実践で使用できるようになるために簡単なプログラムを作成しながらKconfigとデバイスツリーの使い方を学んでいきます。     簡単なプログラムを作成する(ハンズオン) プログラムは、前回作成したLチカプログラムを変更して以下のような仕様のプログラムを作成します。   ここでは実践として、「FRDM-MCXA153」と「FRDM-MCXN947」の両方で動く共通アプリケーションを作成します。 1. プログラムの仕様 ソースコード: 「第3回 始めてのLチカプログラム〜」を利用し、以下修正を加える LEDの点滅速度: Kconfigを用いて点滅間隔を設定可能にする。 ボタン機能(機能の有効/無効化): Kconfigの設定により、ボタン機能の有効/無効を切り替えられるようにする。有効な場合は、ボタンを押すたびにLEDの「点滅」と「常時点灯」が切り替わる。 ボード名の出力: 起動時に標準出力(ターミナル)へ、Kconfigで設定した「デバイス(ボード)名」を出力する。 2. ディレクトリ構成   プロジェクトのディレクトリ構成を以下のようにします。   前回作成したLチカプログラムの「my_hello」フォルダにKconifgファイルやboardsフォルダを追加します。ファイルの追加はどのような方法でも問題ありません。 WindowsではPowerShellの`ni`コマンドやテキストエディターで「新規ファイル作成」をして、my_helloフォルダに保存してください。 LInuxでは、`touch`コマンドを使用することで空の新規ファイルを作成することが可能です。   「boards/」 以下のファイルによって、ボードごとのハードウェア差異や固有設定を吸収します。     my_hello/ ├── CMakeLists.txt ├── Kconfig <- 新規追加:アプリ独自のKconfig ├── prj.conf <- アプリの共通設定 ├── src/ │ └── main.c <- ハードウェア非依存の共通コード └── boards/ <- 新規作成フォルダ  ├── frdm_mcxa153.overlay <- 新規作成:FRDM-MCXA153用のデバイスツリー設定  ├── frdm_mcxa153.conf <- 新規作成:FRDM-MCXA153用のKconfig設定  ├── frdm_mcxn947_cpu0.overlay <- 新規作成:FRDM-MCXN947用のデバイスツリー設定  └── frdm_mcxn947_cpu0.conf <- 新規作成:FRDM-MCXN947用のKconfig設定   参考: アプリケーションのディレクトリ内に特定のファイルを作成することで、Zephyrのビルドシステム(West)は自動的にそれらを認識し、設定を適用します。 Kconfigの追加:  アプリケーションフォルダに 「Kconfig」 ファイルを置くことで、独自のコンフィグシンボルを追加できます。 ボードごとの設定 (「boards/」 ディレクトリ): アプリケーション内に 「boards」 ディレクトリを作成し、そこに 「[ボード名].overlay」 や 「[ボード名].conf」 を配置すると、そのボードをターゲットとしてビルドした時にのみ、自動的にオーバーレイやKconfigの上書きが適用されます。   3. Kconfig と prj.conf の作成 まず、アプリケーションルートに独自の 「Kconfig」 を作成し、アプリケーション専用のパラメータを定義します。 my_hello/Kconfig   mainmenu "my LED blink" config CUSTOM_BLINK_RATE_MS int "LED blink rate in milliseconds" default 1000 help Set LED blink frequency. #LEDの点滅周期(ミリ秒)を設定します config ENABLE_BUTTON_TOGGLE bool "Enable button to toggle LED state" default y help Enable button to toggle LED state. # ボタン入力によるLEDの点滅/点灯状態>の切り替え機能を有効にします。 config BOARD_NAME_STRING string "Board Name String" default "Unknown Board" help Set board name for printf. # 標準出力に表示するボード名を設定します。 source "Kconfig.zephyr"     次に、アプリケーション全体の共通設定として 「prj.conf」 を記述します。 このprj.confに先ほど作成したKconfigシンボルを使って以下のように設定します。 my_hello/prj.conf   # GPIOの有効化 CONFIG_GPIO=y # アプリケーションの共通設定 CONFIG_CUSTOM_BLINK_RATE_MS=500 CONFIG_ENABLE_BUTTON_TOGGLE=y   4. デバイスツリーオーバーレイとボード別設定の作成 「boards」ディレクトリを作成し、各ボードに向けたファイルを用意します。 FRDM-MCXA153用 (メインボード)     アプリケーションからは `sw0` という標準的なエイリアスでアクセスできるように、ボード上のボタン(`sw2`)をマッピングします。`led0` はすでにボード定義にあるためここでは省略できますが、必要に応じて明示的に上書きすることも可能です。   my_hello/boards/frdm_mcxa153.overlay / { aliases { sw0 = &user_button_2; /* FRDM-MCXA153のユーザーボタン */ }; };   my_hello/boards/frdm_mcxa153.conf   CONFIG_BOARD_NAME_STRING="FRDM-MCXA153 Board"   アプリケーション(main.c)内でこの.conf(ボード別Kconfig)のシンボルを参照して、printf関数でボード名を標準出力させることが可能になります。 FRDM-MCXN947用  FRDM-MCXN947でも同様に 「sw0」 を定義します。ボタンのハードウェア名が異なる場合でも、ここで吸収します。   実際、ボードによりハードウェア(ペリフェラルやインスタンスが異なる)名が異なる場合は、デバイスツリー内のエイリアスノードに実際のハードウェアを割当てます。 my_hello/boards/frdm_mcxn947_cpu0.overlay   / { aliases { sw0 = &user_button_3; /* FRDM-MCXN947のユーザーボタン */ }; };   my_hello/boards/frdm_mcxn947_cpu0.conf   MCXN947でビルドした時だけ、LEDの点滅速度を250msに上書き変更してみます。   CONFIG_BOARD_NAME_STRING="FRDM-MCXN947 Board" CONFIG_CUSTOM_BLINK_RATE_MS=250 FRDM-MCXA153とFRDM-MCXN947では、アプリケーションコードは同じですが、Lチカの点滅の挙動をここでそれぞれ設定することができます。 5. ハードウェア非依存の共通コード (main.c) の作成 「my_hello/src/main.c」を以下のように記述します。   LED制御部分は、前回の記事で作成したハードウェア非依存のコード(「led0」 エイリアスを使用)を再利用し、そこにKconfigとボタンの制御を組み込んでいます。 my_hello/src/main.c   #include #include #include /* Devicetreeのエイリアスを参照する */ /* どのボードでも、一番目のLEDは通常 "led0" と定義されています */ #define LED0_NODE DT_ALIAS(led0) #define SW0_NODE DT_ALIAS(sw0) /* エイリアスからGPIO仕様(ポート、ピン、フラグ)を取得 */ static const struct gpio_dt_spec led = GPIO_DT_SPEC_GET(LED0_NODE, gpios); /* ボタン機能がKconfigで有効化されている場合のみコンパイルされる部分 */ #ifdef CONFIG_ENABLE_BUTTON_TOGGLE static const struct gpio_dt_spec sw = GPIO_DT_SPEC_GET(SW0_NODE, gpios); static struct gpio_callback button_cb_data; static bool is_blinking = true; void button_pressed(const struct device *dev, struct gpio_callback *cb, uint32_t pins) { is_blinking = !is_blinking; if (!is_blinking) { /* 点滅オフ時はLEDを点灯させた状態にする */ gpio_pin_set_dt(&led, 1); } } #endif //CONFIG_ENABLE_BUTTON_TOGGLE int main(void) { int ret; /* Kconfigで設定されたボード名を出力 */ printf("Starting application on %s\n", CONFIG_BOARD_NAME_STRING); /* デバイスの準備確認 */ if (!gpio_is_ready_dt(&led)) { return -1; } /* ピンの設定 (Devicetreeで定義された初期状態などを考慮して設定) */ ret = gpio_pin_configure_dt(&led, GPIO_OUTPUT_ACTIVE); if (ret < 0) { return -1; } #ifdef CONFIG_ENABLE_BUTTON_TOGGLE if (!gpio_is_ready_dt(&sw)) { return -1; } ret = gpio_pin_configure_dt(&sw, GPIO_INPUT); if (ret < 0) { return -1; } ret = gpio_pin_interrupt_configure_dt(&sw, GPIO_INT_EDGE_TO_ACTIVE); if (ret < 0) { return -1; } gpio_init_callback(&button_cb_data, button_pressed, BIT(sw.pin)); gpio_add_callback(sw.port, &button_cb_data); #endif //CONFIG_ENABLE_BUTTON_TOGGLE while (1) { #ifdef CONFIG_ENABLE_BUTTON_TOGGLE if (is_blinking) { ret = gpio_pin_toggle_dt(&led); } #else /* ピンの状態を反転 (ボタン機能が無効な場合は常に点滅) */ ret = gpio_pin_toggle_dt(&led); #endif //CONFIG_ENABLE_BUTTON_TOGGLE /* Kconfigで設定された点滅間隔で待機 */ k_msleep(CONFIG_CUSTOM_BLINK_RATE_MS); } return 0; }     6. ビルドと実行 さて、実際に動作を確認してみます。ビルド環境セットアップやwestコマンド有効化については、前回の記事を参考にしてください。 まずは、下記のコマンド手順の様にインストールしているzephyrprojectリポジトリのディレクトリに移動し、west 有効化を行ってから進めます。 FRDM-MCXA153 での動作確認(メイン) 以下のコマンドでビルドし、FRDM-MCXA153に書き込みます。   ## ホームディレクトリからZephyrprojectディレクトリに移動 cd ~/zephyrproject ## west環境を有効化 source .venv/bin/activate ## zephyr v4.3をチェックアウトしていない場合は、前回(第3回 初めてのLチカとソフトウェアの再利用性)を参考にv4.3をチェックアウトしてください。 west build -b frdm_mcxa153 my_hello west flash     実行結果   コンソール出力コンソール出力   LED点滅、点灯モード切り替えLED点滅、点灯モード切り替え   ターミナルに 「Starting application on FRDM-MCXA153 Board」 と表示されます。 LEDは 500ms 間隔で点滅します(「prj.conf」 の設定)。 SW2(「custom-sw」)を押すと点灯状態になり、再度押すと点滅に戻ります。 FRDM-MCXN947 での動作確認 全く同じC言語のソースコードのまま、ボード指定だけを変えてビルドします。   # -pオプションを使用し、frdm_mcxa153のビルド情報をクリーンしてビルドします。 west build -p -b frdm_mcxn947//cpu0 my_hello west flash   実行結果   「boards/frdm_mcxn947_cpu0.conf」 の内容が自動的に反映され、ターミナルには 「Starting application on FRDM-MCXN947 Board」 と表示されます。 LEDは 250ms 間隔で速く点滅します(「prj.conf」の設定)。 SW3(MCXN947側のボタンにマッピングされた 「user_button_3」)を押すことでLED点灯、点滅動作が同様に切り替わります。 FRDM-MCXA153とFRDM-MCXN947では、LED制御しているGPIOやスイッチボタンに繋がっているGPIOが異なりますが、デバイスツリーによりその差分が吸収され、アプリケーションのプログラムとハードウェアがきれいに分離できていることが実感できたと思います。   まとめ     今回は、ZephyrにおけるKconfigとデバイスツリーの基本を学び、それらを活用してハードウェア依存部分をCコードから分離する手法を実践しました。   デバイスツリーのオーバーレイ(「.overlay」)によってハードウェア設定を吸収し、ボード別Kconfigファイル(「.conf」)によってアプリケーションのパラメータを柔軟に変更したり、機能を簡単に有効、無効にすることができ、同一のソースコードを複数の異なるボードで再利用する強力な仕組みを体験できたかと思います。   =========================​ 本投稿の「Comment」欄にコメントをいただいても、現在返信に対応しておりません。​ お手数をおかけしますが、お問い合わせの際には「NXPへの技術質問 - 問い合わせ方法 (日本語ブログ)」をご参照ください。​ (既に弊社NXP代理店、もしくはNXPとお付き合いのある方は、直接担当者へご質問いただいてもかまいません。)​ Zephyrのソフトウェア再利用性を高めるための特徴であるデバイスツリーとKconfigの概要を説明します。そして、それらを実践で利用するためにステップを踏んで説明していきます。 このぜZephyrシリーズ第1回から今回の第4回までを読み終えると、Zephyr RTOSを利用してプログラムが書けるようになります。 General Purpose Microcontrollers MCX 日本語ブログ
View full article
[Zephyr ®系列] 第 4 部分:Kconfig 和设备树的概述及实际应用(日语博客)   从现在开始,我们将进入 Zephyr 的高级主题学习。 本次课程将概述 Kconfig 和设备树,然后进行实践编程练习,帮助您有效地使用它们。   如前所述,Zephyr RTOS 的一个关键特性是其软件可扩展性(可重用性),这使得在其他项目或衍生产品中重用一次开发的软件变得容易,从而实现快速开发。   此外,为了支持各种硬件平台,Zephyr 采用了名为“Kconfig”和“Devicetree”的强大配置系统。   这样,您只需更改配置文件,即可将程序移植到不同的微控制器板,而无需使用相同的 C/C++ 语言重写源代码。 本文解释了Kconfig和设备树的基本机制。作为实际应用,我们将修改第三部分中创建的与硬件无关的LED闪烁程序,使其能够在两种不同的微控制器板“ FRDM-MCXA153 ”和“ FRDM-MCXN947 ”上运行。   为了在不同的电路板(微控制器和处理器)上运行同一个应用程序,我们将解释使用 Kconfig 和设备树的实用编程方法。     目录   准备 Kconfig基础知识 设备树基础知识 提高软件重用性的最佳实践 Kconfig 和设备树的实际应用 创建一个简单的程序(动手实践) 1. 程序规范 2. 目录结构 3. 创建 Kconfig 和 prj.conf 文件 4. 创建设备树覆盖层和板级特定设置 5. 与硬件无关的通用代码(main.c)创造 6. 构建并运行 总结 准备   硬件准备   本文将主要使用以下开发板来创建和测试程序。 FRDM-MCXA153 (主要用途) 此外,以下电路板将作为辅助工具,用于验证您所创建的程序的可移植性。 FRDM-MCXN947   SW 准备   本指南假设您已搭建好 Zephyr 开发环境(Zephyr SDK、West 命令等)。如果您尚未搭建,请参阅第二篇关于环境搭建的文章。 【Zephyr ®系列】第二部分:首次构建与测试(日语博客)   我们将使用在 Zephyr 系列第三篇文章中创建的 LED 闪烁程序。如果您尚未创建该程序,我们建议您参考上一篇文章进行创建。 【Zephyr ®系列】第三部分:LED 闪烁和软件复用的第一步(日语博客)   Kconfig基础知识     Kconfig 是 Linux 内核中使用的一种配置系统。在 Zephyr 中,它用于管理是否“启用或禁用”软件功能,或者“设置哪些参数”,例如内核函数、设备驱动程序、子系统和应用程序特定的设置。 以下两个文件对 Kconfig 很重要: “Kconfig”文件定义了可选的配置项(符号)、它们的默认值和依赖关系。 "prj.conf" 文件*:应用程序开发人员在此文件中指定他们想要为 "Kconfig" 中定义的项目设置的值(例如,使用 "y" 启用它们或提供特定的数值)。 使用 Kconfig,您可以排除编译中不必要的代码并优化内存使用。 此外,Kconfig 和 prj.conf 文件都是以文本格式编写的。 如何启用此功能 prj.conf 文件启用整个项目的功能。 例如,ADC、DAC 和 OPAMP 驱动程序在 Kconfig 中定义。使用 Kconfig 中定义的函数时,需要在 prj.conf 文件开头添加“CONFIG_”来声明它们。 Kconfig:ADCの定義Kconfig:ADC定义 prj.conf例prj.conf 示例   设备树基础知识   Devicetree例设备树示例   设备树是一个文本文件,它描述了微控制器支持的硬件(CPU、内存、外设、引脚设置等),以及这些硬件的设置和配置。 然后将这些设置和配置展开成宏。   Zephyr 宏可以读取设备树中描述的信息,而不是直接将硬件地址写入 C 代码(硬编码),从而实现与硬件无关的编程。 节点和属性:硬件的每个元素在层次结构中都表示为一个“节点”,寄存器地址、中断号等则被描述为“属性”。 ".dts" 和 ".dtsi":每个微控制器和电路板的标准硬件配置都在 Zephyr 存储库中的 ".dts"(设备树源)和 ".dtsi"(包含)文件中预定义。 dts:被描述为电路板的设备树。 dtsi:描述 SoC/微控制器的设备树,由设备制造商提供。 ".overlay" 文件:当您想要覆盖特定应用程序的接线(例如,将 LED 连接到特定的 GPIO 引脚)或默认设置时,将创建此文件。   提高软件重用性的最佳实践   为了提高 Zephyr 软件的可重用性,遵循以下设计原则非常重要: 硬件相关部分与硬件无关部分的分离: C 代码(`main.c`)例如,避免直接描述具体的微控制器寄存器操作或引脚编号。 利用设备树别名:应用程序不应直接引用实际的硬件节点(例如 `&red_led` 或 `&gpioa`),而应引用在 `aliases` 节点中定义的抽象名称(例如 `led0`)。这样,只需更改别名指向的内容,即可轻松适配不同的开发板。 准备特定于电路板的设备树(覆盖) :当某些功能存在差异时,例如在衍生产品中,您可以仅对每个电路板上硬件不同的部分进行覆盖(覆盖)。 使用 Kconfig 切换功能:应用程序行为参数和特定功能的开/关状态使用 Kconfig 符号而不是 C 语言“#define”进行控制。   Kconfig 和设备树的实际应用   接下来,我们将通过创建一个简单的程序来学习如何使用 Kconfig 和设备树,以便我们能够在实践中实际使用它们。     创建一个简单的程序(动手实践) 该程序将通过修改我们上次创建的 LED 闪烁程序来创建,并将具有以下规格。   在这里,作为一项实践练习,我们将创建一个可以在“FRDM-MCXA153”和“FRDM-MCXN947”上运行的通用应用程序。 1. 程序规范 源代码:使用“第 3 部分:你的第一个 LED 闪烁程序”中的代码,并进行以下修改。 LED闪烁速度:可以使用Kconfig设置闪烁间隔。 按钮功能(启用/禁用):可通过 Kconfig 设置启用或禁用按钮功能。启用后,按下按钮可在 LED 闪烁和常亮之间切换。 输出板卡名称:启动时,Kconfig 中配置的“设备(板卡)名称”将输出到标准输出(终端)。 2. 目录结构   项目目录结构应如下所示:   将 Kconfig 文件和 boards 文件夹添加到上次创建的 LED 闪烁程序的“my_hello”文件夹中。添加文件的方法不限。 在 Windows 系统中,使用 PowerShell `ni` 命令或文本编辑器创建一个新文件,并将其保存在 `my_hello` 文件夹中。 在 Linux 系统中,可以使用 `touch` 命令创建一个新的空文件。   “boards/”目录下的文件用于处理硬件差异以及每个主板特有的独特设置。     my_hello/ ├── CMakeLists.txt ├── Kconfig <- 新規追加:アプリ独自のKconfig ├── prj.conf <- アプリの共通設定 ├── src/ │ └── main.c <- ハードウェア非依存の共通コード └── boards/ <- 新規作成フォルダ  ├── frdm_mcxa153.overlay <- 新規作成:FRDM-MCXA153用のデバイスツリー設定  ├── frdm_mcxa153.conf <- 新規作成:FRDM-MCXA153用のKconfig設定  ├── frdm_mcxn947_cpu0.overlay <- 新規作成:FRDM-MCXN947用のデバイスツリー設定  └── frdm_mcxn947_cpu0.conf <- 新規作成:FRDM-MCXN947用のKconfig設定   注意:通过在应用程序目录中创建特定文件,Zephyr 的构建系统(West)将自动识别它们并应用设置。 添加 Kconfig:您可以通过在应用程序文件夹中放置“Kconfig”文件来添加自己的配置符号。 板级特定设置(“boards/”目录):通过在应用程序中创建“boards”目录并将“[板级名称].overlay”或“[板级名称].conf”文件放置于其中,overlay和Kconfig覆盖将仅在以该板级为目标进行构建时自动应用。   3. 创建 Kconfig 和 prj.conf 文件 首先,在应用程序根目录中创建您自己的“Kconfig”文件,并定义特定于应用程序的参数。 my_hello/Kconfig   mainmenu "my LED blink" config CUSTOM_BLINK_RATE_MS int "LED blink rate in milliseconds" default 1000 help Set LED blink frequency. #LEDの点滅周期(ミリ秒)を設定します config ENABLE_BUTTON_TOGGLE bool "Enable button to toggle LED state" default y help Enable button to toggle LED state. # ボタン入力によるLEDの点滅/点灯状態>の切り替え機能を有効にします。 config BOARD_NAME_STRING string "Board Name String" default "Unknown Board" help Set board name for printf. # 標準出力に表示するボード名を設定します。 source "Kconfig.zephyr"     其次,作为整个应用程序的通用设置,还有“prj.conf”。这件事将会被写下来。 在 prj.conf 文件中,使用您刚刚创建的 Kconfig 符号按如下方式进行配置: my_hello/prj.conf   # GPIOの有効化 CONFIG_GPIO=y # アプリケーションの共通設定 CONFIG_CUSTOM_BLINK_RATE_MS=500 CONFIG_ENABLE_BUTTON_TOGGLE=y   4. 创建设备树覆盖层和板级特定设置 创建一个名为“boards”的目录,并为每个电路板准备必要的文件。 FRDM-MCXA153主板     我们将电路板上的按钮(`sw2`)映射出来,以便应用程序可以使用标准别名`sw0`访问它。`led0`已经在电路板定义中,因此这里可以省略,但如果需要,也可以显式地覆盖它。   my_hello/boards/frdm_mcxa153.overlay / { aliases { sw0 = &user_button_2; /* FRDM-MCXA153のユーザーボタン */ }; };   my_hello/boards/frdm_mcxa153.conf   CONFIG_BOARD_NAME_STRING="FRDM-MCXA153 Board"   通过在应用程序 (main.c) 中引用此 .conf(特定于板的 Kconfig)中的符号,可以使用 printf 函数将板名称输出到标准输出。 适用于 FRDM-MCXN947 同样,我们在 FRDM-MCXN947 中定义了“sw0”。这可以处理按钮硬件名称的任何差异。   事实上,如果硬件名称(因外围设备或实例而异)在不同电路板之间有所不同,则需要将实际硬件分配给设备树中的别名节点。 my_hello/boards/frdm_mcxn947_cpu0.overlay   / { aliases { sw0 = &user_button_3; /* FRDM-MCXN947のユーザーボタン */ }; };   my_hello/ boards/frdm_mcxn947_cpu0.conf   我将尝试仅在使用 MCXN947 构建时将 LED 闪烁速度设置为 250ms。   CONFIG_BOARD_NAME_STRING="FRDM-MCXN947 Board" CONFIG_CUSTOM_BLINK_RATE_MS=250 FRDM-MCXA153 和 FRDM-MCXN947 的应用程序代码相同,但您可以在此处单独配置 LED 的闪烁行为。 5. 与硬件无关的通用代码(main.c)创造 在“my_hello/src/main.c”中写入以下内容:   LED 控制部分重用了上一篇文章中创建的硬件无关代码(使用“led0”别名),并将 Kconfig 和按钮控制集成到其中。 my_hello/ src/main.c   #include #include #include /* Devicetreeのエイリアスを参照する */ /* どのボードでも、一番目のLEDは通常 "led0" と定義されています */ #define LED0_NODE DT_ALIAS(led0) #define SW0_NODE DT_ALIAS(sw0) /* エイリアスからGPIO仕様(ポート、ピン、フラグ)を取得 */ static const struct gpio_dt_spec led = GPIO_DT_SPEC_GET(LED0_NODE, gpios); /* ボタン機能がKconfigで有効化されている場合のみコンパイルされる部分 */ #ifdef CONFIG_ENABLE_BUTTON_TOGGLE static const struct gpio_dt_spec sw = GPIO_DT_SPEC_GET(SW0_NODE, gpios); static struct gpio_callback button_cb_data; static bool is_blinking = true; void button_pressed(const struct device *dev, struct gpio_callback *cb, uint32_t pins) { is_blinking = !is_blinking; if (!is_blinking) { /* 点滅オフ時はLEDを点灯させた状態にする */ gpio_pin_set_dt(&led, 1); } } #endif //CONFIG_ENABLE_BUTTON_TOGGLE int main(void) { int ret; /* Kconfigで設定されたボード名を出力 */ printf("Starting application on %s\n", CONFIG_BOARD_NAME_STRING); /* デバイスの準備確認 */ if (!gpio_is_ready_dt(&led)) { return -1; } /* ピンの設定 (Devicetreeで定義された初期状態などを考慮して設定) */ ret = gpio_pin_configure_dt(&led, GPIO_OUTPUT_ACTIVE); if (ret < 0) { return -1; } #ifdef CONFIG_ENABLE_BUTTON_TOGGLE if (!gpio_is_ready_dt(&sw)) { return -1; } ret = gpio_pin_configure_dt(&sw, GPIO_INPUT); if (ret < 0) { return -1; } ret = gpio_pin_interrupt_configure_dt(&sw, GPIO_INT_EDGE_TO_ACTIVE); if (ret < 0) { return -1; } gpio_init_callback(&button_cb_data, button_pressed, BIT(sw.pin)); gpio_add_callback(sw.port, &button_cb_data); #endif //CONFIG_ENABLE_BUTTON_TOGGLE while (1) { #ifdef CONFIG_ENABLE_BUTTON_TOGGLE if (is_blinking) { ret = gpio_pin_toggle_dt(&led); } #else /* ピンの状態を反転 (ボタン機能が無効な場合は常に点滅) */ ret = gpio_pin_toggle_dt(&led); #endif //CONFIG_ENABLE_BUTTON_TOGGLE /* Kconfigで設定された点滅間隔で待機 */ k_msleep(CONFIG_CUSTOM_BLINK_RATE_MS); } return 0; }     6. 构建并运行 现在,让我们实际测试一下它的功能。请参考上一篇文章,了解如何设置构建环境和启用 west 命令。 首先,按照下面的命令说明导航到已安装的 zephyrproject 存储库目录,并在继续操作之前启用 west。 已确认 FRDM-MCXA153(主)运行正常 使用以下命令构建并将其写入 FRDM-MCXA153。   ## ホームディレクトリからZephyrprojectディレクトリに移動 cd ~/zephyrproject ## west環境を有効化 source .venv/bin/activate ## zephyr v4.3をチェックアウトしていない場合は、前回(第3回 初めてのLチカとソフトウェアの再利用性)を参考にv4.3をチェックアウトしてください。 west build -b frdm_mcxa153 my_hello west flash     执行结果   コンソール出力控制台输出   LED点滅、点灯モード切り替えLED闪烁和常亮模式切换   终端上将显示“正在FRDM-MCXA153板上启动应用程序”的消息。 LED 灯以500 毫秒的间隔闪烁(“prj.conf”)。(设置)。 按下 SW2(“自定义开关”)即可将其打开,再按下即可使其恢复闪烁状态。 已确认FRDM-MCXN947运行正常 我们将使用完全相同的 C 源代码来构建该项目,只更改电路板规格。   # -pオプションを使用し、frdm_mcxa153のビルド情報をクリーンしてビルドします。 west build -p -b frdm_mcxn947//cpu0 my_hello west flash   执行结果   “boards/frdm_mcxn947_cpu0.conf”的内容将自动应用,终端将显示“在FRDM-MCXN947板上启动应用程序”。 LED 灯以250 毫秒的间隔快速闪烁(在“prj.conf”中配置)。 按下 SW3(MCXN947 上映射到“user_button_3”的按钮)同样可以在 LED 点亮和闪烁之间切换。 虽然 FRDM-MCXA153 和 FRDM-MCXN947 使用不同的 GPIO 来控制 LED 和开关按钮,但设备树有效地吸收了这些差异,这表明应用程序和硬件是如何清晰分离的。   总结     在本节课中,我们学习了 Zephyr 中 Kconfig 和设备树的基础知识,并练习了如何利用它们将硬件相关的部分与 C 代码分离。   我相信您已经体验到了一种强大的机制,可以在多个不同的电路板上重用相同的源代码,其中硬件设置被设备树覆盖(“overlay”)吸收,应用程序参数可以灵活地更改,并且可以使用特定于电路板的 Kconfig 文件(“conf”)轻松启用或禁用功能。   ========================== 我们目前无法回复此帖子“评论”部分留下的评论。 由此给您带来的不便,我们深表歉意。如有任何疑问,请参考“NXP 技术问题 - 如何联系我们(日语博客)”。 (如果您已经是恩智浦的分销商或与恩智浦有合作关系,您可以直接咨询您的代表。) 本文档概述了设备树和 Kconfig,这两项功能旨在增强 Zephyr 的软件重用性。随后,本文档详细介绍了在实践中使用这些功能所需的步骤。 读完 Zephyr 系列的第一册到第四册后,你将能够使用 Zephyr 实时操作系统编写程序。 通用微控制器 MCX 日本博客
View full article
PDB ADC pre trigger sequence error recovery Hi NXP community, ADC0/ADC1 Interrupts Stop After Runtime Flash Erase/Program Operation on S32K144 As a continuation of my previous question, I need some clarification on how to properly recover from a PDB ADC pre-trigger sequence error on the S32K144. I tried the following three methods, but only one of them worked correctly. Method 1 (working): Stop PDB0 and PDB1 before performing the flash erase/program operation. After the flash operation is complete, restart both PDBs and re-enable the corresponding ISRs. With this approach, no PDB sequence error occurs. Method 2: After the flash erase/program operation was completed, I stopped and restarted PDB0 and PDB1. However, a PDB pre-trigger sequence error occurred. I then attempted to recover by stopping and restarting the PDB modules again, but the sequence error persisted. Method 3: Method 3 (Not Working): I did not stop or restart PDB0 and PDB1 during the flash erase/program operation. Instead, after the operation completed, one pending PDB ISR and ADC ISR were triggered. Inside the PDB ISR, I attempted to clear the sequence error flag using: PDB0->CH[0].S &= (uint32_t)(~PDB_S_ERR_MASK); The corresponding ADC ISR was then executed, and reading the ADC result register cleared the COCO flag. I expected this to prevent further pre-trigger sequence errors, but the issue still persisted and this method did not work. My question is: once a PDB pre-trigger sequence error has been triggered, is it possible to recover the PDB/ADC operation and resume normal triggering without resetting the system? Or does the PDB need to be stopped and restarted beforehand to avoid entering an unrecoverable state? Re: PDB ADC pre trigger sequence error recovery Hi PetrS, I tried the following approach. After the flash erase operation without PDB stop, micro got one pending ADC ISR callback. Inside that callback, after reading the ADC result register, I call the functions below to check and recover from a PDB sequence error: ```c void PDB1_check_seq_err(void) { if ((PDB1->CH[0].S & PDB_S_ERR_MASK) != 0) { PDB1->CH[0].S &= (uint32_t)(~PDB_S_ERR_MASK); PDB1->SC &= (uint32_t)(~PDB_SC_PDBEN_MASK); PDB1->SC |= (uint32_t)PDB_SC_PDBEN_MASK; PDB1->SC |= (uint32_t)PDB_SC_SWTRIG_MASK; } } void PDB0_check_seq_err(void) { if ((PDB0->CH[0].S & PDB_S_ERR_MASK) != 0) { PDB0->CH[0].S &= (uint32_t)(~PDB_S_ERR_MASK); PDB0->SC &= (uint32_t)(~PDB_SC_PDBEN_MASK); PDB0->SC |= (uint32_t)PDB_SC_PDBEN_MASK; PDB0->SC |= (uint32_t)PDB_SC_SWTRIG_MASK; } } ``` The recovery sequence I used is: 1. Clear the `ERR` flag. 2. Stop the PDB. 3. Re-enable and restart the PDB. With this stop-and-start sequence, everything works correctly again: subsequent pre-triggers occur, and the ADC ISR callbacks are invoked normally. However, I still do not fully understand why this is necessary. The Reference Manual states that clearing the `ERR` condition and reading the ADC result register (which clears `COCO`) should release the lock. In my case, that alone does not seem to be sufficient, and a PDB stop/start sequence is required for recovery. Also, I observed that `PDBn->SC |= PDB_SC_SWTRIG_MASK` is not strictly required. Even without issuing a software trigger, the lock is released and the ADC ISR starts executing again after the PDB restart. Could you please clarify why stopping and restarting the PDB is necessary in this scenario, even though the RM indicates that clearing `ERR` and `COCO` should release the lock? Re: PDB ADC pre trigger sequence error recovery Hi, Clearing PDB_S_ERR alone is usually not sufficient to recover from a pre-trigger sequence error because the ADC/PDB sequence may already be out of synchronization. Based on your test results, preventing the condition by stopping the PDB before the flash operation and restarting it afterwards appears to be the most reliable approach. If recovery is attempted after the error occurs, I would recommend ensuring that both the PDB and ADC state are fully re-synchronized. This may include disabling the PDB, clearing pending PDB status flags, ensuring all pending ADC conversion results have been read (COCO cleared), re-enabling the PDB, and reloading the configuration if required before triggering resumes. According to the RM, the pre-trigger lock is released when the corresponding COCO flag is set, when the pre-trigger is disabled, or when the PDB is disabled, so a full PDB disable/enable sequence may also be worth investigating. BR, Petr
View full article
IMX93はデバイスツリー経由でのみCCM CLKOを自由に実行できます みなさんこんにちは、 MX93_PAD_CCM_CLKO3__CCMSRCGPCMIX_CLKO3 に、フリーランニング 12288000Hz のクロックを出力したいです。 マニュアルによると、これはIMX93_CLK_AUDIO_PLLから導き出すことができるはずです。 device-treeのみでこれを実現する方法のヒントを教えてもらえますか? Linux Re: imx93 free running ccm clko via device tree only IMX93クロックドライバーを参照してください。これをサポートするには新しいPLLを追加する必要があります。DTSだけを変更することはできません
View full article
OP-TEE in Falcon Mode || iMX8MP_EVK Hi, I want to enable OP-TEE along with Falcon Mode on the i.MX8MP EVK. Machine: imx8mpevk Repository: https://github.com/nxp-imx/imx-manifest Branch: imx-linux-walnascar XML: imx-6.12.34-2.1.0.xml Currently, I am using meta-imx-fastboot (lf-6.12.20-2.0.0-secure) to achieve fast boot via Falcon Mode. However, when Falcon Mode is enabled, OP-TEE gets disabled. As per my requirement, I need both OP-TEE and Falcon Mode to be enabled simultaneously. Could you please guide me on how to enable OP-TEE in Falcon Mode on the i.MX8MP EVK? i.MX 8 Family | i.MX 8QuadMax (8QM) | 8QuadPlus i.MX 8M | i.MX 8M Mini | i.MX 8M Nano Security Yocto Project Re: OP-TEE in Falcon Mode || iMX8MP_EVK Hi @Sanjiv_Mns  Currently, the meta-imx-fastboot layer does not support OP-TEE. It should be possible in principle, but it is not implemented yet. Explanation: In the default BSP, the OP-TEE start address and size are calculated during the U-Boot proper boot stage based on the rom_pointer (see: https://github.com/nxp-imx/uboot-imx/blob/lf-6.12.20-2.0.0/arch/arm/mach-imx/dt_optee.c#L13). The rom_pointer has different meaning/values in the SPL, compared to U-Boot proper. So, the ft_add_optee_node function cannot be executed from SPL without further changes. Thanks, Elena Re: OP-TEE in Falcon Mode || iMX8MP_EVK Hi @elena_popa  Could you please guide me on how to proceed further to achieve the SPL → OP-TEE → Linux boot flow? I’d like to understand the correct steps and components involved to make this work reliably. I also came across the following link where a similar flow was implemented on STM32MP platforms: https://patchwork.ozlabs.org/project/uboot/cover/[email protected]/ Could you please let me know whether this approach is applicable to my use case, or if parts of it can be reused or adapted for achieving the same boot sequence on my platform? Re: OP-TEE in Falcon Mode || iMX8MP_EVK Hi @elena_popa I have already completed this activity, and it is now booting successfully on my i.MX8MP board. The current boot flow is: SPL → ATF → OP-TEE → Linux Everything is working as expected. Thank you for your comments @elena_popa   [ 0.412349] optee: probing for conduit method. [ 0.412373] optee: revision 4.6 (788dc101b05ae47b) [ 0.412678] optee: dynamic shared memory is enabled [ 0.413062] optee: initialized driver Re: OP-TEE in Falcon Mode || iMX8MP_EVK Hi @Sanjiv_Mns  I managed to enable and run OP-TEE in Falcon Mode for i.MX 8MP.  The boot flow on i.MX 8MP will be: SPL -> ATF -> OP-TEE -> Linux Here are the steps: 1. Remove the following line in the conf/layer.conf of the meta-imx-fastboot layer. MACHINE_FEATURES:remove = "optee"  2. In imx-boot mkimage source code, modify the iMX8M/mkimage_fit_atf_kernel.sh script to add the OP-TEE binary into the FIT image. 6a7,9 > # keep backward compatibility > [ -z "$TEE_LOAD_ADDR" ] && TEE_LOAD_ADDR="0xfe000000" > 19a23,41 > [ -z "$BL32" ] && BL32="tee.bin" > PAD=../scripts/pad_image.sh > > if [ ! -f $BL32 ]; then > BL32=/dev/null > else > echo "Building with TEE support, make sure $BL31 is compiled with spd. If you do not want tee, please delete $BL32" >&2 > if [ $TEE_COMPRESS_ENABLE ]; then > echo "Start compress $BL32" >&2 > rm -f $BL32.lz4 > lz4 -9 $BL32 $BL32.lz4 >&2 > BL32=$BL32.lz4 > ./$PAD $BL32 >&2 > fi > echo "$BL32 size: " >&2 > ls -lct $BL32 | awk '{print $5}' >&2 > LOADABLES="$LOADABLES, \"tee-1\"" > fi > 71a94,103 > tee-1 { > description = "TEE firmware"; > data = /incbin/("$BL32"); > type = "firmware"; > arch = "arm64"; > compression = "none"; > load = <$TEE_LOAD_ADDR>; > entry = <$TEE_LOAD_ADDR>; > }; > 87c119 < loadables = "kernel","dtb"; --- > loadables = "tee-1","kernel","dtb"; 3. In the kernel device tree, add manually the OP-TEE nodes (firmware and reserved memory). Edit the imx8mp.dtsi device tree and: - add the following OP-TEE firmware node in the root node ("/"). firmware { optee { compatible = "linaro,optee-tz"; method = "smc"; }; }; - add the OP-TEE reserved memory regions under the reserved-memory node: optee_core@56000000 { reg = <0 0x56000000 0 0x1e00000>; no-map; }; optee_shm@57e00000 { reg = <0 0x57e00000 0 0x200000>; no-map; };  4. Build the image and write it on the boot device. 5. To check that OP-TEE has started and Linux probed the driver, run: root@imx8mp-lpddr4-evk:~# dmesg | grep optee [ 0.000000] OF: reserved mem: 0x0000000057e00000..0x0000000057ffffff (2048 KiB) nomap non-reusable optee_shm@57e00000 [ 0.000000] OF: reserved mem: 0x0000000056000000..0x0000000057dfffff (30720 KiB) nomap non-reusable optee_core@56000000 [ 2.581777] optee: probing for conduit method. [ 2.590862] optee: revision 4.8 (e7ed997213779e3d) [ 2.596363] optee: dynamic shared memory is enabled [ 2.601567] optee: initialized driver 6. If you want to test the OP-TEE you can run xtest. root@imx8mp-lpddr4-evk:~# xtest Run test suite with level=0 TEE test application started over default TEE instance ###################################################### # # regression+pkcs11+regression_nxp # ###################################################### * regression_1001 Core self tests o regression_1001.1 Core self tests regression_1001.1 OK o regression_1001.2 Core dt_driver self tests regression_1001.2 OK o regression_1001.3 Core transfer list self tests ..... +----------------------------------------------------- 49354 subtests of which 0 failed 161 test cases of which 0 failed 0 test cases were skipped TEE test application done! Please, let me know if you have issues during enablement. Thanks, Elena
View full article
S32N55 HSE2 — CRS(APP) Domain Secure Debug Authentication using ADKP Hi We are working on Secure Debug authentication for the S32N55 platform and have successfully implemented FSS domain debug authorization using ADKP (HSE_OTP_FOEM_ADKP_ATTR_ID) via SDC-600. We are now trying to extend this to the CRS domain (HSE_DEBUG_DOMAIN_APP = 0x1B) and have the following questions: --- [Q1] Is ADKP usable for CRS domain Secure Debug authentication? After provisioning ADKP via HSE_OTP_FOEM_ADKP_ATTR_ID, is it possible to use the same ADKP for CRS domain (APP) Secure Debug authentication via HSE_DEBUG_CMD_APP_CHALLENGE? --- [Q2] Does SetOwnerDebugKeyMap() need to be called separately per MU (FSS MU vs CRS MU)? Per the RM description of hseOwnerDebugKeyMapConfig_t: "This service is called for each installed device owner individually from an owning MU. HSE FW assumes the owner identity based on the MU this service request is sent to." Our current implementation calls SetOwnerDebugKeyMap() (HSE_SRV_ID_DEBUG_KEY_MAPPING) only through FSS MU (MU0), mapping aOwnerAuthRef[0] = HSE_OTP_KEY_FOEM_ADKP. - Is a separate SetOwnerDebugKeyMap() call required through the CRS MU for CRS domain authentication? - If so, which MU number should be used for the CRS domain on S32N55? --- [Q3] Does SetOwnerDebugKeyMap() need to be called on every boot? The RM states: "Only the numOfAuthorizationRefEntries and numOfAuthenticationRefEntries are logged, rest of the entries are ignored." This implies the key mapping is volatile and not stored in NVM. Does this mean SetOwnerDebugKeyMap() must be called on every boot (after SU rights are granted) for both FSS and CRS domains? --- [Q4] Correct keyRef value for APP_CHALLENGE In hseDebugAuthorizeStartCmd_t, the keyRef field references the index mapped via hseOwnerDebugKeyMapConfig_t. Since we map aOwnerAuthRef[0] = HSE_OTP_KEY_FOEM_ADKP, we send keyRef = 0x00 for CRS domain authentication. Is this correct? --- [Q5] Response size and packet structure for APP_CHALLENGE Per hseDebugAuthorizeProofProvCmd_t byte map, the packet structure is always 32 bytes (2 packets x 8 words). HSE_CR_APP_RESPONSE_SIZE = 16U vs HSE_CR_FSS_OR_HSE_RESPONSE_SIZE = 32U. For APP_CHALLENGE, should the host send: - 16 bytes of AES-encrypted response + 16 bytes of zero padding = 32 bytes total? - Or only 16 bytes? Currently, after sending FLAG_START + DebugSignalMap(4 bytes) + Response(16 bytes) + FLAG_END, HSE2 does not respond and T32 hangs waiting indefinitely. When we send 32 bytes (16-byte response + 16-byte zero padding), we observe the same hang. --- For reference: - Sherpa_Cdd_AllocateChannel() always allocates MU0 (FSS) - SetOwnerDebugKeyMap(): aOwnerAuthRef[0] = HSE_OTP_KEY_FOEM_ADKP (0x00000302), called with SU rights - crs_auth.cmm: DEBUG_TARGET=0x1B, OID=0xFF*16, keyRef=0x00 - AUTH_MODE_REQ passes successfully (HSE_DEBUG_WAITING_RESPONSE_TO_CHG received) - Challenge received: 32 bytes - After sending Response, no ACK (0x4A4A4A4A) received from HSE2 Please see the attached CMM script and log for reference. Thank you in advance. Re: S32N55 HSE2 — CRS(APP) Domain Secure Debug Authentication using ADKP Hello, Thank you for your suggestion. As requested, I have created a new post to track the CRS (APP domain) Secure Debug authentication issue: [S32N55 HSE2 — CRS (APP Domain) Secure Debug Authentication via hseDebugCardCmd_t] (Please search the title above in NXP Community) This issue is currently blocking our customer delivery schedule. Could you please review the new post at your earliest convenience? The CMM script (crs_auth.cmm) and log file are attached in the new post. Thank you very much for your urgent support. Re: S32N55 HSE2 — CRS(APP) Domain Secure Debug Authentication using ADKP Hello, Thank you for your response.  We have additional questions regarding hseDebugCardCmd_t implementation for CRS (APP) domain Secure Debug authentication on S32N55. --- [Q1] Is the Owner ID (ownerId) in hseDebugCardInfo_t the same value as provisioned via hseOwnerDebugKeyMapConfig_t? Our device is configured in single-owner scenario where Fss_Firmware_au8Oid[] = {0xFF * 16}. Should the ownerId field in hseDebugCardCmd_t also be set to 0xFF * 16? Or does it need to match a specific value provisioned during Device Owner installation? --- [Q2] Does hseDebugCardCmd_t need to be sent after APP_CHALLENGE, or instead of hseDebugAuthorizeProofProvCmd_t? Per RM: "For APP based options, debug signals are enabled and authorized only through the debug cards authentication (see hseDebugCardCmd_t)(field is ignored)." Our current flow: 1. AUTH_MODE_REQ (DEBUG_TARGET=0x1B) 2. rx_authmode → HSE_DEBUG_WAITING_RESPONSE_TO_CHG received 3. APP_CHALLENGE → rx_challenge (32 bytes received) 4. hseDebugCardCmd_t sent directly (skipping hseDebugAuthorizeProofProvCmd_t) 5. HSE2 stops responding (T32 hangs at FLAG_END of CARD_REQUEST) Should hseDebugAuthorizeProofProvCmd_t (appChallengeAuth = AES256-CMAC) be sent BEFORE hseDebugCardCmd_t? Or should hseDebugCardCmd_t be sent directly after rx_challenge without ProofProv? --- [Q3] What is the correct Authentication Tag (authTag) computation for hseDebugCardTag_t when using MAC scheme? We are using: authScheme.macScheme.macAlgo = HSE_MAC_ALGO_CMAC (0x11) authTag = AES256-CMAC(key=ADKP, data=Challenge[32 bytes]) authLen = 16 Is this the correct computation? Or should the CMAC input include additional fields (OID, domain map, etc.)? --- [Q4] What is the correct packet structure for hseDebugCardCmd_t? Based on the RM byte map, our current implementation: Packet 1 (32 bytes): KRI(4B) + CMD(4B=0x5DCDEB77) + OID(16B=0xFF*16) + AuthScheme(8B=CMAC) Packet 2 (32 bytes): enabledDebugDomainMap(bit27=0x08000000) + padding(28B) Packet 3: debugDomainMapping(4B) + numOfAllowedUids(2B) + reserved(2B) + authLen(2B) + reserved(2B) + authTag(256B) Is this structure correct? HSE2 stops responding after receiving the OID field (0xFF bytes). --- Could you please let me know your email?  I will send you cmm file for crs auth. BRs. Re: S32N55 HSE2 — CRS(APP) Domain Secure Debug Authentication using ADKP Hello, @EddiePark  Thanks for your post. Pleased to hear that the Secure Debug authentication for the S32N55 platform have successfully implemented FSS domain debug authorization using ADKP (HSE_OTP_FOEM_ADKP_ATTR_ID) via SDC-600. I will continue to help check with the details for your new issues, sorry that I did not see the attached CMM script and log for reference, would you mind uploading them again to share with us? BR Chenyin Re: S32N55 HSE2 — CRS(APP) Domain Secure Debug Authentication using ADKP Hello, @EddiePark  Thanks for your reply. There are already 6 questions existed in this post, and may take a relative long time to investigate, in order for improving the efficiency,  for additional questions, I suggest creating a new post to track. And as you mentioned, there would be scripts/logs attached for checking, but I do not see in your post, may I know if they would be uploaded again? BR Chenyin Re: S32N55 HSE2 — CRS(APP) Domain Secure Debug Authentication using ADKP Hello, @EddiePark  Thanks for your reply. 1. As always, we will try our best to support your queries. 2. I understand it is a urgence issue, but as what I had mentioned in previous support, S32N55 is still in pre-production phase, it is not yet supported via the community channel, (during this period, we suggest directly contacting your FAE/Distributor to accelerate the efficiency)so it would take relative long time to reply, furthermore, the secure debug with LC advanced is usually at a relatively late stage of development, the document/samples are still limited in recent term. Sorry for your inconvenience. BR Chenyin Re: S32N55 HSE2 — CRS(APP) Domain Secure Debug Authentication using ADKP Hello, @EddiePark  Thanks for your patience, below are some initial comments for your reference [Q1] Is ADKP usable for CRS domain Secure Debug authentication? [Comments]: Yes, the used key for App domain secure debug authentication is selected from the hseOwnerDebugKeyMapConfig_t->pOwnerCardAuthenticationRef, it could includes the ADKP 's keyhandle. [Q2] Does SetOwnerDebugKeyMap() need to be called separately per MU (FSS MU vs CRS MU)? [Comments]: SetOwnerDebugKeyMap() should bound to the Device owner , not MU. The Device owner could includes multiple cohorts which has multiple MU instances. If FSS and CRS are included in the same device owner, it could be called by the CRS MU or FSS MU. [Q3] Does SetOwnerDebugKeyMap() need to be called on every boot? [Comments]:  It should not be called on every boot, the configuration should be saved in the SYS-IMG or fuse, otherwise the secure debug will fail after repowering the device, it does not meet the design expectation of secure debug. However not sure where to store this configuration from the current available resource. [Q4] Correct keyRef value for APP_CHALLENGE In hseDebugAuthorizeStartCmd_t, the keyRef field references the index mapped via hseOwnerDebugKeyMapConfig_t. Since we map aOwnerAuthRef[0] = HSE_OTP_KEY_FOEM_ADKP, we send keyRef = 0x00 for CRS domain authentication. Is this correct? [Comments]: Yes, if  ADKP handle is the first entry of OwnerCardAuthenticationRef and the user wants to use ADKP to authenticate CRD debug, the authKeyRef  should be 0(The index of ADKP handle entry) [Q5] Response size and packet structure for APP_CHALLENGE [Comments]: For App debug, besides the debug signal map and challenge response data fileds, the other unused data  in packet 1 can be filled with 0. Since the corresponding documents are not yet updated fully for this topic(the S32N55 is still at early stage), there is limited information we would provide. Sorry for your inconvenience. BR Chenyin  Re: S32N55 HSE2 — CRS(APP) Domain Secure Debug Authentication using ADKP Hello, Thank you again for your continued support. We fully understand that S32N55 is still in the pre-production phase and that documentation/resources for this topic are currently limited. We sincerely apologize for the additional questions, but as our customer delivery schedule is approaching and this is a critical blocker, we are compelled to ask for a bit more guidance. We have applied your previous comments (Q1-Q5): keyRef=0x00, ADKP in pOwnerCardAuthenticationRef, and Packet 1 filled to 32 bytes (debugSignalMap 4B + appChallengeAuth 16B + unused 12B = 0). However, we are still blocked at the ProofProv / CARD_REQUEST stage. Our current status: 1. AUTH_MODE_REQ (DEBUG_TARGET=0x1B) -> OK (HSE2 returns 0x4A4A4A4A) 2. APP_CHALLENGE -> OK (32-byte Challenge received) 3. ProofProv (hseDebugAuthorizeProofProvCmd_t): - Packet 1 = debugSignalMap(4B=0) + appChallengeAuth(16B AES256-CMAC) + unused(12B=0) - All 32 bytes transmitted successfully over SDC-600 - >>> HSE2 gives NO response after this <<< The SDC-600 TX appears to stall shortly after ~20 bytes and HSE2 never sends any response frame. Could you please clarify the following about the APP (CRS) domain authentication sequence: [Q1] After the host sends ProofProv (hseDebugAuthorizeProofProvCmd_t with appChallengeAuth) for APP_CHALLENGE, does HSE2 send an intermediate response frame back to the host? Or does HSE2 remain silent and wait for the next command? For reference, in the FSS domain, after ProofProv the HSE2 returns 0x4A4A4A4A. We observe NO such response in APP domain. Is this expected? [Q2] What is the correct ordering between ProofProv (hseDebugAuthorizeProofProvCmd_t) and CARD_REQUEST (hseDebugCardCmd_t) for APP_CHALLENGE? - Option A: APP_CHALLENGE -> ProofProv -> (HSE2 response?) -> CARD_REQUEST - Option B: APP_CHALLENGE -> CARD_REQUEST directly (ProofProv skipped for APP) - Option C: some other sequence Since RM states debugSignalMap is 'ignored' for APP and authorization happens 'only through the debug card authentication', should ProofProv be sent at all for APP domain, or should we go directly to CARD_REQUEST after the challenge? [Q3] Could you please provide the complete command sequence for APP (CRS) domain Secure Debug authentication from COMM_START to the final authorization response? We would like to confirm the exact order and which commands expect a response from HSE2, specifically: COMM_START -> AUTH_MODE_REQ -> APP_CHALLENGE -> [ProofProv?] -> [CARD_REQUEST?] -> [final response?] Any reference flow or example for the APP/CRS domain would be extremely helpful, as the current behavior (HSE2 silent after ProofProv) does not match the FSS domain flow. Thank you very much for your understanding and support. Best regards, Re: S32N55 HSE2 — CRS(APP) Domain Secure Debug Authentication using ADKP Hello,   Thanks for your reply, I understand, and will always. try our best to support. 1. I have downloaded the cmm and auth files you shared from the other post S32N55 HSE2 CRS domain authentication does not complete, are they still the same one currently used? 2. For your questions listed later: [Q1] Is the Owner ID (ownerId) in hseDebugCardInfo_t the same value as provisioned via hseOwnerDebugKeyMapConfig_t? [Comments]: Yes, the OID of hseDebugCardInfo_t is just the ownerid of Device Owner installation service. [Q2] Does hseDebugCardCmd_t need to be sent after APP_CHALLENGE, or instead of hseDebugAuthorizeProofProvCmd_t? [Comments]: hseDebugAuthorizeProofProvCmd_t should be sent before sending CARD_REQUEST [Q3] What is the correct Authentication Tag (authTag) computation for hseDebugCardTag_t when using MAC scheme? [Comments]:  Sorry that no obvious description about this in API RM. But the authentication tag for App domain may not use the received challenge, the challenge is used for hseDebugAuthorizeProofProvCmd_t. For user's CRS domain debug, maybe it is authTag = AES256-CMAC(key=ADKP, data=hseDebugCardInfo_t). You may have a try. [Q4] What is the correct packet structure for hseDebugCardCmd_t? [Comments]:  The structure of hseDebugCardCmd_t could be referred to the comment in HSE FW API interface which is more clear than the description in HSE FW API RM. by checking your original script shared, we found some errors about hseDebugCardCmd_t structure, see the attached word. For any other files that you may not be conveniently shared within the post, you may send them to me via the private message BR Chenyin
View full article
S32J100ではMCU_performresetは発生していません こんにちは、 Mcu_performReset機能を使ってコントローラをリセットしようとしていますが、PCはリセット機能から出てきて、このリセット機構Power_Ip_Specific_RequestPerformReset()を扱う機能には機能リセットか破壊リセットかのデータがありません。S32DSの設定を試みましたが、問題は解決しません。 私はSW32J100_RTD_R23-11_0.8.0_CD04_HF01、S32DSバージョン3.6.7を使用しています。 どこで間違っているのか教えてもらえますか? ありがとうございます アモル Re: MCU_performreset is not happening in S32J100 こんにちは、 @PavelL さん。 状況は理解しました。この件については現場のエンジニアに連絡します。 サポートありがとうございます。 よろしくお願いいたします。 アモル Re: MCU_performreset is not happening in S32J100 こんにちは、 @Ajadhav5 さん。 現在お手元にある製品、まだ正式に発売されていないNPI(新製品導入)についてお手伝いしています。 これらの製品の早期アクセス権を得たお客様は、現場エンジニアを割り当てていることにご注意ください。指定されたフィールドエンジニアが、この製品に関する問題や懸念、問い合わせの主要なサポートチャネルとなります。 正式リリース後、オンラインサポートチームは本製品に対してより幅広いサポートを展開していきます。それまでは、私たちは必要な支援を提供する体制が整っていません。 このマターについてご理解いただけるとありがとうございます。今後もパートナーシップをさらに深めていきたいと思います。ご質問があれば、ぜひフィールドエンジニアにご連絡いただくか、私と私のチームに直接お問い合わせください。 ご理解いただきありがとうございます。 よろしくお願いいたします。 パベル
View full article
CODEWARRIOR 11.1 I used a M9S08QG8 micro chip, with this code in 1984. I am using windows 11 now. Is there a compiler that will debug this code Now. Also, is this chip still made? void my_main(void) { initial(); } void initial(void) { if(loopcount==2){goto initend;} PTADD_PTADD0 = 0; //io direction PTADD_PTADD1 = 0; PTADD_PTADD2 = 0; PTADD_PTADD3 = 1; PTBDD_PTBDD0 = 1; PTBDD_PTBDD1 = 1; //PTADD_PTADD4 = 0; //io direction //PTADD_PTADD5 = 0; //PTBDD_PTBDD6 = 1; //osc direction //PTBDD_PTBDD7 = 0; //PTBPE_PTBPE6 = 1; //pullup resistor //PTBPE_PTBPE7 = 0; //PTAPE_PTAPE0 = 0; //PTAPE_PTAPE1 = 0; //PTAPE_PTAPE2 = 0; //PTAPE_PTAPE4 = 0; //PTAPE_PTAPE5 = 0; //ICSC1_IREFS = 0; //select external osc param //ICSC1_CLKS0 = 0; //ICSC1_CLKS1 = 1; //ICSC2_EREFS = 0; //ICSC2_BDIV0 = 0; //ICSC2_BDIV1 = 0; PTAD_PTAD0 = 0; PTAD_PTAD1 = 0; PTAD_PTAD2 = 0; PTAD_PTAD3 = 0; PTBD_PTBD0 = 1; PTBD_PTBD1 = 1; bobbin_one_white=0; bobbin_two_white=0; bobbin_one_black=0; bobbin_two_black=0; bobbin_count_one=0; bobbin_count_two=0; bobbin_one_count_up_down = 20; bobbin_two_count_up_down = 20; bobbin_three_count_up_down = 20; bobbin_four_count_up_down = 20; rewind1 = 1; rewind2 = 1; rewind3 = 1; rewind4 = 1; programlength = 10; buzzcount = 0; buzzdelay = 0; buzzonoff = 1; needle = 20; delay = 100; light = 20; speed = 1000; c=0; //__RESET_WATCHDOG(); for(speed=0;speed<=1000;speed++){ PTAD_PTAD3=1;} //__RESET_WATCHDOG(); for(speed=0;speed<=1000;speed++){ PTAD_PTAD3=0;} //__RESET_WATCHDOG(); for(speed=0;speed<=1000;speed++){ PTAD_PTAD3=1;} //__RESET_WATCHDOG(); for(speed=0;speed<=1000;speed++){ PTAD_PTAD3=0;} PTAD_PTAD3 = 0; //buzzonoff = 1; buzzonoff = 0; initend: PTAD_PTAD3 = 1; //PTAD_PTAD3 = 0; c=0; peace(); } void peace(){ loopcount=2; onemoretime: buzzer(); //__RESET_WATCHDOG(); for(speed=0;speed<=delay;speed++){} if(PTAD_PTAD2==0){PTAD_PTAD3=0;buzzonoff=1;} //if(PTAD_PTAD2==0){setlength();} // winding bobbin on bobbin winder if(PTAD_PTAD0==0){bobbin_one_black++;PTBD_PTBD1=0;if(bobbin_count_one==1){bobbin_count_one=2;}} if(PTAD_PTAD0==1){bobbin_one_white++;PTBD_PTBD1=1;halfturna=1;bobbin_count_one=1;} if(bobbin_count_one==2){ if(halfturna == 1){fullturna=1;bobbin_count_one=0;}} // hook sewing if(PTAD_PTAD1==0){bobbin_two_black++;PTBD_PTBD0=0;if(bobbin_count_two==1){bobbin_count_two=2;}} if(PTAD_PTAD1==1){bobbin_two_white++;PTBD_PTBD0=1;halfturnb=1;bobbin_count_two=1;} if(bobbin_count_two==2){ if(halfturnb== 1){fullturnb=1;bobbin_count_two=0;}} if(fullturna==1)goto bobbinwinder; if(fullturnb==1)goto hook; goto onemoretime; Re: CODEWARRIOR 11.1 Hello, The CodeWarrior tool version 11.1, is supported in windows 11, this tool supports different connections [P&E USB Multilink Universal / USB Multilink, P&E Cyclone, Open-Source BDM, P&E Full chip simulation] You can download the tool from this link: CodeWarrior® for MCUs (Eclipse IDE) v11.1 The device status is in "NOT RECOMMENDED FOR NEW DESIGNS (NRND)", but you can still order from the distributors available stock, please refer to product part page in buy options section MC9S08QG8CDTE Product Information | NXP Semiconductors Best Regards, Luis
View full article
コードウォリアー 11.1 I used a M9S08QG8 micro chip, with this code in 1984. I am using windows 11 now. Is there a compiler that will debug this code Now. Also, is this chip still made? void my_main(void) { initial(); } void initial(void) { if(loopcount==2){goto initend;} PTADD_PTADD0 = 0; //io direction PTADD_PTADD1 = 0; PTADD_PTADD2 = 0; PTADD_PTADD3 = 1; PTBDD_PTBDD0 = 1; PTBDD_PTBDD1 = 1; //PTADD_PTADD4 = 0; //io direction //PTADD_PTADD5 = 0; //PTBDD_PTBDD6 = 1; //osc direction //PTBDD_PTBDD7 = 0; //PTBPE_PTBPE6 = 1; //pullup resistor //PTBPE_PTBPE7 = 0; //PTAPE_PTAPE0 = 0; //PTAPE_PTAPE1 = 0; //PTAPE_PTAPE2 = 0; //PTAPE_PTAPE4 = 0; //PTAPE_PTAPE5 = 0; //ICSC1_IREFS = 0; //select external osc param //ICSC1_CLKS0 = 0; //ICSC1_CLKS1 = 1; //ICSC2_EREFS = 0; //ICSC2_BDIV0 = 0; //ICSC2_BDIV1 = 0; PTAD_PTAD0 = 0; PTAD_PTAD1 = 0; PTAD_PTAD2 = 0; PTAD_PTAD3 = 0; PTBD_PTBD0 = 1; PTBD_PTBD1 = 1; bobbin_one_white=0; bobbin_two_white=0; bobbin_one_black=0; bobbin_two_black=0; bobbin_count_one=0; bobbin_count_two=0; bobbin_one_count_up_down = 20; bobbin_two_count_up_down = 20; bobbin_three_count_up_down = 20; bobbin_four_count_up_down = 20; rewind1 = 1; rewind2 = 1; rewind3 = 1; rewind4 = 1; programlength = 10; buzzcount = 0; buzzdelay = 0; buzzonoff = 1; needle = 20; delay = 100; light = 20; speed = 1000; c=0; //__RESET_WATCHDOG(); for(speed=0;speed<=1000;speed++){ PTAD_PTAD3=1;} //__RESET_WATCHDOG(); for(speed=0;speed<=1000;speed++){ PTAD_PTAD3=0;} //__RESET_WATCHDOG(); for(speed=0;speed<=1000;speed++){ PTAD_PTAD3=1;} //__RESET_WATCHDOG(); for(speed=0;speed<=1000;speed++){ PTAD_PTAD3=0;} PTAD_PTAD3 = 0; //buzzonoff = 1; buzzonoff = 0; initend: PTAD_PTAD3 = 1; //PTAD_PTAD3 = 0; c=0; peace(); } void peace(){ loopcount=2; onemoretime: buzzer(); //__RESET_WATCHDOG(); for(speed=0;speed<=delay;speed++){} if(PTAD_PTAD2==0){PTAD_PTAD3=0;buzzonoff=1;} //if(PTAD_PTAD2==0){setlength();} // winding bobbin on bobbin winder if(PTAD_PTAD0==0){bobbin_one_black++;PTBD_PTBD1=0;if(bobbin_count_one==1){bobbin_count_one=2;}} if(PTAD_PTAD0==1){bobbin_one_white++;PTBD_PTBD1=1;halfturna=1;bobbin_count_one=1;} if(bobbin_count_one==2){ if(halfturna == 1){fullturna=1;bobbin_count_one=0;}} // hook sewing if(PTAD_PTAD1==0){bobbin_two_black++;PTBD_PTBD0=0;if(bobbin_count_two==1){bobbin_count_two=2;}} if(PTAD_PTAD1==1){bobbin_two_white++;PTBD_PTBD0=1;halfturnb=1;bobbin_count_two=1;} if(bobbin_count_two==2){ if(halfturnb== 1){fullturnb=1;bobbin_count_two=0;}} if(fullturna==1)goto bobbinwinder; if(fullturnb==1)goto hook; goto onemoretime; Re: CODEWARRIOR 11.1 こんにちは、 CodeWarriorツールバージョン11.1はWindows 11でサポートされており、このツールはさまざまな接続に対応しています[P&E USB Multilink Universal / USB Multilink、P&E Cyclone、オープンソースBDM、P&E Full chip simulation] このツールはこちらのリンクからダウンロードできます: CodeWarrior® for MCUS (Eclipse IDE) v11.1 デバイスの状態は「新しいデザインには推奨されません(NRND)」ですが、代理店の在庫からも注文可能です。製品情報の購入オプションセクションMC9S08QG8CDTE製品部品ページを参照してください 。NXPセミコンダクターズ 敬具、ルイス
View full article
PDB ADC プリトリガーシーケンスエラー回復 こんにちは、NXPコミュニティの皆さん、 S32K144では、ランタイムフラッシュ消去/プログラム操作後にADC0/ADC1割り込みが停止します。 前回の質問の続きとして、S32K144におけるPDB ADCのプリトリガーシーケンスエラーから適切に復旧する方法について、いくつか説明が必要です。 以下の3つの方法を試しましたが、そのうち1つだけが正しく動作しました。 方法1(動作中): フラッシュ消去/書き込み操作を実行する前に、PDB0とPDB1を停止してください。 フラッシュ処理が完了したら、両方のPDBを再起動し、対応するISRを再度有効にします。 この方法を用いると、PDB配列のエラーは発生しない。 方法2: フラッシュメモリの消去/書き込み操作が完了した後、PDB0とPDB1を停止して再起動しました。しかし、PDBプレトリガーシーケンスエラーが発生しました。そこで、PDBモジュールを停止して再起動することで復旧を試みましたが、シーケンスエラーは解消されませんでした。 方法3: 方法3(効果なし): フラッシュ消去/書き込み操作中、PDB0とPDB1を停止または再起動しませんでした。その代わりに、操作が完了した後、保留中のPDB ISRとADC ISRがそれぞれ1つずつトリガーされました。 PDB ISR内で、以下の方法でシーケンスエラーフラグをクリアしようと試みました。 PDB0->CH[0].S &= (uint32_t)(~PDB_S_ERR_MASK); 対応するADC割り込みサービスルーチンが実行され、ADC結果レジスタを読み取ることでCOCOフラグがクリアされた。これでさらなるプリトリガーシーケンスエラーを防ぐつもりでしたが、問題は依然として解決せず、この方法はうまくいきませんでした。 私の質問は、PDBプリトリガーシーケンスエラーが発生した場合、システムをリセットせずにPDB/ADCの動作を回復し、通常のトリガー動作を再開することは可能かということです。それとも、回復不能な状態に陥るのを避けるために、PDBを事前に停止して再起動する必要があるのでしょうか? Re: PDB ADC pre trigger sequence error recovery こんにちは、 PDB_S_ERRをクリアするだけでは、ADC/PDBシーケンスが既に同期していない可能性があるため、プリトリガーシーケンスエラーからの回復には通常不十分です。テスト結果に基づくと、フラッシュ処理の前にPDBを停止し、処理後に再起動することで、この問題を回避するのが最も確実な方法であると思われます。 エラー発生後に復旧を試みる場合は、PDBとADCの両方の状態が完全に再同期されていることを確認することをお勧めします。これには、PDB の無効化、保留中の PDB ステータス フラグのクリア、保留中のすべての ADC 変換結果が読み取られていることの確認 (COCO がクリアされていること)、PDB の再有効化、および再開をトリガーする前に必要に応じて構成の再読み込みが含まれる場合があります。 RMによると、プレトリガーロックは対応するCOCOフラグが設定されたとき、プリトリガーが無効化されたとき、またはPDBが無効化されたときに解除されるため、完全なPDB無効化・有効シーケンスも検討する価値があるかもしれません。 BR、ペトル Re: PDB ADC pre trigger sequence error recovery こんにちは、PetrSさん。 私は以下の方法を試してみました。 PDB停止なしでフラッシュ消去操作を行った後、マイクロコントローラは保留中のADC ISRコールバックを1つ受け取りました。そのコールバック関数内で、ADC結果レジスタを読み取った後、以下の関数を呼び出してPDBシーケンスエラーをチェックし、エラーから回復します。 「`c」 void PDB1_check_seq_err(void) ヤージュ ((PDB1->CH[0].S & PDB_S_ERR_MASK) != 0) の場合 ヤージュ PDB1->CH[0].S &= (uint32_t)(~PDB_S_ERR_MASK); PDB1->SC &= (uint32_t)(~PDB_SC_PDBEN_MASK); PDB1->SC |= (uint32_t)PDB_SC_PDBEN_MASK; PDB1->SC |= (uint32_t)PDB_SC_SWTRIG_MASK; } } void PDB0_check_seq_err(void) ヤージュ ((PDB0->CH[0].S & PDB_S_ERR_MASK) != 0) の場合 ヤージュ PDB0->CH[0].S &= (uint32_t)(~PDB_S_ERR_MASK); PDB0->SC &= (uint32_t)(~PDB_SC_PDBEN_MASK); PDB0->SC |= (uint32_t)PDB_SC_PDBEN_MASK; PDB0->SC |= (uint32_t)PDB_SC_SWTRIG_MASK; } } 「`」 私が使用した復旧手順は以下のとおりです。 1. `ERR`フラグをクリアします。 2. PDBを停止します。 3. PDBを再度有効化して再起動します。 この停止と開始のシーケンスにより、すべてが再び正常に動作するようになります。後続のプリトリガーが発生し、ADC ISRコールバックが正常に呼び出されます。 しかし、なぜこれが必要なのか、私にはまだ完全には理解できていません。リファレンスマニュアルには、「ERR」条件をクリアし、ADC結果レジスタ(「COCO」をクリア)を読み取ることでロックが解除されると述べられています。私のCASEでは、それだけでは十分ではなく、回復にはPDBのストップ/ストップシーケンスが必要です。 また、`PDBn->SC |= PDB_SC_SWTRIG_MASK` は厳密には必須ではないことも確認しました。ソフトウェアトリガーを発行しなくても、ロックは解除され、PDB再起動後にADC ISRの実行が再び始まります。 RMでは「ERR」と「COCO」をクリアすればロックが解除されるはずだと示されているにもかかわらず、なぜPDBを停止して再起動する必要があるのか、説明していただけますか?
View full article
MCU_performreset is not happening in S32J100 HI,  I am trying to reset the controller using the Mcu_performReset function but the PC is coming out of the function with reset and the function which handles this reset mechanism Power_Ip_Specific_RequestPerformReset() has no data depending on the Functional or destructive reset. i tried configuring the S32DS but issue persist. i am using SW32J100_RTD_R23-11_0.8.0_CD04_HF01, S32DS 3.6.7 version. can you please suggest where i am going wrong? Thanks, Amol Re: MCU_performreset is not happening in S32J100 Hi @PavelL , I understood the Scenario, Will connect to the Field engineers for this issue. Thanks for the support. Regards, Amol  Re: MCU_performreset is not happening in S32J100 Hello @Ajadhav5 , I am writing to you in regard to a product currently in your possession – an NPI (New Product Introduction) which has not been officially launched yet. Please be advised that customers who have been granted early access to such products have assigned their field engineers. Your designated field engineer should serve as your primary support channel for any issues, concerns or queries you may have about this product. Our online support team will be opening a wider range of support for this product once it has been officially released. Until then, we will not be equipped to provide the desired assistance. We appreciate your understanding in this matter and look forward to further enhance our partnership with you. Should you have any questions, please feel free to connect with your field engineer or contact my team and me directly. Thank you for your understanding. Best regards, Pavel
View full article
PDB ADC 预触发序列错误恢复 NXP社区的各位好, S32K144 运行时闪存擦除/编程操作后,ADC0/ADC1 中断停止 作为我之前问题的延续,我需要一些关于如何正确恢复 S32K144 上的 PDB ADC 预触发序列错误的说明。 我尝试了以下三种方法,但只有一种方法有效。 方法一(有效): 在执行闪存擦除/编程操作之前,请先停止 PDB0 和 PDB1。 闪存操作完成后,重新启动两个 PDB 并重新启用相应的 ISR。 采用这种方法,不会出现PDB序列错误。 方法2: 闪存擦除/编程操作完成后,我停止并重新启动了 PDB0 和 PDB1。然而,PDB 预触发序列出现错误。然后我尝试通过停止并重新启动 PDB 模块来恢复,但序列错误仍然存在。 方法三: 方法三(无效): 在闪存擦除/编程操作期间,我没有停止或重新启动 PDB0 和 PDB1。相反,操作完成后,产生了一个待处理的 PDB ISR 和一个 ADC ISR 触发信号。 在 PDB ISR 中,我尝试使用以下方法清除序列错误标志: PDB0->CH[0].S &= (uint32_t)(~PDB_S_ERR_MASK); 然后执行相应的 ADC ISR,读取 ADC 结果寄存器清除 COCO 标志。我原本期望这样做可以防止进一步的预触发序列错误,但问题仍然存在,这种方法并没有奏效。 我的问题是:一旦触发了 PDB 预触发序列错误,是否有可能在不 RESET 系统的情况下恢复 PDB/ADC 操作并恢复正常触发信号?或者是否需要事先停止并重新启动 PDB,以避免进入不可恢复的状态? Re: PDB ADC pre trigger sequence error recovery 嗨 PetrS, 我尝试了以下方法。 在未停止 PDB 的情况下执行闪存擦除操作后,微控制器收到一个待处理的 ADC ISR 回调。在该回调函数中,读取 ADC 结果寄存器后,我调用以下函数来检查和恢复 PDB 序列错误: ```c void PDB1_check_seq_err(void) { 如果 ((PDB1->CH[0].S & PDB_S_ERR_MASK) != 0) { PDB1->CH[0].S &= (uint32_t)(~PDB_S_ERR_MASK); PDB1->SC &= (uint32_t)(~PDB_SC_PDBEN_MASK); PDB1->SC |= (uint32_t)PDB_SC_PDBEN_MASK; PDB1->SC |= (uint32_t)PDB_SC_SWTRIG_MASK; } } void PDB0_check_seq_err(void) { 如果 ((PDB0->CH[0].S & PDB_S_ERR_MASK) != 0) { PDB0->CH[0].S &= (uint32_t)(~PDB_S_ERR_MASK); PDB0->SC &= (uint32_t)(~PDB_SC_PDBEN_MASK); PDB0->SC |= (uint32_t)PDB_SC_PDBEN_MASK; PDB0->SC |= (uint32_t)PDB_SC_SWTRIG_MASK; } } ``` 我使用的恢复顺序是: 1. 清除 `ERR` 标志。 2. 停止 PDB。 3. 重新启用并重启 PDB。 通过这种停止和启动序列,一切都恢复正常:后续的预触发发生,ADC ISR 回调正常调用。 然而,我仍然不太明白为什么有必要这样做。参考手册指出,清除“ERR”条件并读取ADC结果寄存器(这将清除“COCO”)应该可以释放锁定。就我而言,仅靠这一点似乎还不够,需要执行 PDB 停止/启动序列才能恢复。 另外,我观察到 `PDBn->SC |= PDB_SC_SWTRIG_MASK` 并不是严格必需的。即使没有发出软件触发信号,PDB 重启后,锁定也会被释放,ADC ISR 也会再次开始执行。 请问为什么在这种情况下需要停止并重新启动 PDB,即使 RM 指示清除 `ERR` 和 `COCO` 应该可以释放锁? Re: PDB ADC pre trigger sequence error recovery 您好, 仅清除 PDB_S_ERR 通常不足以从触发信号前序列错误中恢复,因为 ADC/PDB 序列可能已经失去同步。根据您的测试结果,在刷写操作之前停止 PDB,然后在刷写操作之后重新启动 PDB,似乎是防止出现这种情况的最可靠方法。 如果在发生错误后尝试恢复,我建议确保 PDB 和 ADC 的状态完全重新同步。这可能包括禁用 PDB、清除待处理的 PDB 状态标志、确保所有待处理的 ADC 转换结果都已读取(COCO 已清除)、重新启用 PDB,以及在执行触发信号恢复之前根据需要重新加载配置。 根据 RM 的说法,当相应的 COCO 标志被设置、预触发被禁用或 PDB 被禁用时,预触发锁将被释放,因此完整的 PDB 禁用/启用序列也可能值得研究。 BR,彼得
View full article
S32J100 中 MCU_performreset 没有执行。 你好, 我尝试使用 Mcu_performReset 函数 RESET 控制器,但 PC 从该函数退出时处于 RESET 状态,而处理此 RESET 机制的函数Power_Ip_Specific_RequestPerformReset () 没有数据,取决于功能性 RESET 还是破坏性 RESET。我尝试配置S32DS,但问题仍然存在。 我使用的是 SW32J100_RTD_R23-11_0.8.0_CD04_HF01,S32DS 3.6.7 版本。 请问我哪里做错了? 谢谢! 阿莫尔 Re: MCU_performreset is not happening in S32J100 嗨@PavelL , 我了解了情况,会联系现场工程师解决这个问题。 感谢您的支持。 此致, 阿莫尔 Re: MCU_performreset is not happening in S32J100 你好@Ajadhav5 , 我写信给您是关于您目前拥有的一款产品——一款尚未正式上市的新产品(NPI)。 请注意,已获准提前使用此类产品的客户已指派了现场工程师。您指定的现场工程师应作为您解决有关本产品任何问题、疑虑或疑问的主要支持渠道。 我们的在线支持团队将在该产品正式版本发布后,提供更广泛的支持服务。在此之前,我们将无法提供所需的帮助。 感谢您对此事的理解,我们期待进一步加强与您的合作关系。如有任何疑问,请随时联系您的现场工程师,或直接联系我的团队和我。 感谢您的理解。 顺祝商祺! 帕维尔
View full article