Multi Source Translation Content

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

Multi Source Translation Content

ディスカッション

ソート順:
aarch64Linuxカーネルメモリ管理 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> aarch64 linuxカーネルメモリマッピングレイアウトと基本的な管理内容についての簡単な紹介。 内容は次のとおりです。 実行後のカーネルの仮想メモリのレイアウトとマッピング i.MX8QM/QXPカーネル予約メモリレイアウト カーネルメモリの割り当て方法と技術(Buddy、cma、IONなど) DMAバッファ管理、SWIOTLB、IOMMU GPU メモリ管理 さまざまなユースケースに合わせてメモリをカスタマイズする方法 安定性とパフォーマンスを向上させるためにCMAの使用を避ける方法 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> aarch64 linuxカーネルメモリマッピングレイアウトと基本的な管理内容についての簡単な紹介。 内容は次のとおりです。 実行後のカーネルの仮想メモリのレイアウトとマッピング i.MX8QM/QXPカーネル予約メモリレイアウト カーネルメモリの割り当て方法と技術(Buddy、cma、IONなど) DMAバッファ管理、SWIOTLB、IOMMU GPU メモリ管理 さまざまなユースケースに合わせてメモリをカスタマイズする方法 安定性とパフォーマンスを向上させるためにCMAの使用を避ける方法
記事全体を表示
QSPI 1 で MGC アクセス制御を無効にするにはどうすればよいでしょうか? 私は、カスタム ドライバを使用して S32E2 評価ボードで QSPI を動作させることに取り組んでいます。EMMC からのブートから QSPI からのブートに切り替えるプロセス中であるため、JTAG を使用してコードをロードし、RAM が不足しています。評価ボードには、QSPI フラッシュが QSPI1 B に接続されています。主に SFAR などの特定のレジスタへの書き込みに問題があります。SFAR は MGC によって保護されているようなので、ビット 31 (GVLD) をクリアしてアクセス制御を無効にしたいと思います。ただし、リファレンス・マニュアルによると、MGC にアクセスできるのはバス・マスタ 0x1F のみであり、これが HSE コアです。QSPI0 のこれらのレジスタにアクセスできるバス マスターを変更できる HSE_QSPI0_DAT0 の形式で QPSI0 のバイパス メカニズムがあるようですが、QSPI1 に相当するものを見つけることができませんでした。 誰か助けてくれませんか? Re: How do you disable MGC access control on QSPI 1? こんにちは@AdamH_work 、 NXP サポートにお問い合わせいただきありがとうございます。ご質問に関してですが、おっしゃったレジスタにアクセスするための正しい方法を検索するのに少し時間が必要です。 現時点では、S32ZE RTD 2.0.1 で提供しているQspi_Ip_Example_S32Z2XX_R52またはMemAcc_Example_S32E2XX_R52サンプル プロジェクトを確認することをお勧めします。これらのプロジェクトでは RTD が使用されていますが、S32Z/E ファミリで QSPI を使用するために必要な手順を把握することができます。 よろしくお願いします。 Re: How do you disable MGC access control on QSPI 1? こんにちは@AdamH_work 、 返信が遅くなり申し訳ありません。セクション65.1.6 QuadSPI_0とセキュリティレジスタの相互作用[ページ3349、S32Z2リファレンス・マニュアル、Rev. 5、2025-01-28]、セクション121.2.1.5 QuadSPI_0データ0 (HSE_QSPI0_DAT0) [ページ6674] の表もご確認ください。表の最初の行では、HSE_QSPI0_DAT0の値に応じて、MGCレジスタにアクセスできるマスターIDを設定する方法について説明しています。 問題を解決できたかどうか教えてください Re: How do you disable MGC access control on QSPI 1? こんにちは@AdamH_work 、 混乱させてしまい申し訳ございません。さて、私が理解しているのは、元々の問題は克服されたということですが、それで正しいでしょうか? IP コマンドを送信するための最適なフローをチェックするには、サンプル プロジェクトMemAcc_Example_S32E2XX_R52を確認してください。特に、関数Qspi_Ip_StatusType Qspi_Ip_IpCommand ()と、それが静的 Qspi_Ip_StatusType Qspi_Ip_InitReset()およびQspi_Ip_StatusType Qspi_Ip_RunCommand() でどのように呼び出されるかを確認してください。 他にご質問があればお知らせください。 Re: How do you disable MGC access control on QSPI 1? 私はその部分をすでに見ていましたが、それは QuadSPI 0 のみをカバーしているようで、私はこれを QuadSPI 1 で実行しようとしています。その間に、MDAD および FRAD レジスタをプログラムしてすべてのアクセスを許可する方法を見つけ、IP コマンドを開始すると SFAR にデータが設定されるようですが、現在はビジー状態になっているため、MGC ですべてを無効にする必要はないかもしれません。 Re: How do you disable MGC access control on QSPI 1? MDAD/FRAD を設定し、LUT をプログラミングした後、IP コマンドを開始できるようになりました。フラッシュ通信の最初のステップとして、S32E288-975EVB 評価ボード上の Micron MT25QL256ABA8E12 からシリアル フラッシュ検出パラメータを読み取ろうとしています。スロット 8 に次の LUT シーケンスを設定しました。 コマンドパッド1 0x5A アドレスパッド1 24 ダミーパッド1 8 パッド1 16を読み取り 停止パッド1 0 シーケンスは開始しているようですが、その後、無限にビジーな状態に陥ってしまうようです。SFAR は 0x10000000 (設定された開始アドレス) に設定され、IPCR は 0x08000008 (スロット 8、8 バイト) に設定されます。BUFXCR レジスタは、バッファ 3 を除いてすべてサイズ 0 に設定し、バッファ 3 はすべてのマスターに設定しました (値 0x80004000)。金曜日に、オシロスコープで CS0/D0/D1 ピンを調べることができ、IP コマンドが開始されると CS がアサートされるものの、デアサートされないことが分かりました。コマンドとアドレスが送信され、その後にダミー サイクルが続き、その後 D1 がアクティブになってデータに応答するように見えます。しかし、読み取りは完了せず、ただノンストップでデータをクロックし続けているように見えます。フラッシュ チップが SFDP バッファを何度も繰り返して循環するため、D1 に繰り返しパターンが表示されます (少なくとも私はそう推測します)。 実行を一時停止すると、次の画面が表示されます。 読み取りが完了しない原因が何なのかはわかりません。QSPI 読み取りに関するデータシートのセクションを読みましたが、この動作を説明するものは見つかりませんでした。クロックを下げてみました (ビット タイミングを見ると最初は約 100 MHz のようでしたが、その後 CGM に /10 分周器を追加したところ、D1 のビット パターンが遅くなりましたが、ビジー動作は変わりませんでした)。 Re: How do you disable MGC access control on QSPI 1? こんにちは@AdamH_work 、 メモリのデータシートを見ると、SFDP (0x5A) は「通常の」操作ではなく、コントローラが通信フローを意図的に停止する必要があるようです。 これにより、読み取りが完了しない理由を説明できます。私の見るところでは、QSPI ペリフェラルは動作しており、少なくとも通信は行われているので、現時点での問題は操作の種類にある可能性があります。もっと簡単な操作を試してみませんか?例えば、私が言及した例では、 Qspi_Ip_Cfg.c の MemCfg_0_SPI3ByteAddress_paInitOperations_0 と MemCfg_0_SPI3ByteAddress_paLutOperations_0 という LUT シーケンスが見つかります。初期化操作については、 Qspi_Ip.c の Qspi_Ip_InitOperation () でどのように使用されているかを確認してください。 別の操作を実行して、異なる動作が表示されるかどうかを教えてください。 よろしくお願いします。 Re: How do you disable MGC access control on QSPI 1? 結局、問題は DLL を適切に設定していなかったことにありました。私は S32DS の例に従って DLL バイパス モードの初期化シーケンスを実行し、それをコードに再実装したところ、読み取り操作が正しく完了するようになりました。次の課題は書き込み操作ですが、この問題はCANとして解決済みとしてマークできます。
記事全体を表示
S32K3XX的drivers配置 您好,我想请教一下,S32K3XX系列芯片新建设工程,在使用drivers时,每一个driver(1所对应位置的每一种driver类型)对应的配置界面中每一项配置(3所示位置),有没有文档或者教程说明? 在实际工程应用中,我可以依据哪些资料来进行配置,我每次设置都是看设置项名称猜测其功能,并决定是配置成什么,感觉缺乏官方依据,让我觉得我的每一个设置很没有确定性和依据。 Re: S32K3XX的drivers配置 Hi@Aaron_LL AN13435下面的章节中有各组件的一些描述 并且在官网中有很多外设的配置培训教程,你可以在官网找到这些外设的培训教程。 https://www.nxp.com/products/S32K3
記事全体を表示
LS1046A RDB:用于测试 linux gpio 中断处理性能的 GPIO 您好, 我正在使用 LS1046ARDB,想测量中断延迟。我的目标是通过外部信号发生器(输入 GPIO)触发信号中断,然后切换另一个引脚(输出 GPIO)作为响应,用示波器测量延迟。 我正在寻找板接头上可以混合为 GPIO 的可访问引脚。 我的想法是使用 IEEE-1588 接头 (J11),但不确定这是否可行,也不知道需要做些什么。 参考手册指出,可以通过 RCW(EC2=1)将 EC2 引脚配置为 GPIO3。 如果我在 RCW 中设置 EC2=1,这些信号是否会路由到 J11? LS1046A RDB 上是否有其他易于访问的引脚可供使用? 感谢您的帮助 QorIQ LS1设备 Re: LS1046A RDB: GPIOs for testing gpio interrupt handling performance of linux 谢谢您的帮助!这应该行得通。我发现GPIO_2[1]、GPIO_2[2]、GPIO_2[3] 与 TP14、TP13 和 TP11 相对应。 Re: LS1046A RDB: GPIOs for testing gpio interrupt handling performance of linux 您可以使用与 SPI 信号复用的GPIO。 GPIO_2[1]、GPIO_2[2]、GPIO_2[3] SPI 接口在 RDB 上未使用,并终止到测试点。 请参阅"表 3-8。详情请参阅 LS1046ARM 中的 SPI 信号配置" 。
記事全体を表示
異なる DDR サイズに応じて i.MX8MP の予約メモリを調整するにはどうすればよいでしょうか? NXPエキスパートの皆様、こんにちは。 コミュニティ全体を検索しましたが、満足のいく答えは見つかりませんでした。 以下はNXPのLinux 6.12のimx8mp.dtsiの予約メモリノードです。 予約メモリ { #アドレスセル = <2>; #size-cells = <2>; 範囲; /* * optee の使用のために予約されたメモリ。使用しないでください。 * OP-TEE がインストールされている場合は、これが dtb に自動的に追加されます。 * optee@56000000 { * reg = <0 0x56000000 0 0x2000000>; * マップなし; * }; */ /* 連続した割り当てのためのグローバル自動構成領域 */ Linux、cma { compatible = "共有DMAプール"; 再利用可能 サイズ = <0 0x3c000000>; 割り当て範囲 = <0 0x40000000 0 0xC0000000>; linux、cma-デフォルト; }; GPU予約済み: GPU予約済み@100000000 { マップなし; レジスタ = <0x1 0x00000000 0 0x10000000>; }; dsp_reserved: dsp@92400000 { レジスタ = <0 0x92400000 0 0x1000000>; マップなし; }; dsp_reserved_heap: dsp_reserved_heap@93400000 { レジスタ = <0 0x93400000 0 0xef0000>; マップなし; }; dsp_vdev0vring0: vdev0vring0@942f0000 { レジスタ = <0 0x942f0000 0 0x8000>; マップなし; }; dsp_vdev0vring1: vdev0vring1@942f8000 { レジスタ = <0 0x942f8000 0 0x8000>; マップなし; }; dsp_vdev0バッファ: vdev0バッファ@94300000 { compatible = "共有DMAプール"; レジスタ = <0 0x94300000 0 0x100000>; マップなし; }; }; 1.2GB/4GB/8GB DDR サイズの i.MX8MP の reserved-memory/linux,cma/size と reserved-memory/linux,cma/alloc-ranges を調整するにはどうすればよいでしょうか?(サイズ(960MB)は2GB DDRには大きすぎること、割り当て範囲も2GB DDRの範囲外であることは明らかです) 2.linux,cma/size と linux,cma/alloc-ranges を除いて、DDR サイズ 2GB/4GB/8GB に応じて変更する必要がある他のプロパティはありますか? 3. gpu_reserved ノードの reg が 2GB ddr の範囲外であることは明らかですが、どのように変更すればよいでしょうか? NXP の linux6.12 arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl.dts で、reserved-memory/linux,cma/size&alloc-ranges が変更されていることがわかります。 予約メモリ { #アドレスセル = <2>; #size-cells = <2>; 範囲; /* 連続した割り当てのためのグローバル自動構成領域 */ Linux、cma { compatible = "共有DMAプール"; 再利用可能 サイズ = <0 0x38000000>; 割り当て範囲 = <0 0x40000000 0 0xB0000000>; linux、cma-デフォルト; }; }; 4.この変更のきっかけは何ですか?これは DDR サイズの違いによるものでしょうか? また、NXP の Linux 6.12 arch/arm64/boot/dts/freescale/imx8mp-evk-root.dts では、node/reserved-memory がさらに変更されていることにも気付きました。 &{/予約メモリ} { jh_reserved: jh@fdc00000 { マップなし; レジスタ = <0 0xfdc00000 0x0 0x400000>; }; loader_reserved: loader@fdb00000 { マップなし; レジスタ = <0 0xfdb00000 0x0 0x00100000>; }; ivshmem_reserved: ivshmem@fda00000 { マップなし; reg = <0 0xfda00000 0x0 0x00100000>; }; ivshmem2_reserved: ivshmem2@fd900000 { マップなし; reg = <0 0xfd900000 0x0 0x00100000>; }; pci_reserved: pci@fd700000 { マップなし; レジスタ = <0 0xfd700000 0x0 0x00200000>; }; 受刑者予約: 受刑者@c0000000 { マップなし; レジスタ = <0 0xc0000000 0x0 0x3d700000>; }; }; &{/予約メモリ/linux,cma} { サイズ = <0 0x28000000>; 割り当て範囲 = <0 0x40000000 0 0x60000000>; }; 5. 新しく追加されたノード jh_reserved/loader_reserved/ivshmem_reserved/ivshmem2_reserved/pci_reserved/inmate_reserved はどのような状況で使用する必要がありますか? 上記の疑問について詳しく説明してください。 i.MX 8M | i.MX 8M ミニ | i.MX 8M ナノ Re: How to adjust i.MX8MP's reserved-memory accroding different DDR size? こんにちは、ホルヘ・カスさん。 ご協力誠にありがとうございます。Quction6についてはまだ疑問があります。 2GB/4GB/8GB DDR を搭載したカスタム imx8mp ボード (6GB DDR を搭載した imx8mpevk ボードに基づく) では、異なる DDR サイズの各ボードごとに個別の u-boot.imx があり、linux6.12 ソース コードの imx8mp-evk.dts から次の ' memory@40000000' ノードを変更せずに保持します。 メモリ@40000000 { device_type = "メモリ"; レジスタ = <0x0 0x40000000 0 0xc0000000>, <0x1 0x00000000 0 0xc0000000>; //3GB+3GB=6GB }; そして、弊社の imx8mp ボードは正常に動作します。また、彼らは一晩のテストに合格することもできます。 以下は 4GB DDR を搭載した imx8mp ボードです。 root@router:/#無料 使用可能な使用済み無料共有バフ/キャッシュの合計 Mem: 3686580 159528 2914044 19536 613008 3458156 // 4GB DDR の場合、合計 3686580 KB を認識するのが妥当です。 スワップ: 0 0 0 root@router:/# /プレスリリース、製品ニュース/MCB2/memtester 3G memtester バージョン 4.3.0 (32 ビット) 著作権 (C) 2001-2012 Charles Cazabon。 GNU General Public License バージョン 2 (のみ) に基づいてライセンスされます。 ページサイズは4096です ページサイズマスクは0xfffff000です 3072MB(3221225472バイト)必要 3072MB (3221225472 バイト) を取得しました。mlock を試行しています...ロックされました。 ループ1: スタックアドレス: テスト3[3326.210063] clean_cache.sh (100707): drop_caches: 1 [ 3326.277139] clean_cache.sh (100707): drop_caches: 2 [ 3326.316299] clean_cache.sh (100707): drop_caches: 3 わかりました ランダム値: OK XOR比較: OK 比較SUB:OK MULを比較: OK DIVを比較: OK 比較OR:OK ANDを比較: OK 順次増分: OK ソリッドビット:OK ブロックシーケンシャル:OK チェッカーボード:OK ビットスプレッド:OK ... // 一晩のテストでは問題は見つかりませんでした。 4GB DDRデバイスのカーネル起動段階のメモリ情報は次のとおりです。 [ 0.000000] マシンモデル: NXP i.MX8MPlus EVKボード [ 0.000000] efi: UEFI が見つかりません。 [ 0.000000] 予約メモリ: 0x00000000c4000000 に CMA メモリプールを作成しました。サイズは 960 MiB です。 [ 0.000000] OF: 予約済みメモリ: 初期化されたノード Linux、cma、互換ID 共有DMAプール [ 0.000000] OF: 予約済みメモリ: 0x00000000c4000000..0x00000000ffffffff (983040 KiB) マップ再利用可能 Linux,cma [ 0.000000] OF: 予約済みメモリ: 0x0000000057c00000..0x0000000057ffffff (4096 KiB) nomap 再利用不可 optee_shm@0x57c00000 [ 0.000000] OF: 予約済みメモリ: 0x0000000056000000..0x0000000057bfffff (28672 KiB) nomap 再利用不可 optee_core@0x56000000 [ 0.000000] OF: 予約済みメモリ: 0x0000000100000000..0x000000010ffffffff (262144 KiB) nomap 再利用不可 gpu_reserved@100000000 [ 0.000000] OF: 予約済みメモリ: 0x0000000092400000..0x00000000933fffff (16384 KiB) nomap 再利用不可 dsp@92400000 [ 0.000000] OF: 予約済みメモリ: 0x0000000093400000..0x00000000942effff (15296 KiB) nomap 再利用不可 dsp_reserved_heap@93400000 [ 0.000000] OF: 予約済みメモリ: 0x00000000942f0000..0x00000000942f7fff (32 KiB) nomap 再利用不可 vdev0vring0@942f0000 [ 0.000000] OF: 予約済みメモリ: 0x00000000942f8000..0x00000000942fffff (32 KiB) nomap 再利用不可 vdev0vring1@942f8000 [ 0.000000] 予約メモリ: 0x0000000094300000 に DMA メモリプールを作成しました。サイズは 1 MiB です。 [ 0.000000] OF: 予約済みメモリ: 初期化されたノード vdev0buffer@94300000、互換性のあるIDは共有DMAプール [ 0.000000] OF: 予約済みメモリ: 0x0000000094300000..0x00000000943fffff (1024 KiB) nomap 再利用不可 vdev0buffer@94300000 [ 0.000000] NUMA: [mem 0x0000000040000000-0x000000013fffffff] でノードを偽装しています [ 0.000000] NODE_DATA(0) 割り当て済み [mem 0x13f84a840-0x13f84d3bf] [ 0.000000] ゾーン範囲: [ 0.000000] DMA [メモリ 0x0000000040000000-0x00000000ffffffff] [ 0.000000] DMA32 空 [ 0.000000] 正常 [メモリ 0x0000000100000000-0x000000013ffffffff] [ 0.000000] 各ノードの移動可能ゾーンの開始 [ 0.000000] 初期メモリノード範囲 [ 0.000000] ノード 0: [メモリ 0x0000000040000000-0x0000000055ffffff] [ 0.000000] ノード 0: [メモリ 0x0000000058000000-0x00000000923fffff] [ 0.000000] ノード 0: [メモリ 0x0000000092400000-0x00000000943fffff] [ 0.000000] ノード 0: [メモリ 0x0000000094400000-0x00000000ffffffff] [ 0.000000] ノード 0: [メモリ 0x0000000100000000-0x000000010fffffff] [ 0.000000] ノード 0: [メモリ 0x0000000110000000-0x000000013ffffffff] [ 0.000000] 初期化メモリ セットアップ ノード 0 [メモリ 0x0000000040000000-0x000000013fffffff] [ 0.000000] ノード0のゾーンDMA: 使用できない範囲に8192ページ 1.実際には 4GB DDR デバイスの memory@40000000 ノードの6GB reg 構成によって発生した不合理なログを特定できますか? 2.SO、カーネルはDTSのmemory@40000000/reg構成のみに基づいてメモリ範囲を計算しているのではなく、U-BootからATAGを介してカーネルに渡される実際の物理メモリサイズと合わせて、包括的にメモリ範囲を決定しているのではないかと推測しています。つまり、2GB/4GB/8GBのメモリ構成ごとに別々のDTBファイルを用意する必要はないのではないかと考えています。この点についてご確認いただけますでしょうか? 改めて感謝申し上げます。 Re: How to adjust i.MX8MP's reserved-memory accroding different DDR size? こんにちは、 1. デバイス ツリー内の予約済みメモリ ノードを調整するための具体的なドキュメントはありません。これらの値は DDR サイズとアプリケーションによって異なるためです。唯一の制限は、リファレンス マニュアルのメモリ マップに記載されているように、各モジュールに割り当てられた最大メモリ領域になります。 BSP のデフォルトの CMA サイズは 960 MB CAN が、2GB DDR の場合、960 MB は大きすぎるため、CMA を 256 MB ~ 512 MB 程度に減らすのが一般的です。有効な DDR スペースでの割り当てに重点を置く必要があります。 2. 追加のプロパティを追加する必要はありません。 3. 設計で使用可能なサイズに応じて各ノードを再編成できます。例: gpu_reserved: gpu_reserved@70000000 { no-map; reg = <0 0x70000000 0 0x10000000>; }; 他も同様です。 4. このデバイス ツリーは、ハイパーバイザーの予約済みメモリに使用されます。 5. これらのノードは Jailhouse/PCIe/仮想化に使用されますが、使用しない場合はこれらのノードを省略できます。 詳細については、このドキュメントをCAN参照できます。 i.MX 仮想化ユーザーガイド 6. はい、各 DDR サイズに一致するはずです。 よろしくお願いいたします。 Re: How to adjust i.MX8MP's reserved-memory accroding different DDR size? 質問6:(追加 ) メモリ@400000000ノード(arch/arm64/boot/dts/freescale/imx8mp-evk.dts内)のregプロパティはDDR容量(2GB/4GB/8GB)に応じて変更する必要がありますか? メモリ@40000000 { device_type = "メモリ"; レジスタ = <0x0 0x40000000 0 0xc0000000>, <0x1 0x00000000 0 0xc0000000>; }; はいの場合、異なる DDR サイズのカスタム i.MX8MP ボードには個別の DTB ファイルが必要であることを意味しますか? 事前に考えます! Re: How to adjust i.MX8MP's reserved-memory accroding different DDR size? こんにちは、ホルヘ・カスさん。 カーネルは U-boot から渡された DDR サイズを使用するので、DTS で memory@40000000/reg を構成する目的は何ですか? Re: How to adjust i.MX8MP's reserved-memory accroding different DDR size? こんにちは、 情報ありがとうございます。 1. エラーや警告などの重大なログはなく、カーネルは U-boot から利用可能なメモリ範囲を使用するだけです。 2. カーネルでは U-boot と DTS の両方の構成が使用されます。 デバイス ツリーでは、物理メモリが十分でない場合でも仮想メモリをさらに割り当てることができますが、RAM の使用量が多いとシステムがクラッシュする可能性があります。 よろしくお願いいたします。 Re: How to adjust i.MX8MP's reserved-memory accroding different DDR size? こんにちは、 社内チームに確認しました。 U-boot 構成には、使用可能な物理 DDR メモリに関する正しいデータが含まれていますが、DTS 予約メモリ ノードもカーネルに渡されます。あなたのCASE、ノードにさらに仮想メモリを割り当てることができますが、物理予約メモリをすべて使い切ると、使用可能なメモリがないためエラーが発生し、物理アドレスが存在しない、または他のモジュールによって使用される可能性があるためにリソースの問題が発生します。 予約メモリを各ボードに適合させる必要があります。おっしゃるとおり、これは機能しますが、RAM の使用量が多い場合は、エラーやカーネル パニックが発生する可能性があります。 前回の返信を訂正させていただきます。 よろしくお願いいたします。
記事全体を表示
The RT speech recognition system based on VIT to obtain weather information 1.  Abstract NXP EdgeReady solution can use RT106/5 S/L/A/F to achieve speech recognition, but the relevant support software libraries for the RT4-bit series are limited to the S/L/A/F series, if you want to use normal RT chips, how to achieve speech recognition functions? NXP officially launched the VIT software package in the SDK, which can support RT1060, RT1160, RT1170, RT600, RT500 to achieve SDK-based speech recognition functions. For the acquisition of weather information, usually customer can connect with a third-party platform or the cloud weather API, using http client method to access directly, the current weather API platforms, you can register it, then call the API directly, so you can use the RT SDK lwip socket client method to call the corresponding weather API, to achieve real-time specific geographical location weather forecast data.     This article will use MIMXRT1060-EVK to implement customer-defined wake-up word(WW) and voice recognition word recognition(VC) based on SDK VIT lib, and LWIP socket client to achieve real-time weather information acquisition in Shanghai, then print it to the terminal, this article mainly use the print to share the weather information, for the sound broadcasts, it also add the simple method to broadcast the fixed sound with mp3 audio data, but for the freely sound broadcast, it may need to use real-time TTS function, which is not added now.     The system block diagram of this document is as follows:   Fig 1 System Block diagram The VIT custom wake-up word of this system is "小恩小恩", and after waking up, one of the following recognition words can be recognized: ”开灯”("Turn on the lights"),“关灯”("Turn off the lights"),”今天天气”("Today's weather"),“明天天气”("Tomorrow's Weather"),“后天天气”("The day after tomorrow's weather"). Turn on the light or Turn off the lights , that is to control  the external LED red light on the EVK board. ”今天天气” gets today’s weather forecast, it is in the following format:                     "date": "2022-05-27",                     "week": "5",                     "dayweather": "阴",                     "nightweather": "阴",                     "daytemp": "28",                     "nighttemp": "21",                     "daywind": "东南",                     "nightwind": "东南",                     "daypower": "≤3",                     "nightpower": "≤3" “明天天气”,“后天天气” are the same format, but it is 1-2 days after the date of today. To get the weather data, the MIMXRT1060-EVK board needs to connect the network to achieve the acquisition of the Gaode Map(restapi.amap.com) Weather API data. 2.  Related preparations 2.1 Weather API Platform     At present, there are many third-party platforms that can obtain weather on the Internet for Chinese, such as: Baidu Intelligent Cloud, Baidu Map API, Huawei cloud platform, Juhe weather, Gaode Map API, and so on. This article tried several platform, the test results found: Baidu intelligent cloud, the number of daily free calls is small, the need for real-time synthesis of AK, SK, cumbersome to call; Baidu Map API needs to upload ID card information; Several others have a similar situation. In the end, the Gaode Map API with convenient registration, many daily calls and relatively full feedback weather data information was selected.     Here, we mainly talk about the Gaode Map API usage, the link is: https://lbs.amap.com/api/webservice/guide/api/weatherinfo Create the account and the API key, then add the relevant parameters to implement the call of the weather API, the application for API Key is as follows: Fig 2 Gaode map API key The following diagram shows the call volume:   Fig 3 Gaode Map API call volume This is the API calling format:   Fig 4 Weather API calling parameters So, the full Gaode Map API link should like this: https://restapi.amap.com/v3/weather/weatherInfo?key=xxxxxxx&city=xxx&extensions=all&output=JSON If need to test the Shanghai weather, city code is 310000. 2.2 Postman test weather API     Postman is an interface testing tool, when doing interface testing, Postman is equivalent to a client, it can simulate various HTTP requests initiated by users, send the request data to the server, obtain the corresponding response results, and verify whether the result data in the response matches the expected value. Postman download link: https://www.postman.com/   After finding the proper weather API platform and the calling link, use the postman do the http GET operation to capture the weather data, refer to the Fig 4, fill the related parameters to the postman: Fig 5 Postman call weather API Send Get command, we can find the weather information in the position 7, the complete all information is: {     "status": "1",     "count": "1",     "info": "OK",     "infocode": "10000",     "forecasts": [         {             "city": "上海市",             "adcode": "310000",             "province": "上海",             "reporttime": "2022-05-27 17:34:12",             "casts": [                 {                     "date": "2022-05-27",                     "week": "5",                     "dayweather": "阴",                     "nightweather": "阴",                     "daytemp": "28",                     "nighttemp": "21",                     "daywind": "东南",                     "nightwind": "东南",                     "daypower": "≤3",                     "nightpower": "≤3"                 },                 {                     "date": "2022-05-28",                     "week": "6",                     "dayweather": "小雨",                     "nightweather": "中雨",                     "daytemp": "24",                     "nighttemp": "20",                     "daywind": "东南",                     "nightwind": "东南",                     "daypower": "≤3",                     "nightpower": "≤3"                 },                 {                     "date": "2022-05-29",                     "week": "7",                     "dayweather": "大雨",                     "nightweather": "小雨",                     "daytemp": "23",                     "nighttemp": "20",                     "daywind": "南",                     "nightwind": "南",                     "daypower": "≤3",                     "nightpower": "≤3"                 },                 {                     "date": "2022-05-30",                     "week": "1",                     "dayweather": "小雨",                     "nightweather": "晴",                     "daytemp": "27",                     "nighttemp": "20",                     "daywind": "北",                     "nightwind": "北",                     "daypower": "≤3",                     "nightpower": "≤3"                 }             ]         }     ] } We can see, it can capture the continuous 4 days information, with this information, we can get the weather information easily. From the postman, we also can see the Get code, like this: Fig 6 postman API HTTP code     With this API which already passed the testing, it can capture the complete weather information, here, we can consider adding the working http API to the MIMXRT1060-EVK code.    2.3 VIT custom commands     From the maestro code of the RT1060 SDK, we can know that the SDK already supports the VIT library, what is VIT?     VIT's full name: Voice Intelligent Technology, the library provides voice recognition services designed to wake up and recognize specific commands, control IOT, and the smart home. Fig 7 VIT system block diagram     In NXP RT1060 SDK code, the generated wake word and command word have been provided and placed in the VIT_Model.h file. If in the customer's project, how to customize the wake word and command word? With the NXP's efforts, we have made a web page form for customers to choose their own command, and then generate the corresponding VIT_Model.h file for code to call. VIT command word generation web page is: https://vit.nxp.com/#/home     Login the NXP account, choose the RT chip partn umber, wakeup word, voice command. Please note, the current supported RT chip is: RT1060,RT1160,RT1170,RT600,RT500 The following is the example for generating wakeup word and voice command:   Fig 8 Custom VIT configuration Fig 9 generated result Download the generated model, you can get VIT_Model_cn.h, open to see the command word information and related model data stored in the const PL_MEM_ALIGN (PL_UINT8 VIT_Model_cn[], VIT_MODEL_ALIGN_BYTES) array, the command word information is as follows: WakeWord supported : " 小恩 小恩 " Voice Commands supported     Cmd_Id : Cmd_Name       0    : UNKNOWN       1    : 开灯       2    : 关灯       3    : 今天 天气       4    : 明天 天气       5    : 后天 天气 Use the RT1060 SDK maestro_record demo to test this custom command result:   Fig 10 Custom Wakeup word and voice command test From the test result, we can see, both the wakeup word and voice command is detected. 3 Software code 3.1 LWIP socket client code capture weather API From chapter 2.2, we have been able to obtain the weather API and through testing, we can successfully achieve weather acquisition, so we need to add relevant commands in combination with the needs of our own system. For the acquisition of the weather API, the lwip code based on the RT1060 SDK is in the form of socket client. The relevant code is as follows: #define PORT 80 #define IP_ADDR "59.82.9.133" uint8_t get_weather[]= "GET /v3/weather/weatherInfo?key=xxx&city=310000&extensions=all&output=JSON HTTP/1.1\r\nHost: restapi.amap.com\r\n\r\n\r\n\r\n"; if (sys_thread_new("weather_main", weathermain_thread, NULL, HTTPD_STACKSIZE, HTTPD_PRIORITY) == NULL) LWIP_ASSERT("main(): Task creation failed.", 0); static void weathermain_thread(void *arg) { static struct netif netif; ip4_addr_t netif_ipaddr, netif_netmask, netif_gw; ethernetif_config_t enet_config = { .phyHandle = &phyHandle, .macAddress = configMAC_ADDR, }; LWIP_UNUSED_ARG(arg); mdioHandle.resource.csrClock_Hz = EXAMPLE_CLOCK_FREQ; IP4_ADDR(&netif_ipaddr, configIP_ADDR0, configIP_ADDR1, configIP_ADDR2, configIP_ADDR3); IP4_ADDR(&netif_netmask, configNET_MASK0, configNET_MASK1, configNET_MASK2, configNET_MASK3); IP4_ADDR(&netif_gw, configGW_ADDR0, configGW_ADDR1, configGW_ADDR2, configGW_ADDR3); tcpip_init(NULL, NULL); netifapi_netif_add(&netif, &netif_ipaddr, &netif_netmask, &netif_gw, &enet_config, EXAMPLE_NETIF_INIT_FN, tcpip_input); netifapi_netif_set_default(&netif); netifapi_netif_set_up(&netif); PRINTF("\r\n************************************************\r\n"); PRINTF(" TCP client example\r\n"); PRINTF("************************************************\r\n"); PRINTF(" IPv4 Address : %u.%u.%u.%u\r\n", ((u8_t *)&netif_ipaddr)[0], ((u8_t *)&netif_ipaddr)[1], ((u8_t *)&netif_ipaddr)[2], ((u8_t *)&netif_ipaddr)[3]); PRINTF(" IPv4 Subnet mask : %u.%u.%u.%u\r\n", ((u8_t *)&netif_netmask)[0], ((u8_t *)&netif_netmask)[1], ((u8_t *)&netif_netmask)[2], ((u8_t *)&netif_netmask)[3]); PRINTF(" IPv4 Gateway : %u.%u.%u.%u\r\n", ((u8_t *)&netif_gw)[0], ((u8_t *)&netif_gw)[1], ((u8_t *)&netif_gw)[2], ((u8_t *)&netif_gw)[3]); PRINTF("************************************************\r\n"); sys_thread_new("weather", weather_thread, NULL, DEFAULT_THREAD_STACKSIZE, DEFAULT_THREAD_PRIO); vTaskDelete(NULL); } static void weather_thread(void *arg) { int sock = -1,rece; struct sockaddr_in client_addr; char* host_ip; ip4_addr_t dns_ip; err_t err; uint32_t *pSDRAM= pvPortMalloc(BUF_LEN);// host_ip = HOST_NAME; PRINTF("host name : %s , host_ip : %s\r\n",HOST_NAME,host_ip); while(1) { sock = socket(AF_INET, SOCK_STREAM, 0); if (sock < 0) { PRINTF("Socket error\n"); vTaskDelay(10); continue; } client_addr.sin_family = AF_INET; client_addr.sin_port = htons(PORT); client_addr.sin_addr.s_addr = inet_addr(host_ip); memset(&(client_addr.sin_zero), 0, sizeof(client_addr.sin_zero)); if (connect(sock, (struct sockaddr *)&client_addr, sizeof(struct sockaddr)) == -1) { PRINTF("Connect failed!\n"); closesocket(sock); vTaskDelay(10); continue; } PRINTF("Connect to server successful!\r\n"); write(sock,get_weather,sizeof(get_weather)); while (1) { rece = recv(sock, (uint8_t*)pSDRAM, BUF_LEN, 0);//BUF_LEN if (rece <= 0) break; memcpy(weather_data.weather_info, pSDRAM,1500);//max 1457 } Weather_process(); memset(pSDRAM,0,BUF_LEN); closesocket(sock); vTaskDelay(10000); } }  3.2 VIT detect customer command code    Put the generated VIT_Model_cn.h to the maestro_record folder path:   vit\RT1060_CortexM7\Lib    The specific wake word and voice command related code can be viewed from the code vit_pro.c, mainly involving function is: int VIT_Execute(void *arg, void *inputBuffer, int size) The code is modified as follows, mainly to record the wake and wake word number, for specific function control, the command directly controlled here is the local "开灯:turn on the light", "关灯:turn off the light" command, as for the weather command needs to call the socket client API, so in the main lwip call area combined with the command word recognition number to call: if (VIT_DetectionResults == VIT_WW_DETECTED) { PRINTF(" - WakeWord detected \r\n"); weather_data.ww_flag = 1; //kerry } else if (VIT_DetectionResults == VIT_VC_DETECTED) { // Retrieve id of the Voice Command detected // String of the Command can also be retrieved (when WW and CMDs strings are integrated in Model) VIT_Status = VIT_GetVoiceCommandFound(VITHandle, &VoiceCommand); if (VIT_Status != VIT_SUCCESS) { PRINTF("VIT_GetVoiceCommandFound error: %d\r\n", VIT_Status); return VIT_Status; // will stop processing VIT and go directly to MEM free } else { PRINTF(" - Voice Command detected %d", VoiceCommand.Cmd_Id); weather_data.vc_index = VoiceCommand.Cmd_Id;//kerry 1:ledon 2:ledoff 3:today weather 4:tomorrow weather 5:aftertomorrow weather if(weather_data.vc_index == 1)//1 { GPIO_PinWrite(GPIO1, 3, 1U); //pull high PRINTF(" led on!\r\n"); } else if(weather_data.vc_index == 2)//2 { GPIO_PinWrite(GPIO1, 3, 0U); //pull low PRINTF(" led off!\r\n"); } // Retrieve CMD Name: OPTIONAL // Check first if CMD string is present if (VoiceCommand.pCmd_Name != PL_NULL) { PRINTF(" %s\r\n", VoiceCommand.pCmd_Name); } else { PRINTF("\r\n"); } } }  3.3 Voice recognize weather information    In the weather_thread while, check the wakeup word and voice command, if meet the requirement, then create the socket connection, write the API and capture the weather data.   The related code is: while(1) { //add the command request, only cmd == weather flag, then call it. if((weather_data.ww_flag == 1)) { if(weather_data.vc_index >= 3) { // create connection //write API and read API Weather_process(); } memset(weather_data.weather_info, 0, sizeof(weather_data.weather_info)); weather_data.ww_flag = 0; weather_data.vc_index = 0; } vTaskDelay(10000); } void Weather_process(void) { char * datap, *datap1; datap = strstr((char*)weather_data.weather_info,"date"); if(datap != NULL) { memcpy(today_weather, datap,184);//max 1457 if(weather_data.vc_index == 3) { PRINTF("\r\n*******************today weather***********************************\n\r"); PRINTF("%s\r\n",today_weather); return; } } else return; datap1 = strstr(datap+4,"date"); if(datap1 != NULL) { memcpy(tomorr_weather, datap1,184);//max 1457 if(weather_data.vc_index == 4) { PRINTF("\r\n*******************tomorrow weather*******************************\n\r"); PRINTF("%s\r\n",tomorr_weather); return; } } else return; datap = strstr(datap1+4,"date"); if(datap != NULL) { memcpy(aftertom_weather, datap,184);//max 1457 if(weather_data.vc_index == 5) { PRINTF("\r\n*******************after tomorrow weather**************************\n\r"); PRINTF("%s\r\n",aftertom_weather); } } else return; }   Function Weather_process is used to refer to the voice recognized weather number to get the related date’s weather, and printf it. 4 Test result  the test result video: (view in My Videos) Print the log results as shown in Figure 11, after testing, you can see that the wakeup word and voice command can be successfully recognized, in the recognition of word sequence numbers 3, 4, 5 is the weather acquisition, you can successfully call the lwip socket client API, successfully obtain weather information and printf it.   Fig 11 system test print result  evkmimxrt1060_maestro_weather_backup.zip is the project without sound playback, weather information will print to the terminal! 5 Meet issues conclusion 5.1 LWIP failed to get weather    When creating the code, call the postman provided http code: GET /v3/weather/weatherInfo?key=8f777fc7d867908eebbad7f96a13af10& city=310000& extensions=all& output=JSON HTTP/1.1 Host: restapi.amap.com    Add it to the socket API function: uint8_t get_weather[]= "GET /v3/weather/weatherInfo?key=xxx&city=310000&extensions=all&output=JSON HTTP/1.1\r\nHost: restapi.amap.com\r\n\r\n\r\n\r\n";    The test result is:   Fig 12 socket weather API return issues     We can see, server connection is OK, http also return back the data, but it report the parameter issues, after checking, we use the postman C code, and put it to the get_weather: uint8_t get_weather[]= "GET /v3/weather/weatherInfo?key=xxx&city=310000&extensions=all&output=JSON HTTP/1.1\r\nHost: restapi.amap.com\r\n\r\n\r\n\r\n"; Then, it can capture the weather data, the same as postman test result. 5.2 VIT LWIP merger memory is not enough     After combining the maestro_record and lwip socket code together, compile it, it will meet the DTCM memory overflow issues. Fig 13 memory overflow After optimize, still meet the DTCM overflow issues, so, at last, choose to reconfigure the FlexRAM: OCRAM 192K, DTCM 256K, ITCM 64K Compile it, and the memory overflow issues disappear:   Fig 14 FlexRAM recofiguration 5.3 Print Chinese word in tera    Directly use teraterm, when the weather API returns the Chinese word, the print out information is the garbled code, and then after the following configuration, to achieve Chinese printing: Setup  ->  Terminal Locale    : american->chinese Codepage : 65001 ->936 Fig 15 Tera Term Chinese word print In summary, after various data collection and problem solving, in MIMXRT1060-EVK board  combined with the official SDK complete the function of customizing VIT voice commands to obtain real-time weather and local control.So, even if the ordinary RT series which is not S/L/A/F series, you also can use VIT to implement speech recognition functions. 6 Add the sound broadcast    This chapter mainly gives the method how to add the sound broadcast with the mp3 video data which is stored in the memory, but to the realtime weather data playback, it is not very freely, it needs to check the weather data, and use the video mp3 data lib get the correct mp3 data, as it is not the online TTS method.     So, here, just share one example add the sound broadcast, eg: WW : “小恩小恩”    ->   “小恩来了,请吩咐!” VC  :“今天天气”   ->   “温度32.1度” VC playback is fixed now, if need to play real data, it needs to generate the mp3 voice data lib, then according to the feedback weather information, to generate the correct weather mp3 data array, and play it, as this is a little complicated, but not difficult, so here, just use one fixed sound give an example of it. 6.1 MP3 playback audio data preparation     For audio broadcasting which need to convert the Chinese word into MP3 files, you can use some online speech synthesis software, here use Baidu online speech synthesis function, you can view the previous article, chapter 2.2.2 online speech synthesis: https://community.nxp.com/t5/i-MX-RT-Knowledge-Base/RT106L-S-voice-control-system-based-on-the-Baidu-cloud/ta-p/1363295     If use the Baidu online speech synthesis generated mp3 file to convert to the c array directly, it will meet the first audio play issues, so, here we use the Audacity to convert the mp3 file, the convert configuration is like this:  Fig 16 Audacity convert configuration     After the regeneration of mp3, you can use xxd .exe to convert the mp3 file to an array of C files, and then put it into RT-related memory or external flash , xxd .exe can be found at the following link: https://github.com/baldram/ESP_VS1053_Library/issues/18 The convert command like this: xxd -i your-sound.mp3 ready-to-use-header.c Convert the xiaoencoming.mp3 and temptest.mp3 file to the C array, then modify the data to the C file, save file as: xiaoencoming.h and temptest.h. Here, take xiaoencoming.c as an example: #define XIAOEN_MP3_SIZE  6847 unsigned char xiaoencoming_mp3[XIAOEN_MP3_SIZE] = {   0x49, 0x44, 0x33, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x54, 0x58, …   0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 }; unsigned int xiaoencoming1_mp3_len = XIAOEN_MP3_SIZE;//6847; Until now, the playback audio data is finished.     Copy xiaoencoming.h and temptest.h to project path: evkmimxrt1060_maestro_weather_mp3\source 6.2 Play the MP3 data from memory    Here, share the related code. 6.2.1 app_streamer.c added code    #include "xiaoencoming.h" #include "temptest.h" void *voice_inBuf = NULL; void *voice_outBuf = NULL; status_t STREAMER_file_Create(streamer_handle_t *handle, char *filename, int eap_par) { STREAMER_CREATE_PARAM params; OsaThreadAttr thread_attr; int ret; ELEMENT_PROPERTY_T prop; MEMSRC_SET_BUFFER_T inBufInfo = {0}; SET_BUFFER_DESC_T outBufInfo = {0}; PRINTF("Kerry test begin!\r\n"); if(filename == "temptest.mp3") inBufInfo = (MEMSRC_SET_BUFFER_T){.location = (int8_t *)temptest_mp3, .size = TEMPtest_MP3_SIZE}; else if(filename == "xiaoencoming.mp3") inBufInfo = (MEMSRC_SET_BUFFER_T){.location = (int8_t *)xiaoencoming_mp3, .size = XIAOEN_MP3_SIZE}; /* Create message process thread */ osa_thread_attr_init(&thread_attr); osa_thread_attr_set_name(&thread_attr, STREAMER_MESSAGE_TASK_NAME); osa_thread_attr_set_stack_size(&thread_attr, STREAMER_MESSAGE_TASK_STACK_SIZE); ret = osa_thread_create(&msg_thread, &thread_attr, STREAMER_MessageTask, (void *)handle); osa_thread_attr_destroy(&thread_attr); if (ERRCODE_NO_ERROR != ret) { return kStatus_Fail; } /* Create streamer */ strcpy(params.out_mq_name, APP_STREAMER_MSG_QUEUE); params.stack_size = STREAMER_TASK_STACK_SIZE; params.pipeline_type = STREAM_PIPELINE_MEM; params.task_name = STREAMER_TASK_NAME; params.in_dev_name = "buffer"; params.out_dev_name = "speaker"; handle->streamer = streamer_create(&params); if (!handle->streamer) { return kStatus_Fail; } prop.prop = PROP_DECODER_DECODER_TYPE; prop.val = (uintptr_t)DECODER_TYPE_MP3; ret = streamer_set_property(handle->streamer, prop, true); if (ret != STREAM_OK) { streamer_destroy(handle->streamer); handle->streamer = NULL; return kStatus_Fail; } prop.prop = PROP_MEMSRC_SET_BUFF; prop.val = (uintptr_t)&inBufInfo; ret = streamer_set_property(handle->streamer, prop, true); if (ret != STREAM_OK) { streamer_destroy(handle->streamer); handle->streamer = NULL; return kStatus_Fail; } handle->audioPlaying = false; error: PRINTF("End STREAMER_file_Create\r\n"); PRINTF("Kerry test end!\r\n"); return kStatus_Success; } The code implements the thread build, creates a streamer, defines it as playing from memory, decodes the properties for MP3, and specifies an array of MP3 files in memory. Specify a different array of mp3 files in memory based on the calling file name. 6.2.2 cmd.c added code void play_file(char *filename, int eap_par) { STREAMER_Init(); int ret = STREAMER_file_Create(&streamerHandle, filename, eap_par); if (ret != kStatus_Success) { PRINTF("STREAMER_file_Create failed\r\n"); goto file_error; } STREAMER_Start(&streamerHandle); PRINTF("Starting playback\r\n"); file_playing = true; while (streamerHandle.audioPlaying) { osa_time_delay(100); } file_playing = false; file_error: PRINTF("[play_file] Cleanup\r\n"); STREAMER_Destroy(&streamerHandle); osa_time_delay(100); } Play file, it calls the STREAMER_file_Create API function, start play, and wait the play finished, then release the STREAMER. shellRecMIC API function add the VIT recorded flag, which is used to play feedback audio file. static shell_status_t shellRecMIC(shell_handle_t shellHandle, int32_t argc, char **argv) { … //kerry PRINTF("Kerry MP3 stream data test!\r\n"); PRINTF("---weather_data.ww_flag =%d--\r\n ", weather_data.ww_flag); PRINTF("---weather_data.vc_inde =%d--\r\n ", weather_data.vc_index); PRINTF("---weather_data.mp3_flag =%d--\r\n ", weather_data.mp3_flag); if(weather_data.ww_flag == 1) { play_file("xiaoencoming.mp3", 0); } if(weather_data.vc_index == 3) { play_file("temptest.mp3", 0); } if(weather_data.mp3_flag != 0) { weather_data.ww_flag = 0; weather_data.vc_index = 0; } weather_data.mp3_flag = 0; /* Delay for cleanup */ osa_time_delay(100); return kStatus_SHELL_Success; } If detect the Wakeup Word: “小恩小恩”, play feedback audio: “小恩来了请吩咐”. If detect the voice command: “今天天气”, play feedback audio: “温度32.1度”, please note, this playback just an example, it is the fixed audio, you also can create audio word lib, then according to the received weather information, combine the related word audio together, then playback it. This is a little complicated, but not difficult. So, if need to play the free audio, also can consider the online TTS method in real time. 6.2.3 VIT WW and VC flag VIT_Execute function int VIT_Execute(void *arg, void *inputBuffer, int size) { … if (VIT_DetectionResults == VIT_WW_DETECTED) { PRINTF(" - WakeWord detected \r\n"); weather_data.ww_flag = 1; //kerry weather_data.mp3_flag = 1; } else if (VIT_DetectionResults == VIT_VC_DETECTED) { // Retrieve id of the Voice Command detected // String of the Command can also be retrieved (when WW and CMDs strings are integrated in Model) VIT_Status = VIT_GetVoiceCommandFound(VITHandle, &VoiceCommand); if (VIT_Status != VIT_SUCCESS) { PRINTF("VIT_GetVoiceCommandFound error: %d\r\n", VIT_Status); return VIT_Status; // will stop processing VIT and go directly to MEM free } else { PRINTF(" - Voice Command detected %d", VoiceCommand.Cmd_Id); weather_data.vc_index = VoiceCommand.Cmd_Id;//kerry 1:ledon 2:ledoff 3:today weather 4:tomorrow weather 5:aftertomorrow weather weather_data.mp3_flag = 2; if(weather_data.vc_index == 1)//1 { GPIO_PinWrite(GPIO1, 3, 1U); //pull high PRINTF(" led on!\r\n"); } else if(weather_data.vc_index == 2)//2 { GPIO_PinWrite(GPIO1, 3, 0U); //pull low PRINTF(" led off!\r\n"); } // Retrieve CMD Name: OPTIONAL // Check first if CMD string is present if (VoiceCommand.pCmd_Name != PL_NULL) { PRINTF(" %s\r\n", VoiceCommand.pCmd_Name); } else { PRINTF("\r\n"); } } } return VIT_Status; } Until now, all the code is added. 6.2.4  playback audio test result     This is the audio playback test result: (view in My Videos)   Fig 17 playback audio log   From the test result, we can see, we also can use the mp3 data which is stored in the memory and play it as audio playback.   The code project is: evkmimxrt1060_maestro_weather_mp3.zip. i.MXRT 106x
記事全体を表示
Kinetis 器件的复位引脚建议 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 嘿,Kinetis 爱好者们!我们 Kinetis 微控制器系统工程团队了解客户遇到的各种情况,但没有一种情况像复位引脚的处理那样特别麻烦。本文档的目的是提供我们在 Kinetis 系统工程部门收到的常见问题 (FAQ) 列表。这是一个动态列表,因此可能并不完整。然而,我们希望您发现以下问题和答案很有用。 问:我需要连接复位信号才能调试 Kinetis 设备吗? 这是一个常见的问题。严格来说,您不需要将 Kinetis 设备的设备复位线连接到调试连接器即可进行调试。调试端口 MDM-AP 寄存器允许通过仅使用 SWD_CLK 和 SWD_DIO 线设置系统复位请求位来使处理器保持复位状态。 但是,在决定从调试连接器中省略复位线之前,您应该仔细考虑这可能会如何影响在某些情况下对设备进行编程和调试的能力。 调试器/闪存编程器或外部调试器是否需要复位引脚?您使用的特定工具可能仅支持通过重置线重置设备,而不提供通过 MDM-AP 重置设备的功能。 您是否更改了调试信号的默认功能?您可能需要在应用程序中使用 SWD_CLK 和/或 SWD_DIO 信号来实现其他功能。对于低引脚数封装来说尤其如此。一旦功能发生变化(通过 PORTx_PCRy 寄存器),您将无法再通过这些信号访问 MDM-AP。如果您无法访问重置信号,那么您就无法阻止核心执行禁用引脚 SWD 功能的代码。因此您将无法重新编程该设备。为了防止这种情况,您需要: 设置您的代码以在复位释放几秒钟后更改 SWD 引脚的功能,以便调试器可以在发生这种情况之前停止核心。 在您的代码中放置某种“后门”机制,不会在这些引脚上重新编程 SWD 功能或重新启用 SWD 功能。例如,通过 UART 或 SPI 接口发送的特定字符序列。 一些 Kinetis 设备允许禁用复位引脚的复位功能。在这种情况下,您只能使用 SWD 信号作为通过 MDM-AP 重置设备的一种方式。如果您除了禁用复位引脚之外还更改了 SWD 引脚功能,那么如果您想对设备进行重新编程,就必须提供重新启用 SWD 功能的后门方法。 Kinetis硬件支持 Kinetis K系列MCU Kinetis L系列MCU Kinetis V系列MCU/单片机 Kinetis W系列MCU
記事全体を表示
FTF-ACC-F1259 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 同步多线程 (SMT) 是一种先进的处理器微架构功能,它允许独立执行线程更有效地利用超标量 CPU 管道组织。双向超标量流水线中的 SMT 实现以相对较小的增量动态功耗最大化双线程并发性。本次会议重点关注下一代 Power Architecture e200z9 处理器核心中包含的 SMT 功能,以及通过该微架构可实现的改进的性能/功率指标。 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 同步多线程 (SMT) 是一种先进的处理器微架构功能,它允许独立执行线程更有效地利用超标量 CPU 管道组织。双向超标量流水线中的 SMT 实现以相对较小的增量动态功耗最大化双线程并发性。本次会议重点关注下一代 Power Architecture e200z9 处理器核心中包含的 SMT 功能,以及通过该微架构可实现的改进的性能/功率指标。 回复:FTF-ACC-F1259 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 新款e200z9什么时候上市?
記事全体を表示
FTF-INS-F1277 Automotive integrated circuits are requiring high temperature and high voltage application environments. High temperature and high voltage impose severe constraints on the design of IC interconnect and the materials used in the assembly and packaging processes. The use of fine gauge copper wire bonding has been growing very rapidly in consumer, portable, and industrial electronics. Freescale has made significant inroads in introducing and accelerating the adoption of fine gauge copper wire in the high reliability automotive space. The molding compounds were studied and reformulated to accommodate high voltage up to 65V. This presentation will discuss key learnings in copper wire bonding process and molding compound formulation development, and present an exciting update on Freescale strategy on gold to copper wire conversion. Automotive integrated circuits are requiring high temperature and high voltage application environments. High temperature and high voltage impose severe constraints on the design of IC interconnect and the materials used in the assembly and packaging processes. The use of fine gauge copper wire bonding has been growing very rapidly in consumer, portable, and industrial electronics. Freescale has made significant inroads in introducing and accelerating the adoption of fine gauge copper wire in the high reliability automotive space. The molding compounds were studied and reformulated to accommodate high voltage up to 65V. This presentation will discuss key learnings in copper wire bonding process and molding compound formulation development, and present an exciting update on Freescale strategy on gold to copper wire conversion.
記事全体を表示
DwFシリコンバレー - 2015-03-26 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> オープニングセッション IoT エンド ノードの概念 設計、ソフトウェア、サービス スマートインダストリー " modifiedtitle="true" title="モータ制御のための効率的な熱管理 ヘルスケア&ウェアラブル " modifiedtitle="true" title="ウェアラブルを市場に投入する:プロトタイプから製品化まで スマートシティ " modifiedtitle="true" title="フリースケール・ワイヤレス・コネクティビティ・ポートフォリオの概要 スマートホームとスマートビルディング i.MX 6シリーズ用のビデオおよび画像コーデックとデータパイプライン 次世代 i.MX アプリケーションプロセッサ上のヘテロジニアスマルチプロセッシング(ARM® Cortex-A® + Cortex-M)の概要 Yocto プロジェクト™と i.MX アプリケーション プロセッサ向けの Linux® ソフトウェア開発 スマートネットワーク QorIQ LS1024A Consumer Network Attached Storage(cNAS)ソリューションによるパーソナル・クラウドの起動 デジタル・ネットワーキングのセキュリティ 101: QorIQ Communications Platform、QorlQ Qonverge Platform、C29x Crypto Coprocessor Family、Layerscape Architecture セキュリティ・エンジンとそのソフトウェア・イネーブルメントの概要 QorIQ T4240通信プロセッサの詳細 QorIQ LSシリーズ・プロセッサを使用した電力効率の設計方法 QorIQ Platformのトラスト・アーキテクチャの概要: ネットワーク・システムおよびネットワーキング・システムへのトラストの追加 Power Architecture®とARM®テクノロジのプログラム・モデルの違い QorIQプロセッシング・プラットフォームにおけるDDRの基礎 Sneak Peak: QorIQプロセッサの新機能 QorIQ通信プラットフォームおよびC29x暗号化コプロセッサ・ファミリ上のOpenSSL QorIQ T102xおよびLS10xxプロセッサを搭載した次世代IEEE® 802.11ac WLANシステム設計 ソフトウェア・デファインド・ネットワーキングとモノのインターネット(IoT)
記事全体を表示
IMX8M PLUS LPDDR4 2G 兼容性 我们尝试使用 ISSI IS43LQ32512A-046BLI 2GB RAM。校准后,在配置为 2000MHz 的memcpy SSN armv8_x32 测试中,RAM 出现故障。 如果我将内存配置为 1500MHz,它就能通过所有测试。 有人使用过这种 LPDDR4 内存吗?它与 IMX8M PLUS 兼容吗? i.MX 8 系列 | i.MX 8QuadMax (8QM) | 8QuadPlus i.MX 8M | i.MX 8M Mini | i.MX 8M Nano Re: IMX8M PLUS LPDDR4 2G compatibility 你好@TMpieye 您是否使用 DDR 配置工具运行校准?如果是,.请共享您的配置页面和故障日志文件。 B.R Re: IMX8M PLUS LPDDR4 2G compatibility IS43LQ32512A-046BLI(ISSI 2GB LPDDR4X 同步动态随机存取存储器(SDRAM))通常与恩智浦 i.MX 8M Plus 处理器兼容,前提是它符合 LPDDR4/LPDDR4X 内存的 JEDEC 标准。但是,你的memcpy SSN armv8_x32测试在2000MHz(但通过了 1500MHz)时失败的问题并不少见,可能源于配置、板设计或校准方面的挑战,而不是根本的不兼容性。 兼容性确认 i.MX 8M Plus 支持高达 4266 MT/s(2133MHz 时钟)的 LPDDR4/LPDDR4X 内存,IS43LQ32512A-046BLI 工作频率高达 2133MHz(4266 MT/s 数据速率),与恩智浦的规格一致。 恩智浦的社区论坛证实,类似的 ISSI LPDDR4X 部件(例如,IS46LQ32512A-046BLA2,这是您的型号的汽车变体)与 i.MX 8M Plus 兼容,前提是它们遵循 JEDEC 规范。只要配置得当,用户都能顺利实施。 导致 2000MHz 频率测试失败的潜在原因 根据恩智浦和嵌入式论坛上的类似报告: 定时/配置不匹配:i.MX 8M Plus DDR 控制器需要 RAM 的 SPD/数据表提供精确的时序参数(如 CAS 延迟、tRCD、tRP)。在 2000MHz 时,您的校准可能无法完全优化 ISSI 部件的规格(例如,在更高的速度下,CL=32,RL=14)。将频率降至 1500MHz 可降低压力和通过率,但这表明调谐未达到最佳状态。 板设计问题:信号完整性问题,如走线长度不匹配、阻抗错误或功率解耦不足,可能会导致较高速度失效。使用示波器检查 DQ/DQS 线路上是否有反射或噪音。 校准限制:i.MX 8M Plus 使用恩智浦的 DDR 工具进行校准。如果您的脚本或设置基于 Micron/Samsung 参考(在 EVK 中很常见),则它们可能与 ISSI 的特征不符。使用 ISSI 专用参数重新运行校准。 功率/温度:在 2000MHz 时,较高的电流消耗可能会导致电压下降或过热,从而使 memcpy 测试(强调顺序读/写)失败。 有人使用过这种内存吗? 是的,有记录的实施方案: 在恩智浦社区话题中,用户已将类似的ISSI LPDDR4X(例如 IS46LQ 系列)集成到用于工业应用的定制i.MX 8M Plus板上,在微调后实现了高达2133MHz的稳定运行。 嵌入式Linux/电路板支持包开发人员报告说,在基于Yocto的版本中成功使用了ISSI部件,但通常使用自定义的DDR初始化脚本来处理512M x 32的组织(16Gbit密度)。 解决问题的建议 验证数据表对齐: 下载ISSI数据表(IS43/46LQ32512A系列),将时序参数与恩智浦的i.MX 8M Plus RM(参考手册,第13.5节DDR控制器)进行比较。 内存的主要规格:2133MHz 最大时钟、LVSTL 接口、1G x 16 组织(双通道 x32 总计)。 重新运行校准: 使用恩智浦的DDR 测试工具或SCFW DDR 配置工具进行 ISSI 特定压力测试。 从 1600MHz 开始,逐渐增加到 2000MHz,同时监测眼图。 如果使用 U-启动/Linux,请使用正确的时间更新设备树 (.dtb)(例如 mx8mp-ddrc-devfreq.dtsi)。 董事会级别的检查: 确保 VDDQ = 1.1V、VDD2 = 0.6V,采用干净的解耦(电容靠近引脚)。 使用信号完整性模拟器(如 HyperLynx)验证迹线。 用更低的温度或更好的冷却方式进行测试,以排除热节流。 如果仍然失败 通过恩智浦的社区或票务系统联系恩智浦支持人员——提供您的校准日志和电路板原理图。 考虑改用美光 MT53E512M32D2NP(恩智浦 EVK 默认值)等经过验证的内存进行比较。 总的来说,内存是兼容的,但你的 2000MHz 故障很可能是设置问题。如果你分享更多细节(例如校准日志或电路板原理图片段),我可以帮助进一步排除故障! 我建议通过消息应用程序联系 +8526583 (7594);从他那里获得 EOL 文件,然后提出建议。他能帮助你 Re: IMX8M PLUS LPDDR4 2G compatibility 感谢你的支持 在附件中,我向您发送了配置文件 .xls和测试日志。 Re: IMX8M PLUS LPDDR4 2G compatibility 在二手板上,我们成功地在 2000MHz 上运行了 3GB(MT53E768M32D2ZW-046 WTC)和 4GB(MT53E1G32D2FW-046 AAT: B)美光 LPDDR4。 Re: IMX8M PLUS LPDDR4 2G compatibility 你好@pengyong_zhang、 使用配置工具 V 13.1 时结果相同。也许我们对 IS43LQ32512A-046BLI 的配置有误?能否提供正确的配置(*.ds 文件)?我们的硬件设计是关于 LPDDR4 接口的评估板的 1:1 副本。 此致 托比亚斯 Re: IMX8M PLUS LPDDR4 2G compatibility 你好@TMpieye 请使用以下链接下载我们的 DDR 配置工具,然后使用 configure 2GB 动态随机存取存储器(DRAM) 运行 ddr 测试。 https://www.nxp.com/design/design-center/development-boards-and-designs/i-mx-evaluation-and-development-boards/config-tools-for-i-mx-applications-processors:CONFIG-TOOLS-IMX B.R Re: IMX8M PLUS LPDDR4 2G compatibility 你好@TMpieye 请使用以下设置运行 DDR 测试。 B.R Re: IMX8M PLUS LPDDR4 2G compatibility 感谢您的配置示例。我已经用这个内存试过了,还是出错。 Re: IMX8M PLUS LPDDR4 2G compatibility 你好@TMpieye 真奇怪。请分享您的 DDR 配置工具 v25.12 故障日志 B.R Re: IMX8M PLUS LPDDR4 2G compatibility 你好@TMpieye 您使用我们的 DDR 配置工具进行压力测试了吗?从你的日志文件来看,配置工具的输出结果似乎与之不符。同时使用最新的工具版本 v25.12。 B.R Re: IMX8M PLUS LPDDR4 2G compatibility 你好@pengyong_zhang、 这是 Stresstest 的日志。我们的 4GB ISSI IS43LQ32K01S2A-046BLI 也遇到了同样的问题。 Re: IMX8M PLUS LPDDR4 2G compatibility hi@pengyong_zhang 我们使用 Mscale DDR 工具 3.31 进行stresstest。我将使用其他配置工具进行配置 Re: IMX8M PLUS LPDDR4 2G compatibility 你好@pengyong_zhang、 我在配置工具中运行测试,结果通过了。因此,这似乎是 MSCALER 工具的问题。非常感谢你们的大力支持!
記事全体を表示
高レベルの宣言型UIフレームワーク i.MX RT クロスオーバー MCU 用の高レベルの宣言型 UI フレームワークはありますか?Swift や JavaScript のような高級言語でコードを記述し、SwiftUI や React に似たものを使用して UI を作成できるようになりたいです。 Re: High level declarative UI framework こんにちは@MatthewRuzzi 、 NXP MIMXRTシリーズにご興味をお持ちいただきありがとうございます。 NXP は、LVGL を基盤フレームワークとして、お客様が UI ソフトウェアを迅速に開発できるようにするために、GuiGuider ツールを公式に提供しています。さらに、SDK には emWin および VGLite のサンプル プロジェクトが含まれています。高水準言語の実装は現在公式にはサポートされていませんが、次のアプローチを検討することをお勧めします。 1. https://doc.qt.io/QtForMCUs/qtul-zephyr-mimx1060-evk.html https://www.embeddedartists.com/wp-content/uploads/2023/06/QtMCUs_ProgramDevelopment.pdf 2 https://www.nxp.com/design/design-center/training/TIP-CREATE-USER-INTERFACE-QT 3. https://docs.microej.com/en/latest/GettingStarted/gettingStartedIMXRT1170.html 4. https://github.com/lvgl/lv_micropython 5. https://www.swift.org/blog/embedded-swift-examples/ これらのリソースがあなたの成長に刺激を与えることを願っています。 よろしくお願いします、 ギャビン Re: High level declarative UI framework 現在これに取り組んでいるプロジェクトはありますか?Swift や JavaScript のような言語を使用できるようになりたいです。将来的にこれを可能にするために私ができることはありますか?機能リクエストを送信または投票する場所、またはこれを投稿する他の場所はありますか?
記事全体を表示
S32K148锁死 S32K148 MCU用J-LINK错刷Flash,再用J-LINK链接发生如下错误,JLINK unsecured已没用,怎么解决? Connecting ... - Connecting via USB to probe/ programmer device 0 - Probe/ Programmer firmware: J-Link V9 compiled Dec 13 2022 11:14:50 - Probe/ Programmer S/N: 25994751 - Device "S32K148" selected. - Target interface speed: 50 kHz (Fixed) - VTarget = 3.301V - ConfigTargetSettings() start - ConfigTargetSettings() end - Took 305us - InitTarget() start - SWD selected. Executing JTAG -> SWD switching sequence. - Protection bytes in flash at addr. 0x400 - 0x40F indicate that readout protection is set. For debugger connection the device needs to be unsecured. Note: Unsecuring will trigger a mass erase of the internal flash. - Executing default behavior previously saved in the registry. - Device will be unsecured now. - Timeout while unsecuring device. Erase never stops. - InitTarget() end - Took 2.17s - 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]: Skipped. Could not read CPUID register - AP[1]: Skipped. Not an AHB-AP - Attach to CPU failed. Executing connect under reset. Re: S32K148锁死 Hi@dongkuili 首先不见得保证能恢复,因为加密段被你写入了错误持续值,可能并不支持mass erase擦除 可以阅读该文档6. S32K1xx系列MCU芯片锁死(lockup)现象 https://mp.weixin.qq.com/s?__biz=MzI0MDk0ODcxMw==&mid=2247485716&idx=1&sn=979631aa2385a4e3c7651ee75ee252b4&chksm=e9124d92de65c484f1cfec7de451958cfd5cf818c46a4f71a7d3dd8a522af229c5a18aad58ff&scene=21#wechat_redirect Re: S32K148锁死 Hi@dongkuili 这和你使用什么软件没关系,按照文章中说的,直接去测试reset管脚的波形来判断是否可能被恢复,不能的话就不要再浪费你的时间了。 Re: S32K148锁死 谢谢回复 仔细看了链接文档和芯片手册,多次尝试还是无法通过mass erase恢复,想用S32FlashTool_v2.3.4,但不支持S32K148,有支持S32K148的S32FlashTool吗?
記事全体を表示
i.MX93 M33 Core: How to get System Uptime (sec/nsec) for micro-ROS on Custom Board? Hi everyone, I am currently porting micro-ROS to the Cortex-M33 core of an i.MX93 (MIMX9352) using a custom SOM and the MCUXpresso SDK (v25.06.00).  have successfully established a UART transport and connected to the micro-ROS agent. My nodes and topics are created, but published data appears empty/invalid. After debugging, I’ve realized I need to provide high-resolution timestamps (seconds and nanoseconds) to the micro-ROS client to synchronize with the ROS 2 ecosystem. Screenshots, Debug terminal output, Codes are attached below. Micro-ros agent connection Micro-ros agent connectionMicro-ros agent connectionMicro-ros agent connection ROS Topic listing (Topic is emtpy (data not publishing)) ROS Topic listing (But topic is empty)ROS Topic listing (But topic is empty)ROS Topic listing (But topic is empty) Debug terminal output: Debug Console Init done Past lpuart init and custom trnsport open Past rclc support,node,publisher init Past rclc timer init Past rclc executor init, add_timer Inside while loop RCSOFTCHECK Failed: rclc_executor_spin_some(&executor, RCL_MS_TO_NS(100)) | Lin0 after executor spin Inside while loop RCSOFTCHECK Failed: rclc_executor_spin_some(&executor, RCL_MS_TO_NS(100)) | Lin0 after executor spin Inside while loop RCSOFTCHECK Failed: rclc_executor_spin_some(&executor, RCL_MS_TO_NS(100)) | Lin0 after executor spin The Problem: I am struggling to find a reliable "System Uptime" or "Tick" function in the SDK that provides the precision required for rmw_publisher_publish. I tried using the lptmr driver examples, but the code hangs during LPTMR_Init() My Questions: Is there a recommended SDK API for getting a high-resolution (nsec) monotonic timestamp since boot on the i.MX93 M33? For those who have implemented micro-ROS on i.MX9 series: Did you use a dedicated hardware timer, or is there a standard CMSIS/SDK "GetTime" function I should be using instead? Environment Details: Hardware: Custom i.MX93 SOM + EVB Baseboard Core: Cortex-M331 SDK: 25.06.00 Toolchain: MCUXpresso IDE / VS Code Extension2 Any insights or code snippets for a 64-bit nanosecond counter implementation on this platform would be greatly appreciated! Regards, Anandhu Re: i.MX93 M33 Core: How to get System Uptime (sec/nsec) for micro-ROS on Custom Board? Hi, I have tried the tstmr.c demo program in the SDK example. It's not working as expected, tried in two different boards one custom board and avnet osm93, both of them doesn't gave any output in the terminal. Upon debugging it's the TSTMR related functions are not working, the program's not going past "TSTMR_ReadTimeStamp()". SDK Used : MCUXpresso SDK (v25.06.00).
記事全体を表示
CSEC GenerateMACAddrMode アドレス範囲 メリークリスマス こんにちは CSECのGenerateMACAddrMode関数を使用していたところ、アドレス値が0x7DFFFを超えるとエラーが発生します。これは普通ですか? Re: CSEC GenerateMACAddrMode address range 私のせい つまり512KBからCANができない CSEC_DRV_GenerateMACAddrMode(CSEC_RAM_KEY、(uint8_t *)0x0007FFFC、0x00000080、(uint8_t *)cmacout); ただし、addr = 0x0007FFFC、len = 0x00000080 を使用します エラーもありませんが、範囲外です Re: CSEC GenerateMACAddrMode address range こんにちは@SaLan これは、Addr モード(ポインター方法とも呼ばれます)の CMD_GENERATE_MAC コマンドの制限です。 パーティション(つまりブロックサイズは派生に応じて128KB、256KB、または512KBになります。 よろしくお願いいたします。 ルーカス
記事全体を表示
i.MX93: Cortex-M33 Reset using J-Link and SYSRESETREQ not working Hello, I am trying to debug firmware for the Cortex-M33 on an i.MX93 using a Segger J-Link and gdb. I established an SWD connection using the patch from NXP for the J-Link software and can halt the processor, read the registers and memory and so on. My problem is, that resetting the processor does not work. The content of the registers does not change so I assume the reset is ignored: (gdb) monitor regs R0 = 40D000C0, R1 = 2001EFE3, R2 = 40D000C0, R3 = 00000000 R4 = 00000000, R5 = 00000000, R6 = FFFFFFFF, R7 = 2001EEE8 R8 = FFFFFFFF, R9 = FFFFFFFF, R10= 2000F000, R11= 00000000 R12= FFFFFFFF, R13= 2001EEE8, MSP= 2001EEE8, PSP= 00000000 R14(LR) = 0FFE219D, R15(PC) = 0FFE2248 XPSR 49000003, APSR 48000000, EPSR 01000000, IPSR 00000003 CFBP 00000000, CONTROL 00, FAULTMASK 00, BASEPRI 00, PRIMASK 00 Security extension regs: MSP_S = 2001EEE8, MSPLIM_S = 00000000 PSP_S = 00000000, PSPLIM_S = 00000000 MSP_NS = 00000000, MSPLIM_NS = 00000000 PSP_NS = FFFFFFFC, PSPLIM_NS = 00000000 CONTROL_S 00, FAULTMASK_S 00, BASEPRI_S 00, PRIMASK_S 00 CONTROL_NS 00, FAULTMASK_NS 00, BASEPRI_NS 00, PRIMASK_NS 00 (gdb) monitor reset Resetting target (gdb) monitor regs R0 = 40D000C0, R1 = 2001EFE3, R2 = 40D000C0, R3 = 00000000 R4 = 00000000, R5 = 00000000, R6 = FFFFFFFF, R7 = 2001EEE8 R8 = FFFFFFFF, R9 = FFFFFFFF, R10= 2000F000, R11= 00000000 R12= FFFFFFFF, R13= 2001EEE8, MSP= 2001EEE8, PSP= 00000000 R14(LR) = 0FFE219D, R15(PC) = 0FFE2248 XPSR 49000003, APSR 48000000, EPSR 01000000, IPSR 00000003 CFBP 00000000, CONTROL 00, FAULTMASK 00, BASEPRI 00, PRIMASK 00 Security extension regs: MSP_S = 2001EEE8, MSPLIM_S = 00000000 PSP_S = 00000000, PSPLIM_S = 00000000 MSP_NS = 00000000, MSPLIM_NS = 00000000 PSP_NS = FFFFFFFC, PSPLIM_NS = 00000000 CONTROL_S 00, FAULTMASK_S 00, BASEPRI_S 00, PRIMASK_S 00 CONTROL_NS 00, FAULTMASK_NS 00, BASEPRI_NS 00, PRIMASK_NS 00 The reset strategy from the J-Link is using SYSRESETREQ and not the reset signal since only the Cortex-M33 core is supposed to be reset. Is it possible that the debug controller does not have the necessary security privileges to write the SYSRESETREQ bit? What is the correct way to perform a reset of the Cortex-M33 using a J-Link? Regards, Malte Re: i.MX93: Cortex-M33 Reset using J-Link and SYSRESETREQ not working Hello, Can you also share the details on [email protected]? More than a yer already from this topic, and still same issue. Thanks. Re: i.MX93: Cortex-M33 Reset using J-Link and SYSRESETREQ not working It worked in the sense I never lost again the processor, but the execution time was heavily affected, which I don't understand why. Each operation took 10x more the time. Does it make sense to perform a cold reset but have by default some code in the ROM (contrary on what is suggested by NXP to have no SD card) and attach the debugger to what is ongoing and overwrite ram? Re: i.MX93: Cortex-M33 Reset using J-Link and SYSRESETREQ not working Hello, Is it possible to use this JLink script? https://kb.segger.com/images/8/86/Example_Reset_CortexM_Normal.JLinkScript It is a standard strategy for CortexM. Kind Regards Re: i.MX93: Cortex-M33 Reset using J-Link and SYSRESETREQ not working Hello, Can you please share your solution? I am currently facing the same situation. Re: i.MX93: Cortex-M33 Reset using J-Link and SYSRESETREQ not working Hello Krzysztof, as stated above, I did manage to work out a way to reset the Cortex-M33 in an i.MX93 using a J-Link. If that is what you are looking for, I will gladly share the details with you. Just tell me your e-mail address or another way of contacting you directly. Regards, Malte Re: i.MX93: Cortex-M33 Reset using J-Link and SYSRESETREQ not working Hi, I just found this topic and was wondering if someone was finally able to find some reliable solution for working with M33 in separation from A55. Recently I have started creating development environment for upcoming project and pretty quickly got into the same trouble with triggering software reset. It's been some time since the thread was opened, SEGGER now (v8.10) provides software with builtin IMX targets, although still seems not capable of performing single core reset. I did some experiments with SCB (SYSRESETREQ) and SCR registers but just can't achieve anything stable. I had also quickly tested MCUXpresso plugin for VSCode and didn't notice any custom, working reset strategy implementation. Regards, Krzysztof Re: i.MX93: Cortex-M33 Reset using J-Link and SYSRESETREQ not working Hi Malkai, I am very much interested in a solution as I get exactly the same problem. Is it possible to send me your solution or advice? Many thanks. [email protected] Best regards Junshu Re: i.MX93: Cortex-M33 Reset using J-Link and SYSRESETREQ not working Hi Malte That would be much appreciated. My mail is [email protected] Best regards Niels Re: i.MX93: Cortex-M33 Reset using J-Link and SYSRESETREQ not working Hi Niels, no thanks to the NXP support, which is less than helpful, I worked out a solution for this problem. If you tell me your e-mail address or any other way of contacting you directly I will be glad to help you. Kind regards, Malte Kaiser Re: i.MX93: Cortex-M33 Reset using J-Link and SYSRESETREQ not working Hello @Sanket_Parekh  I'm in the exact same situation as the original author. It appears that the JLink script provided by NXP doesn't actually reset the M33 core, but only halts it. This leaves registers and processor state unchanged and if a fault was encountered, I'm not able to continue debugging properly without resetting the core through Linux first. Is there any way that I can trigger such a reset of the M33 core but using the JLink debugger? Best regards Niels Re: i.MX93: Cortex-M33 Reset using J-Link and SYSRESETREQ not working Hello Sanket_Parekh, (1) Where can I get the NXP J-Link script patch for i.MX93 Cortex-M33? (2) According to Segger there is no roadmap yet to support i.MX93 in J-Link. But it make come in Q1/Q2. Is there any other possibilities to debug the Cortex-M33? BR Re: i.MX93: Cortex-M33 Reset using J-Link and SYSRESETREQ not working Hello @malkai , I hope you are doing well. "What is the procedure intended by NXP to reset the Cortex-M33 core in the i.MX93?" ->The System Reset Controller (SRC) is responsible for the generation of all the system reset signals and boot argument latching. ->Its main functions are as follows: • Deals with all global system reset sources from other modules and generates global system reset. • Responsible for power gating of MIXs (Slices) and their memory low power control. ->The SRC takes the POR_B from the PAD and fuse bits to complete the boot sequence and the GPC low power request to complete the power down/up sequence. Please refer to Chapter 33 System Reset Controller (SRC). https://www.nxp.com/webapp/Download?colCode=IMX93RM Thanks & Regards, Sanket Parekh Re: i.MX93: Cortex-M33 Reset using J-Link and SYSRESETREQ not working Hello @Sanket_Parekhm, thank you for your reply. However, that information does not help to solve the issue. As you know, the Cortex-M33 core in the i.MX93 has the Armv8-M architecture which does not have a VECTRESET bit in the AIRCR register (see D1.2.3 in https://developer.arm.com/documentation/ddi0553/latest/). So the only available reset request is SYSRESETREQ to which there is no reaction by the Cortex-M33 core nor by the entire system. Why is that? I already looked into the reset strategies used by the J-Link. The thing is, that the patch from NXP replaces these with just halting the CPU, as I told you. And the reset line cannot be used here, since it resets the entire SoC. So, the issue still remains: What is the procedure intended by NXP to reset the Cortex-M33 core in the i.MX93? Thank you and kind regards, Malte Kaiser Re: i.MX93: Cortex-M33 Reset using J-Link and SYSRESETREQ not working Hello @malkai , I hope you are doing well. ->The Reset selection controls the target device reset operation. All reset options apply to Cortex-M processor-based devices, are available in JTAG and SWD mode, and halt the CPU after the reset. ->Core - performs a reset of the Cortex-M core only by setting the VECTRESET bit. On—chip peripherals are not reset. For some Cortex—M devices, this reset method is the only way they may be reset. However, in most cases, this method is not recommended, because most target applications rely on the reset state of some peripherals (PLL, External memory interface, etc.) and may be confused if they boot up, but the peripherals are already configured. ->ResetPin - J-Link pulls its RESET pin low to reset the core and peripherals. Normally, this causes the CPU RESET pin of the device to go low as well, resulting in a reset of the CPU and peripherals. This reset method will fail if the RESET pin of the target device is not pulled low. Please refer to the section reset strategies in the below link. https://community.nxp.com/ pwmxy87654/attachments/ pwmxy87654/kinetis/28743/1/ UM08001_JLink.pdf Thanks & Regards, Sanket Parekh Re: i.MX93: Cortex-M33 Reset using J-Link and SYSRESETREQ not working Hello @Sanket_Parekh, thank you for your reply. Unfortunately, that information is not helping to solve my problem. In the meantime, I found out multiple things: 1. The J-Link script provided by NXP in the patch for the i.MX93 does not implement a reset. It replaces resetting the CPU with just halting it. 2. Requesting a reset by manually writing AICR.SYSRESETREQ to 1 through the debugger does not result in a reset of the Cortex-M33 core. So, my original question remains: What possibility exits to reset the Cortex-M33 through a debugger? Thanks and regards, Malte Re: i.MX93: Cortex-M33 Reset using J-Link and SYSRESETREQ not working Hello @malkai, I hope you are doing well. Please refer to this link, It will be helpful. https://community.nxp.com/t5/ i-MX-Processors-Knowledge- Base/All-Boards-JTAG/ta-p/ 1106822 ------------------------------ ------------------------------ ------------------------------ ----------------------------- Note: If this post answers your question, please click the Correct Answer button. ------------------------------ ------------------------------ ------------------------------ ----------------------------- Thanks & Regards, Sanket Parekh
記事全体を表示
カスタムボードの Yocto BSP の DDR バイナリを置き換えるにはどうすればよいでしょうか? こんにちは、 カスタム ボードの Yocto BSP 内の DDR バイナリを置き換えようとしています。 新しいマシンが作成され、必要なファイルを含むレシピ ddr-firmware のディレクトリもカスタム メタ レイヤーに作成されます。しかし、SRC_URI に新しい値を割り当て、レシピ追加で元の値を削除しても、Bitbake が評価ボードの元のパスを検索するのを止めることはできません。レシピ追加を使用しない場合も、この検索については何も変わりません。 唯一機能する方法は、元のレシピをマスクし、カスタム レイヤーに新しいレシピを作成することです。 しかし、それは好ましい方法ではないと思います。これは、カスタム マシン用に作成された DDR バイナリを使用するのに簡単に実行できるはずです。ここで何が見逃される可能性があるでしょうか? よろしくお願いします! クレーン Re: How to replace DDR binaries in Yocto BSP for the custom board? はい、うまくいきました。NXP_FIRMWARE_LOCAL_DIR に設定されているフォルダーと正確に一致しないようです。しかし、いずれにせよ、それは機能します。 もう 1 つ質問があります。カスタム レイヤーの .bbappend で NXP-EULA ライセンスを閉じるにはどうすればよいでしょうか? よろしくお願いいたします。 クレーン Re: How to replace DDR binaries in Yocto BSP for the custom board? こんにちは、鶴 ご返信よろしくお願いします。 お客様の DDR にも DDR ファームウェアが含まれている必要があります。Yocto で BSP をビルドするときに、S32G3_LinuxBSP_44.0_User_Manual.pdf を参照して DDR ファームウェアを追加していただけますか。 BR ジョーイ Re: How to replace DDR binaries in Yocto BSP for the custom board? こんにちは、ジョーイ。 ご返信よろしくお願いします。 S32G3で、BSPは「bsp44.0」です。 よろしくお願いいたします。 クレーン Re: How to replace DDR binaries in Yocto BSP for the custom board? こんにちは、クレーン お問い合わせいただきありがとうございます。 使用している BSP のバージョンはどれですか? S32G3 または S32G2 チップを使用していますか? BR ジョーイ Re: How to replace DDR binaries in Yocto BSP for the custom board? こんにちは、クレーン フォルダ(fsl-車載-Yocto-bsp/build_s32g274ardb2/conf)内のlocal.confファイルを変更してみてください。 ACCEPT_FSL_EULA = "1" BR ジョーイ Re: How to replace DDR binaries in Yocto BSP for the custom board? こんにちは、ジョーイ。 .bbappend を追加しようとしましたが機能しませんでしたカスタムボード用。 ERROR: /home/crane/work/yocto/sources/meta-alb/meta-alb-bsp/recipes-bsp/ddr-firmware/ddr-firmware.bb: Unable to get checksum for ddr-firmware SRC_URI entry NXP-EULA: file could not be found The following paths were searched: .bbappendを試してみたLICENSE = "CLOSED"、LIC_FILES_CHKSUM = "" で、SUMMARYのみ、.bbappendも試しませんでした。すべて同じエラーメッセージが表示されます。 元のレシピに基づいてレシピを追加するのではなく、NXP からの元のレシピをマスクしてカスタム レシピを作成するのが、カスタム DDR バイナリを処理する唯一の方法ですか? よろしくお願いいたします。 クレーン Re: How to replace DDR binaries in Yocto BSP for the custom board? こんにちは、クレーン フォルダーに NXP-EULA ファイルを追加しましたか? BR ジョーイ Re: How to replace DDR binaries in Yocto BSP for the custom board? こんにちは、ジョーイ。 このファイルを元のレシピまたはカスタムレシピにコピーしようとしましたが、どちらも機能しません。ファイルは両方の方法で見つかりますが、どちらも以下のエラー メッセージを生成します。 ERROR: No recipes in default available for: /home/crane/work/yocto/sources/meta-crane/recipes-bsp/ddr-firmware/ddr-firmware_%.bbappend 私は NXP の DDR バイナリを使用していないので、NXP によって生成された NXP-EULA を使用するのは意味がないと思います。NXP-EULA のチェックを無効にするのが合理的ですよね? よろしくお願いいたします。 クレーン Re: How to replace DDR binaries in Yocto BSP for the custom board? こんにちは、クレーン ご返信よろしくお願いします。 この問題の根本原因を見つける必要があります。NXPのDDRファームウェアとNXP-EULAファイルを使用するには、YoctoでBSP44をビルドしてみてください。BSP44を正常にビルドできた場合は、DDRファームウェアを交換してから再度ビルドしてみてください。 BR ジョーイ
記事全体を表示
S32K388CVB-Q289 Driving PTC21 Dear Team I am using S32K388CVB-Q289, and enabling the FlexCAN_0 along with the TJA1153 CAN0. I am connected a second node on the physical bus for testing porpose. But the FlexCAN_0 gets Ack errors upon transmission When I double check that the TJA1153 transceiver is enabled, I measure pin 5 in J95 But it reads ~2 Volts. And when I change the GPDO85 register between 0 and 1, the voltage read on the pin is not affected. Although I can see that pin is Set high in GPDO85 register, and that the Output driver is enabled in MSCR85 Configuration: Re: S32K388CVB-Q289 Driving PTC21 Hi, to check pin level simply remove J95.5-6 jumper and check MCU (5) and TJA1153 (6) side. Note TJA1153 has VIO connected to VDD_HV_B_PERH (VDD_HV_B 3.3V) using J804, while used MCU pins are on VDD_HV_A (5V) There is no need to drive EN pin, unless user want to switch between TJA1153 modes. Both EN and STB_N are pulled up to VIO by external resistors. STB_N should be driven low by MCU to allow local configuration if device is in Vanilla state. At the end of config TJA1153, STB is put back to Normal mode with EN, STB_N high. If you see message on the bus, but it is not ACKed, most probably it is due to inconsistent CAN bit timing between both nodes. Anyway, ready example for S32K388EVB is posted on  https://community.nxp.com/t5/S32K/Need-MCAL-working-CAN-Configuration-for-S32K388-EVB-bench/m-p/1923345/highlight/true#M38660   BR, Petr Re: S32K388CVB-Q289 Driving PTC21 Thanks for your response. The voltage levels seems now good. EN and nSTB go to high. Still I get Ack errors, with nothing appearing on the bus in my test measurement tool. Is it possible that my transceiver is in Vanilla state, and hence it is not operational till I configure it once? I read the example, but it would be way easier for my current setup to just send the CAN messages from test tool, rather than connecting the transceivers to each other. Can you share with me the initialization sequence, what I should send through CAN for a basic configuration that just send and receive (no security requirements needed)? Re: S32K388CVB-Q289 Driving PTC21 Hi, by default the device is in Vanilla state so must be configured, either from host or remotely. After configuration, the state can be changed, but in examples it is commonly kept in Vanilla state, so init is needed after each power on. If the posted example is working between FlexCAN modules on the board, it should work as well if just single one is connected to your CAN tool. In that example the ID being transmitted is added to the CAN0 transceiver's passlist, other configurations are left as default. You can refer to below example, done in IP level,  for another init sequence. https://community.nxp.com/t5/S32K-Knowledge-Base/Example-S32K358-FlexCAN-TXRX-ISR-S32DS35-RTD400-500/ta-p/1981987 It expects transceiver in Vanilla state as well and set transceiver's passlist to pass all std and ext ID and do not block any message coming from bus. Finally leaving configuration mode without writing to non-volatile memory nor locking the transceiver (keeping Vanilla). BR, Petr
記事全体を表示
LPC5536 和 Hyperram 你好 我在 LPC5536JBD100 上配置 FLEXSPI 外设时遇到了难题;hyperram 芯片是 S27KS0642GABHV020。该系统位于自定义板上,我们已经成功地在其中集成了其他功能。 我受到 AN12239 的启发,它适用于不同的处理器,但以一种与我正在使用的芯片非常相似的芯片为例:在我看来,主要区别在于 S27KS0642 的新节点技术,它比应用程序节点中使用的 S27KS0641 更快,但时序图(因此虚拟周期)和命令是相同的。 另一个灵感来源是这篇文章 https://community.nxp.com/t5/MCX-Microcontrollers-Knowledge/MCX-N947-FlexSPI-Connecting-to-HyperRAM-Analysis-and/ta-p/1988799 这与我使用的处理器不同,但解释了配置数据结构中某些字段的含义。 我还看了示例 lpcxpresso55s36_flexspi_octal_polling_transfer 来比较 FlexSPI 配置(知道必须进行某些更改,因为它针对的是闪存设备)。 我的症状是,当我尝试读取供应商 ID 时,函数不返回 kStatus_Success(返回值为 7001)。 我检查了时钟是否已连接: CLOCK_SetClkDiv(kCLOCK_DivFlexSpiClk, 0U, true); /*!< Reset FLEXSPICLKDIV divider counter and halt it */ CLOCK_SetClkDiv(kCLOCK_DivFlexSpiClk, 2U, false); /*!< Set FLEXSPICLKDIV divider to value 2 */ CLOCK_AttachClk(kPLL0_to_FLEXSPI); /*!< Switch FLEXSPI to PLL0 */ 并通过图形用户界面配置了引脚 周波的配置方式为 int config_hr(void) { flexspi_config_t config; uint32_t tempCustomLUT[ARRAY_SIZE(customLUT)] = {0U}; /* Copy LUT information from flash region into RAM region, because flash will be reset and back to single mode; In lately time, LUT table assignment maybe failed after flash reset due to LUT read entry is application's required mode(such as octal DDR mode) and flash is being in single SDR mode, they don't matched. */ memcpy(tempCustomLUT, customLUT, sizeof(tempCustomLUT)); /* Get FLEXSPI default settings and configure the flexspi. */ FLEXSPI_GetDefaultConfig(&config); /* Init FLEXSPI. */ config.rxSampleClock = kFLEXSPI_ReadSampleClkExternalInputFromDqsPad;//kFLEXSPI_ReadSampleClkLoopbackFromDqsPad;//kFLEXSPI_ReadSampleClkExternalInputFromDqsPad; //config.enableSckBDiffOpt = true; //config.enableCombination = true; config.ahbConfig.enableAHBPrefetch = true; config.ahbConfig.enableAHBBufferable = true; config.ahbConfig.enableAHBCachable = true; // config.enableDoze = false; FLEXSPI_Init(EXAMPLE_FLEXSPI, &config); /* Configure RAM settings according to serial RAM feature. */ FLEXSPI_SetFlashConfig(EXAMPLE_FLEXSPI, &deviceconfig, kFLEXSPI_PortA1); /* Update LUT table. */ FLEXSPI_UpdateLUT(EXAMPLE_FLEXSPI, 0, tempCustomLUT, ARRAY_SIZE(customLUT)); /* Do software reset. */ FLEXSPI_SoftwareReset(EXAMPLE_FLEXSPI); return 0; } 我检查过了,即使在读取供应商 ID 的函数中,我们使用的也是 A1 端口 status_t flexspi_hyper_ram_get_id(FLEXSPI_Type *base, uint32_t *vendorId) { flexspi_transfer_t flashXfer; status_t status; uint32_t id; /* Write data */ flashXfer.deviceAddress = 0x0U; flashXfer.port = kFLEXSPI_PortA1; flashXfer.cmdType = kFLEXSPI_Read; flashXfer.SeqNumber = 1; flashXfer.seqIndex = HYPERRAM_CMD_LUT_SEQ_IDX_READREG; flashXfer.data = &id; flashXfer.dataSize = 4; status = FLEXSPI_TransferBlocking(base, &flashXfer); *vendorId = id & 0xffffU; return status; } flexspi_device_config_t 结构的初始化过程如下 flexspi_device_config_t deviceconfig = { .flexspiRootClk = 75000000, /* 75MHZ SPI serial clock */ .isSck2Enabled = false, .flashSize = FLASH_SIZE, .CSIntervalUnit = kFLEXSPI_CsIntervalUnit1SckCycle, .CSInterval = 2, .CSHoldTime = 1, .CSSetupTime = 1, .dataValidTime = 1, .columnspace = 3, .enableWordAddress = true, .AWRSeqIndex = HYPERRAM_CMD_LUT_SEQ_IDX_WRITEDATA, .AWRSeqNumber = 1, .ARDSeqIndex =HYPERRAM_CMD_LUT_SEQ_IDX_READDATA, .ARDSeqNumber = 0, .AHBWriteWaitUnit = kFLEXSPI_AhbWriteWaitUnit2AhbCycle, .AHBWriteWaitInterval = 0, .enableWriteMask = true, }; LUT 值为 #define LATENCY (0x04) uint32_t customLUT[20] = { /* Read Data */ [4 * HYPERRAM_CMD_LUT_SEQ_IDX_READDATA] = FLEXSPI_LUT_SEQ(kFLEXSPI_Command_DDR, kFLEXSPI_8PAD, 0xA0,kFLEXSPI_Command_RADDR_DDR, kFLEXSPI_8PAD, 0x18), [4 * HYPERRAM_CMD_LUT_SEQ_IDX_READDATA + 1] = FLEXSPI_LUT_SEQ(kFLEXSPI_Command_CADDR_DDR, kFLEXSPI_8PAD, 0x10, kFLEXSPI_Command_DUMMY_RWDS_DDR, kFLEXSPI_8PAD, LATENCY), [4 * HYPERRAM_CMD_LUT_SEQ_IDX_READDATA + 2] = FLEXSPI_LUT_SEQ(kFLEXSPI_Command_READ_DDR, kFLEXSPI_8PAD, 0x04, kFLEXSPI_Command_STOP, kFLEXSPI_1PAD, 0x00), /* Write Data */ [4 * HYPERRAM_CMD_LUT_SEQ_IDX_WRITEDATA] = FLEXSPI_LUT_SEQ(kFLEXSPI_Command_DDR, kFLEXSPI_8PAD, 0x20,kFLEXSPI_Command_RADDR_DDR, kFLEXSPI_8PAD, 0x18), [4 * HYPERRAM_CMD_LUT_SEQ_IDX_WRITEDATA + 1] = FLEXSPI_LUT_SEQ(kFLEXSPI_Command_CADDR_DDR, kFLEXSPI_8PAD, 0x10, kFLEXSPI_Command_DUMMY_RWDS_DDR, kFLEXSPI_8PAD, LATENCY), [4 * HYPERRAM_CMD_LUT_SEQ_IDX_WRITEDATA + 2] = FLEXSPI_LUT_SEQ(kFLEXSPI_Command_WRITE_DDR, kFLEXSPI_8PAD, 0x04, kFLEXSPI_Command_STOP, kFLEXSPI_1PAD, 0x00), /* Read Register */ [4 * HYPERRAM_CMD_LUT_SEQ_IDX_READREG] = FLEXSPI_LUT_SEQ(kFLEXSPI_Command_DDR, kFLEXSPI_8PAD, 0xE0,kFLEXSPI_Command_RADDR_DDR, kFLEXSPI_8PAD, 0x18), [4 * HYPERRAM_CMD_LUT_SEQ_IDX_READREG + 1] = FLEXSPI_LUT_SEQ(kFLEXSPI_Command_CADDR_DDR, kFLEXSPI_8PAD, 0x10, kFLEXSPI_Command_DUMMY_RWDS_DDR, kFLEXSPI_8PAD, LATENCY), [4 * HYPERRAM_CMD_LUT_SEQ_IDX_READREG + 2] = FLEXSPI_LUT_SEQ(kFLEXSPI_Command_READ_DDR, kFLEXSPI_8PAD, 0x04, kFLEXSPI_Command_STOP, kFLEXSPI_1PAD, 0x00), /* Write Register */ [4 * HYPERRAM_CMD_LUT_SEQ_IDX_WRITEREG] = FLEXSPI_LUT_SEQ(kFLEXSPI_Command_DDR, kFLEXSPI_8PAD, 0x60,kFLEXSPI_Command_RADDR_DDR, kFLEXSPI_8PAD, 0x18), [4 * HYPERRAM_CMD_LUT_SEQ_IDX_WRITEREG + 1] = FLEXSPI_LUT_SEQ(kFLEXSPI_Command_CADDR_DDR, kFLEXSPI_8PAD, 0x10, kFLEXSPI_Command_DUMMY_RWDS_DDR, kFLEXSPI_8PAD, LATENCY), [4 * HYPERRAM_CMD_LUT_SEQ_IDX_WRITEREG + 2] = FLEXSPI_LUT_SEQ(kFLEXSPI_Command_WRITE_DDR, kFLEXSPI_8PAD, 0x04, kFLEXSPI_Command_STOP, kFLEXSPI_1PAD, 0x00), }; 这对我来说很有感知,因为我总共使用了 48 个地址位,8 个键盘上有 DDR 模式,命令是正确的。 我是不是漏掉了什么? Re: LPC5536 and Hyperram 你好 谢谢。 不,我配置了更多引脚,但截图拍得很差:我猜有 8 个数据引脚,一个 RWDS、一个 CS_n 和一对差分时钟引脚。 Re: LPC5536 and Hyperram 你好@img_gabrigob 关于引脚配置 您是否只配置了 5 个数据引脚? S27KS0642GABHV020 需要 8 个数据引脚。 BR 哈利 Re: LPC5536 and Hyperram 你好 谢谢。我给你回复了,但我想我做错了什么(第一次使用这个社区),回复直接转到了我的原帖。 Re: LPC5536 and Hyperram 你好@img_gabrigob 首先,我认为您可以检查硬件。 探测物理信号(示波器): 确认 CK 按您预期的速率切换,交易的 CS# 脉冲,当您触发信号 Read-ID 序列时,DQ [7:0]/RWDS 会显示活动。 并将 FlexSPI 串行时钟降低到较低的安全频率(例如20-25 MHz),同时进行调试。 那么我认为您可以参考这个 LUT。 /* Read Register */ [4 * HYPERRAM_CMD_LUT_SEQ_IDX_READREG] = FLEXSPI_LUT_SEQ(kFLEXSPI_Command_DDR, kFLEXSPI_8PAD, 0xE0, kFLEXSPI_Command_RADDR_DDR, kFLEXSPI_8PAD, 0x18), [4 * HYPERRAM_CMD_LUT_SEQ_IDX_READREG + 1] = FLEXSPI_LUT_SEQ( kFLEXSPI_Command_CADDR_DDR, kFLEXSPI_8PAD, 0x10, kFLEXSPI_Command_DUMMY_RWDS_DDR, kFLEXSPI_8PAD, 0x06), [4 * HYPERRAM_CMD_LUT_SEQ_IDX_READREG + 2] = FLEXSPI_LUT_SEQ(kFLEXSPI_Command_READ_DDR, kFLEXSPI_8PAD, 0x04, kFLEXSPI_Command_STOP, kFLEXSPI_1PAD, 0x00), /* Write Register */ [4 * HYPERRAM_CMD_LUT_SEQ_IDX_WRITEREG] = FLEXSPI_LUT_SEQ(kFLEXSPI_Command_DDR, kFLEXSPI_8PAD, 0x60, kFLEXSPI_Command_RADDR_DDR, kFLEXSPI_8PAD, 0x18), [4 * HYPERRAM_CMD_LUT_SEQ_IDX_WRITEREG + 1] = FLEXSPI_LUT_SEQ( kFLEXSPI_Command_CADDR_DDR, kFLEXSPI_8PAD, 0x10, kFLEXSPI_Command_DUMMY_RWDS_DDR, kFLEXSPI_8PAD, 0x06), [4 * HYPERRAM_CMD_LUT_SEQ_IDX_WRITEREG + 2] = FLEXSPI_LUT_SEQ( kFLEXSPI_Command_WRITE_DDR, kFLEXSPI_8PAD, 0x04, kFLEXSPI_Command_STOP, kFLEXSPI_1PAD, 0x00), RT1064 HyperRAM 支持 S27KS0641 和 S27KS0642 - NXP Community BR 哈利 Re: LPC5536 and Hyperram 你好,@Harry_Zhang、 谢谢您! 我试着查看我的 LUT 与您链接的另一篇文章中用户使用的 LUT 之间是否存在任何差异,但即使在尝试调整延迟等待状态下的假人数量后,我还是遇到了同样的问题。 我不知道我是否在安装 IDE 时配置错误,但在 LPC5536 上,我似乎无法通过 flexspi_config_t 数据结构设置差分时钟(字段 enableSckBDiffOpt 位于禁用的 ifdef 中)。 我们在董事会采取了一些措施。CSN 和 CLK 信号处于激活状态。 我们使用两种压摆率(标准和高)来捕获时钟 时钟频率比我预想的要慢(我想我把它设置为 75MHz,这里是 75/2,而不是 150/2)。 数据和 RWDS 信号稳定在 0V。我们只是在数据信号上看到一个小故障(5 毫微秒)。 我还附上了从图形用户界面输出的 pin_mux 和 clock_config 文件。 请问您还有其他建议吗? 顺祝商祺! Re: LPC5536 and Hyperram 您好! 感谢您的回复 我再次检查了电路图,...我意识到 RESN 不受 FLEXspi 控制,因此我更改了软件,使其上升。 现在控制器可以工作了,我们还将 MCU 上的引脚配置为快速转换速率选项。 例如,这是 RWDS 与 CLK 的对比。 因此,问题在于 LUT 中的延迟值(使用您的链接进行更正)和 RESET。 我还有一些不明白的地方,即使这对这个项目并不重要,但可能对未来的应用有用:从时钟树中的配置来看,我期望 CLK 频率为 75MHz,但我测量的频率为 37.5MHz。 还有其他我错过的时钟分频器吗? 谢谢! 顺祝商祺! 加布里埃尔 Re: LPC5536 and Hyperram 你好@img_gabrigob 您能分享与 HyperRAM 的连接原理图吗? BR 哈利 Re: LPC5536 and Hyperram 你好@img_gabrigob 根据 LPC55S36 数据表。 时钟频率最高为 50M(DDR 模式)。 /* Flexspi frequency 150MHz / 3 = 50MHz */ CLOCK_SetClkDiv(kCLOCK_DivFlexSpiClk, 0U, true); /*!< Reset FLEXSPICLKDIV divider counter and halt it */ CLOCK_SetClkDiv(kCLOCK_DivFlexSpiClk, 3U, false); /*!< Set FLEXSPICLKDIV divider to value 3 */ CLOCK_AttachClk(kPLL0_to_FLEXSPI); /*!< Switch FLEXSPI to PLL0 */ BR 哈利
記事全体を表示
恩智浦 s32k312 SRAM 多位错误 @danielmartynek 对于单位错误,我可以调用 SRAM ISR(ERM0_ISR_Handler),但对于多位错误,却无法调用处理程序。 据我所知,不可纠错事件与多位错误相对应,对吗? 我可以看到 SRAM 不可更正的错误事件位是在 SR0 中设置的,但是 ISR 没有被触发信号。 能否请您帮助我了解如何调用多位错误 ISR? 我还在 CR0 寄存器中启用了 SRAM0 的中断通知功能 Re: NXP s32k312 SRAM MultibitError 你好,@Anitha7、 不可纠正的错误会触发信号 CM7 故障异常。 在我链接的示例中,我启用了 Bus_Fault 异常,但其优先级低于 ERM 处理程序的优先级,这样 ERM 处理程序就会首先被调用。 我认为这可能是您项目中的问题所在。 此外,请仔细检查 VTOR 指针,并确保在 NVIC 中启用 ERM 中断。您可能会注意到 NVIC 中的中断待处理。 Re: NXP s32k312 SRAM MultibitError 你好@丹尼尔-马蒂内克 多比特是指 RM 规定的双比特 我根据你的参考将系统配置为 SRAM0。通过设置 SRO 寄存器中的相应位,可避免发生无法纠正的 ECC 故障(NEC0)。 我在相应的 CR0 寄存器中启用了 NEC0 和单比特事件的中断通知。 发生不可纠正的 ECC 故障后,控制权转移到系统调用功能,此后直到我执行 RESET 后,软件才能运行。尽管我已经添加了 ERM_1_Hand ler ,但它没有被触发。对于单位错误, ERM_0_H andler 会被正确触发信号。 我该如何确保 ERM_1_Handler 在发生多位(不可纠正)ECC 错误时被调用? 另外,我想确认一下,多位错误(双位错误)是否总是表示出现了无法纠正的 ECC 故障? 发生不可纠正的 ECC 事件后,我需要在正常模式下在 ECU 中执行 RESET 运行 Re: NXP s32k312 SRAM MultibitError 你好,@Anitha7、 多位错误是什么意思? 64 位(8 字节)的数据有一个 8 位校验和,不可能检测到所有可能的 ECC 错误。有 ECC SECDED(单错误纠正,双错误检测)。 此致, 丹尼尔 Re: NXP s32k312 SRAM MultibitError 你好@丹尼尔-马蒂内克 VTOR 表仅在 SRAM0 注入无法纠正的 ECC 故障时指向闪存。 我根据您的参考示例代码将系统配置为 SRAM0。通过设置 SRO 寄存器中的相应位,可在发生不可纠正的 ECC 故障时自动恢复 ECC。 我在相应的 CR0 寄存器中启用了中断通知功能。 发生不可纠正的 ECC 故障后,控制权转移到系统调用功能,之后软件将无法运行,直到我执行 RESET。尽管我已经添加了 ERM_1_Handler,但它没有被触发信号。对于单位错误,ERM_0_Handler 会被正确触发。 我该如何确保在发生多位(不可修正)ECC 错误时调用ERM_1_Handler? 另外,我想确认一下,多位错误是否总是表示无法纠正的 ECC 故障? Re: NXP s32k312 SRAM MultibitError 你好,@Anitha7、 我更新了示例,在 SRAM0 中加入了不可纠正的错误注入。 https://community.nxp.com/t5/S32K-Knowledge-Base/Example-S32K344-EIM-ERM-DTCM-SRAM-Baremetal-v3-0-S32DS36/ta-p/2193534 您能在应用程序中读取 VTOR 寄存器吗? 在内存中注入无法纠正的 ECC 故障时,中断向量表不得位于 SRAM0 中。 否则,ECC 故障会在获取过程中损坏矢量表,导致另一个故障异常。 此致, 丹尼尔
記事全体を表示