Multi Source Translation Content

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

Multi Source Translation Content

Discussions

Sort by:
AB_SWAPファームウェアの初期インストール手順 HSE_B リファレンス・マニュアル (v2.7)では、ファームウェアのインストールが2つのセクションで扱われています。 - 3.2 FULL_MEM構成でのインストールプロセス - 3.3 AB_SWAP構成におけるインストールプロセス 工場出荷時のS32K3デバイスは、FULL_MEM構成になっています。これは、正しい手順がセクション3.2(FULL_MEM構成)で網羅されていることを示唆しています。 一方、インストールするファームウェアはAB_SWAPタイプです。これは、正しい一連の命令がセクション3.3(AB_SWAP構成)で網羅されていることを示唆しています。 工場出荷時の新品デバイスにAB_SWAPファームウェアをインストールするための手順は、マニュアルのどのセクションに記載されていますか? Re: Instructions for initial installation of AB_SWAP firmware こんにちは、 @FredrikMoller さん もしHSE_B Firmware リファレンス・マニュアルの3.3.1節に記載されているMUベースの方法ではなく、IVT方法でAB_SWAP構成でHSE FWをインストールするための指針をお探しの場合は、AN744810: HSE FW Install for S32K3xxを参照することをお勧めします。これは、デバイスの「セキュアファイル」セクションで利用できます。 また、「 Install HSE Firmware on S32K344 」では、FULL_MEMメモリ構成とAB_SWAPメモリ構成の両方に対してIVT方式でS32K344デバイスにHSE FWをインストールする方法を実演しています。 BR、VaneB
View full article
RW612: FlexSPIポートの混在(CACHE64書き込みバッファ)、PMUゲートCM33クロック、リセット後にPSRAM FSELが失われる RW612(u-blox IRIS-W10モジュール、CHIP_INFO 0x7002)上に通信スティックを構築します。コードはFlexSPIポートA1の外部16MB QSPI NORからXIPを実行し、同じコントローラーのポートB1には2MBのQSPI PSRAM(APS1604M-3SQR、DQSなし)が接続されています。ファームウェア:MCUXpresso SDK 25.06.00 + FreeRTOS、およびZephyr 4.5.0-rc1です。3つの問題点が見つかりましたので、その根本原因と推奨設定について教えてください。測定値、除外した項目、登録住所、コード抜粋を含む完全な報告書を添付します。 1) CACHE64_CTRL0書き込みバッファが有効になっているFlexSPIポート間でのデータ混合 PSRAMはコードバスウィンドウからアクセスされ、コードはポートAからXIPを実行しているため、PSRAMアクセスは時にフラッシュワードを返すことがあり、命令フェッチは誤ったワード(ヒープコードやNET割り込みのBusFault/UsageFault)を返すこともあります。同一のコードアドレスを持つ画像に対するA/Bテスト:バッファオンの場合、約115分で9回の障害が発生。バッファオフの場合、約195分で0回の障害が発生(p値は約1e-4)。SDK SystemInit()はXIP上でこのバッファを有効にします。 - CCRのCACHE64_CTRL0に訂正や制限はありますか?ポートBにPSRAM、ポートAにXIPを使ったENWRBUFは?SDKはデフォルトで安全ですか? - システムバスウィンドウ(0x28000000/0x38000000 with CACHE64_CTRL1、Zephyr GitHub issue 99943で示唆されているように)は、PSRAMの隣にXIPの隣で必須ですか?CTRL1書き込みバッファは安全ですか?(バッファ7の場合)どのAHB RXバッファ/プリフェッチ設定をお勧めしますか? 両方向の混合のメカニズムは何ですか? 2) PMUはCM33クロック(gate_cpu_clk)を制御し、デバッガが接続されたときにのみコアが再開します。 基板はリセットも故障記録もなくフリーズし、映像にWFIも表示されません(FreeRTOS)。デバッガが接続した瞬間(Cortex-M33のアタッチが素でさえ)すぐに再び動作します。SysTick/ENETカウンターは停止前に読み取られ、DWT_PCSRサンプルはコアが進んでいないことを示している。リセットを有効にした状態でLPOSCにWWDT0を有効化した場合のみ、この問題は回避できた(70分間で0回の故障に対し、無効化した場合は20分間で6~7回の故障)。Zephyrでは、同じクラスがWFIに残るコアとして表示され、OSタイマー割り込みが有効化されています。WFIなしのアイドルループはこれを回避します。 - WFIを使用せず、SCR = 0の場合、PMUはいつCPUクロックをゲート制御するのでしょうか?デバッグ接続によってゲート制御が解除されるのはなぜですか?また、WWDTリセットが有効になっている場合、ゲート制御が解除されないのはなぜですか?SYSCTL2 SOURCE_CLK_GATE CPU_CLK_ENは実際には何を制御しているのでしょうか? - RW612で通常のWFIを使用するには、どのようなウェイクアップ/PMU構成が必要ですか?WFI(給水設備)のない、忙しいけれど何もしない状態は、長期的に見て許容できる戦略でしょうか? 3) ディープリセット後にMCI_IO_MUX FSELビット3(QUAD_SPI_PSRAM、0x40004020)がクリアされる ハング後にWWDTリセットを行った後、QUAD_SPI_PSRAM機能選択ビットがクリアになり、PSRAMパッドが浮かび上がり、すべての読み取りが返0x1797523E、コードが再びピングループを適用するまで続きました。Zephyrはこのピン群自体を適用しません。 - どのリセットタイプがMCI_IO_MUX FSELとパッドプルをリセットしますか?ROMはFSELと接触しますか?ZephyrはXIPの隣でPSRAM(ピン、LUT分離、キャッシュポリシー)をサポートする予定ですか? 未公開項目:NETがZephyrでエラー(ENET_GetRxFrameSizeステータス4001、BABR/CRCエラー)を受け取り、RMIIで100 Mbit/sの全二重KSZ8081を受信しています。これは既知の問題でしょうか? 現在の回避策(CTRL0バッファをPSRAMで書き出し、システムバスウィンドウ、LPOSCでWWDT0をリセット、WFIなしのアイドル、毎回の起動でPSRAMピングループを再適用)は添付のレポートに含まれています。ご指導いただければ幸いです。 製品: WiFi RW6XX Re: RW612: FlexSPI port mixing (CACHE64 write buffer), PMU gates CM33 clock, PSRAM FSEL lost after r @dimush様、 総合的な分析に基づくと、まずはフラッシュメモリとPSRAM間のデータ破損/混在の問題を解決する必要があります。 以下の設定が正しいことを確認する必要があります。 FlexSPIポートA -> QSPI NORフラッシュ -> code-bus/cache0 -> XIP FlexSPIポートB -> PSRAM -> システムバス/キャッシュ1 -> ヒープ/データ また、以下の商品もおすすめします。 CACHE64_CTRL0.ENWRBUF = 0 CACHE64_CTRL1.ENWRBUF = 0 // トラブルシューティング中 PSRAMプリフェッチ = 無効 // トラブルシューティング中 [注] FlashとPSRAMは、それぞれ適切なAHBマッピングパスを使用する必要があります。RW612フラッシュキャッシュとPSRAMキャッシュは、それぞれコードバスとシステムバスにマッピングされています。 FlexSPI LUTの変更、ポートの再構成、メモリエイリアスの切り替え、またはIPコマンドによるメモリの変更を行った後にのみ、FlexSPIがアイドル状態になるまで待って、対応するAHB RX/TXバッファとCPUキャッシュをクリアする必要があります。キャッシュは通常のPSRAMヒープアクセスの前にクリアしてはいけません。 トラブルシューティング中は、PSRAMの非キャッシュ可能なシステムバスエイリアスを使ってキャッシュ機構をさらに分離することもできます。 ありがとうございます よろしくお願いいたします。 維東 Re: RW612: FlexSPI port mixing (CACHE64 write buffer), PMU gates CM33 clock, PSRAM FSEL lost after r ありがとう、ウェイドン。私たちのZephyrビルドはすでにこのレイアウトを使っています:ポートAからコードバス/CACHE64_CTRL0経由XIP(ENWRBUF = 0)、システムバス0x38000000/CACHE64_CTRL1経由でポートBにPSRAM、通常のヒープパスではキャッシュ保守なし。このシステムに移行して以来、第1の問題で発生したデータの混在は見られなくなりました。今度は、CACHE64_CTRL1.ENWRBUF = 0 かつ PSRAM プリフェッチを無効にした状態で、現在のイメージと A/B 比較を実行し、結果を報告します。 残りの問題は2つ目の問題で、約18~20ボード時間ごとにコア全体が停止してしまうことです。SysTickで駆動されるタイマーとワークキューは、最後のウォッチドッグフィードから約1秒以内に同時に停止し、WWDT0リセットによってのみ復旧します。これは、WFIが無効で、システムバスのPSRAMウィンドウが既に設定されているアイドル状態のときに発生します。PMUがWFIなしでCM33クロックをゲートするタイミングや、問題3(WWDTリセット後にFSELビット3がクリアされたMCI_IO_MUX)についてコメントしていただけますか? Re: RW612: FlexSPI port mixing (CACHE64 write buffer), PMU gates CM33 clock, PSRAM FSEL lost after r @dimush様、 最新情報のご提供ありがとうございます。 問題2に関して、PM2のエントリとウェイクアップ設定を確認するには、以下の参照フローを使用してください。必要な調整を行った後、問題が再現可能かどうか確認してください。 まず、PM1の基準値を設定します。 PMUはPM0のままです SCR.SLEEPDEEP = 0 WFIを実行する PM1では、有効かつ有効な割り込みソースはすべてCM33を起動させる必要があります。 PM2に入る前に、ウェイクアップソースを必要なすべてのレベルで設定する必要があります。 周辺タイマーまたはGPIO割り込みを有効化・設定; 対応するNVIC割り込みを有効にする。 PMUウェイクアップマスクで、対応するPM2ウェイクアップソースを有効にします。 ウェイクアップソースに必要なクロックがPM2内でアクティブな状態を維持するようにしてください。 古いペリフェラルの割り込み状態をすべて消去します。 次の有効なタイマーマッチ/比較イベントをプログラムします。 NVIC割り込みが保留状態にあることだけでは、そのソースがPM2ウェイクアップソースとして構成されていることを証明するものではありません。PM2はタイマー、GPIO、FlexSPI、USB、DMA、イーサネットなどのウェイクアップソースをサポートしています。 文書化されたPM2移行は以下のとおりです。 PM0 -> PM2: PMUの電力モードを2'b01に設定します。 WFIを実行する PM2では、CPUの状態が保持されている間、CM33のクロックはゲート制御されます。AONドメインと選択されたPM2起動ソースはアクティブな状態を維持します。 以下のコードは、処理手順を説明するためのものであり、直接コピーして使用することを意図したものではありません。 configure_wakeup_source(); enable_peripheral_interrupt(); enable_nvic_interrupt(); enable_pmu_pm2_wakeup_source(); clear_peripheral_interrupt_status(); program_next_timer_event(); /* PM2に入る前にCPU_CLK_ENを有効にしておく */ set_pmu_power_mode(PM2); __DSB(); __ISB(); __WFI(); __ISB(); 本番環境実装では、PMUレジスタを直接プログラムするのではなく、対応するMCUXpresso SDKバージョンが提供するパワーマネージメントAPIを使用してください。SDKのAPI名称はバージョンごとに異なる場合があります。 PM2に入る前に、SYSCTL2.SOURCE_CLK_GATE.CPU_CLK_ENが有効になっていることを確認してください。PM2をエミュレートするためにこのビットをクリアしてはいけません。CPUクロックゲーティングはPMU電源モード遷移によって実行されるべきです。 PM2に入る直前に、以下の値を記録してください。 PMU電源モード SCB->SCR SYSCTL2.SOURCE_CLK_GATE CPU_CLK_EN PM22対策マスク NVICの有効化/保留ステータス タイマー有効化/ステータスレジスタ 最後に、FreeRTOSのWFI非対応構成を別途テストしてください。 WFIなし SCR.SLEEPDEEP = 0 PMUの電力モードはPM0のままです。 CPU_CLK_EN = 1 これらの条件下でもCM33が停止する場合、その挙動は正常なPM2遷移とはみなすべきではない。その場合は、予期せぬクロックゲート動作、またはRW612 PMU/クロックゲーティング用シリコンの問題の可能性として調査する必要があります。 問題3に関して、WWDTリセット後、RW612はブートROMブートフローを通じて再起動します。 起動ROM -> FlexSPI NOR/FCB - >アプリケーションイメージ アプリケーションイメージにPSRAMのピン多解式設定コードが含まれている場合、そのコードを再度実行して有効にします。したがって、アプリケーションコードに必要なPSRAMピン-マルチックス構成が含まれているか必ず確認してください。 ありがとうございます よろしくお願いいたします。 維東 Re: RW612: FlexSPI port mixing (CACHE64 write buffer), PMU gates CM33 clock, PSRAM FSEL lost after r ありがとう、ウェイドン。ご依頼いただいたFreeRTOSのWFI非対応テストを、弊社の高速再現ボードで実行しました。BoardInit の後に明示的に設定され、1 秒ごとに再チェックされる条件: イメージ内のどこにも WFI がない (逆アセンブリで検証済み。ティックレス アイドルはオフ)、SCB->SCR = 0 (SLEEPDEEP = 0、SLEEPONEXIT = 0)、PMU PWR_MODE = PM0 (PWR_MODE_STATUS = 0)、SYSCTL2.SOURCE_CLK_GATE = 0x700100D2 (CPU_CLK_EN = 1)、WWDT は無効。注: ROM/ブートローダーは SOURCE_CLK_GATE = 0x300000C6 を残しました。CPU_CLK_EN = 0、コアが動作中。 結果:CM33は約7分以内に3回停止した(最初の停止は約6分後の稼働後)。SysTickとOSタイマーのギャップチェックによると、デバッガーが接続されるまでコアは進んでいませんでした。最初の停止では12.4秒、その後は接続するたびに進みました。割り込まれたThreadは毎回lwIP RXタスクであり、PC 0x20002344(SRAM内のコード)でした。停止1秒前のレジスタスナップショット:PWR_MODE 0、PWR_MODE_STATUS 0、WAKEUP_LEVEL 0x3、WAKEUP_MASK 0x20、WAKEUP_STATUS 0、PM2マスク 0x0/0x200/0x800000、SCR 0、ICSR 0x00400000、SOURCE_CLK_GATE 0x700100D2、NVIC ISER 0x00010400/0x00040000/0/0x00080000、ISPR3 0x120、SysTick CTRL 0x10007、CLKCTL0 PSCCTL0..2 0x02410E07/0x0E020001/0x8、CLKCTL1 PSCCTL0..2 0x08000D00/0x00010003/0x8000004D。アタッチ後、DHCSR = 0x01100001 (実行中)。 あなたの基準によれば、これは予期せぬクロックゲートであり、PM2遷移ではありません。さらに2つの観察結果:LPOSCでWWDT0を有効化した場合、FreeRTOSでは以前は停止が発生しなかった(70分で0)。Zephyrでは、アイドルループが毎回OSタイマーを読み取るビルドで、91ボード時間(約4ボード時間)停止なしで動作していましたが、現在それを分離しています。完全なレジスターのダンプを添付できます。次のステップとして何を提案しますか?また、これに関する既知の誤りはありますか? Re: RW612: FlexSPI port mixing (CACHE64 write buffer), PMU gates CM33 clock, PSRAM FSEL lost after r @dimush様、 最新情報のご提供ありがとうございます。 最も低いレジスタレベルやIPコマンドレベルで調査を続けると、誤った方向に進んでしまう可能性がある。別のアプローチを取るべきです。RW612とu-blox W10モジュールが正常に動作していると仮定し、SDKレベルから調査を再開します。 あなたはW10モジュールを使用しているとおっしゃっていましたね。私は以前、u-blox W10 EVKのデバッグを行ったことがあります。お使いのモジュールがFM25Q128A QSPI NORフラッシュを使用しているかどうかをご確認ください。その後、以下を検証できます: FCBフラッシュのタイミング設定。 実行時のLUT設定。 さらに、W10のPSRAMはお客様追加です。部品番号と仕様をお知らせください。また、LUTの設定も確認する必要があります。   ありがとうございます よろしくお願いいたします。 魏東 Re: RW612: FlexSPI port mixing (CACHE64 write buffer), PMU gates CM33 clock, PSRAM FSEL lost after r ありがとう、ウェイドン。構成は以下のとおりです。完全なFCB、ランタイムレジスタ、および実行中のボードから読み取られたLUTワードは、添付のRW612_FlexSPI_config_dongle_c0.txtに記載されています。 フラッシュメモリ:はい、FM25Q128A - Fidelix、JEDEC ID F8 42 18、16 MB、ポートA1、XIPです(最初のレポートでは誤って「Fudan」と記載されていました)。0x08000400 の FCB は u-blox IRIS-W1 "Fidelex 8/16 MB" です。flash_config.c(FRDM-RW612 ベース): readSampleClkSrc 1 (DQS-pad ループバック)、CS ホールド/セットアップ 3/3、sflashPadType 4、serialClkFreq 7 (133 MHz 列挙; FRDM-RW612 は 5 = 100 MHz)、QE は WRSR 01h を介して 0x0200 で設定、シーケンス EBh 1-4-4 をモードバイト 0x00 と 4 つのダミーサイクルで読み出します (LUT 0x0A1804EB 0x32041E00 0x00002604)。ROMはこのパーツのSFDPを読み取れないため、フルFCBが使われます。 ランタイム:ブートローダーはFlexSPIのルートを130 MHzに設定します。Zephyrアプリケーションはコントローラ設定をXIPで維持し、ランタイムの読み込みLUTはFCBと同じで、PSRAM initはルートディバイダーを/3に設定します。MCR0.SERCLKDIV = 1 の場合、シリアルクロックは両方のポートで約 43 MHz になります (PSRAM SCLK で測定: 43 MHz)。MCR0 0xFFFF1110、MCR2 0x200009F7、AHBCR 0x00200078、FLSHA1CR1 0x63。 PSRAM: AP Memory APS1604M-3SQR、16 Mbit、2.7~3.6 V (3.3 V 電源)、QSPI SDR、DQS ピンなし (RDQS プルダウン)、3.3 V で最大 109 MHz、tCEM 8 μs。ポートB1:2MB、CSホールド/セットアップ3/3、データ有効時間1、書き込みマスクオフ。LUT を 6 つのダミーサイクルで EBh 1-4-4 を読み取り (0x0A1804EB 0x26043206)、38h 1-4-4 を書き込み (0x0A180438 0x00002200)、66h/99h をリセットします。CACHE64_CTRL1はシステムバスの0x39000000を通じてのみアクセスされます。XIPはコードバスをCACHE64_CTRL0で使用します。ENWRBUF = 0。この構成ではPSRAMのスコープで測定:SCK 43 MHz、CE#低パルスは最大19 us(APS1604M tCEMは8 us)。 ポートBのサンプリングはFRDM-RW612リファレンスと一致します(両ポートともDQSパッドループバック、RX_CLK_SRC_DIFF = 0)。 コアの停止についてですが、Zephyrでもトラブルシューティング設定(CTRL1でバッファを書き出す、プリフェッチをオフにする)でも同じことが起こりました。現在使用している2つのビルド(1つはトレースフックあり、アイドルフックなし、もう1つはアイドルループでOSタイマーを読み取る)は、停止することなく約50ボード時間稼働しました(予想では約2時間)。 Re: RW612: FlexSPI port mixing (CACHE64 write buffer), PMU gates CM33 clock, PSRAM FSEL lost after r @dimush様、 最新情報のご提供ありがとうございます。 添付ファイルには、FCB設定ファイル、flash_config.c/.h、ランタイムLUT、およびmflash_drv.c/.hが含まれています。 私が共有したファイルに置き換える前に、元のファイルのバックアップを取っておいてください。 以前、私のお客様の一人がカスタムボードでBLEのFW関連の問題に遭遇したので、調査してLUTを調整しFM25Q128Aしました。添付ファイルは、検証済みの構成ファイルからのものであり、比較の参考になるかもしれません。 デバッグ範囲を絞るために、一時的にZephyrを一時的に置いて、FreeRTOS SDKの例を使って問題を再現することをお勧めします。上流のZephyrがすべてのRW612機能や構成を完全にサポートしていないのではないかと懸念しています。 さらに、ご指摘の3つの問題はFRDM-RW612ボードでも再現可能かどうか教えていただけますか? ありがとうございます よろしくお願いいたします。 維東 Re: RW612: FlexSPI port mixing (CACHE64 write buffer), PMU gates CM33 clock, PSRAM FSEL lost after r Weidongさん、FM25Q128Aのファイルをありがとうございました。それらを比較し、FRDM-RW612を含む、あなたが提案したテストを実施しました。 FCB/LUTの比較:flash_config.cは、deviceModeType(貴社ではkDeviceConfigCmdType_QuadEnable、弊社ではGeneric)を除いて、弊社ボードのFCBと同一です。serialClkFreq 7、readSampleClkSrc 1、CS 3/3、WRSR 01h 0x0200経由のQE、およびEBh読み出しシーケンスは同じです。あなたのmflash_drv.cは、私たちの(フリーズした)FreeRTOSファームウェアのドライバと3つの点で異なります:EBhモードのバイト0x00(私たちの0xF0)、クアッドページプログラム33h 1-4-4(うちの32h 1-1-4)、そして2バイトのWRSR(うちの4)です。当社の製品ファームウェアはZephyrで、独自のNORドライバを使用しています。共有されているのはFCBだけです。 FRDM-RW612、SDK 25.06.00 lwip_ping FreeRTOS例、FRDMボードファイル変更なし、PCからのイーサネットロード(約4000回のENET RX割り込み/秒lwip_rx:TCP ~8.7 Mbit/s、UDP、pingは1400 B): - 問題 2 (WFI はどこにもありません - 逆アセンブリで確認済み、SCR = 0、PM0、CPU_CLK_EN = 1、WWDT オフ): 111 分でコアが停止しませんでした。私たちのボードでは、同じ構成で約7分間に3回停止しました。 - 問題 1 (コードバスウィンドウを介した PSRAM、キャッシュ不可、CACHE64_CTRL0 書き込みバッファのオン/オフ): それぞれ 36 分間で不一致は 0 件 (書き込みバッファオン実行で書き込まれた PSRAM ワードは約 4e9 個)。当社のボードでは、バッファをオンにした状態で約115分間に9回の障害が発生しました。 したがって、SDKの例ではFRDM-RW612ではどちらの問題も再現されません。FRDM実行では、mbedTLS/ELS/PKC、TRNG、HTTPSのロード、およびその他のフラッシュ/PSRAM部分は含まれません。 FRDM-RW612でSDKの例を動かすために変更しなければならなかった4つのポイントがあります。 1. app.hはKSZ8081としてMDIOアドレス2を使用します。このボード上のPHYはアドレス1で応答します(「PHYを初期化できません」と呼ばれ、その後ハングします)。 2. OSタイマーはサンプルではクロックされません。最初のOSTIMER読み取りでバスがハングアップします。 3. XIP から呼び出された BOARD_InitPsRam() がコアをハングアップさせる: FLEXSPI_SetFlashConfig() が同じ FlexSPI からコードが実行されている間に MCR0.MDIS を設定する。割り込みをマスクした状態でSRAMから実行する必要がありました。 4. SDK FlexSPIの設定(AHBアライメント未設定、ルート130 MHz)では、2 KBのPSRAM読み戻しが正確に1 KBページ境界(1KB下のデータ)で誤り、CTRL0書き込みバッファとは無関係でした。AHBCRのアライメントを512バイトに設定し、書き込み後にAHB RXバッファをクリアすることで、その設定は削除されます。 当社のボード、第1版 / PSRAMの整合性:プリフェッチオンと256 B AHB RXバッファを使用した場合、APS1604MのCE#ローはSCK 43 MHzで最大19マイクロ秒持続しました(実測値、tCEMは8マイクロ秒)。SCKを65 MHz(ルート/2、SERCLKDIV /2)に変更し、システムバス・マスタ(マスター1、PSRAMウィンドウは0x39000000)に64 BのAHB RXバッファ(プリフェッチなし)を割り当てました(XIPはバッファ6を保持し、プリフェッチ時には256 Bを保持)。ポートBではCSINTERVAL 3を設定しました:CE#の低値は最大1.4 us(測定値)です。43 MHzのボードは76時間後にPSRAMでTLSヒープ破損が発生しました(これが3回目の事例です)。65 MHzのボードはこれまでに約80ボード時間稼働しています。 私たちのボード、Zephyrの第2号:変更なしでコアは約22ボード時間に1回停止します。2つのビルドは約150ボード時間連続で停止なしで動作しました(約7時間が予想されます):1つはすべてのコンテキストスイッチと割り込みにZephyrのトレーシングフックを搭載し、もう1つはアイドルループでOSタイマーカウンターの読み取りのみを毎回加算する(どちらのドライブにもWFIはありません)。これは、アイドルループが周辺バスを静かにしたとき、WFIなしでPM0でコアクロックがゲートされていることを示しています。 これで今回の調査は完了です。SCK 65MHzと独立した短いPSRAM AHBバッファを使用することで、PSRAMはクリーンな状態を保ち、アイドルループタイマーの読み出しによってコアが動作し続けることが確認できました。サポートと認証済みのFM25Q128A設定に心より感謝します。
View full article
AB_SWAP固件初始安装说明 HSE_B 固件参考手册(v2.7)中,固件安装分为两个部分: - 3.2 FULL_MEM 配置下的安装过程 - 3.3 AB_SWAP 配置中的安装过程 出厂时,S32K3 设备将处于 FULL_MEM 配置。这表明第 3.2 节(FULL_MEM 配置)涵盖了正确的指令集。 另一方面,要安装的固件类型为 AB_SWAP。这表明第 3.3 节(AB_SWAP 配置)涵盖了正确的指令集。 手册的哪一部分包含了在刚从工厂交付的设备上安装 AB_SWAP 固件的相关说明? Re: Instructions for initial installation of AB_SWAP firmware 嗨@FredrikMoller 如果您正在寻找有关使用 IVT 方法在 AB_SWAP 配置中安装 HSE FW 的指导,而不是 HSE_B 固件参考手册第 3.3.1 节中描述的基于 MU 的方法,我建议您参考 AN744810:S32K3xx 的 HSE FW 安装。此功能位于设备的“安全文件”部分。 此外,在 S32K344 上安装 HSE 固件演示了如何使用 IVT 方法在 S32K344 设备上为 FULL_MEM 和 AB_SWAP 内存配置安装 HSE 固件。 BR,VaneB
View full article
Recommended BSP / Neutron SDK versioning strategy Hello, We are developing a PoC for an automotive application using the i.MX95 as our platform and would like to clarify the recommended Neutron SDK versioning strategy. We have read the "Neutron SDK Version Compatibility with Yocto BSP" table in NeutronSDKUserGuide.md and understand that the compiler and runtime must come from the same SDK. However, the guide does not say which version is recommended. Should we always use the latest Neutron SDK version (with the runtime upgraded) on our current BSP, or should we use the SDK version that is Default for that BSP? Environment - Board: IMX95LPD5EVK-19 - BSP: LF_6.18.20_2.0.0 - Neutron SDK: eiq-neutron-sdk-linux-3.2.3 - NeutronFirmware.elf, libNeutronDriver.so, and libneutron_delegate.so have been updated to the versions from Neutron SDK 3.2.3. Thank you! Re: Recommended BSP / Neutron SDK versioning strategy Hi, Thank you for your interest in NXP Semiconductor products, You can find what Neutron SDK version is included with every BSP at the end of Machine Learning User's Guide, e.g. Neutron SDK v3.2.1 is included in LF6.18.37_2.1.0 However, for development, customers are encouraged to use latest SDK revision, and documentation advises copying the binaries (used for conversion) to target: - Updating the Neutron Runtime - To update the neutron runtime on a target device, upload the files to the ir designated directories, as follows: | File | Target Directory | |------|------------------| | `NeutronFirmware.elf` | `/lib/firmware/` | | `libNeutronDriver.so` | `/lib/` | | `libneutron_delegate.so` | `/lib/` | Regards Re: Recommended BSP / Neutron SDK versioning strategy Hi Joseph, Thank you for your reply. We will use the latest SDK revision as recommended. Regards
View full article
推荐的 电路板支持包。/Neutron SDK 版本控制策略 你好, 我们正在使用 i.MX95 作为平台开发汽车应用的 PoC,并希望澄清推荐的 Neutron SDK 版本策略。 我们已经阅读了 NeutronSDKUserGuide.md 中的“Neutron SDK 版本与 Yocto 电路板支持包的兼容性”表格,并了解到编译器和运行时必须来自同一个 SDK。但是,该指南并未说明推荐哪个版本。 我们应该始终在当前的 电路板支持包。 上使用最新的 Neutron SDK 版本(运行时已升级),还是应该使用该 电路板支持包。 的默认 SDK 版本? 环境 - 板:IMX95LPD5EVK-19 - 电路板支持包:LF_6.18.20_2.0.0 - Neutron SDK:eiq-neutron-sdk-linux-3.2.3 - NeutronFirmware.elf、libNeutronDriver.so 和 libneutron_delegate.so 已更新至 Neutron SDK 3.2.3 的版本。 谢谢! Re: Recommended BSP / Neutron SDK versioning strategy 您好, 感谢您对恩智浦半导体产品的关注, 您可以在《机器学习用户指南》的末尾找到每个电路板支持包所包含的 Neutron SDK 版本,例如:Neutron SDK v3.2.1 包含在 LF6.18.37_2.1.0 中。 但是,对于开发工作,我们鼓励客户使用最新的 SDK 版本,并且文档建议将二进制文件(用于转换)复制到目标位置: - 更新 Neutron 运行时 - 要更新目标设备上的中子运行时间,请将文件上传到 其指定目录如下: 文件 | 目标目录 | |------|------------------| | `NeutronFirmware.elf`| `/lib/firmware/` | | `libNeutronDriver.so`| `/lib/` | | `libneutron_delegate.so` | `/lib/` | 此致 Re: Recommended BSP / Neutron SDK versioning strategy 嗨,约瑟夫, 感谢你的回复。我们将按照建议使用最新的SDK版本。 问候
View full article
Instructions for initial installation of AB_SWAP firmware In HSE_B Firmware Reference Manual (v2.7) installation of firmware is covered in two sections: - 3.2 Installation process in FULL_MEM configuration - 3.3 Installation process in AB_SWAP configuration With an S32K3 device delivered from factory, the device will be in FULL_MEM configuration. This suggests that the correct set of instructions are covered by section 3.2 (FULL_MEM configuration). On the other hand, the firmware to install is of type AB_SWAP. This suggests that the correct set of instruction are coverd by section 3.3 (AB_SWAP configuration). Which section in the manual contains the relevant instructions for installing AB_SWAP firmware on device freshly delivered from factory? Re: Instructions for initial installation of AB_SWAP firmware Hi @FredrikMoller  If you are looking for guidance on installing HSE FW in the AB_SWAP configuration using the IVT method, rather than the MU-based method described in Section 3.3.1 of the HSE_B Firmware Reference Manual, I recommend referring to AN744810: HSE FW Install for S32K3xx. This is available under the device's Secure Files section. Also, Install HSE Firmware on S32K344 demonstrates how to install HSE FW on an S32K344 device using the IVT method for both FULL_MEM and AB_SWAP memory configurations.  BR, VaneB
View full article
How to use the GPU of the NXP Layerscape LS1028A with Yocto How to use the GPU of the NXP Layerscape LS1028A with Yocto  Yocto Project Configuration The most modern and NXP-recommended method for developing with the LS1028A is the Layerscape Linux Distribution POC (LLDP) based on Yocto. Unlike the LSDK (which uses Flexbuild), LLDP uses Yocto/Bitbake and is the long-term supported path. 1 Host Requirements Requirement Details Operating System Ubuntu 20.04 LTS (Focal) — official recommendation RAM Minimum 8 GB (16 GB+ recommended) Disk Space Minimum 100 GB free CPU Minimum 4 cores (more cores = faster builds) Tools git, repo, python3, wget, curl, build-essential Install dependencies on Ubuntu: sudo apt-get update && sudo apt-get install -y  gawk wget git diffstat unzip texinfo gcc-multilib \   build-essential chrpath socat cpio python3 python3-pip  python3-pexpect xz-utils debianutils iputils-ping \   python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev  pylint xterm rsync curl locales zstd liblz4-tool \   repo ca-certificates # Configure git (required by repo) git config --global user.name "Your Name" git config --global user.email "[email protected]" 2 Download the LLDP Repository (Yocto for LS1028A) # Create working directory mkdir ~/lldp-ls1028a && cd ~/lldp-ls1028a # Initialize repo with the LLDP manifest (Kirkstone, kernel 5.15) repo init -u https://github.com/nxp-qoriq/yocto-sdk.git \           -b kirkstone \           -m ls-5.15.71-2.2.0_distro.xml # Sync all repositories (may tak             e 30-60 minutes) repo sync Note: For the latest version (LLDP L6.1.1, kernel 6.1), check the updated manifest at: https://github.com/nxp-qoriq/yocto-sdk 3 Set Up the Build Environment for LS1028A # Initialize Yocto environment for the LS1028A # (run from the lldp-ls1028a/ directory) DISTRO=fsl-qoriq-distro MACHINE=ls1028ardb source distro-setup-env # This automatically creates and enters the build directory # You are now in: ~/lldp-ls1028a/build_ls1028ardb/ 4 local.conf File — GPU Configuration The conf/local.conf file inside the build directory controls compilation options. For the LS1028A with GPU, verify or add: # Edit the configuration file nano conf/local.conf Key parameters for GPU and desktop: # Target machine MACHINE = "ls1028ardb" # Distribution with GPU and Wayland support DISTRO = "fsl-qoriq-distro" # Enable display and GPU features DISTRO_FEATURES:append = " wayland opengl" # GPU driver: use Etnaviv (open-source) for LS1028A # DO NOT use imx-gpu-viv (i.MX only, requires ARCH_MXC) PREFERRED_PROVIDER_virtual/libgl = "mesa" PREFERRED_PROVIDER_virtual/libgles1 = "mesa" PREFERRED_PROVIDER_virtual/libgles2 = "mesa" PREFERRED_PROVIDER_virtual/egl = "mesa" # Enable OpenCL support via Vivante GPU IMAGE_INSTALL:append = " clinfo" # Accept NXP proprietary licenses (required for GPU firmware) LICENSE_FLAGS_ACCEPTED = "nxp-proprietary" # Parallel build threads (adjust to your host PC) BB_NUMBER_THREADS = "8" PARALLEL_MAKE = "-j 8" # (Optional) Use ccache to speed up recompilations INHERIT += "ccache" 5 Required Yocto Layers (bblayers.conf) Verify that conf/bblayers.conf includes these layers: cat conf/bblayers.conf It must contain at least: BBLAYERS ?= " \   ${BSPDIR}/sources/poky/meta \   ${BSPDIR}/sources/poky/meta-poky \   ${BSPDIR}/sources/meta-openembedded/meta-oe \   ${BSPDIR}/sources/meta-openembedded/meta-multimedia \   ${BSPDIR}/sources/meta-openembedded/meta-python \   ${BSPDIR}/sources/meta-openembedded/meta-networking \   ${BSPDIR}/sources/meta-freescale \   ${BSPDIR}/sources/meta-qoriq \   ${BSPDIR}/sources/meta-nxp-desktop \ " The meta-nxp-desktop layer is what provides GPU support for the LS1028A with the ls-image-desktop image. 6 Build the Image with GPU Support # Recommended: Desktop image with full GPU support (LS1028A only) # Includes: GNOME desktop, Weston/Wayland, Vivante GPU drivers, OpenCL bitbake ls-image-desktop # Alternative: download all packages first before building # (useful for catching network errors before the long build) bitbake ls-image-desktop --runall fetch bitbake ls-image-desktop # Minimal: main image without desktop (no GPU by default) bitbake ls-image-main # Lite: minimal image bitbake ls-image-lite Estimated build time: Between 4 and 8 hours on the first build (depending on host hardware). Incremental builds are much faster. 7 Install the Image to the SD Card After compilation, output files are located in: tmp/deploy/images/ls1028ardb/ # Identify the SD card (verify with lsblk) lsblk # Install image using flex-installer (included in the SDK) flex-installer \   -b tmp/deploy/images/ls1028ardb/boot_ls1028ardb.tgz \   -f tmp/deploy/images/ls1028ardb/firmware_ls1028ardb_sdboot.img \   -r tmp/deploy/images/ls1028ardb/ls-image-desktop-ls1028ardb.tar.zst \   -d /dev/sdX    # replace with your SD device Practical Example: OpenCL Application on LS1028A This example shows how to compile and run a program that uses the GC7000UL GPU to add two vectors with OpenCL. 8.1 Source Code: vector_add.cl (OpenCL Kernel) Create the kernel file on the LS1028A board: # On the LS1028A (via serial or SSH) cat > /home/root/vector_add.cl << 'EOF' __kernel void vector_add(     __global const float* a,     __global const float* b,     __global float* c,     const int n) {     int gid = get_global_id(0);     if (gid < n) {         c[gid] = a[gid] + b[gid];     } } 8.2 Source Code: vector_add.c (OpenCL Host) cat > /home/root/vector_add.c << 'EOF' #include #include #include #include #define VECTOR_SIZE 1024 int main() {     cl_platform_id   platform;     cl_device_id     device;     cl_context       context;     cl_command_queue queue;     cl_program       program;     cl_kernel        kernel;     cl_mem           buf_a, buf_b, buf_c;     cl_int           err;     // 1. Get Vivante GPU platform and device     err = clGetPlatformIDs(1, &platform, NULL);     err = clGetDeviceIDs(platform, CL_DEVICE_TYPE_GPU, 1, &device, NULL);     // Print device name     char device_name[128];     clGetDeviceInfo(device, CL_DEVICE_NAME, sizeof(device_name), device_name, NULL);     printf("GPU detected: %s\n", device_name);     // 2. Create context and command queue     context = clCreateContext(NULL, 1, &device, NULL, NULL, &err);     queue   = clCreateCommandQueue(context, device, 0, &err);     // 3. Read kernel source from file     FILE* f = fopen("vector_add.cl", "r");     fseek(f, 0, SEEK_END);     size_t src_size = ftell(f);     rewind(f);     char* src=(char*)malloc(src_size + 1);     fread(src, 1, src_size, f);     src[src_size] = '\0';     fclose(f);     // 4. Compile OpenCL program     program = clCreateProgramWithSource(context, 1, (const char**)&src, &src_size, &err);     err = clBuildProgram(program, 1, &device, NULL, NULL, NULL);     if (err != CL_SUCCESS) {         char log[2048];         clGetProgramBuildInfo(program, device, CL_PROGRAM_BUILD_LOG,                               sizeof(log), log, NULL);         printf("Compilation error:\n%s\n", log);         return 1;     }     kernel = clCreateKernel(program, "vector_add", &err);     // 5. Prepare input data     float* h_a = (float*)malloc(VECTOR_SIZE * sizeof(float));     float* h_b = (float*)malloc(VECTOR_SIZE * sizeof(float));     float* h_c = (float*)malloc(VECTOR_SIZE * sizeof(float));     for (int i = 0; i < VECTOR_SIZE; i++) {         h_a[i] = (float)i;         h_b[i] = (float)(VECTOR_SIZE - i);     }     // 6. Create GPU buffers     buf_a = clCreateBuffer(context, CL_MEM_READ_ONLY | CL_MEM_COPY_HOST_PTR,                            VECTOR_SIZE * sizeof(float), h_a, &err);     buf_b = clCreateBuffer(context, CL_MEM_READ_ONLY | CL_MEM_COPY_HOST_PTR,                            VECTOR_SIZE * sizeof(float), h_b, &err);     buf_c = clCreateBuffer(context, CL_MEM_WRITE_ONLY,                            VECTOR_SIZE * sizeof(float), NULL, &err);     // 7. Set kernel arguments and execute on GPU     int n = VECTOR_SIZE;     clSetKernelArg(kernel, 0, sizeof(cl_mem), &buf_a);     clSetKernelArg(kernel, 1, sizeof(cl_mem), &buf_b);     clSetKernelArg(kernel, 2, sizeof(cl_mem), &buf_c);     clSetKernelArg(kernel, 3, sizeof(int), &n);     size_t global_size = VECTOR_SIZE;     err = clEnqueueNDRangeKernel(queue, kernel, 1, NULL,                                   &global_size, NULL, 0, NULL, NULL);     clFinish(queue);     // 8. Read result     clEnqueueReadBuffer(queue, buf_c, CL_TRUE, 0,                         VECTOR_SIZE * sizeof(float), h_c, 0, NULL, NULL);     // 9. Verify result (each element should equal VECTOR_SIZE = 1024)     int ok = 1;     for (int i = 0; i < VECTOR_SIZE; i++) {         if (h_c[i] != (float)VECTOR_SIZE) { ok = 0; break; }     }     printf("Result: %s\n", ok ? "CORRECT - GPU works!" : "CALCULATION ERROR");     printf("Example: a[0]=%.0f + b[0]=%.0f = c[0]=%.0f\n",            h_a[0], h_b[0], h_c[0]);     // Free resources     clReleaseMemObject(buf_a); clReleaseMemObject(buf_b); clReleaseMemObject(buf_c);     clReleaseKernel(kernel); clReleaseProgram(program);     clReleaseCommandQueue(queue); clReleaseContext(context);     free(h_a); free(h_b); free(h_c); free(src);     return 0; } 8.3 Compile and Run on the LS1028A On the LS1028A board (connected via serial or SSH): # Install build tools and OpenCL headers apt-get install -y gcc clinfo ocl-icd-libopencl1 opencl-headers # Compile gcc -o vector_add vector_add.c -lOpenCL -I/usr/include # Run ./vector_add Expected output: GPU detected: Vivante OpenCL Device GC7000UL.6202.0000 Result: CORRECT - GPU works! Example: a[0]=0 + b[0]=1024 = c[0]=1024 12.4 Yocto Recipe to Include the Example in the Image To include the example directly in the Yocto image, create a recipe in your custom layer: mkdir -p ~/lldp-ls1028a/sources/meta-my-layer/recipes-examples/opencl-vector/files cp vector_add.c vector_add.cl \    ~/lldp-ls1028a/sources/meta-my-layer/recipes-examples/opencl-vector/files/ Recipe file opencl-vector_1.0.bb: SUMMARY = "OpenCL vector addition example for LS1028A GPU" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" SRC_URI = "file://vector_add.c \            file://vector_add.cl" DEPENDS = "virtual/opencl-icd opencl-headers" S = "${WORKDIR}" do_compile() {     ${CC} ${CFLAGS} -o vector_add vector_add.c -lOpenCL ${LDFLAGS} } do_install() {     install -d ${D}${bindir}     install -m 0755 vector_add ${D}${bindir}/     install -d ${D}/home/root     install -m 0644 vector_add.cl ${D}/home/root/ } FILES:${PN} += "/home/root/vector_add.cl" Add to local.conf and rebuild: IMAGE_INSTALL:append = " opencl-vector" bitbake ls-image-desktop Practical Example: OpenGL ES Rendering with Wayland/Weston This example shows how to render an animated triangle using OpenGL ES 2.0 with EGL on the Weston (Wayland) compositor — the standard "Hello World" of embedded graphics on the GC7000UL GPU. 9.1 Graphics Stack Diagram C Application      ↓ OpenGL ES 2.0  (libGLESv2.so — Vivante GC7000UL)      ↓ EGL 1.4        (libEGL.so — interface between GLES and Wayland)      ↓ Wayland Client (libwayland-client, libwayland-egl)      ↓ Weston Compositor (DRM/KMS + Mali-DP500)      ↓ DisplayPort → 4K Monitor 9.2 Install Dependencies On the LS1028A (with ls-image-desktop): apt-get install -y libgles2-mesa-dev libegl1-mesa-dev libwayland-dev libwayland-egl-backend-dev gcc pkg-config 9.3 Source Code: triangle_gles.c cat > /home/root/triangle_gles.c << 'EOF' /**  * OpenGL ES 2.0 + EGL + Wayland example  * Renders a colored spinning triangle on the Vivante GC7000UL GPU of the LS1028A  * Compile: gcc -o triangle_gles triangle_gles.c -lwayland-client -lwayland-egl -lEGL -lGLESv2 -lm  */ #include #include #include #include #include #include #include #include #define WIDTH  800 #define HEIGHT 600 static struct wl_display       *wl_display    = NULL; static struct wl_compositor    *wl_compositor = NULL; static struct wl_shell         *wl_shell      = NULL; static struct wl_surface       *wl_surface    = NULL; static struct wl_shell_surface *shell_surface = NULL; static struct wl_egl_window    *egl_window    = NULL; static EGLDisplay egl_display; static EGLContext egl_context; static EGLSurface egl_surface; static const char *vertex_shader_src=     "attribute vec2 a_position;          \n"     "attribute vec3 a_color;             \n"     "varying vec3 v_color;               \n"     "uniform float u_angle;              \n"     "void main() {                       \n"     "  float c = cos(u_angle);           \n"     "  float s = sin(u_angle);           \n"     "  vec2 rot = vec2(                  \n"     "    a_position.x*c - a_position.y*s,\n"     "    a_position.x*s + a_position.y*c \n"     "  );                                \n"     "  gl_Position = vec4(rot, 0.0, 1.0);\n"     "  v_color = a_color;                \n"     "}                                   \n"; static const char *fragment_shader_src=     "precision mediump float;            \n"     "varying vec3 v_color;               \n"     "void main() {                       \n"     "  gl_FragColor = vec4(v_color, 1.0);\n"     "}                                   \n"; /* Vertices: position (x,y) + color (r,g,b) */ static const float vertices[] = {      0.0f,  0.8f,  1.0f, 0.0f, 0.0f,   /* Top    - Red   */     -0.7f, -0.5f,  0.0f, 1.0f, 0.0f,   /* Left   - Green */      0.7f, -0.5f,  0.0f, 0.0f, 1.0f,   /* Right  - Blue  */ }; static void registry_global(void *data, struct wl_registry *reg,                              uint32_t name, const char *iface, uint32_t ver) {     if (strcmp(iface, "wl_compositor") == 0)         wl_compositor = wl_registry_bind(reg, name, &wl_compositor_interface, 1);     else if (strcmp(iface, "wl_shell") == 0)         wl_shell = wl_registry_bind(reg, name, &wl_shell_interface, 1); } static void registry_global_remove(void *d, struct wl_registry *r, uint32_t n) {} static const struct wl_registry_listener registry_listener = {     registry_global, registry_global_remove }; static GLuint compile_shader(GLenum type, const char *src) {     GLuint shader = glCreateShader(type);     glShaderSource(shader, 1, &src, NULL);     glCompileShader(shader);     GLint ok; glGetShaderiv(shader, GL_COMPILE_STATUS, &ok);     if (!ok) {         char log[512]; glGetShaderInfoLog(shader, 512, NULL, log);         printf("Shader error: %s\n", log); exit(1);     }     return shader; } int main() {     wl_display = wl_display_connect(NULL);     if (!wl_display) { printf("Error: could not connect to Wayland\n"); return 1; }     struct wl_registry *registry = wl_display_get_registry(wl_display);     wl_registry_add_listener(registry, &registry_listener, NULL);     wl_display_dispatch(wl_display);     wl_display_roundtrip(wl_display);     wl_surface = wl_compositor_create_surface(wl_compositor);     shell_surface = wl_shell_get_shell_surface(wl_shell, wl_surface);     wl_shell_surface_set_toplevel(shell_surface);     egl_display = eglGetDisplay((EGLNativeDisplayType)wl_display);     eglInitialize(egl_display, NULL, NULL);     eglBindAPI(EGL_OPENGL_ES_API);     EGLint config_attribs[] = {         EGL_SURFACE_TYPE,    EGL_WINDOW_BIT,         EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,         EGL_RED_SIZE,   8, EGL_GREEN_SIZE, 8,         EGL_BLUE_SIZE,  8, EGL_ALPHA_SIZE, 0,         EGL_DEPTH_SIZE, 16, EGL_NONE     };     EGLConfig egl_config; EGLint num_configs;     eglChooseConfig(egl_display, config_attribs, &egl_config, 1, &num_configs);     EGLint ctx_attribs[] = { EGL_CONTEXT_CLIENT_VERSION, 2, EGL_NONE };     egl_context = eglCreateContext(egl_display, egl_config, EGL_NO_CONTEXT, ctx_attribs);     egl_window  = wl_egl_window_create(wl_surface, WIDTH, HEIGHT);     egl_surface = eglCreateWindowSurface(egl_display, egl_config,                                           (EGLNativeWindowType)egl_window, NULL);     eglMakeCurrent(egl_display, egl_surface, egl_surface, egl_context);     printf("GPU: %s\n", glGetString(GL_RENDERER));     printf("OpenGL ES Version: %s\n", glGetString(GL_VERSION));     GLuint vs = compile_shader(GL_VERTEX_SHADER,   vertex_shader_src);     GLuint fs = compile_shader(GL_FRAGMENT_SHADER, fragment_shader_src);     GLuint program = glCreateProgram();     glAttachShader(program, vs); glAttachShader(program, fs);     glLinkProgram(program); glUseProgram(program);     GLint pos_loc   = glGetAttribLocation(program,  "a_position");     GLint color_loc = glGetAttribLocation(program,  "a_color");     GLint angle_loc = glGetUniformLocation(program, "u_angle");     glViewport(0, 0, WIDTH, HEIGHT);     float angle = 0.0f;     int frames = 0;     printf("Rendering spinning triangle (Ctrl+C to exit)...\n");     while (1) {         wl_display_dispatch_pending(wl_display);         glClearColor(0.1f, 0.1f, 0.15f, 1.0f);         glClear(GL_COLOR_BUFFER_BIT);         glUniform1f(angle_loc, angle);         glEnableVertexAttribArray(pos_loc);         glVertexAttribPointer(pos_loc,   2, GL_FLOAT, GL_FALSE, 5*sizeof(float), vertices);         glEnableVertexAttribArray(color_loc);         glVertexAttribPointer(color_loc, 3, GL_FLOAT, GL_FALSE, 5*sizeof(float), vertices + 2);         glDrawArrays(GL_TRIANGLES, 0, 3);         eglSwapBuffers(egl_display, egl_surface);         angle += 0.02f;         if (angle > 6.2832f) angle -= 6.2832f;         frames++;         if (frames % 300 == 0)             printf("Frame %d — angle: %.2f rad\n", frames, angle);     }     eglDestroyContext(egl_display, egl_context);     eglDestroySurface(egl_display, egl_surface);     eglTerminate(egl_display);     wl_display_disconnect(wl_display);     return 0; } 9.4 Compile and Run # Compile gcc -o triangle_gles triangle_gles.c \     -lwayland-client -lwayland-egl \     -lEGL -lGLESv2 -lm # Make sure Weston is running and set Wayland environment export XDG_RUNTIME_DIR=/run/user/0 export WAYLAND_DISPLAY=wayland-0 # Run ./triangle_gles Expected terminal output: GPU: Vivante GC7000UL OpenGL ES Version: OpenGL ES 3.1 V6.4.3.p4.398061 Rendering spinning triangle (Ctrl+C to exit)... Frame 300 — angle: 6.00 rad Frame 600 — angle: 5.68 rad A RGB triangle spinning on a dark background will appear on screen, rendered by the GC7000UL GPU. 9.5 Yocto Recipe SUMMARY = "OpenGL ES 2.0 spinning triangle example — LS1028A" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" SRC_URI = "file://triangle_gles.c" DEPENDS = "virtual/libgles2 virtual/egl wayland" S = "${WORKDIR}" do_compile() {     ${CC} ${CFLAGS} -o triangle_gles triangle_gles.c \         -lwayland-client -lwayland-egl -lEGL -lGLESv2 -lm ${LDFLAGS} } do_install() {     install -d ${D}${bindir}     install -m 0755 triangle_gles ${D}${bindir}/ } 9.6 Yocto Recipe for OpenCV with GPU Add to local.conf: IMAGE_INSTALL:append = " opencv python3-opencv" PACKAGECONFIG:append:pn-opencv = " opencl" bitbake ls-image-desktop References: 1) https://www.nxp.com/products/processors-and-microcontrollers/arm-processors/layerscape-processors:QORIQ-ARM 2) https://www.khronos.org/news/permalink/vivante-gc7000-gpus 3) Layerscape Software Development Kit User Guide for Yocto : https://docs.nxp.com/bundle/GUID-E5527A77-2F97-4244-BF9C-D08F068EFD16/page/GUID-B386D634-B9B1-4980-AA56-9C705D7FBC52.html?gad_source=1&gad_campaignid=24106955438&gclid=EAIaIQobChMI3cKf4KqZlwMVbnJ_AB17dwoGEAAYASAAEgJURPD_BwE Regards  
View full article
Transformed and Quantized your model with NPU of the MX8Mplus  Introduction In this article, we will explain in this article which steps you have to take to transform and quantize your model with different TensorFlow versions. We are only looking into post training quantization. We are using the MX8MPlus EVK run our model that have a dedicated neural network accelerator IP from VeriSilicon (Vivante VIP8000). Press enter or click to view image in full size i.mx8MPlus block diagram from NXP Is the neural processing unit (NPU) from NXP need a fully int8 quantized model we have to look into full int8 quantization of a TensorFlow lite or PyTorch model. Both libraries are supported with the eIQ library from NXP. Here we will only look into the TensorFlow variant. The general overview on how to do post training quantization can be found on the TensorFlow website.  The operations for floating point are more complex than for integer (arithmetic’s, avoiding overflow). This results in the ability to use only the much simpler and smaller arithmetic units instead of the larger floating-point units. ​ ​The physical space needed for float32 operation much larger than for int8. This results in:​ Lower power consumption, ​ Less heat development, ​ The ability to join more calculation units decreasing inference time. Prerequisite To create the code on your PC first, we recommend using Anaconda with a virtual environment running Python 3.6, TensorFlow 2.x, numpy, opencv-python and pandas. Post training quantization with TensorFlow Version 2.x If you created and trained a model via tf.keras there are three similar ways of quantizing the model. First Method — Quantizing a Trained Model Directly The trained TensorFlow model has to be converted into a TFlite model and can be directly quantize as described in the following code block. For the trained model we exemplary use the updated tf,keras_vggface model based on the work of rcmalli . The transformation starts at line 28. from keras_vggface_TF.utils import preprocess_input from keras_vggface_TF.vggfaceTF import VGGFace converter.inference_output_type = tf.int8   import tensorflow as tf import numpy as np tfVersion=tf.version.VERSION.replace(".", "") # can be used as savename print(tf.version.VERSION) # TRAIN A MODEL pretrained_model = VGGFace(model='resnet50', include_top=False, input_shape=(224, 224, 3), pooling='avg') # pooling: None, avg or max #Create a generator for representative Dataset folderpath='./All_croped_images/' def prepare(img):          img = np.expand_dims(img,0).astype(np.float32)          img = preprocess_input(img, version=2) return img repDatagen=tf.keras.preprocessing.image.ImageDataGenerator(preprocessing_function=prepare) datagen=repDatagen.flow_from_directory(folderpath,target_size=(224,224),batch_size=1) def representative_dataset_gen():       for _ in range(10):       Img = datagen.next()       yield [img[0]] #CONVERT YOUR MODEL TO TFLITE AND QUANTIZE TO INT8 converter = tf.lite.TFLiteConverter.from_keras_model(pretrained_model) converter.optimizations = [tf.lite.Optimize.DEFAULT] converter.representative_dataset = representative_dataset_gen converter.target_spec.supported_ops = [tf.lite.OpsSet.TFLITE_BUILTINS_INT8] converter.experimental_new_converter = True converter.target_spec.supported_types = [tf.int8] converter.inference_input_type = tf.int8 quantized_tflite_model = converter.convert() #SAVE THE QUANTIZED MODEL AS TFLITE FILE open('quant_model.tflite' , "wb").write(quantized_tflite_model) After loading/training your model you first have to create a representative data set. The representative data set is used by the converter to get the max and min values to be able to estimate the scaling factor. This limits the error introduced by the quantization from float32 to intX. The error comes from the different number-space of float and int. Converting from float to int8 limits the number-space to integer values between -128 to 127. Calibrating the model on the dynamic range of the input limits this error. Here you can just loop through your images or create a generator as in our example. We used the tf.keras.preprocessing.image.ImageDataGenerator() to yield images and do the necessary prepossessing on the images. As a generator you can of course also use the tf.data.Dataset.from_tensors() or … from.tensor_slices(). Just keep in mind to do the same pre-processing on your data here as you did on the data you trained your network with (normalization, resizing, de-noising, …). This can all be packed into the preprocessing_function call of the generator (line 19). The conversion starts at line 28. A simple TensorFlow lite conversion would look like this: converter = tf.lite.TFLiteConverter.from_keras_model(pretrained_model) tflite_model = converter.convert() open('model.tflite' , "wb").write(tflite_model) The quantization part is in-between: converter = tf.lite.TFLiteConverter.from_keras_model(pretrained_model) converter.optimizations = [tf.lite.Optimize.DEFAULT] converter.representative_dataset = representative_dataset_gen converter.target_spec.supported_ops = [tf.lite.OpsSet.TFLITE_BUILTINS_INT8] converter.experimental_new_converter = True converter.target_spec.supported_types = [tf.int8] converter.inference_input_type = tf.int8 converter.inteference_output_type=tf.int8 quantized_tflite_model = converter.convert() open('quant_model.tflite' , "wb").write(quantized_tflite_model) Line 3 : optimizations other than default are deprecated. No other options are available at the moment (Year 2020). Line 4 : Here we set the representative data set. Line 5 : Here we make sure that we have a full conversion to int8. Without this option, only the weights and biases would be converted but not the activations. This is used when we only want to reduce the model size. However, our NPU needs full int8 quantization. Having the activations still in floating point would result in overall floating-point and could not run on the NPU. Line 6: Enables MLIR-based conversion instead of TOCO conversion, which enables RNN support, easier error tracking. Line 7: Sets the internal constant value to int8. The target_spec corresponds with the TFLITE_BUILTINS from line 5. Line 9 and 10: Set also the input to int8. This is fully available from TF 2.3 Now if we convert the model using TF2.3 with experimental_new_converter=True inference_input_type=tf.int8 inference_output_type=tf.int8 we receive the following model: However if we do not set the inference_input_type and inference_output_type we receive following model: So the effect is that you can determine which input data type the model accepts and returns. This can be important if you work with an embedded camera, as included with the MX8MPEVK. The mipi camera returns 8bit values, so if you want to spare a conversion to float32 int8 input can be handy. But be aware, if you use a model without prediction layers to gain e.g., embeddings, an int8 output will result in very poor performance. Here an output of float32 is recommended. This shows that each problem needs a specific solution. Second and Third Method — Quantize a Saved Model from *.h5 or *.pb Files If you already have your model, you most likely have it saved somewhere either as an Keras h5 file or a TensorFlow protocol buffer pb. We will quickly save our model using TF2.3: import tensorflow as tf f rom keras_vggface_TF.vggfaceTF import VGGFace pretrained_model = VGGFace(model='resnet50', include_top=False, input_shape=(224, 224, 3), pooling='avg') # pooling: None, avg or max # Saving as a protocol buffer !mkdir -p saved_model pretrained_model.save('saved_model/my_model') #saving as a h5 file (if your Tensorflow Version is < 2.0 use this) !mkdir -p keras_model pretrained_model.save('keras_model/my_model.h5') Following the conversion and quantization is very similar as in Method One. The only difference is how we load the model in with the converter. Either load the model and continue as in Method One. #Load the h5 model pretrained_model = tf.keras.models.load_model('my_model.h5') #Then use the converter as before converter = tf.lite.TFLiteConverter.from_keras_model(pretrained_model) Or load the h5 model directly. When using TensorFlow version 2 and above you have to use a compatible converter: # Or load the h5 model from file # TensorFlow version >2.x converter = tf.compat.v1.lite.TFLiteConverter.from_keras_model_file(saved_model_dir + h5_modelname) #works now also with TF2.x # TensorFlowversion < 2.0 converter = tf.lite.TFLiteConverter.from_keras_model_file(saved_model_dir + h5_modelname) If you load from a TensorFlow pb file use: # Or load the pb file from the modelfolder # TensorFlow version >2.x converter = tf.lite.TFLiteConverter.from_saved_model(saved_model_dir) # the folder contains the pb file and a assets and variables folder Converting with TensorFlow Versions below 2.0 If you want to convert a model written in TensorFlow version < 1.15.3 using Keras, not all options are available for TFlite conversion and quantization. The best way is to save the model with the TensorFlow version it was created in (e.g., rcmalli keras-vggface was trained in TF 1.13.2). I would suggest not using the “saving and freeze graph” method to create a pb file as the pb files differ between TF1 and TF2. The TFLiteConverter.from_saved_model does not work, creating quite a hassle to achieve quantization. I would suggest using the above mentioned method using Keras: import keras …. pretrained_model.save('my_model.h5') Then convert and quantize your model with a TensorFlow version from 1.15.3 onward. From this version on a lot of functions where added in preparation for TF2. I suggest using the latest version.  Regards
View full article
S32 Design Studio for Power Architecture 2017.R1 在许可证过期后显示“缺少许可证” 您好,NXP支持团队, 我正在 Windows 系统上使用S32 Design Studio for Power Architecture 2017.R1 版本。现在 IDE 显示“缺少许可证” ,而且许可证似乎已经过期。 Re: S32 Design Studio for Power Architecture 2017.R1 shows “License missing” after license expired 你好, 您的S32DS许可证已延期。请使用您之前的激活码重新激活S32DS。
View full article
MCU (S32k312) to MC33664 (Network Isolator) to MC33771C(AFE) Comms No Response Diagnostics: Hello Everyone, Currently I am working on a BMS design.  The Main components/design highlights are: 1. MCU: S32k312 2. Network Isolator: MC33664 3. AFE: MC33771 4. Communication mode: TPL Isolation is as shown below: Also,  MCU to MC33664 Comms from Dual SPI.  MC33664 to MC33771C is TPL.  SPI Configuration is set as follows:     1. Wakeup Sequence:    Wake up sequence is pulling the VCOM high keeping it stable at 5V.  2. First Command  First command is a Software Reset command through Global Write with CID set to 0x00.    This is followed by Second Command after a 500 mS delay.  3. Second Command  Second command is a read command to read the Init (0x01) Register to verify the comms.    Second command is failing because it is expected to read 2 frames of 6 Bytes i.e. the echo and the read response but only echo is generated but not the read response.  4. Read Command and Read Response on the TPL Line:    The first pulse train shown in this image is the echo of the read command sent which is properly translated to SPI by MC33664. The second pulse train the actual response from the AFE on the TPL which the MC33664 is failing to translate to the SPI. The visual difference here is that the voltage levels of the echo and read response are different on the TPL which is a suspect to investigate.  Additional Diagnostic Signal Captures:  RDTX+ and RDTX- before the isolator.    2. RDTX+ and RDTX- after the isolator.      Conclusion:  The TPL comms are accepted by the AFE and is producing the responses but the MC33664 is not translating the responses back to SPI RX line which is causing communication timeout failure.  Please help !! Thank you in advance. Re: MCU (S32k312) to MC33664 (Network Isolator) to MC33771C(AFE) Comms No Response Diagnostics: Hello, Please verify that the wake-up is generated through the MC33664 CSB_TX timing after enabling the MC33664, rather than by forcing VCOM high. Since the AFE response appears on the TPL line, please focus next on the MC33664 receive path and check CSB_RX, SCLK_RX, DATA_RX, SPI mode, 48-bit frame timing, and the signal at both the MC33664 SPI RX pins and the S32K312 pins.  Please note that we do not have a ready made, tested software and evaluation-board combination for the exact S32K312 + MC33664 + MC33771C configuration, so the SPI driver and dual-SPI receive implementation require application specific validation.
View full article
S32 Design Studio for Power Architecture 2017.R1 はライセンス満了後に「ライセンス不足」と表示します こんにちは、NXPサポートチームの皆さん、 私はWindowsの S32 Design Studio for Power Architecture 2017.R1 を使っています 。IDEでは「 ライセンス不足」 と表示 され、ライセンスは期限切れのようです。 Re: S32 Design Studio for Power Architecture 2017.R1 shows “License missing” after license expired こんにちは、 お客様のS32DSライセンスが延長されました。以前のコードを使用して、S32DSを再度有効化してください。
View full article
MCU(S32k312)からMC33664(ネットワークアイソレータ)からMC33771C(AFE)通信無応答診断: 皆さん、こんにちは。 現在、BMSの設計に取り組んでいます。 主な構成要素/デザインのハイライトは以下の通りです: 1. MCU:S32k312 2. ネットワークアイソレータ:MC33664 3. AFE:MC33771 4. 通信モード:TPL アイソレータは以下の通りです: それから、 MCUからデュアルスパイからのMC33664通信へ。 MC33771C MC33664はTPLです。  SPI構成は以下の通りに設定されます:    1.起動シーケンス:    ウェイクアップシーケンスはVCOMをハイレベルに引き上げ、5Vで安定させます。  2. 最初の命令  最初のコマンドは、CIDを0x00に設定したグローバル書き込みによるソフトウェアリセットコマンドです。    これに続いて、500ミリ秒の遅延の後、第2コマンドが送信されます。  3. 第二の命令  2 番目のコマンドは、通信を確認するために Init (0x01) レジスタを読み取る読み取りコマンドです。    2番目のコマンドが失敗するのは、6バイトのフレームを2つ(つまり、エコーと読み取り応答)読み込むことが期待されているにもかかわらず、エコーのみが生成され、読み取り応答が生成されないためです。  4. TPL回線での読み取りコマンドと読み取り応答:    この画像に示されている最初のパルス列は、MC33664によってSPIに正しく変換された読み出しコマンドのエコーです。2番目のパルス列は、TPL上のAFEからの実際の応答ですが、MC33664はこれをSPIに変換できていません。ここで視覚的にわかる違いは、エコーと読み出し応答の電圧レベルがTPL上で異なっていることであり、これが調査すべき原因と考えられます。  追加の診断信号キャプチャ:  アイソレータの前にRDTX+とRDTX-を配置します。    2. アイソレータ後のRDTX+とRDTX-。      結論:  TPL通信はAFEによって受け入れられ、応答が生成されますが、MC33664が応答をSPI RXラインに変換しないため、通信タイムアウトエラーが発生します。 助けてください!! よろしくお願いします。 Re: MCU (S32k312) to MC33664 (Network Isolator) to MC33771C(AFE) Comms No Response Diagnostics: こんにちは、 MC33664を有効にした後、ウェイクアップがVCOMを強制的にハイにするのではなく、MC33664のCSB_TXタイミングによって生成されることを確認してください。 AFE応答がTPLラインに現れるため、次にMC33664の受信経路に注目し、CSB_RX、SCLK_RX、DATA_RX、SPIモード、48ビットフレームタイミング、およびMC33664のSPI RXピンとS32K312ピンの両方の信号を確認してください。 なお、S32K312 + MC33664 + MC33771C構成のための既成のテスト済みソフトウェアと評価ボードの組み合わせは存在しないため、SPIドライバおよびデュアルSPI受信実装はアプリケーション固有の検証が必要です。
View full article
PT2001 Demo Request: Dual Cores Sharing the Same Microcode on a Single Channel Hi NXP team and community, According to the PT2001, the shared RAM architecture enables efficient RAM usage when multiple actuators must be controlled in parallel with identical microcode: "This architecture of shared RAM allows efficient use of the RAM when multiple actuators need to be controlled in parallel with identical microcode." I am currently working on a design where two actuators need to be driven simultaneously using identical drive profiles. To understand how to implement this properly, I am looking for: A simple example/demo project demonstrating how both cores in a single channel share and execute the same microcode from the shared RAM A brief explanation of the key configurations involved (e.g., core startup, any special register settings required to avoid conflicts) Does NXP provide such an example application or code sample? Any pointers to application notes, documentation, or example projects would be greatly appreciated. Thanks in advance for your support! PT2001 PT2000    Best regards, zaoluo Re: PT2001 Demo Request: Dual Cores Sharing the Same Microcode on a Single Channel HI Tom (@TomasVaverka ),  Thank you very much for your interest in the questions I raised! Thanks & BRs, zaoluo Re: PT2001 Demo Request: Dual Cores Sharing the Same Microcode on a Single Channel Hi Lex (@LexLiu), Could you please help with this another question from Mr. Zao Luo? Thanks & BRs, Tomas
View full article
S32 Design Studio for Power Architecture 2017.R1 shows “License missing” after license expired Hi NXP Support team, I am using S32 Design Studio for Power Architecture 2017.R1 on Windows. The IDE now shows “License missing”, and it seems the license has expired. Re: S32 Design Studio for Power Architecture 2017.R1 shows “License missing” after license expired Hi,  your S32DS license has been extended. Please activate S32DS again with your old code. 
View full article
MCU (S32k312) 至 MC33664 (网络隔离器) 至 MC33771C (AFE) 通信无响应诊断: 大家好, 目前我正在进行电池管理系统(BMS)的设计工作。 主要元器件/设计亮点如下: 1. MCU:S32k312 2. 网络隔离器:MC33664 3. AFE:MC33771 4. 通信方式:TPL 隔离情况如下所示: 还, MCU 与 MC33664 通过双 SPI 进行通信。 MC33664 至 MC33771C 是 TPL。 SPI配置设置如下:    1.唤醒序列:    唤醒序列将 VCOM 拉高,使其稳定在 5V。  2. 第一条命令  第一个命令是通过全局写入执行的软件 RESET 命令,CID 设置为 0x00。    随后,在延迟 500 毫秒后发出第二个命令。  3. 第二条命令  第二条命令是读取 Init (0x01) 寄存器的READ命令,用于验证通信。    第二个命令失败,因为它应该读取 2 个 6 字节的帧,即回显和读取响应,但只生成了回显,没有生成读取响应。  4. 在 TPL 线上READ命令和读取响应:    图中显示的第一组脉冲是发送的READ命令的回波,MC33664 已将其正确翻译为 SPI 信号。第二组脉冲是 TPL 上 AFE 的实际响应,MC33664 未能将其翻译为 SPI 信号。此处的视觉差异在于 TPL 上回波和读取响应的电压等级不同,这可能是需要调查的原因。  其他诊断信号捕获:  隔离器之前的 RDTX+ 和 RDTX-。    2. 隔离器后的 RDTX+ 和 RDTX-。      结论:  AFE 接受 TPL 通信并产生响应,但 MC33664 没有将响应已翻译回 SPI RX 线,导致通信超时失败。  请帮帮我!! 先感谢您。 Re: MCU (S32k312) to MC33664 (Network Isolator) to MC33771C(AFE) Comms No Response Diagnostics: 你好, 请验证在启用 MC33664 后,是否通过 MC33664 CSB_TX 时序产生唤醒,而不是通过强制 VCOM 为高电平产生唤醒。 由于AFE响应出现在TPL线上,接下来请重点检查MC33664接收路径,并检查CSB_RX、SCLK_RX、DATA_RX、SPI模式、48位帧时序,以及MC33664 SPI RX引脚和S32K312引脚上的信号。 请注意,我们没有针对 S32K312 + MC33664 + MC33771C 配置的现成、经过测试的软件和评估板组合,因此 SPI 驱动程序和双 SPI 接收实现需要针对特定应用进行验证。
View full article
JN5189が現場で突然動作しなくなり、フラッシュメモリの完全消去と再プログラミング後に復旧した。 こんにちは、 私はJN5189をカスタム照明制御モジュールで使用しており、SDKバージョン2.6.16を使用しています。現場で突然1台のユニットが動作しなくなり、根本原因や診断方法、予防策について理解したいと思っています。 どうしたの 1.故障したモジュールを取り外し、DK6 Programmerを使用してフラッシュメモリの内容全体を読み取りました。 2. ダンプファイルを別の新しいJN5189モジュールにプログラムしたところ、正常に動作しました。これは、ダンプに含まれるファームウェアとデータが有効であることを示唆している。 3. 同じダンプを元の故障したチップに書き戻しましたが、問題は解決しませんでした。 4. 元のチップに対して「フルフラッシュ消去」を実行し、その後同じダンプを再度プログラムしました。モジュールは正常に動作し始めた。 質問 1. 考えられる根本原因 この行動の原因は何でしょうか?なぜ同じフラッシュダンプをプログラムしても元のチップを復元できないのに、プログラム前に完全消去を実行すると正常に動作が回復するのでしょうか? 2. 診断方法 この問題が再び発生した場合、根本原因を特定するために、完全消去を実行する前に何をチェックすべきでしょうか?この種の障害を調査するための推奨デバッグ手順やツールはありますか? 3. ファームウェアにおける予防措置 この問題を再発防止するためのファームウェアレベルの対策はありますか? アドバイスや似たような経験、関連する技術ドキュメントの参考文献があれば教えていただけるとありがたいです。 ご協力ありがとうございます。 ジョニー9 Re: JN5189 Suddenly Stops Working in the Field and Recovers After Full Flash Erase and Reprogramming こんにちは、 あなたの調子が良いといいのですが。詳細な説明をありがとうございました。 1. 考えられる根本原因 フラッシュダンプが別のJN5189にプログラムされても動作するという事実は、抽出された画像自体が機能するデバイスに繋がることを示しています。また、元のデバイスはフラッシュメモリを完全に消去した後、同じダンプをプログラムすることで復旧したことから、デバイスに恒久的な故障は発生していないと考えられる。 重要な点は、フラッシュメモリへの書き込みとフラッシュメモリの消去は異なる操作であるということです。JN5189の場合、フラッシュメモリのページはプログラムする前に消去する必要があります。ページが以前に消去されている場合、異なるアドレスで連続FLASH_Program()操作を行うことができます。 したがって、フラッシュメモリを消去せずにダンプデータを影響を受けたデバイスに書き戻しても、必ずしもフラッシュメモリが本来の状態に復元されるとは限りません。まず完全消去を実行することで、イメージを再度プログラムする前に、フラッシュメモリのページが適切な状態になっていることが保証されます。 これが、消去+プログラムのシーケンスでデバイスを回復した理由を説明できます。 しかし、上記の観察だけでは、ユニットが最初に故障した原因を特定することはできません。アプリケーションがフラッシュを修正している間に電源中断、リセット、その他のイベント情報が起きた場合、通常の動作中にフラッシュ消去やプログラム操作を行う場合は調査する価値がありますが、現時点ではこれらのいずれかが根本原因であるとは確認できません。 2. 診断手順 問題が再発した場合は、消去やプログラミング操作を行う前に、デバイスの状態を保存しておくことをお勧めします。 特に: 今回のように、Flashの全コンテンツを読んで保存してください。 ダンプファイルと、プログラムされた想定イメージを比較してください。 どのフラッシュメモリ領域に差異があるかを特定し、それらの領域が通常動作中に変更される可能性があるかどうかを判断する。 アプリケーションが実行時にフラッシュ消去やプログラム操作を行っているか確認してください。 ランタイムフラッシュ操作を使用する場合は、それらの操作中にリセットや電源中断が発生する可能性があるかどうかを調べてください。 可能であれば、故障したユニットを再プログラムする前に、リセット原因情報やその他の診断情報を保存してください。 最も価値のある証拠は、復旧操作前に取得された別の故障デバイスからのフラッシュダンプと、アプリケーションによってどのフラッシュ領域が修正されているかに関する情報です。 3.ファームウェアに関する考慮事項 アプリケーション管理型フラッシュストレージでは、プログラム前にページを消去することを必ずしてください。FLASH_ErasePages()はページ消去操作に使用でき、対応するページが消去された後は異なる場所への連続プログラミング操作が可能です。 アプリケーションが通常動作中に不揮発性データを修正した場合、その操作中に発生する中断やリセットの処理方法を確認することも有用です。 この時点で、消去+再プログラムによる復旧は、以前のフラッシュメモリの状態が観測された動作に関連していたことを示していますが、その状態がどのようにして最初に達成されたかを特定するには十分ではありません。 よろしくお願いいたします。 リカルド
View full article
Tedの木工パッケージは価値がありますか?詳細かつ正直なレビュー もし木工に興味がある方や、DIYプロジェクトが好きな方、あるいは自宅でのワークショップを始めたばかりなら、おそらくテッドズ・ウッドワーキングのことを聞いたことがあるでしょう。16,000以上のプランを提供するという謳い文句で、オンライン上の至る所に登場し、大きな注目を集めている。 では、本当の中身は何なのでしょうか?全体を掘り下げて、レイアウトを見直し、実際に手に入るものを確認し、良いものとあまり良くないものを選別しました。ここでは、テッドズ・ウッドワーキングが提供するサービスと、その欠点を率直に検証し、あなたにとって最適な選択肢かどうかを判断するのに役立てていただきたいと思います。 まず最初に、テッドの木工所とは何でしょうか?要するに、テッド・マクグラスは、ほぼあらゆるスキルレベルに対応した、膨大な数の木工設計図をデジタルデータとしてまとめ上げたのだ。新しいプロジェクトのためにウェブ上をくまなく探したり、大量の本を購入したりするのにうんざりしているなら、ここは必要なものがすべて揃う場所です。中には、シンプルな家具、物置小屋、鳥小屋、作業台など、さまざまな設計図が掲載されています。 ここに 何 あなた 得る: 段階的な設計図:すべてのプロジェクトには、詳細な図面、複数の角度からの図、および組み立ての各部分を具体的に説明した手順書が記載されています。 カットリストと素材リスト:各プロジェクトごとにわかりやすいショッピングリストが用意されているので、何を買うべきかが正確にわかります。推測する必要がなく、木材の無駄も少なくなる。 スキルの多様性:初めてのプロジェクトで基本的な手工具を使う方から、プロとしてより難易度の高い高度なプランに挑戦したい方まで、誰もが楽しめる内容になっています。 特典:このバンドルには、木工ビジネスのヒント、CADプランビューア、作業を進める上で役立つ解説ビデオなど、ボーナスガイドが付属しています。 全体として、Ted's Woodworkingは本当に多様性に富んだ膨大なコレクションですが、最も重要なのは中身を実際に使うかどうかです。 メリット 豊富な選択肢:多くのプランが用意されているので、常に新しい試しができます。インスピレーションが枯渇したり、好きなスタイルが見つからなかったりすることは、かなり難しいことだ。 初心者に最適です:寸法から視覚的なガイドまですべてが明確に並べられているので、初めて作ったものでも各パーツの組み立て方が簡単にわかります。 材料費を節約:詳細なカットリストがあれば、何を購入すればよいかが正確にわかります。もう材木店で高額なミスはしない。リスクフリー購入:ClickBankでは60日間の返金保証があるSO、期待通りにならなくても返金がCANです。 デメリット 最初は少し圧倒される:何千ものファイルを見て回るため、メンバーエリアは混沌として感じられるかもしれませんが、すべての場所が把握できるまでは。大容量ダウンロード:ファイルサイズが非常に大きいです。インターネットが遅いと、すべてのダウンロードに時間がかかり、ブラウジングも遅延することもあります。 最終評決 インターネットで散在する寸法や意味不明な設計図を探し回るのにうんざりしているなら、Ted’s Woodworking がその手間をすべて省いてくれます。DIY愛好家が、整理された膨大なデザインライブラリに簡単かつ瞬時にアクセスしたいなら、定番のスポットです。 実際に何が手に入るのか気になりますか?下記の概要図には、公式の解説、ビデオガイド、最新情報が掲載されています。 下記のQRコードをスキャンして、公式プレゼンテーションをご覧ください。 スマートフォンのカメラでスキャンすると、公式ページに直接アクセスできます
View full article
PT2001演示请求:双核处理器在单通道上共享同一微代码 NXP团队和社区的各位好, 根据 PT2001,共享 RAM 架构能够在多个致动器必须使用相同的微代码并行控制时实现高效的 RAM 使用: “当需要多个致动器需要使用相同的微代码并行控制时,这种共享 RAM 架构能够高效地使用 RAM。” 我目前正在研究一个设计,其中需要使用相同的驱动曲线同时驱动两个致动器。为了了解如何正确实施,我正在寻找: 这是一个简单的示例/演示项目,展示了单个通道中的两个核心如何共享并从共享 RAM 中执行相同的微代码。 对所涉及的关键配置进行简要说明(例如,核心启动、避免冲突所需的任何特殊寄存器设置) NXP是否提供此类示例应用程序或代码示例?非常感谢您能提供任何应用笔记、文档或示例项目的线索。 感谢您的支持! PT2001 PT2000   此致敬礼,zaoluo Re: PT2001 Demo Request: Dual Cores Sharing the Same Microcode on a Single Channel 嗨,汤姆( @TomasVaverka ), 非常感谢您对我提出的问题感兴趣! 谢谢 & BRs,zaoluo Re: PT2001 Demo Request: Dual Cores Sharing the Same Microcode on a Single Channel 嗨 Lex( @LexLiu ), 您能否帮忙解答一下赵罗先生的另一个问题? 谢谢 & BR,托马斯
View full article
​Is Ted’s Woodworking Package Worth It? A Detailed Honest Review If you’re into woodworking, love DIY projects, or just getting started in your own home workshop, you’ve probably heard about Ted’s Woodworking. With promises of 16,000+ plans, it pops up everywhere online and gets a lot of attention. So, what’s really inside? I dug into the whole thing—looked over the layout, checked what you actually get, and sorted the good stuff from the not-so-great. Here’s a straight-up look at what Ted’s Woodworking offers and where it falls short, to help you figure out if it’s right for you. First off, what is Ted’s Woodworking? In short, Ted McGrath put together a giant digital stash of woodworking plans for just about every skill level. If you’re tired of searching all over the web or buying a ton of books for new projects, this is meant to be everything in one place. Inside, you’ll find plans for simple furniture, garden sheds, birdhouses, workbenches, and a lot more.  Here’s what you get: Step-by-Step Blueprints: Every project lists out detailed diagrams, multiple angle views, and instructions that spell out each part of the build. Cut and Material Lists: You get straightforward shopping lists for each project, so you know exactly what to buy. No guessing, and less wasted wood. Skill Variety: There’s something for everyone, whether you’re working with basic hand tools for your first project or you want tougher, more advanced plans to tackle as a pro. Extras: The bundle throws in bonus guides—things like woodworking business tips, a CAD plan viewer, and some instructional videos to help you along the way. Overall, Ted’s Woodworking is a huge collection with real variety, but what matters most is whether you’ll actually use what’s inside. The Pros Tons of Choices: With so many plans available, you’ll always have something new to try. It’s pretty hard to run out of inspiration or not find a style you like. Great for Beginners: Everything’s laid out clearly, from the measurements down to visual guides, so even if you’ve never built anything before, it’s easy to figure out how each piece comes together. Save on Materials: Detailed cut lists mean you know exactly what to buy. No more expensive mistakes at the lumberyard. Risk-Free Purchase: There’s a 60-day money-back guarantee through ClickBank, so if it doesn’t live up to your expectations, you can get a refund. The Cons Kind of Overwhelming at First: With thousands of files to look through, the member’s area can feel chaotic until you get the hang of where everything is. Big Downloads: The files are huge. If your internet is slow, downloading everything takes a while and browsing can lag. Final Verdict If you’re tired of digging through the internet for scattered measurements and plans that barely make sense, Ted’s Woodworking saves you all that hassle. It’s the go-to spot for any DIYer who wants easy, instant access to a massive library of well-organized designs. Curious about what you actually get? You’ll find an official breakdown, video guides, and the latest info in the overview graphic below.  Scan the QR Code Below to View the Official Presentation: Scan with your smartphone camera to access the official page directly
View full article
PT2001デモリクエスト:同じマイクロコードを共有するデュアルコアが1チャネル NXPチームとコミュニティの皆様、こんにちは。 PT2001によると、共有RAMアーキテクチャは、複数のアクチュエータを同一のマイクロコードで並列制御する必要がある場合に、効率的なRAM使用を可能にする。 「この共有RAMアーキテクチャにより、複数のアクチュエータを同一のマイクロコードで並列制御する必要がある場合に、効率的なRAM使用が可能になります。」 現在、2つのアクチュエーターを同じドライブプロファイルで同時に駆動する必要がある設計に取り組んでいます。これを適切に実装する方法を理解するために、私は以下の情報を探しています。 単一のチャネル内で両方のコアが共有RAMから同じマイクロコードを共有・実行する方法を示す簡単な例/デモプロジェクト 関連する主要な設定に関する簡単な説明(例:コアの起動、競合を回避するために必要な特別なレジスタ設定など) NXPはそのような例やコードサンプルを提供していますか?アプリケーションノートやドキュメント、サンプルプロジェクトのヒントがあれば大変ありがたいです。 ごサポートありがとうございます! PT2001 PT2000   よろしくお願いいたします、zaoluo Re: PT2001 Demo Request: Dual Cores Sharing the Same Microcode on a Single Channel こんにちは、トム( @TomasVaverka ) 私が提起した質問にご関心をお寄せいただき、誠にありがとうございます! ありがとう&BR、zaoluo Re: PT2001 Demo Request: Dual Cores Sharing the Same Microcode on a Single Channel こんにちは、Lex( @LexLiu ) ザオ・ルオさんからの別の質問について、手伝ってもらえますか? ありがとう&よろしく、トーマス
View full article