Multi Source Translation Content

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

Multi Source Translation Content

Discussions

Sort by:
CodeWarrior 5.1 デバッガー。「ステップ実行時にマスク可能なISRを無効にする」Iビットが9S12XEQ512で永続的に設定されます。 環境: IDE: CodeWarrior 5.1(HC(S)12Xコンパイラ) ターゲット: MC9S12XEQ512 バスクロック: 49.777 MHz BDMインターフェース:USB Multilink Universalで再現可能;Cyclone Proでは確認されていません ホストOS: Windows 10とWindows 11の両方で確認されました メモリモデル:大規模モデルでは再現可能;バンクモデルでは再現性が低いか、それ以下です 使用した設定: 「HC12MultilinkCyclonePro」→「セットアップ...」→「デバッグオプション」→「ステップ実行時にマスク可能なISRを無効にする」— 有効。 説明: デバッガで一定回数のステップ操作(シングルステップまたはステップオーバー)を実行すると、マスク可能な割り込み(CCRのIビット)が永久的に無効になります。割り込みは、実行を継続した後(実行/ゴー)でも再開されず、CCRレジスタビューでIビットを手動でクリアするまでマスクされたままになります。この挙動は、USB Multilink Universal BDMインターフェースを用いたLargeメモリモデルでも、Windows 10およびWindows 11のホスト上で一貫して再現可能です。同じプロジェクト設定のCyclone Proインターフェースでも、バンクメモリモデルでも同様の問題は見られていません 現在使用されている回避策: CCRレジスタビューでIビットがスタックした場合、手動でIビットをクリアします。 リクエスト: これは、S12Xコア上のCode Warrior 5.1のステップエミュレーションと組み合わせたUSB Multilink Universalのファームウェア/ドライバの既知の問題でしょうか?固定されたマルチリンクユニバーサルのファームウェアバージョンや、このデバイス/インターフェースの組み合わせで割り込み駆動の大規模モデルプロジェクトをデバッグするための推奨代替ワークフローはありますか? よろしくお願い申し上げます。 Re: CodeWarrior 5.1 debugger. "Disable maskable ISR's when stepping" I-bit permanently set こんにちは、 あなたが見ている挙動は現実的で、あなたが気づいたインターフェースの違い(Multilink Universalは影響を受けていますが、Cyclone Proは影響を受けていません)は有益な観察です。発生する割り込みの種類によって選択肢が異なるため、それに基づいて実践的なガイダンスを提供させていただきます。 タイマーベースの割り込みの場合 もしアプリケーションがタイマーオーバーフローや出力比較、またはペリフェラルで生成される割り込みを使っている場合、デバッグ時に「ステッピング時にマスク可能なISRを無効化する」機能が実際には必要ありません。ほとんどのS12Xタイマーおよびペリフェラルモジュールには、デバイスがBDMアクティブモードに入るとモジュールをフリーズするFRZビットがあり、これは停止や単一ステップの間自動的に動作します。FRZが設定されると、タイマーはステップ中にカウントを停止し、ステップ間で割り込みを発生させることはできません。これはデバッガインターフェースとは独立してハードウェアレベルで動作し、このクラスの割り込みに対してよりクリーンな解決策となります。 外部割り込みおよびキーボード割り込み(KBI)の場合 この点に関しては、状況はより限定的である。外部IRQおよびKBI割り込みは非同期の外部信号であり、それらに対するハードウェアフリーズ機構はありません。BDMインターフェースはハードウェアレベルでそれらを抑制できません。「ステップ実行時にマスク可能なISRを無効にする」機能は、まさにこのギャップを埋めるために存在し、各ステップ中にCCR Iビットを介してそれらをマスクします。 お使いの環境では、この機能がUSB Multilink Universalを使用してIビットを正しく復元しないため、これらの割り込みソースを使用するコードのデバッグには、既に正しく動作することが確認されているCyclone Proを使用するのが最も確実な方法です。 試してみる価値あり もしCodeWarrior 5.2にアクセスできるなら、試す価値はあります。このバージョンではデバッガ側の変更があり、USB Multilink Universalを用いたLargeメモリモデルでのIビット復元動作は改善される可能性がありますが、保証はありません。 これで選択肢が明確になれば幸いです。 ラディスラフ
View full article
i.MX 95:M7とA55間の動的TRDC/システムマネージャーリソース割り当ておよびGPIO共有 こんにちは、チームのみなさん。 私たちは i.MX 95プラットフォームを開発しており、まずM7コアからMIPI DSIペリフェラルを使用し、その後実行時にリソースをA55コアに引き渡したいと考えています。 私たちの理解では、周辺リソースとその所有権は 、 System Managerツール を通じて生成・設定 された mx95evk.cfg ファイル内の各論理マシン/プロセッサごとに最初に定義されています。 以下の点について明確にしておきたいと思います。 動的リソースハンドオーバー: 実行時にM7からA55へMIPI DSIペリフェラルリソースを動的に移すことは可能でしょうか?例えば、M7は最初にMIPI DSIを所有・使用し、その後リリースし、その後A55が所有権を取得し同じペリフェラルを使用します。 動的リソース配分: ランタイムハンドオーバーがサポートされている場合、リソースの所有権やアクセス権限を動的に変更するための推奨されるメカニズムやAPIは何ですか?これはSystem Manager、TRDC、または他の仕組みで処理されるのでしょうか? GPIO共有: 同じGPIOポート/リソースをM7とA55の両方が同時にアクセスすることは可能でしょうか?もし可能なら、GPIOリソースを安全に共有するためにTRDCの設定要件やソフトウェア同期メカニズムを実装する必要がありますか? i.MX 95におけるM7とA55間の動的ペリフェラルハンドオーバーやリソース共有の実装方法について、推奨される方法についてのご指針をいただけるとありがたいです。 Re: i.MX 95: Dynamic TRDC/System Manager Resource Allocation and GPIO Sharing Between M7 and A55 こんにちは、 i.MX 95では、MIPI DSIリソースは当初M7で使用され、後にA55に引き継がれます。リソースアクセスと所有権はSystem Manager/TRDCの設定で設定し、実際のランタイムハンドオーバーはソフトウェアで処理すべきです。TRDCはどの論理マシン/ドメインが周辺機器にアクセスできるかを制御しますが、M7とA55間の同期は管理しません。したがって、M7はまずすべてのDSI操作を完了し、ペリフェラルの使用を停止し、A55が制御を取る前にMU/IPCなどのコア間機構を通じてA55に通知すべきです。同様に、GPIOリソースは適切なTRDC構成を通じてM7とA55の両方にアクセス可能ですが、同時アクセスはソフトウェアによる同期が必要です。DSIのユースケースでは、同時に1つのコアだけがペリフェラルをアクティブに使い、ハンドオーバーはMU/IPCで行うのが推奨されます。 Re: i.MX 95: Dynamic TRDC/System Manager Resource Allocation and GPIO Sharing Between M7 and A55 AEチームと話し合った結果、以下のアップデート内容をご参照ください。 i.MX 95では、リソース所有権とTRDC権限は、SM構成ファイル(mx95evk.cfg)でビルド時に静的に定義されます。→はconfig_.h)を生成し、MIXが起動するとシステムマネージャー(SM)によって適用されます。*実行時に周辺機器の所有権を論理マシン(LM)から別の論理マシンへ移すSCMI/SMメッセージはありません。 しかし、SMのドキュメントでは「ディスプレイを別のLMへ引き継ぐこと」がSM_SCMI_PERM_EXCLUSIVEモデルの正確な動機として挙げられています。したがって、引き継ぎは可能ですが、所有権を「移動」するだけでは不可能です。 Q1 & Q2 — MIPI DSI M7 → A55 ハンドオーバー:やり方 LMM(論理マシン管理)SCMIプロトコルは、LMの起動・リセット・シャットダウン・サスペンド・ウェイクのみを行い、RESOURCE_ASSIGNやメッセージOWNERSHIP_TRANSFERはありません。代わりに、時間分割ハンドオフを使用してください。 mx95evk.cfgで両方のLMに最初にアクセス権を付与してください。デフォルトでは、EVK の設定により、MIPI_DSI、MIPI_PHY、DC_DISPENG、BLK_CTRL_DISPLAYMIX、ディスプレイのクロック/電源 (PD_DISPLAY、CLK_DISP*)が AP (LM2) の所有者としてのみ割り当てられます。M7 を優先的に使用するには、これらを M7 LM (LM1) にも追加する必要があります。 SM管理リソース(クロック、電源、リセット)をSM_SCMI_PERM_EXCLUSIVE(api=all)としてマークし、2つのLMからのリクエストが静かに集約・上書きされないようにします。 ハンドオーバー時にM7はDSI/DCIFを静止し、アプリケーションレベルのIPC(MUメールボックスまたはSCMI通知)を通じてA55に信号を送ります。A55(Linux/DRM DSI+DPUスタック)は同じIPを表示します。 ハンドオフシーケンスはお客様のソフトウェア責任(時間的区分)です。SMは、両方のLMが事前にアクセス許可されているため、HWがどちら側からも運転可能であることを保証しています。TRDCの所有権は実行時に書き換えられず、SMプログラムのみがTRDCを実行し、MIX電源投入時の静的設定からのみ可能です。 これを制御するTRDC設定(.cfgファイルに記載): MDAC_am=... — マスタードメイン割り当て(バス・マスタをドメインIDにマッピング) MBC_am=s.b— メモリブロックチェック — ここでペリフェラルアクセスがゲートされます MRC_am=… — メモリ領域チェック(DDRなどの大規模メモリ領域) 各LMはDIDにバインドされます。例:SMは2、AP(LM2)は3、M7(LM1)は4でした。 Q3 — M7とA55の間でGPIOを共有 はい、TRDCはM7ドメインとA55ドメインの両方に同じGPIOインスタンスへの同時アクセスを許可できます(両方のDIDでMBCブロックを有効にすること)。しかし、重要な注意点と、支持される2つのパターンがあります。 注意点:i.MX 95 GPIOにはハードウェア仲裁機能がなく、PDR/DR/GDIRレジスタは物理的に共有されるため、両コアレースから非調整の読み書き・修正・書き込みが可能です。 パターンA(分離ピン+ソフトウェア同期):慣例に従って各コアに特定のピンを割り当てます(設定では既にLMごとにピンが分割されています)。データ/方向レジスタバンクは依然として共有されているため、ハードウェアセマフォ/MUを使用して同時RMWを保護するか、コアが同じレジスタバンクに同時にアクセスしないようにしてください。 パターンB(SM仲裁、真に共有されたインスタンスに推奨): SMが所有し、文書化された役割は 「共有アクセスの仲裁 」とされる常時接続 GPIO1 を経由します。IOMUXC/IOMUX_GPRも同様にSMによって調停されます。Pinmux/daisyは、エージェントごとの権限を持つSCMIピン制御プロトコルを介して設定されます。GPIOデータ操作は直接MMIOで行われます。
View full article
i.MX 95: Dynamic TRDC/System Manager Resource Allocation and GPIO Sharing Between M7 and A55 Hi Team, We are working on an i.MX 95 platform and would like to use the MIPI DSI peripheral initially from the M7 core, and then hand over the resource to the A55 core at runtime. From our understanding, the peripheral resources and their ownership are initially defined for each Logical Machine/processor in the mx95evk.cfg file generated/configured through the System Manager tools. We would like to clarify the following: Dynamic Resource Handover: Is it possible to dynamically transfer the MIPI DSI peripheral resource from M7 to A55 at runtime? For example, M7 would initially own and use MIPI DSI, then release it, after which A55 would take ownership and use the same peripheral. Dynamic Resource Allocation: If runtime handover is supported, what is the recommended mechanism/API to change the resource ownership or access permissions dynamically? Is this handled through the System Manager, TRDC, or another mechanism? GPIO Sharing: Is it possible for the same GPIO port/resource to be accessed by both M7 and A55 simultaneously? If so, are there any TRDC configuration requirements or software synchronization mechanisms that need to be implemented to safely share the GPIO resource? We would appreciate any guidance on the recommended approach for implementing dynamic peripheral handover and/or resource sharing between M7 and A55 on the i.MX 95. Re: i.MX 95: Dynamic TRDC/System Manager Resource Allocation and GPIO Sharing Between M7 and A55 I discussed with the AE team, please refer to the following update. On i.MX 95, resource ownership and TRDC permissions are defined statically at build time in the SM config (mx95evk.cfg → generated config_.h) and applied by the System Manager (SM) when a MIX powers up. *There is no SCMI/SM message that transfers ownership of a peripheral from one Logical Machine (LM) to another at runtime. However, SM documentation names "handing a display over from one LM to another" as the exact motivating use case for the SM_SCMI_PERM_EXCLUSIVE model. So the handover is achievable, just not by "moving" ownership. Q1 & Q2 — MIPI DSI M7 → A55 handover: how to do it The LMM (Logical Machine Management) SCMI protocol only boots / resets / shuts down / suspends / wakes LMs — it has no RESOURCE_ASSIGN or OWNERSHIP_TRANSFER message. Instead, use a temporal-division handoff: Grant BOTH LMs access up-front in mx95evk.cfg. By default the EVK config assigns MIPI_DSI, MIPI_PHY, DC_DISPENG, BLK_CTRL_DISPLAYMIX, the display clocks/power (PD_DISPLAY, CLK_DISP*) as OWNER of the AP (LM2) only — you must also add them to the M7 LM (LM1) to allow M7-first usage. Mark the SM-managed resources (clocks, power, reset) as SM_SCMI_PERM_EXCLUSIVE (api=all) so requests from the two LMs are not silently aggregated/overwritten. At handover, M7 quiesces DSI/DCIF, then signals A55 via application-level IPC (MU mailbox or SCMI notification). A55 (Linux/DRM DSI+DPU stack) then brings up the same IP. The handoff sequencing is the customer's software responsibility (temporal division). The SM only guarantees the HW is drivable from either side because both LMs were pre-granted access. TRDC ownership cannot be rewritten at runtime — only the SM programs TRDC, and only from the static config at MIX power-up. TRDC config that controls this (expressed in the .cfg): MDAC_am=… — Master-Domain Assignment (maps a bus master to a domain ID) MBC_am=s.b — Memory Block Check — this is where peripheral access is gated MRC_am=… — Memory Region Check (large memory regions like DDR) Each LM binds to a DID, e.g. SM did=2, AP(LM2) did=3, M7(LM1) did=4. Q3 — Shared GPIO between M7 and A55 Yes, TRDC can grant both the M7 domain and the A55 domain concurrent access to the same GPIO instance (enable its MBC block for both DIDs). But there is a critical caveat and two supported patterns: Caveat: i.MX 95 GPIO has no hardware arbitration — PDR/DR/GDIR registers are physically shared, so uncoordinated read-modify-write from both cores races. Pattern A (disjoint pins + SW sync): Assign specific pins to each core by convention (the config already splits pins per LM). Since the data/direction register banks are still shared, protect concurrent RMW with a hardware semaphore / MU, or ensure the cores never touch the same register bank concurrently. Pattern B (SM-arbitrated, recommended for truly shared instances): Route through the always-on GPIO1, which is owned by the SM and whose documented role is "arbitrates shared access." IOMUXC/IOMUX_GPR are likewise SM-arbitrated. Pinmux/daisy is set via the SCMI pin-control protocol with per-agent permissions; GPIO data ops are direct MMIO. Re: i.MX 95: Dynamic TRDC/System Manager Resource Allocation and GPIO Sharing Between M7 and A55 Hello, On the i.MX 95, the MIPI DSI resource can be used by the M7 initially and later handed over to the A55. The resource access and ownership should be configured through the System Manager/TRDC configuration, while the actual runtime handover should be handled by software. TRDC controls which Logical Machine/domain is allowed to access the peripheral, but it does not manage synchronization between M7 and A55. Therefore, M7 should first complete all DSI operations, stop using the peripheral, and notify A55 through an inter-core mechanism such as MU/IPC before A55 takes control. Similarly, GPIO resources can be made accessible to both M7 and A55 through the appropriate TRDC configuration, but simultaneous access must be synchronized by software. For the DSI use case, the recommended approach is to have only one core actively use the peripheral at a time and use MU/IPC for the handover.
View full article
ユーザーガイドで言及されているPIDパラメータの重要性と、それらの計算方法について教えてください。 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 私はBLDC制御用にMagniV開発ボードを使っています......。速度と電流ループ制御とPI制御についてはNXPのコードも参考にしました。PI制御ループのパラメータ計算はfreemasterツールを使用して行います。PIDループのパラメータ計算にも同様のツールはありますか?また、コードに付属していたユーザーガイドに記載されているNXP PID機能で使用されるPIDパラメータの重要性を定義してください。 Re: PID parameters significance mentioned in User guide and how to calculate them ? 別のプロセスの場合: 1. モーター95W、12V、抵抗Rは約1.2Ω、インダクタンスLは約2.5mH 2. スイッチの周波数は160Hz、つまり1000 rad/s(1000/3.1416/2=160Hz)であることを示唆しています。 3. そしてZ_finalは1である。 SO: S = 1/(R+2*pi*L*freq) = 1/(1.2+2*3.14156*2.5e-3*160)= 1/(1.2+2.5) ジャンプはこちらです: 1.Kp = 2*3.1416*2.5e-3*160-R= 5-1.2= 3.8 2.Ki = w^2*L = 2500 3. Vol curr はスタンドリズであるため、 :Kp = 3.8 * 8/12 = 3.8 * 0.667=2.5 この段階で、AIはLが間違っている可能性があると述べた。 ---------------- 適切なモーターパラメータを計算してみましょう。 エンジンがcos(theta)=0.85の場合 >>> import numpy as np >>> np.acos(0.85) np.float64(0.5548110329800715) >>> np.sin(0.555) np.float64(0.5269433002033014) するとsin(θ)=0.5。 つまり、エンジンがSTDで停止したとき、Curr_RとCurr_Lは等しいです。 so:R = 12*0.707/(8*0.707)= 1.5オーム、これは正しいです。 L:9000rpmは150Hzなので、誤差は帯域幅の問題だと思います。1500Hz、あるいは3000Hzより高くあるべきです もし freq_std=1500なら、Lは12*0.85/(2*π*1.5e3)であるはずです。= 10mH ~ 5mH つまり、Ki = 14e3*10e-3 = 140 または 70。 Kp = 2*pi*1.5e3*L-R = 94-1.5= ... それでも間違っている…。 Re: PID parameters significance mentioned in User guide and how to calculate them ? やあ。 私はPID制御に関しては初心者です。 これが私が見つけた最初の投稿です。 以下は、このフォーラムにおける私の発見と知識の一部です。 S32K344 - FreeRTOSと統合されたFOC これが最初の行です。 EVボードをインストールした後、PMSM_appconfig.hを取得しました。PIDパララム、initパララムは: #define CLOOP_D_KP(0.368399F) #define CLOOP_D_KI(0.0298853F) #define CLOOP_Q_KP(0.371817F) #define CLOOP_Q_KI(0.0298853F) これはFOCコントロールなので、ここには2つのPIパラメータがあります。 したがって、Kpが最も重要なものです。 では、私の計算は以下の通りです: PID(err_of_vol) = カール。 電圧範囲は12Vです モーターの出力は95Wで、出力カールは :95/12=8A です。 SO: Kp = 8/12 = 0.67...しかしモーターは前述と後ろのロールをサポートCANできるため、Volは2つの部分に分割しなければなりません。 SO :   if you using +12V to サポート all roll on roll back, kp should be 8*2/12=1.33 DC+とDC-を反転させるようなものを使用する場合は、0.67になるはずです。 調整する場合、常に小さい値から始まります。例えば、その20%。つまり、最終的に0.37は20%×1.33=より大きいです。0.27 KiはKpの約10%であり、Ki = 1/12*Kpとなる。 しかし、それは全くの間違いのようだ。 Qianwen(AIチャット)について何か聞いたんだけど 1. NXPは、最初の段階では、現在の株価と株価を据え置くべきである。 2. 計算の基準となるのは、制御空間のゼロ点と極点です。 後で調べてみます。 それによると、モーターの PID パラメータは、まずモーターの L、R を測定し、次に計算します。 Re: PID parameters significance mentioned in User guide and how to calculate them ? <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> こんにちは、 私たちはウェブ上のモータ制御の例の構造にPIコントローラを使用しています。ご指摘の通り、McatはPIコントローラのパラメータ計算に役立ちます(カスケード制御構造におけるPMSMや、6ステップ構造におけるBLDCの制御)。現時点では、PIDコントローラー付きの構造や設定支援ツールを使った例はウェブ上にありませんが、もちろんAMCLIBライブラリも顧客制御構造の構成要素としてこの機能を提供しています。 お役に立てれば幸いです。 よろしくお願いいたします。 ダイアナ
View full article
NXP Matlab Simulink Interaction I am Trying to flash Simulink model into S32K312 MINI-EVB. It is using CAN interface for input and output of the model. Need to understand why my traces are not matching with what i am getting in Simulink Simulation model. There are differences in the model run in Simulink and that on NXP hardware, maybe because of timestep and other factors, just need support to check what i might be doing wrong.
View full article
NXP Matlab Simulink 交互 我正在尝试将 Simulink 模型刷写到 S32K312 MINI-EVB 中。该模型采用CAN接口进行输入输出。我需要了解为什么我的轨迹与我在 Simulink 仿真模型中得到的结果不符。Simulink 中的模型运行结果与 NXP 硬件上的模型运行结果存在差异,可能是由于时间步长和其他因素造成的,我需要帮助来检查我可能做错了什么。
View full article
FRDM-IMX93 ASCII ボードファイル こんにちは、 このリンクからFRDM-IMX93デザインファイルを取得しました: https://www.nxp.com/design/design-center/development-boards-and-designs/frdm-i-mx-93-development-board:FRDM-IMX93 しかし、それらをAltiumにインポートするためのAllegroやExtracta.exeを持っていません。LAY-94611_B.brdをACII形式で提供してもらえますか?それならAltiumにインポートできます。 ありがとうございます Re: FRDM-IMX93 ASCII Board File こんにちは、 私もこのファイルが必要です。ボードをよりよく理解し、開発に役立てたいからです。送ってくれる? Re: FRDM-IMX93 ASCII Board File こんにちは、 @Cwootton さん! NXPサポートにご連絡いただきありがとうございます! 必要なファイルは近日中にメールでお送りします。 よろしくお願いします、 チャビラ
View full article
PID parameters significance mentioned in User guide and how to calculate them ? I am using MagniV development board for for BLDC control .... I have also took reference from NXP code for speed and current loop control with PI control ..... for PI control loop parameters calculations are done using freemaster tool....Is there any such tool for PID loop parameter calculation ? Also please define significance of PID parameters used in NXP PID function mentioned in user guide that came with code . Re: PID parameters significance mentioned in User guide and how to calculate them ? for another process: 1. motor 95W, 12V, the R is about: 1.2ohm, and L is about:2.5mH 2. it suggest the switch freq is 160Hz, which is 1000 rad/s( 1000/3.1416/2=160Hz) 3. and it suggest the Z_final is 1. so: s = 1/(R+2*pi*L*freq) = 1/(1.2+2*3.14156*2.5e-3*160) = 1/(1.2+2.5)  here is a jump: 1.Kp = 2*3.1416*2.5e-3*160-R = 5-1.2 = 3.8 2.Ki = w^2*L = 2500 3.because the Vol, curr is standlize, so :Kp = 3.8 * 8/12 = 3.8*0.667=2.5 at this stage, AI said the L maybe wrong. ---------------- let me try to calc the right motor params. if engine is cos(theta)=0.85 >>> import numpy as np >>> np.acos(0.85) np.float64(0.5548110329800715) >>> np.sin(0.555) np.float64(0.5269433002033014) then sin(theta)=0.5. so: when engine at std power out. the Curr_R and Curr_L is equal. so:R = 12*0.707/(8*0.707) = 1.5ohm, this is right. L:9000rpm is 150Hz,so, I think the error is bandwith, it should be higher than 1500Hz, and maybe 3000Hz if freq_std=1500, which means the L should be 12*0.85/(2*pi*1.5e3) = 10mH ~5mH so:Ki = 14e3*10e-3 = 140 or 70. Kp = 2*pi*1.5e3*L -R = 94-1.5 = ... still wrong.... Re: PID parameters significance mentioned in User guide and how to calculate them ? hi,there. I am a naive to pid ctrl. this is the first post I found. here are some my foundings in this forum and knowledge. S32K344 - FOC integrated with FreeRTOS this is the beginning line. After I install the EV boards, I got the PMSM_appconfig.h,  the pid params, init params is : #define CLOOP_D_KP (0.368399F) #define CLOOP_D_KI (0.0298853F) #define CLOOP_Q_KP (0.371817F) #define CLOOP_Q_KI (0.0298853F) this is FOC controler, so there are two PI params here. so the Kp is the most important one. so,here is my calc: the PID(err_of_vol) = Curr. Vol range is 12V the motor power is 95W, so the output Curr is :95/12=8A. so: Kp = 8/12 = 0.67... but  the motor can support forword and backword rolling, so the  Vol must split into 2Parts. so :   if you using +12V to support all roll on roll back, kp should be 8*2/12=1.33 if you using something like revert the DC+ DC-, it should be just 0.67. if you tune it, it always start an a more small value. for example 20% of it.  so at last, the 0.37 is more larger than 20%*1.33= 0.27 Ki is about 10percent of Kp, here is Ki = 1/12*Kp but it seems it is totally wrong. I heard sth about Qianwen(An AI-Chat) 1. NXP should Standlize the Curr & Vol, for the very first stage. 2.what the calc is based Zero,and Polor Point of Control Space.  I will try to figure it out later,  it said, the motor's PID params will first try to measure motors' L,R then calc. Re: PID parameters significance mentioned in User guide and how to calculate them ? Hello, We use PI controllers in the structures of our motor control examples on the web. As you write, Mcat helps with the calculation of parameters for the PI controllers used (for PMSM in the cascade control structure for BLDC in the structure for sixstep). At the moment we do not have an example on the web that would use a structure with a PID controller or a tool that would help to set it, but of course, our AMCLIB library also offers this function as a building block for customer control structures. I hope it helps. Best regards, Diana
View full article
The MCUXpresso Secure Provisioning Tool cannot connect to the target board via USB. Hi NXP, I have a question: Development board: MIMXRT1170-EVKB, unable to connect using MCUXpresso Secure Provisioning Tool, as shown in the image: hayden178_0-1788428456159.pnghayden178_0-1788428456159.pnghayden178_0-1788428456159.pnghayden178_0-1788428456159.pnghayden178_0-1788428456159.png The computer's Device Manager displays the following: hayden178_1-1788428566738.pnghayden178_1-1788428566738.pnghayden178_1-1788428566738.pnghayden178_1-1788428566738.pnghayden178_1-1788428566738.png The development board's DIP switches are shown in the figure: hayden178_2-1788428637373.pnghayden178_2-1788428637373.pnghayden178_2-1788428637373.pnghayden178_2-1788428637373.pnghayden178_2-1788428637373.png I've downloaded and debugged the program using an IDE without any issues. How can I troubleshoot this? Thank you. Re: MCUXpresso Secure Provisioning Tool无法通过USB连接目标板 Hi @hayden178 , Thank you for your question! I checked the DIP switch configuration and power options you provided, and there are no issues. USB OTG1 was also selected without any problems. Therefore, it's suspected that some anomaly might be preventing the flashloader from loading data into SRAM promptly via the USB port. We suggest you try using a UART interface first. If the UART interface works fine, then switch to the USB interface. At this point, the flashloader should be running, and the USB port should also be working correctly. If the UART port also has a problem, you need to check the specific output. The detailed commands are listed in gen_scripts/init_flashloader_win.bat in the working directory. Before re-running the test, delete the previous log and check the new log to see which step failed. Best regards, Gavin Re: MCUXpresso Secure Provisioning Tool无法通过USB连接目标板 Hi @Gavin_Jia , Thank you for your support! I switched to UART to connect the MIMXRT1170-EVKB, and the problem was solved. I've encountered a new problem; could you please help me figure out where the problem lies? The built-in example in the MCUXpresso Secure Provisioning Tool fails to run mcuboot_opensource&ota_mcuboot, resulting in a consistent reset, as shown in the image. hayden178_0-1789004746339.pnghayden178_0-1789004746339.pnghayden178_0-1789004746339.png The project configuration is as follows: hayden178_1-1789004822575.pnghayden178_1-1789004822575.pnghayden178_1-1789004822575.png hayden178_2-1789004848902.pnghayden178_2-1789004848902.pnghayden178_2-1789004848902.png hayden178_4-1789005368832.pnghayden178_4-1789005368832.pnghayden178_4-1789005368832.png hayden178_3-1789005332451.pnghayden178_3-1789005332451.pnghayden178_3-1789005332451.png I've successfully run both projects using the IDE, but downloading the generated bin files to the board using SPSP results in the same reset issue. hayden178_5-1789005846515.pnghayden178_5-1789005846515.pnghayden178_5-1789005846515.png Re: MCUXpresso Secure Provisioning Tool无法通过USB连接目标板 Hi @hayden178 , Thanks for sharing the good news. I'm glad the first SPT connection issue has been resolved. Regarding the mcuboot operation process, which guide did you refer to? Could you please share it? I've always used Python scripts and imgtool for signing before, and I haven't tried this SPT solution. Regarding this new question, you are welcome to create a new ticket to keep the topic consistent across all threads. Thank you for your understanding and cooperation! Best regards, Gavin
View full article
FRDM-IMX93 ASCII 板文件 你好, 我从这个链接下载了FRDM-IMX93设计文件: https://www.nxp.com/design/design-center/development-boards-and-designs/frdm-i-mx-93-development-board:FRDM-IMX93 但是我没有 Allegro 或 Extracta.exe 来将它们导入 Altium。请提供 ACII 格式的 LAY-94611_B.brd 文件,以便我将其导入 Altium 系统。 谢谢! Re: FRDM-IMX93 ASCII Board File 你好, 我也需要这份文件来更好地了解电路板并帮助进行开发。你能发给我吗? Re: FRDM-IMX93 ASCII Board File 嗨@Cwootton ! 感谢您联系恩智浦技术支持! 我稍后会通过电子邮件将所需文件发送给您。 此致, 查维拉
View full article
MCUXpresso Secure Provisioning Tool无法通过USB连接目标板 Hi NXP, 请教一下问题: 开发板:MIMXRT1170-EVKB,使用MCUXpresso Secure Provisioning Tool无法连接,如图显示: hayden178_0-1788428456159.pnghayden178_0-1788428456159.pnghayden178_0-1788428456159.pnghayden178_0-1788428456159.pnghayden178_0-1788428456159.png 电脑设备管理器显示如下: hayden178_1-1788428566738.pnghayden178_1-1788428566738.pnghayden178_1-1788428566738.pnghayden178_1-1788428566738.pnghayden178_1-1788428566738.png 开发板拨码开关如图: hayden178_2-1788428637373.pnghayden178_2-1788428637373.pnghayden178_2-1788428637373.pnghayden178_2-1788428637373.pnghayden178_2-1788428637373.png 另外使用IDE下载程序,debug都没问题。请问如何排查?谢谢 Re: MCUXpresso Secure Provisioning Tool无法通过USB连接目标板 Hi @hayden178 , 感谢提问! 我检查了您提供的拨码开关配置和供电选项,都没有问题。选择的也是USB OTG1没有问题。 因此怀疑可能是有什么异常导致flashloader没有及时通过usb端口加载到SRAM。建议您先换用UART接口试一下。如果UART接口没问题,再换到USB接口,此时flashloader已经在运行了,usb端口应当也没有问题了。 如果UART端口也有问题,那就需要检查具体的输出,在工作目录下的,gen_scripts/init_flashloader_win.bat 中详细列举了具体的命令。重新执行test之前先删除之前的log,在新的log中核对具体是哪一步失败。 Best regards, Gavin Re: MCUXpresso Secure Provisioning Tool无法通过USB连接目标板 Hi @Gavin_Jia , 感谢您的支持! 我换成UART连接MIMXRT1170-EVKB,已经解决问题。 我遇到一个新的问题,请帮忙看看问题出在哪里: 使用MCUXpresso Secure Provisioning Tool上的自带的示例,跑不通mcuboot_opensource&ota_mcuboot,现象为一致复位,如图: hayden178_0-1789004746339.pnghayden178_0-1789004746339.pnghayden178_0-1789004746339.png 工程配置如下: hayden178_1-1789004822575.pnghayden178_1-1789004822575.pnghayden178_1-1789004822575.png hayden178_2-1789004848902.pnghayden178_2-1789004848902.pnghayden178_2-1789004848902.png hayden178_4-1789005368832.pnghayden178_4-1789005368832.pnghayden178_4-1789005368832.png hayden178_3-1789005332451.pnghayden178_3-1789005332451.pnghayden178_3-1789005332451.png 另外我用IDE已经跑通这两个工程,但是把生成的bin文件使用SPSP下载到板子上同样一致复位 hayden178_5-1789005846515.pnghayden178_5-1789005846515.pnghayden178_5-1789005846515.png Re: MCUXpresso Secure Provisioning Tool无法通过USB连接目标板 Hi @hayden178 , 感谢分享你那边的好消息,很高兴第一个SPT连接的问题已经解决了。 关于mcuboot这个操作流程,你参考的guide是哪个能同步下吗?之前一直是通过python脚本和imgtool来做签名的,没尝试过这个SPT的方案。 关于这个新的问题,欢迎重新创建一个ticket以保持每个thread下的主题一致。 感谢您的理解和协作! Best regards, Gavin
View full article
NXP Matlab Simulinkとの連携 SimulinkモデルをMINI-EVBにフラッシュしようS32K312。モデルの入出力にCANインターフェースを使用しています。なぜ自分のトレースがSimulinkシミュレーションモデルで得られているものと一致しないのか理解したいです。SimulinkでのモデルとNXPハードウェアでのモデルには違いがあります。おそらくタイムステップやその他の要因が原因かもしれませんが、何が間違っているのか確認するためにサポートが必要です。
View full article
用户指南中提到的PID参数的含义以及如何计算它们? <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 我正在使用MagniV开发板进行BLDC控制……我还参考了NXP关于速度和电流回路的PI控制代码……PI控制回路参数的计算是用Freemaster工具完成的……请问有没有类似的工具可以用于PID回路参数的计算?另外,请解释一下代码附带的用户指南中提到的NXP PID函数中使用的PID参数的含义。 Re: PID parameters significance mentioned in User guide and how to calculate them ? 用于另一个流程: 1. 电机功率95W,电压12V,电阻R约为1.2Ω,电感L约为2.5mH 2. 这表明开关频率为 160Hz,即 1000 rad/s(1000/3.1416/2=160Hz)。 3. 这表明 Z_final 为 1。 所以:s = 1/(R+2*pi*L*freq) = 1/(1.2+2*3.14156*2.5e-3*160)= 1/(1.2+2.5) 这里有一个跳跃: 1.Kp = 2*3.1416*2.5e-3*160-R= 5-1.2= 3.8 2. Ki = w^2*L = 2500 3. 因为 Vol,curr 是标准化的,所以:Kp = 3.8 * 8/12 = 3.8 * 0.667 = 2.5 现阶段,人工智能表示 L 可能错了。 ---------------- 让我尝试计算一下正确的电机参数。 如果引擎的 cos(theta)=0.85 >>> import numpy as np >>> np.acos(0.85) np.float64(0.5548110329800715) >>> np.sin(0.555) np.float64(0.5269433002033014) 那么 sin(θ)=0.5。 所以:当发动机处于 STD 功率输出时,Curr_R 和 Curr_L 相等。 所以:R = 12*0.707/(8*0.707)= 1.5欧姆,没错。 L:9000rpm 对应的频率是 150Hz,所以我认为误差出在带宽上,带宽应该高于 1500Hz,可能是 3000Hz。 如果 freq_std=1500,则 L 应为 12*0.85/(2*pi*1.5e3)= 10mH ~5mH 所以:Ki = 14e3*10e-3 = 140 或 70。 Kp = 2*pi*1.5e3*L-R = 94-1.5= ... 还是错了…… Re: PID parameters significance mentioned in User guide and how to calculate them ? 你好呀。 我对 pid ctrl 完全不了解。 这是我找到的第一篇帖子。 以下是我在这个论坛上的一些心得和知识。 S32K344 - FOC 与 FreeRTOS 集成 这是起始行。 安装完电动汽车电路板后,我得到了 PMSM_appconfig.h 文件。进程 ID 参数、初始化参数为: #define CLOOP_D_KP (0.368399F) #define CLOOP_D_KI (0.0298853F) #define CLOOP_Q_KP (0.371817F) #define CLOOP_Q_KI (0.0298853F) 这是 FOC 控制器,所以这里有两个 PI 参数。 所以Kp是最重要的。 这是我的计算结果: PID(err_of_vol) = Curr。 电压范围为12V 电机功率为 95W,因此输出电流为:95/12=8A。 所以:Kp = 8/12 = 0.67...但是电机可以支持向前和向后滚动,所以 Vol 必须分成 2 部分。 所以:如果您使用 +12V 来支持所有回滚操作,则 kp 值应为 8*2/12=1.33 如果你使用类似反转 DC+ DC- 的方法,它应该只是 0.67。 如果你调整它,它总是从一个较小的值开始。例如,其中20%。所以最终,0.37 比 20%*1.33 更大。0.27 Ki 大约是 Kp 的 10%,所以 Ki = 1/12 * Kp 但这似乎完全错误。 我听说过千文(一款人工智能聊天应用)的事。 1. NXP 应该在第一阶段就实现 Curr & Vol 的标准化。 2. 计算基于零点和控制空间的极点。 我稍后会想办法弄明白。 它说,电机的 PID 参数将首先尝试测量电机的 L、R,然后进行计算。 Re: PID parameters significance mentioned in User guide and how to calculate them ? <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 你好, 我们在网络上的电机控制示例中使用了 PI 控制器。在您编写代码时,Mcat 会帮助计算所用 PI 控制器的参数(对于级联控制结构中的 PMSM,对于六步结构中的 BLDC)。目前,网上还没有使用 PID 控制器结构的示例,也没有可以帮助设置它的工具,但当然,我们的 AMCLIB 库也提供了此功能,作为客户控制结构的构建模块。 希望对您有所帮助。 顺祝商祺! 戴安娜
View full article
FRDM-IMX93 ASCII Board File Hello, I have pulled the FRDM-IMX93 Design Files from this link: https://www.nxp.com/design/design-center/development-boards-and-designs/frdm-i-mx-93-development-board:FRDM-IMX93 However I do not have Allegro or Extracta.exe to import them to Altium. Can you please supply the LAY-94611_B.brd in ACII format so I can import that into Altium? Thanks, Re: FRDM-IMX93 ASCII Board File Hello, I´m also in need for this file to understand the board better and help development. can you send it to me? Re: FRDM-IMX93 ASCII Board File HI @Cwootton! Thank you for reaching out to NXP Support! I will be sending the required files to you via email shortly. Best regards, Chavira
View full article
i.MX 95:M7 和 A55 之间的动态 TRDC/系统管理器资源分配和 GPIO 共享 大家好, 我们正在开发i.MX 95 平台,希望最初使用 M7 内核的 MIPI DSI 外设,然后在运行时将资源移交给 A55 内核。 据我们了解,外围资源及其所有权最初是 在 通过 系统管理器工具 生成/配置的 mx95evk.cfg 文件中为每个逻辑机器/处理器定义的。 我们想澄清以下几点: 动态资源交接: 是否可以在运行时将 MIPI DSI 外设资源从 M7 动态转移到 A55?例如,M7 最初拥有并使用 MIPI DSI,然后释放该资源,之后 A55 接管并使用同一外设。 动态资源分配: 如果支持运行时交接,那么动态更改资源所有权或访问权限的推荐机制/API是什么?这是通过系统管理器、TRDC还是其他机制处理的? GPIO共享: M7 和 A55 是否可以同时访问同一个 GPIO 端口/资源?如果可以,为了安全地共享 GPIO 资源,是否需要进行任何 TRDC 配置或实施任何软件同步机制? 我们非常希望得到关于在 i.MX 95 上实现M7 和 A55 之间的动态外围设备切换和/或资源共享的推荐方法的任何指导。 Re: i.MX 95: Dynamic TRDC/System Manager Resource Allocation and GPIO Sharing Between M7 and A55 你好, 在 i.MX 95 上,MIPI DSI 资源最初可由 M7 使用,之后移交给 A55。资源访问和所有权应通过系统管理器/TRDC 配置进行配置,而实际的运行时交接应由软件处理。TRDC 控制哪些逻辑机器/功能域可以访问外围设备,但它不管理 M7 和 A55 之间的同步。因此,M7 应先完成所有 DSI 操作,停止使用外围设备,并通过 MU/IPC 等核心间机制通知 A55,然后 A55 才能接管控制权。同样,通过适当的 TRDC 配置,可以使 GPIO 资源同时供 M7 和 A55 访问,但同时访问必须通过软件进行同步。对于 DSI 用例,建议的方法是每次只让一个核心积极使用外围设备,并使用 MU/IPC 进行切换。 Re: i.MX 95: Dynamic TRDC/System Manager Resource Allocation and GPIO Sharing Between M7 and A55 我已与AE团队讨论过,请参考以下更新。 在 i.MX 95 上,资源所有权和 TRDC 权限是在构建时静态地在 SM 配置 (mx95evk.cfg) 中定义的。→ 生成的config_.h 文件,并在 MIX 设备上电时由系统管理器 (SM) 应用。*运行时,没有 SCMI/SM 消息可以将外围设备的所有权从一个逻辑机 (LM) 转移到另一个逻辑机。 然而,SM 文档将“将显示屏从一个 LM 移交给另一个 LM”列为 SM_SCMI_PERM_EXCLUSIVE 模型的确切动机用例。所以交接是可以实现的,只是不能通过“转移”所有权来实现。 Q1 & Q2 — MIPI DSI M7 → A55 交接:如何操作 LMM(逻辑机器管理)SCMI 协议仅启动/重置/关闭/挂起/唤醒 LM——它没有 RESOURCE_ASSIGN 或 OWNERSHIP_TRANSFER 消息。请改用时分交接: 在 mx95evk.cfg 中预先授予 BOTH LMs 访问权限。默认情况下,EVK 配置仅将 MIPI_DSI、MIPI_PHY、DC_DISPENG、BLK_CTRL_DISPLAYMIX、显示时钟/电源(PD_DISPLAY、CLK_DISP*)分配给 AP(LM2)的所有者——您还必须将它们添加到 M7 LM(LM1)以允许 M7 优先使用。 将 SM 管理的资源(时钟、电源、RESET)标记为 SM_SCMI_PERM_EXCLUSIVE(api=all),这样来自两个 LM 的请求就不会被静默聚合/覆盖。 在切换时, M7 使 DSI/DCIF 静默,然后通过应用层 IPC(MU 邮箱或 SCMI 通知)向 A55 发出信号。A55(Linux/DRM DSI+DPU 协议栈)随后启动相同的 IP。 交接顺序是客户软件的责任(时间划分)。SM 仅保证 HW 可以从两侧驾驶,因为两个 LM 都已预先获得访问权限。TRDC 所有权不能在运行时重写——只有 SM 可以对 TRDC 进行编程,并且只能从 MIX 上电时的静态配置进行编程。 控制此功能的 TRDC 配置(在 .cfg 文件中定义): MDAC_am=… — 主功能域分配(将总线主控映射到功能域 ID) MBC_am=s.b— 内存块检查 —这是限制外围设备访问的地方。 MRC_am=… — 内存区域检查(大型内存区域,例如 DDR) 每个LM都绑定到一个DID,例如:SM did=2,AP(LM2) did=3,M7(LM1) did=4。 Q3 — M7 和 A55 之间共享 GPIO 是的,TRDC 可以同时授予 M7 功能域和 A55 功能域对同一 GPIO 实例的并发访问(为两个 DID 启用其 MBC 块)。但需要注意一个关键问题,并且有两种支持的模式: 注意: i.MX 95 GPIO没有硬件仲裁——PDR/DR/GDIR 寄存器是物理共享的,因此来自两个核心的非协调读-修改-写操作会相互竞争。 模式 A(不相交引脚 + SW 同步):按照约定为每个内核分配特定引脚(配置已按 LM 分割引脚)。由于数据/方向寄存器组仍然是共享的,因此需要使用硬件信号量/MU来保护并发 RMW,或者确保内核永远不会同时访问同一个寄存器组。 模式 B(SM 仲裁,推荐用于真正共享的实例):通过始终开启的GPIO1进行路由,该 GPIO1 由 SM 拥有,其记录的角色是“仲裁共享访问”。IOMUXC/IOMUX_GPR 同样由 SM 仲裁。Pinmux/daisy 通过 SCMI 引脚控制协议进行设置,并具有每个代理的权限;GPIO数据操作是直接 MMIO。
View full article
LPC5514JBD64E Use for WS2812. Hi, Is LPC5514JBD64E suitable for working with WS2812 for a beginner. If yes Where Can I get The Code and other Details.  Thank you. LPC55xx Re: LPC5514JBD64E Use for WS2812. hi @Kishore02  Thank you for your post! There is not information about the implementation of WS2812 for the LPC551x, you could use the Programmable Logic Unit to do it, in another devices there are example using the FlexIO modules like in application code hub for the MCXA366: https://mcuxpresso.nxp.com/appcodehub?search=an-emulating-ws2812-bus-with-flexio-on-mcx366  Also, there is a post of a colleague that implement it for a Kinetis board: NXP FlexIO Generator for the WS2812B LED Stripe Protocol Hope this information help as a reference  Re: LPC5514JBD64E Use for WS2812. The LPC5514JBD64E (featuring an ARM Cortex-M33 core running up to 150 MHz) is a powerful microcontroller, but it is not the ideal choice for a true beginner when working with WS2812 (NeoPixel) addressable LEDs.  Re: LPC5514JBD64E Use for WS2812. Yes, the LPC5514JBD64 can be used to drive WS2812 LEDs, although it may require configuring a timer/SCT or SPI-based interface to generate the precise WS2812 timing. For a beginner, I recommend starting with NXP’s MCUXpresso SDK examples and WS2812 driver examples, then adapting them to the LPC5514; the LPC5514 SDK documentation and sample code are available through NXP’s official MCUXpresso resources.
View full article
SC16IS740 最大晶体频率 尊敬的恩智浦技术支持团队: 我们使用 SC16IS740,电源电压为 3.3V。 请问能否确认可以直接连接在 XTAL1 和 XTAL2 之间的外部晶振(晶体振荡器)的最大频率是多少? 数据手册中提到: 适用于外部时钟,晶振(晶体振荡器)最大频率为 24 MHz。 感谢您的支持。 此致, 阿比舍克 Re: SC16IS740 Maximum Crystal Frequency 你好 AbishekDevan 再会! 是的,你说得对;使用外部晶体的极限是 24 MHz。 祝你今天过得愉快,一切顺利。
View full article
FRDM-MCXW71の2つのLPSPIポートをZephyrで使うのはどうですか? こんにちは、 FRDM-MCXW71の2つのLPSPIポートをZephyrアプリケーションで使いたいと考えています。 しかし、Zephyr 4.4.0で確認すると、下 Zephyrproject/Zephyr/ボード/NXP/frdm_mcxw71 以下のファイルが見つかりました。 frdm_mcxw_71.dts ファイル。 そこには&lpspi1のエントリしかありません。(SPIフラッシュデモで使用) &lpspi0 のエントリが存在しません。 frdm_mcxw71-pinctrl.dtsi また、&lpspi1 のエントリのみ lpspi0の使い方に関する例はありますか? 通常のZephyrプロジェクトファイル(.overlayやprj.conf)以外で、どのファイルを変更する必要がありますか? ありがとうございます。 Re: Using the two LPSPI ports on the FRDM-MCXW71 with Zephyr? zephyrproject/zephyr/drivers/spi/spi_nxp_lpspiで特定のドライバーを見つけました。 ただ、両方のLPSPIポートにどう使えるのかはよくわかりません。 Re: Using the two LPSPI ports on the FRDM-MCXW71 with Zephyr? こんにちは、お元気でお過ごしでしょうか。 lpspi0とlpspi1は、すでにzephyr/dts/arm/nxp/mcx/nxp_mcxw7x_common.dtsiでSoCレベルで宣言されており、必要なハードウェアプロパティ(レジスタ、割り込み、クロック、FIFOサイズ)がすべて含まれていますが、デフォルトではstatus = "disabled"に設定されています。ボードファイルfrdm_mcxw71.dtsはlpspi1だけを有効にしますが、lpspi0もアプリケーションのオーバーレイファイルを通じて同様に有効化できます。 既存のLPPspy1構成を参考にしてください。基本的なオーバーレイはこんな感じで、カスタムデバイス実装で拡張できます: &pinctrl { pinmux_lpspi0: pinmux_lpspi0 { group0 { pinmux = , , , ; slew-rate = "fast"; drive-strength = "low"; }; }; }; &lpspi0 { status = "okay"; pinctrl-0 = <&pinmux_lpspi0>; pinctrl-names = "default"; }; よろしくお願いします、 ソフィア。 Re: Using the two LPSPI ports on the FRDM-MCXW71 with Zephyr? こんにちは、ソフィアさん。 提案通り、オーバーレイの追加を加えた最小限のアプリケーションを作成しました。 アプリケーションはコンパイルされましたが、spiデバイスのバインドは依然として失敗しました。 オーバーレイ部分にラベルが加わった場合にのみ、製本は機能します。 重ねて表示: &lpspi0 { ... label = "LPSPI_0"; } &lpspi1 { ... label = "LPSPI_1"; } main.c 内: const struct device *lpspi0_dev; lpspi0_dev = device_get_binding("LPSPI_0"); printk("%p\n,lpspi0_dev); lpspi0とlpspi1の両方でこの操作を行うと、現在は正常に動作するようです。 各アプリケーションごとにラベルを作成することが期待されているのでしょうか? よろしくお願いします。 ヘールト
View full article
CodeWarrior 5.1 debugger. "Disable maskable ISR's when stepping" I-bit permanently set on 9S12XEQ512 Environment: IDE: CodeWarrior 5.1 (HC(S)12X compiler) Target: MC9S12XEQ512 Bus clock: 49.777 MHz BDM interface: reproducible with USB Multilink Universal; not observed with Cyclone Pro Host OS: observed on both Windows 10 and Windows 11 Memory model: reproducible in Large model; not (or much less) reproducible in Banked model Setting used: "HC12MultilinkCyclonePro" → "Setup..." → "Debug otions " → "Disable maskable ISR's when stepping" — enabled. Description: After a number of step operations (single step or step over) in the debugger, the maskable interrupts (I bit in CCR) become permanently disabled. Interrupts do not resume even after continuing execution (Run/Go) — they remain masked until the I bit is manually cleared in the CCR register view. This behavior is consistently reproducible in the Large memory model using the USB Multilink Universal BDM interface, on both Windows 10 and Windows 11 hosts. The issue has not been observed with the Cyclone Pro interface under otherwise identical project settings, nor (or much less) in the Banked memory model Workaround currently in use: Manually clearing the I bit in the CCR register view after it becomes stuck. Request: Is this a known issue with the USB Multilink Universal firmware/driver in combination with CodeWarrior 5.1's stepping emulation on the S12X core? Is there a fixed Multilink Universal firmware version, or a recommended alternative workflow for debugging interrupt-driven Large-model projects on this device/interface combination? Thank you Re: CodeWarrior 5.1 debugger. "Disable maskable ISR's when stepping" I-bit permanently set Hi, The behavior you are seeing is real and the interface difference you noticed (Multilink Universal affected, Cyclone Pro not) is a useful observation. Let me give you some practical guidance based on the type of interrupts involved, because the options differ. For timer-based interrupts If your application uses timer overflow, output compare, or similar peripheral-generated interrupts, you do not actually need the "Disable maskable ISR's when stepping" feature to handle them during debugging. Most S12X timer and peripheral modules have a FRZ bit that freezes the module when the device enters BDM active mode, which happens automatically during any halt or single step. With FRZ set, the timer stops counting during stepping and cannot generate an interrupt between steps. This works at the hardware level, independent of the debugger interface, and is the cleaner solution for this class of interrupt. For external interrupts and keyboard interrupts (KBI) This is where the situation is more limited. External IRQ and KBI interrupts are asynchronous external signals and there is no hardware freeze mechanism for them. The BDM interface cannot suppress them at the hardware level. The "Disable maskable ISR's when stepping" feature exists precisely to cover this gap by masking them through the CCR I bit during each step. Since this feature is not restoring the I bit correctly with the USB Multilink Universal in your setup, the most reliable option for debugging code that uses these interrupt sources is to use the Cyclone Pro, which you have already confirmed behaves correctly. Worth trying It is also worth testing with CodeWarrior 5.2 if you have access to it. There were some debugger-side changes in that version and the I-bit restoration behavior under the Large memory model with the USB Multilink Universal may be improved, though this cannot be guaranteed. Hope this helps clarify the options. Ladislav
View full article
Using the two LPSPI ports on the FRDM-MCXW71 with Zephyr? Hello, We want to use the two LPSPI ports on the FRDM-MCXW71 in a Zephyr application. However when I check in Zephyr 4.4.0, under zephyrproject/zephyr/boards/nxp/frdm_mcxw71 I find the following files: frdm_mcxw_71.dts file. It only has an entry for &lpspi1. (used in the spi flash demo) The entry for &lpspi0 is not present? frdm_mcxw71-pinctrl.dtsi Also only an entry for &lpspi1 Is there an example on how to use lpspi0 as well? Which files outside of the regular zephyr project files (.overlay and prj.conf) need to be modified? Thanks. Re: Using the two LPSPI ports on the FRDM-MCXW71 with Zephyr? I noticed a specific driver in zephyrproject/zephyr/drivers/spi/spi_nxp_lpspi. Not sure how this can be used for addressing both lpspi ports though. Re: Using the two LPSPI ports on the FRDM-MCXW71 with Zephyr? Hello, hope you are doing well. Both lpspi0 and lpspi1 are already declared at the SoC level in zephyr/dts/arm/nxp/mcx/nxp_mcxw7x_common.dtsi with all required hardware properties (registers, interrupts, clocks, FIFO sizes), but set to status = "disabled" by default. The board file frdm_mcxw71.dts only enables lpspi1 but lpspi0 can be enabled in the same way through your application overlay file. You can take the existing lpspi1 configuration as reference. The basic overlay would look something like this, which you can then extend with your custom device implementation: &pinctrl { pinmux_lpspi0: pinmux_lpspi0 { group0 { pinmux = , , , ; slew-rate = "fast"; drive-strength = "low"; }; }; }; &lpspi0 { status = "okay"; pinctrl-0 = <&pinmux_lpspi0>; pinctrl-names = "default"; }; Best regards, Sofia. Re: Using the two LPSPI ports on the FRDM-MCXW71 with Zephyr? Hi Sofia, I have created a minimal application with the overlay additions as suggested. The application compiled, but binding the spi devices still failed. Only when a label is added in the overlay sections, the binding works. In overlay: &lpspi0 { ... label = "LPSPI_0"; } &lpspi1 { ... label = "LPSPI_1"; } In main.c: const struct device *lpspi0_dev; lpspi0_dev = device_get_binding("LPSPI_0"); printk("%p\n,lpspi0_dev); Doing this for both lpspi0 and lpspi1 seems to work now. Is it expected to create those labels with each application?  Thanks, Geert
View full article