Multi Source Translation Content

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Multi Source Translation Content

讨论

排序依据:
Can an eBike motor get wet? Yes! An eBike motor can get wet from rain, mud, and splashing puddles, but it is water-resistant, not waterproof. This means your eBike can handle normal wet weather, but it will suffer severe damage if it gets submerged in deep water or blasted with a pressure washer. Using the Himiway D5 2.0 as a reference, here is everything you need to know about how your motor handles water, its safety limits, and how to maintain it after a wet ride. Can an eBike motor get wet.png Real-World Boundaries: What's Safe vs. What's Dangerous The Himiway D5 2.0 is an all-terrain fat-tire eBike built to handle mud, rain, and off-road trails. However, its powerful 750W rear hub motor still operates under key physical limits. What is safe: Riding through steady rain, splashing through shallow puddles, navigating wet off-road trails, and wiping down your frame with a damp cloth or soft brush. What is dangerous: Riding through deep streams or flooded streets where water reaches the center of the wheel hubs, riding in torrential downpours for hours, or using a high-pressure hose. High-pressure water forces moisture past rubber gaskets and into internal electronics. The "Thermal Vacuum" Risk: When you push your Himiway D5 2.0 hard up a steep hill, the hub motor warms up. If you immediately plunge that hot motor into a cold puddle or creek, the air inside contracts rapidly. This sudden cooling creates a vacuum effect that can pull moisture past the seals and directly into the internal circuitry. Understanding Ingress Protection (IP) Ratings Most eBikes use standard IP (Ingress Protection) ratings to define how well their motors and battery systems resist dust and moisture: IP Rating Level of Protection Real-World Application IPX4 Splashes from any angle Light drizzle and small splashes IPX5 Low-pressure water jets Moderate rain and road spray (Standard for Himiway D5 2.0 components) IPX6 Powerful high-pressure jets Heavy downpours and thick mud spray IPX7 Temporary submersion Shallow submersion up to 30 mins (Rarely found on standard eBikes) Note on the Himiway D5 2.0: The D5 2.0's motor, battery, and display screen carry solid IPX5/IPX6-equivalent weather sealing. It is engineered to keep wet trail spray and heavy rain out, provided the seals are not blasted with high pressure. 4 Rules for Wet Weather Maintenance Taking care of your eBike after a wet ride keeps the electronics dry and prevents corrosion over time. Ditch the Pressure Washer: Stick to a bucket of warm water, a gentle soap, a soft brush, and a low-pressure garden hose spray if needed. Dry Key Components Immediately: After riding through rain or mud, use a micro-fiber towel to wipe down the rear motor casing, display, throttle controls, and battery contacts. Never Store It Wet: Park your bike in a warm, dry room or garage so lingering surface humidity can evaporate naturally. If water got near the battery housing, drop the battery out to let the compartment air dry. Don't Power On a Flooded Bike: If you suspect deep water reached the interior of the motor or controller, leave the power off. Allow the bike to dry completely for 24 to 48 hours before turning it back on to avoid short-circuiting the system.
查看全文
SPC入力がWUUに伝わらず、デバイスが起動しない [MCXN947との連携] SPCでは、低電力モードとアクティブモードの両方で、電圧検出割り込みを有効にしています(リセットは無効)。アクティブモードはリセットを無効にし、バンドギャップを有効にしています。 SPC0->ACTIVE_CFG: 3f101615 SPC0->LP_CFG: 3f221515 SPC0->VD_IO_CFG: 0000000a SPC0->VD_SYS_CFG: 0000000a SPC0->VD_CORE_CFG: 0000000a WUUでSPCをウェイクアップソースとして有効にしました(WUU->MEビットが設定されています)。 SPC割り込みはアクティブモードで動作しますが、電源オフモードでは動作しません。つまり、プロセッサはSPC割り込みを処理するためにウェイクアウトしません。 MCX N Re: SPC input to WUU not waking device おそらく動作しているとは思うが、アクティブモードとパワーダウンモードでは反応に大きな違いがある。アクティブモードでは、SPC割り込みはより迅速に応答し、繰り返し発生しますが、パワーダウンモードからは、割り込みが発生するまでに非常に時間がかかり、一度しか発生しません。 Re: SPC input to WUU not waking device こんにちは、 @robert_hines さん。 電源オフモードからのウェイクアップレイテンシは、アクティブモードの割り込み応答時間よりも長くなると予想されます。電源オフモードでは、MCUの大部分が静的状態にあります。より深い低消費電力モードに入る際のトレードオフの一つは、そのモードの入り出時にレイテンシが増えることです。 割り込みが一度だけ発生する問題については、アプリケーションコードの処理に問題があるのではないかと疑っています。SDKに含まれるpower_mode_switch例を参照し、実装とあなたのコードを比較していただけますか? それでも問題が解決しない場合は、FRDM-MCXN947ボード上で問題を再現できる簡単なプロジェクトを提供してください。喜んでさらに詳しく調査いたします。 よろしくお願いします。 BR アリス Re: SPC input to WUU not waking device 状況は以下のとおりです。 - FreeRTOSへの移植 - 低電力タイマーを使用して、PM_EnterLowPower()で電源オフモードに移行します。 - IRQHandlers は setFromISR() と portYIELD_FROM_ISR() を使用します - 高優先度タスクがISRで設定されたイベントビットを待機している場合、xEventGroupWaitBits() - 一部の割り込みはWUUを経由して電源オフモードで利用可能にしており、外部ピンの一部(正常に動作しているようです)や、SPCが遅い/応答しない点を除き、問題なく動作する内部モジュール(VBAT、LPTMR、TDET、SPC)も含まれます。 - SPC割り込みはIRQHandlerで無効化され、イベントビットの設定を待つ高優先度タスクで処理された後に再有効化されます。この待機タスクはイベント情報ビットのプロセッシング後に再び PM_EnterLowPower() を呼び出します。 問題は、SPC割り込みが他の割り込みと同じように応答しないことだ。プロセッサが起動しても再びスリープに戻り、再びトリガーされません。アクティブモードで電源が切れても、発火は続けます(PM_EnterLowPower()でプロセッサを再び電源オフモードに戻せません)。
查看全文
[i.MX95/AAOS16]ブリングアップ支援 ハードウェア: i.MX95 15x15 SW: AAOS16_1.3.0 ほぼすべてのファイルにパッチを適用しました。 しかし、カーネル起動の問題は依然として残っている。 リチャード・キムのサポートが必要です。 Re: [i.MX95/AAOS16] Bringup support こんにちは、 @Jaeheon-Sim_Mobis さん、 改訂版ガイドラインを添付いたしましたのでご確認ください。 また、パッチされたすべてのファイルを正しいディレクトリ構造で添付しているので、ソースツリーで直接上書きできるようにしています。 よろしくお願いします。 Re: [i.MX95/AAOS16] Bringup support これは15x15サイズのFRDM-MX95にも使えますか? Re: [i.MX95/AAOS16] Bringup support いいえ、それらのパッチはi.MX95 15x15 EVKをベースにしたカスタムボード用です。
查看全文
采用LCU互补PWM和死区时间实现6步BLDC换向的推荐方法是什么? 大家好, 我正在使用S32K311 开发一个三相无刷直流电机六步换向项目: 用于 PWM 生成的 eMIOS TRGMUX 拉库 GD3000闸门驱动器 RTD 5.0.0 我的相位映射图是: U_HS = eMIOS ch0 U_LS = eMIOS ch1 V_HS = eMIOS ch2 V_LS = eMIOS ch3 W_HS = eMIOS ch4 W_LS = eMIOS ch5 我使用以下 LUT 值: #define LCU_LUT_OFF 0x0000U #define LCU_LUT_PWM 0xAAAAU #define LCU_LUT_INV_PWM 0x5555U #define LCU_LUT_ON 0xFFFFU 最初,我通过在每个扇区动态更改查找表 (LUT) 来实现换向: Lcu_Ip_SetSyncOutputLutControl(LCU_LutList, 6U); V+ / W- 示例: Emios_Pwm_Ip_SetDutyCycle(EMIOS_INSTANCE, PWM_CHANNEL_V_HS, activeDuty); LCU_LutList[PWM_CHANNEL_V_HS].Value = LCU_LUT_PWM; LCU_LutList[PWM_CHANNEL_V_LS].Value = LCU_LUT_INV_PWM; LCU_LutList[PWM_CHANNEL_W_LS].Value = LCU_LUT_ON; Lcu_Ip_SetSyncOutputLutControl(LCU_LutList, 6U); 出现了一个奇怪的问题: 如果在循环之前配置一次 V_HS,则会出现 PWM。 进入换向循环并反复调用 Lcu_Ip_SetSyncOutputLutControl() 后,V_HS 停止切换,而其他通道继续工作。 这让我不禁思考,动态同步 LUT 更新是否是电机换向的正确方法。   我的主要问题 对于S32K311 + GD3000 ,推荐的架构是什么? 3对互补的PWM对 死时间插入 六步换算 安全切换 我应该: 保持 LCU LUT静态(PWM / INV_PWM),仅通过改变LCU 输出使能/覆盖状态来执行换向? 是否使用 Lcu_Ip_SetOutputLutControl()(立即更新)代替 Lcu_Ip_SetSyncOutputLutControl()? 完全避免动态 LUT 重写?   死时间问题 我想利用 LCU 生成具有死区时间的互补 PWM 。 预期方法是否为: 使用 eMIOS 仅生成 3 个基本 PWM(U、V、W), 将它们通过 TRGMUX 路由到 LCU, 使用固定 LUT:HS = 0xAAAA LS = 0x5555 在LCU输出/滤波器设置中配置死区时间, 然后仅更改每个换向扇区的输出启用/覆盖设置? 如果 NXP 有示例(RTD 或 MBDT)演示了带有 LCU 互补 PWM 和死区时间插入的 6 步 BLDC ,我将非常感激您提供参考,引用。 谢谢! Re: Recommended way to implement 6-step BLDC commutation with LCU complementary PWM and dead time? 您好@Esakki 您可以参考以下链接中的电机解决方案,您可以在此页面找到演示代码和应用程序节点: https://www.nxp.com/design/design-center/development-boards-and-designs/MCSPTE1AK344 例如,在 BLDC 的六步法中,改变电机的旋转方向通常不是通过更新 LCU 的状态来实现的,您可以查看我们的演示代码和应用程序节点。
查看全文
发送协议 大家好 我正在尝试弄清楚如何在 S32K311 PCB 板上实现 SENT 协议,以检测致动器的位置,因为它有一个位置传感器。由于 NXP 没有与 SENT 协议相关的块集。如果有人愿意分享,那将对我们非常有帮助。 Re: SENT Protocol 您好@ Ganesh808 如果您正在使用 S32 DS + RTD,我们的 S32 DS 示例代码提供了一个使用 flexio 实现 SENT 协议的演示。 Senlent_0-1785740424865.png 如果你使用的是 MBDT,以下是我见过的一个类似答案: https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/SENT-Protocol-Support-in-S32K3-MBDT/td-p/1775025 如果您在使用 MBDT 开发项目时遇到任何问题,请下次在 MBDT 论坛中提问。这是一个专门用于回答MBDT问题的论坛。
查看全文
S32K3 DMA logic link channel Hello, How should I use the DMA logic link channel function (major loop or minor loop)? I use channel 0 to link to channel 1. Why does channel 0 complete the transport and cause an interruption, but channel 1 does not transport any data. Attached is my test project BR Jason 回复: S32K3 DMA logic link channel Jason22_0-1785726345456.png This configuration needs to be checked
查看全文
eバイクのモーターはCAN濡れることはありますか? はい!eバイクのモーターは雨や泥、水たまりで濡れることがありますが、水道ではなく水道耐性があります。 つまり、eバイクは通常の雨天にも耐えられますが、深い水道に浸かったり高圧洗浄機で洗浄したりすると大きな損傷を受けます。 Himiway D5 2.0を参考にして、モーターの水道の扱い方、セーフティ限界、そして濡れた走行後のメンテナンス方法について知っておくべきことをすべてご紹介します。 Can an eBike motor get wet.png 現実世界の境界線:安全なものと危険なもの Himiway D5 2.0は、泥道、雨天、オフロードコースにも対応できるよう設計された、全地形対応のファットタイヤ電動自転車です。しかし、その強力な750Wリアハブモーターは、依然としていくつかの物理的な限界の中で動作する。 安全な走行方法:降り続く雨の中を走行すること、浅い水たまりをはためきながら走ること、濡れたオフロードを走行すること、そしてフレームを湿らせた布や柔らかいブラシで拭くこと。 危険なこと:深い小川や水没した通りを走り、水道がホイールハブの中心に達すること、豪雨の中を何時間も走ること、または高圧ホースの使用。高圧の水道はゴム製ガスケットを通って湿気を内部の電子機器に送り込みます。 「熱真空」のリスク: Himiway D5 2.0 を急な坂道で強く押すと、ハブモーターが熱くなります。熱くなったモーターをすぐに冷たい水たまりや小川に浸けると、内部の空気が急速に収縮します。この急激な冷却により真空効果が発生し、湿気がシールを越えて内部回路に直接引き込まれます。 侵入保護等級(IP等級)の理解 ほとんどの電動自転車は、モーターとバッテリーシステムが粉塵や湿気にどれだけ耐えられるかを定義するために、標準的なIP(侵入保護)規格を使用しています。 IP評価 保護レベル 実世界でのアプリケーション IPX4 あらゆる角度からの飛沫 小雨と小さな水しぶき IPX5 低圧水道噴射 中程度の雨と路面からの水しぶき(Himiway D5 2.0コンポーネントの標準仕様) IPX6 強力な高圧ジェット 激しい豪雨と濃い泥しぶき IPX7 一時的な水没 最大30分間の浅い水没に耐える(一般的な電動自転車ではめったに見られない機能) Himiway D5 2.0に関する注記:D5 2.0のモーター、バッテリー、およびディスプレイ画面は、IPX5/IPX6相当の優れた防水性能を備えています。シール部分に高圧が加えられない限り、濡れた路面からの水しぶきや激しい雨を防ぐように設計されています。 雨天時のメンテナンスに関する4つのルール 雨天走行後に電動自転車を適切に手入れすることで、電子機器を乾燥した状態に保ち、経年劣化による腐食を防ぐことができます。 高圧洗浄機をやめましょう:温かい水道の入ったバケツ、優しい石鹸、柔らかいブラシ、必要なら低圧のガーデンホーススプレーを使いましょう。 キー部品をすぐに乾燥させる:雨や泥の中を走った後は、マイクロファイバータオルでリアモーターケース、ディスプレイ、スロットルコントロール、バッテリーお問い合わせを拭き取ってください。 濡れた状態で保管しないでください:自転車は暖かく乾燥した部屋やガレージに停め、表面の湿気が自然に蒸発しやすくしましょう。もし水道がバッテリーハウジングの近くに入った場合は、バッテリーを抜いてコンパートメントを自然乾燥させてください。 浸水したバイクの電源を入れないでください:モーターやコントローラの内部に深い水道が達していると疑われる場合は、電源を切ったままにしてください。システムのショートを防ぐため、バイクの電源を入れる前に、24時間から48時間かけて完全に乾燥させてください。
查看全文
S32K3 DMA 逻辑链路通道 你好, 我应该如何使用DMA逻辑链路通道功能(主循环或次循环)?我使用通道 0 连接到通道 1。为什么通道 0 完成了传输并导致中断,而通道 1 没有传输任何数据? 附件是我的测试项目 BR 杰森 回复: S32K3 DMA logic link channel Jason22_0-1785726345456.png 需要检查此配置。
查看全文
LCU補完PWMとデッドタイムを用いた6ステップBLDC整流を実装するための推奨方法は? こんにちは、皆さん 私は S32K311を用いて3相のBLDCの6ステップ通勤プロジェクト に取り組んでいます。 PWM生成用eMIOS TRGMUX LCU GD3000ゲートドライバー RTD 5.0.0 私の位相マッピングは次のとおりです。 U_HS = eMIOS ch0 U_LS = eMIOS ch1 V_HS = eMIOS ch2 V_LS = eMIOS ch3 W_HS = eMIOS ch4 W_LS = eMIOS ch5 私は以下のLUT値を使用しています。 #define LCU_LUT_OFF 0x0000U #define LCU_LUT_PWM 0xAAAAU #define LCU_LUT_INV_PWM 0x5555U #define LCU_LUT_ON 0xFFFFU 当初、私は各セクターごとにLUTを動的に変更することで、以下の方法で切り替えを実装しました。 Lcu_Ip_SetSyncOutputLutControl(LCU_LutList, 6U); V+ / W- の例: Emios_Pwm_Ip_SetDutyCycle(EMIOS_INSTANCE, PWM_CHANNEL_V_HS, activeDuty); LCU_LutList[PWM_CHANNEL_V_HS].Value = LCU_LUT_PWM; LCU_LutList[PWM_CHANNEL_V_LS].Value = LCU_LUT_INV_PWM; LCU_LutList[PWM_CHANNEL_W_LS].Value = LCU_LUT_ON; Lcu_Ip_SetSyncOutputLutControl(LCU_LutList, 6U); 奇妙な問題が発生する: ループの前に一度V_HSを設定すると、PWMが利用可能になります。 整流ループに入り、Lcu_Ip_SetSyncOutputLutControl()を繰り返し呼び出すと、V_HSはスイッチングを停止しますが、他のチャネルは動作を続けます。 このことから、動的に同期されたLUT更新がモーター整流にとって正しいアプローチなのかどうか疑問に思った。   私の主な質問 S32K311 + GD3000の場合、推奨されるアーキテクチャは何ですか? 3つの相補的なPWMペア デッドタイム挿入 6ステップ整流 安全なスイッチング 私はすべきでしょうか? LCU LUT(PWM / INV_PWM)を静的に保ち、 LCU出力の有効/オーバーライド状態を変更するだけで整流を実行しますか? Lcu_Ip_SetSyncOutputLutControl() の代わりに Lcu_Ip_SetOutputLutControl() (即時更新) を使用してください。 動的なLUT書き換えを完全に回避する?   暇つぶしの質問 LCUを使用して、デッドタイム付きの相補PWMを生成したいと考えています。 意図された方法は以下の通りです: eMIOSで3つの基本PWM(U、V、W)のみを生成します。 TRGMUX を介して LCU にルーティングします。 固定LUTを使用する:HS = 0xAAAA LS = 0x5555 LCU出力/フィルタ設定でデッドタイムを設定します。 そして、各整流セクターの出力有効化/オーバーライドのみを変更するのですか? NXPのサンプル(RTDまたはMBDT)で、LCUによる相補型PWMとデッドタイム挿入を用いた6ステップBLDCモーターの動作を示すものがあれば、ぜひご紹介いただけると幸いです。 ご回答をお待ちしています。 Re: Recommended way to implement 6-step BLDC commutation with LCU complementary PWM and dead time? こんにちは、 Esakkiさん。 以下のリンクで「Out Motor Solution」をCANを参照できます。デモコードとアプリケーションノードはこのページでご覧いただけます: https://www.nxp.com/design/design-center/development-boards-and-designs/MCSPTE1AK344 例えば、BLDCの6ステップ方法では、モーターの回転方向を変えるのは通常LCUの状態を更新しても達成できません。デモコードとアプリケーションノードをご覧ください。
查看全文
电动自行车电机可以进水吗? 是的!电动自行车电机可能会被雨水、泥浆和溅起的水坑弄湿,但它是防水的,不是完全防水的。 这意味着您的电动自行车可以应对一般的潮湿天气,但如果浸入深水中或被高压水枪冲洗,则会遭受严重损坏。 以Himiway D5 2.0为参考,引用,以下是您需要了解的有关电机如何处理水、其功能安全限制以及如何在湿滑路面行驶后对其进行维护的所有信息。 Can an eBike motor get wet.png 现实世界的界限:什么是安全的,什么是危险的 Himiway D5 2.0 是一款全地形胖胎电动自行车版本,专为应对泥泞、雨天和越野路段而设计。然而,其强大的 750W 后轮毂电机仍然受到关键物理限制的影响。 安全行为包括:在持续的雨中骑行、溅过浅水坑、行驶在潮湿的越野小径上,以及用湿布或软刷擦拭车架。 危险行为包括:骑车穿过水淹到车轮轮毂中心的深溪流或被洪水淹没的街道;在暴雨中骑行数小时;或使用高压水枪。高压水流会将水分压过橡胶垫圈,渗入内部电子元件。 “热真空”风险:当您用力推着 Himiway D5 2.0 上陡坡时,轮毂电机就会发热。如果你立即将滚烫的发动机浸入冰冷的水坑或小溪中,发动机内部的空气会迅速收缩。这种突然的冷却会产生真空效应,可以将水分吸入密封件之外,直接进入内部电路。 了解防护等级(IP) 大多数电动自行车使用标准的 IP(防护等级)来定义其电机和电池系统防尘防潮的性能: IP防护等级 实际应用 IPX4 任何角度溅起的水花 毛毛细雨和零星小雨 IPX5 低压水射流 中等雨量和路面溅水(Himiway D5 2.0 元器件的标准配置) IPX6 强劲的高压喷射 暴雨倾盆,泥浆飞溅 IPX7 暂时浸没 浅水浸泡时间最长可达 30 分钟(标准电动自行车很少具备此功能) 关于 Himiway D5 2.0 的说明:D5 2.0 的电机、电池和显示屏具有可靠的 IPX5/IPX6 等效防水密封性能。它经过特殊设计,可以防止潮湿的路面溅水和暴雨进入,前提是密封件不受高压冲击。 雨天维护的 4 条规则 雨天骑行后妥善保养电动自行车,可以保持电子元件干燥,防止长期腐蚀。 别用高压清洗机:只需一桶温水、温和的肥皂、软刷,必要时可用低压花园水管喷水即可。 立即擦干关键元器件:在雨中或泥泞中骑行后,使用超细纤维毛巾擦拭后电机外壳、显示屏、油门控制装置和电池触点。 切勿潮湿存放:将自行车停放在温暖干燥的房间或车库中,以便残留的表面湿气能够自然蒸发。如果水溅到电池仓附近,请取出电池,让电池仓风干。 不要启动进水的自行车:如果您怀疑深水已进入电机或控制器内部,请保持电源关闭。为避免系统短路,请让自行车完全干燥 24 至 48 小时后再重新启动。
查看全文
SPC 输入到 WUU 未唤醒设备 [与 MCXN947 合作] 我在 SPC 中启用了电压检测中断(禁用复位),无论是在低功耗模式还是运行模式下(禁用复位,启用带隙)。 SPC0->ACTIVE_CFG: 3f101615 SPC0->LP_CFG: 3f221515 SPC0->VD_IO_CFG: 0000000a SPC0->VD_SYS_CFG: 0000000a SPC0->VD_CORE_CFG: 0000000a 我已在 WUU 中启用 SPC 作为唤醒源(WUU->ME 位已设置)。 SPC 中断在运行模式下工作,但在掉电模式下不工作,即处理器不会唤醒来处理 SPC 中断。 MCX N Re: SPC input to WUU not waking device 我觉得它可能在工作,但是工作模式和断电模式下的响应速度差异很大。在运行模式下,SPC 中断响应速度更快,会反复触发;但在掉电模式下,触发信号中断所需的时间要长得多,而且只会触发信号一次。 Re: SPC input to WUU not waking device 嗨@robert_hines 预计从断电模式唤醒的延迟时间将比运行模式下的中断响应时间长。在断电模式下,MCU 的大部分功能处于静态状态。进入更深层次的低功耗模式的弊端之一是进入和退出该模式时延迟会增加。 关于中断只发生一次的问题,我怀疑可能是应用程序代码处理方面存在问题。请您参考 SDK 中包含的 power_mode_switch 示例,并将实现方式与您的代码进行比较? 如果问题仍然存在,请提供一个简单的项目,以便在 FRDM-MCXN947 板上重现该问题。我很乐意进一步调查此事。 谢谢! BR 爱丽丝 Re: SPC input to WUU not waking device 上下文是: - FreeRTOS 移植 - 使用低功耗定时器进入关机模式,命令为 PM_EnterLowPower()。 - IRQHandlers 使用 setFromISR() 和 portYIELD_FROM_ISR() - 一个高优先级任务正在等待 ISR 中设置的事件位,xEventGroupWaitBits() - 一些中断通过 WUU 路由,以便在掉电模式下可用,包括一些外部引脚(似乎工作正常)和一些内部模块(VBAT、LPTMR、TDET、SPC),这些模块似乎工作正常,但 SPC 速度慢/无响应。 - SPC 中断在 IRQHandler 中被禁用,并在等待事件位设置的高优先级任务处理完毕后重新启用。该等待任务在处理事件位后还会再次调用 PM_EnterLowPower()。 问题在于SPC中断的响应方式与其他中断不同。当处理器被唤醒后,它会再次进入睡眠状态,并且不会再次发出触发信号。当它在运行模式下关闭时,它会继续触发(PM_EnterLowPower() 无法将处理器恢复到关机模式)。
查看全文
Recommended way to implement 6-step BLDC commutation with LCU complementary PWM and dead time? Hi everyone, I am working on a 3-phase BLDC 6-step commutation project on S32K311 using: eMIOS for PWM generation TRGMUX LCU GD3000 gate driver RTD 5.0.0 My phase mapping is: U_HS = eMIOS ch0 U_LS = eMIOS ch1 V_HS = eMIOS ch2 V_LS = eMIOS ch3 W_HS = eMIOS ch4 W_LS = eMIOS ch5 I use the following LUT values: #define LCU_LUT_OFF 0x0000U #define LCU_LUT_PWM 0xAAAAU #define LCU_LUT_INV_PWM 0x5555U #define LCU_LUT_ON 0xFFFFU Initially I implemented commutation by dynamically changing the LUTs every sector using: Lcu_Ip_SetSyncOutputLutControl(LCU_LutList, 6U); Example for V+ / W-: Emios_Pwm_Ip_SetDutyCycle(EMIOS_INSTANCE, PWM_CHANNEL_V_HS, activeDuty); LCU_LutList[PWM_CHANNEL_V_HS].Value = LCU_LUT_PWM; LCU_LutList[PWM_CHANNEL_V_LS].Value = LCU_LUT_INV_PWM; LCU_LutList[PWM_CHANNEL_W_LS].Value = LCU_LUT_ON; Lcu_Ip_SetSyncOutputLutControl(LCU_LutList, 6U); A strange issue occurs: If I configure V_HS once before the loop, PWM is present. After entering the commutation loop and repeatedly calling Lcu_Ip_SetSyncOutputLutControl(), V_HS stops switching, while the other channels continue to work. This made me wonder whether dynamic synchronized LUT updates are the correct approach for motor commutation.   My main question For S32K311 + GD3000, what is the recommended architecture for: 3 complementary PWM pairs dead-time insertion 6-step commutation safe switching Should I: Keep the LCU LUTs static (PWM / INV_PWM) and perform commutation only by changing LCU output enable/override states? Use Lcu_Ip_SetOutputLutControl() (immediate update) instead of Lcu_Ip_SetSyncOutputLutControl()? Avoid dynamic LUT rewriting completely?   Dead-time question I would like to generate complementary PWM with dead time using the LCU. Is the intended method to: Generate only 3 base PWMs with eMIOS (U, V, W), Route them through TRGMUX to the LCU, Use fixed LUTs: HS = 0xAAAA LS = 0x5555 Configure dead time in the LCU output/filter settings, And then change only the output enable/override for each commutation sector? If there is an NXP example (RTD or MBDT) that demonstrates 6-step BLDC with LCU complementary PWM and dead-time insertion, I would greatly appreciate a reference. Thank you! Re: Recommended way to implement 6-step BLDC commutation with LCU complementary PWM and dead time? Hi@Esakki you can refer to out motor solution in the link below, you can find the demo code and application node in this page: https://www.nxp.com/design/design-center/development-boards-and-designs/MCSPTE1AK344 For example, in the six-step method for BLDC, changing the rotation direction of the motor is usually not achieved by updating the state of the LCU, you can take a look at our demo code and application node.
查看全文
[i.MX95/AAOS16] 启动支持 硬件:i.MX95 15x15 软件版本:AAOS16_1.3.0 我们修补了几乎所有文件。 但是,仍然存在内核启动问题。 需要理查德·金的支持。 Re: [i.MX95/AAOS16] Bringup support 你好@Jaeheon-Sim_Mobis , 请查收附件中的修订版指南。 我还附上了所有已打补丁的文件,并附上了正确的目录结构,以便您可以直接在源代码树中覆盖它们。 谢谢! Re: [i.MX95/AAOS16] Bringup support 这个适用于 15x15 frdm-mx95 吗? Re: [i.MX95/AAOS16] Bringup support 不,这些补丁是为基于 i.MX95 15x15 EVK 的定制板准备的。
查看全文
S32K3 DMAロジックリンクチャネル こんにちは、 DMAのロジックリンクチャネル機能(メジャーループかマイナーループか)はどのように使えばよいでしょうか?チャネル0を使ってチャネル1に接続しています。なぜチャネル0はトランスポートを完了して中断を引き起こすのに、チャネル1はデータを一切転送しないのでしょうか。 テストプロジェクトを添付します。 BR ジェイソン 回复: S32K3 DMA logic link channel Jason22_0-1785726345456.png この設定を確認する必要があります
查看全文
SENTプロトコル こんにちは、コミュニティの皆さん。 位置センサが付いているアクチュエータの位置検出のためにS32K311基板上でSENTプロトコルを実装する方法を模索しています。NXPはSENTプロトコルに関連するブロックセットを持っていません。どなたか情報を共有していただけると大変助かります。 Re: SENT Protocol こんにちは、@ Ganesh808 S32 DS + RTD を使用している場合は、弊社の S32 DS サンプルコードに flexio を使用して SENT プロトコルを実装するデモが含まれています。 Senlent_0-1785740424865.png MBDTを使用している場合、以下のような同様の回答を見たことがあります。 https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/SENT-Protocol-Support-in-S32K3-MBDT/td-p/1775025 MBDTを使用してプロジェクトを開発していて問題が発生した場合は、次回からはMBDTフォーラムで質問してください。ここはMBDTに関する質問に答えるための専用フォーラムです。
查看全文
SC667512MVAのデータシートを入手する方法 親愛なるNXPサポートチームへ、 公式の SC667512MVAデータシートをどのように入手できるかをお尋ねしたいので書いています。   この書類を入手するために必要な手続きについて教えてください。 よろしくお願いします。 よろしくお願いいたします。 Re: How to obtain datasheet for SC667512MVA こんにちは@シェニエ SC667512MVAはカスタム部品番号です。カスタムデバイスのドキュメントは、その部品が開発された特定のお客様のみが利用可能です。残念ながら、このデバイスに関するドキュメントの共有やアクセスの許可はありません。 よろしくお願いいたします。 ルーカス
查看全文
SPC input to WUU not waking device [Working with MCXN947] I have voltage detect interrupts enabled (resets disabled) in SPC in both low-power and active modes (resets disabled, bandgaps enabled). SPC0->ACTIVE_CFG:  3f101615 SPC0->LP_CFG:      3f221515 SPC0->VD_IO_CFG:   0000000a SPC0->VD_SYS_CFG:  0000000a SPC0->VD_CORE_CFG: 0000000a I've enabled SPC as a wake-up source in the WUU (WUU->ME bit is set). The SPC interrupt works in active mode, but not in power-down mode, i.e. the processor doesn't wake to handle the SPC interrupt. MCXN Re: SPC input to WUU not waking device I think it may be working, but there's a large difference in the response between active and power-down mode.  In active mode, the SPC interrupt will respond more quickly and go off repeatedly, but from power-down mode, it takes much longer to trigger the interrupt and it only triggers once. Re: SPC input to WUU not waking device Hi @robert_hines  The wake-up latency from Power-down mode is expected to be longer than the interrupt response time in Active mode. In Power-down mode, most of the MCU is in a static state. One of the trade-offs of entering a deeper low-power mode is the increased latency when entering and exiting that mode. Regarding the issue where the interrupt only occurs once, I suspect there may be an issue in the application code handling. Could you please refer to the power_mode_switch example included in the SDK and compare the implementation with your code? If the issue still persists, please provide a simple project that can reproduce the problem on the FRDM-MCXN947 board. I will be happy to investigate it further. Thank you. BR Alice Re: SPC input to WUU not waking device The context is: - FreeRTOS port - Going into power-down mode with PM_EnterLowPower( ) using a low-power timer. - IRQHandlers use setFromISR() and portYIELD_FROM_ISR() - a high-priority task is waiting for the event bits set from ISR, xEventGroupWaitBits() - some interrupts are routed through the WUU so that they are available in powerdown mode, including some external pins (seem to work fine) and some internal modules (VBAT, LPTMR, TDET, SPC) that seem to work fine, with the exception of SPC being slow/unresponsive. - The SPC interrupt is disabled in the IRQHandler and re-enabled after being processed in the high-priority task that is waiting for event bits to be set.  This waiting task also calls PM_EnterLowPower() again after processing event bits. The "problem" is that the SPC interrupt doesn't respond like the others.  When it does wake up the processor, it goes back to sleep and doesn't trigger again.  When it goes off in active mode, it does keep firing (PM_EnterLowPower() can't put the processor back into powerdown mode).
查看全文
MCU-Link - Linkserver - Injection of unwanted cyclecounts at performance tests Hello there, First of all: everything written is from a claude agent, because everything I make is done inside an obsidian Repo and it is faster to let the agent write 🙂  I am doing cycle-accurate timing measurements on an FRDM-MCXN947 for my master's thesis, where I compare the scheduling overhead of some real-time operating systems. Every number I report is a difference of two DWT->CYCCNT reads, so the measurement has to be repeatable down to the single cycle. It is not, and after a fairly long investigation I have narrowed the cause down to one mechanism that I cannot confirm from the documentation. I would like to ask whether my explanation is actually correct, because if it is wrong then I have excluded everything else and have no candidate left. The short version of the question: while a debug session is open, LinkServer periodically reads DHCSR and CPACR to find out whether the core has halted. Both of these are SCS registers inside the private peripheral bus, so the access is serviced inside the core and never appears on the code bus or the system bus. My assumption is that such an access nevertheless competes with the core's own instruction fetches and data accesses somewhere inside the core, and that this is what costs my measurement a few cycles every time a poll lands inside the measured window. Is that assumption right? Setup The board is an FRDM-MCXN947 and I am using core0 only, at 150 MHz for the real measurements and at 12 MHz for a control experiment described further down. I debug through the on-board MCU-Link with LinkServer, which speaks CMSIS-DAP v2 over USB bulk, and I have tried SWD wire clocks of both 50 and 500. The launch configuration passes --no-rtos and --semihost-port=-1, and liveWatch is disabled, so the IDE should not be reading anything from the target while the core runs. The code under test executes from RAM at 0x2000_0000, which means it is fetched over the system bus. Caches and RAM ECC are off. There is a second, separate variation in how the image gets into RAM: for most of the work the probe simply loads it there, but for one experiment I stored the image in flash and copy it into RAM during startup, because an image that only exists in RAM cannot start without a probe to load it in the first place. That distinction matters only for that one experiment, and I mention it now so the setup is unambiguous later. The thing being measured is an empty counting loop, executed a given number of times and timed by reading CYCCNT before and after. I repeat each measurement 64 times. Problem Running the identical measurement twice does not give the identical answer. On the empty loop the 64 values spread over three to six cycles, and on real application code roughly nine out of a hundred thousand iterations come out one to ten cycles above all the others. The deviations only ever go upward, never downward, and the minimum value is perfectly stable and reproducible. What was most informative is that the spread grows with the length of the measurement window rather than being a fixed cost per measurement call, which already rules out a constant overhead somewhere in my instrumentation. Here is the full sweep. Each cell is 64 measurements of the empty loop; "outliers" counts how many of the 64 came out above the first one, and min and max are given as cycles above the loop's clean value. Core Loop count SWD 50: outliers min max SWD 500: outliers min max Core F loops outliers per 64 MEasurements min jitter count max jitter count outliers/64mea. min jitter max jitter 12 MHz 100 0 +13 +13 0 +13 +13   1 000 4 +13 +15 7 +13 +16   10 000 24 +13 +16 18 +13 +17   100 000 55 +13 +23 57 +13 +22   1 000 000 56 +40 +69 59 +45 +102 150 MHz 100 0 +13 +13 0 +13 +13   1 000 0 +13 +13 1 +13 +15   10 000 4 +13 +15 3 +13 +15   100 000 13 +13 +15 16 +13 +17   1 000 000 53 +13 +20 60 +13 +25 Three things come out of this table. First, the constant +13 is not part of the problem. It shows up as the minimum in every cell that has not saturated, at both core clocks and at both wire speeds, and it is simply the loop prologue plus the CYCCNT read itself. Because it is independent of both the core clock and the probe, it is a fixed bias that I subtract, and everything above +13 is what I am actually chasing. Second, and this is the important one, the disturbance follows wall-clock time and not the number of cycles executed. If you compare the two clocks at the same loop count, there are consistently more outliers at 12 MHz than at 150 MHz: four against zero and seven against one at a thousand iterations, twenty-four against four and eighteen against three at ten thousand, fifty-five against thirteen and fifty-seven against sixteen at a hundred thousand. The instruction stream is identical in both cases and therefore executes the same number of cycles, and the only thing that differs is that the 12 MHz run takes 12.5 times longer in real time. Third, the SWD wire clock makes no difference at all. Across the ten matched pairs above the counts scatter in both directions and stay within counting noise, so a tenfold change in wire rate leaves them alone. Whatever sets the pace, it is not the wire. Excluded as root cause I want to be upfront that a lot of this was ruled out by actually reading the relevant register back from the target with the session open, rather than by assuming that the reset default still held. On the SoC side, CPU1, eDMA0, eDMA1 and the SmartDMA are all disabled, RAM ECC is off and the code cache is off, so nothing else is contending for memory. On the trace side, ITM is disabled, no stimulus port is enabled, timestamps are off, the stall-for-trace bit is clear and ETM is off, which means nothing is generating trace packets and therefore nothing can be stalling in order to deliver them. Within the DWT, PC sampling is off, exception trace is off, all the event counters are off, the watchpoint comparators are unused, and the performance monitor is off. TRCENA is of course set, but it has to be set in both the disturbed and the undisturbed case because CYCCNT depends on it, so it cannot be the difference between them. Interrupts and exceptions are out on grounds of size alone. Any exception on this core costs somewhere between twenty-five and fifty cycles, and my deviations are one to ten. There is no small version of an exception, so the entire class is excluded regardless of what the interrupt masks say. Breakpoints are out for a similar reason: an FPB comparator costs nothing until it matches, and when it matches it halts the core rather than delaying it slightly. The code under test is out because of a control experiment. An empty loop contains no data-dependent work whatsoever and therefore cannot vary on its own, and it varies anyway. So the cause is in the platform, not in what I am measuring. That left debugger memory reads as by far the most promising explanation, and I would like to explain why I dropped it, because it is the mechanism most people would reasonably suspect. A debug read of SRAM does leave the core and would genuinely fight the core for the bus port, so the mechanism would work perfectly. The trouble is that it does not happen. Every read the IDE performs travels as a GDB m packet, and in the gdbserver log there is not a single packet between the $vCont;c that starts execution and the host interrupt thirty-two seconds later. Every memory read in that log sits after the halt, which is just the IDE filling its views once the core has stopped. The same argument disposes of the even more attractive theory that the debugger is reading CYCCNT itself, which would contend with my measurement directly: that would also appear as an m packet, and it does not, and liveWatch is disabled anyway. What it seems to be To separate the probe from the session I ran the identical binary with the probe physically plugged in but with no debug session open. This is the experiment that needed the flash-to-RAM copy at startup I mentioned earlier, since a RAM-only image has no way to get loaded without a probe. The probe stayed connected for both runs, so the only difference between them was whether a session was attached. Without a debug session the jitter is gone. Same binary, same clock, same boot path. So it is not the probe being connected, and it is not the build: a probe that is merely attached but issuing no transactions costs nothing, and attaching a session brings the jitter back. At that point I had a disturbance that is definitely caused by the session, that is paced by real time rather than by the core clock, and for which I had eliminated every mechanism I could think of. To find out what LinkServer sends while the core is running, I captured the MCU-Link's CMSIS-DAP bulk endpoints with USBPcap and Wireshark. Two DAP_Transfer requests repeat continuously, roughly every fifty milliseconds. I should immediately qualify that number. The polling does not look like a fixed timer, because the host appears to send the next request only after the previous response has come back, which makes the interval at least partly event-driven — host turnaround plus USB latency plus whatever delay the host inserts of its own accord. So fifty milliseconds is an order-of-magnitude figure for how often it repeats, not a period I would want to quote, and it also means I cannot cleanly reason backwards from the rate. The first request reads DHCSR and CPACR together. On the wire it is 05 00 06 08 00 00 00 00 05 f0 ed 00 e0 0f 08 00 00 00 00 05 88 ed 00 e0 0f, which decodes as: # Req Decode Data Target access 1 08 DP write SELECT 0x00000000 none (DP-internal) 2 05 AP write TAR 0xE000EDF0 (DHCSR) none (AP-internal) 3 0f AP read DRW — 1 read, PPB 4 08 DP write SELECT 0x00000000 none (DP-internal) 5 05 AP write TAR 0xE000ED88 (CPACR) none (AP-internal) 6 0f AP read DRW — 1 read, PPB The answers were DHCSR = 0x01100001, meaning the core is running with secure debug enabled and instructions retiring, and CPACR = 0x00F00003, meaning the FPU is fully accessible. The second request is 05 00 03 08 00 00 00 00 05 f0 ed 00 e0 0f, which is just the first half of the above and asks only whether the core has halted, without the FPU check. So the entire traffic reaching the target during my measurement window is two PPB reads, or one in the case of the shorter request. The SELECT and TAR writes produce no target access at all, since they are internal to the DP and the AP respectively, and only the two DRW reads actually go anywhere. I checked the transfer count against the data-word count and confirmed a direct value-to-register mapping with no posted-read shift on this adapter, so I am confident about which value belongs to which address. Both addresses are SCS registers inside the PPB, and neither appears on the SoC bus matrix. There is no SRAM access anywhere in this, and there is no access to the core register file either, since nothing goes through the DCRSR/DCRDR keyhole, which would require the core to be halted first. For completeness: a separate seventy-one-transfer dump of S0 to S31 and FPSCR does appear in the capture, but only at a moment when the core was halted at a stopAtSymbol breakpoint, not during the run. My guess is that CPACR is bundled with DHCSR precisely so that the adapter already knows whether the floating-point registers are live at the instant the core does halt. Assumption to check:  What I currently believe is happening is this. The request enters the core through the D-AHB debug port and is then arbitrated by the core's internal interconnect against the core's own instruction fetches and data accesses. Being resolved inside the core does not put the access on a path that is disjoint from execution; it still meets execution at a shared internal stage. The core holds priority, so in the normal case the debug access waits and the core carries on unaffected. The residual cost appears only when a debug beat is already in flight and cannot be preempted, in which case the core has to wait for that beat to finish. That wait would be exactly what I observe: a few cycles, always upward, and only on the fraction of measurement windows that a poll happens to fall inside. Questions: Is the mechanism I described above actually correct? Does a DAP-originated read of a PPB or SCS register such as DHCSR or CPACR, arriving over the D-AHB debug port, contend with the running core's own accesses inside the M33 in a way that can stall it by a small number of cycles? Or is the debug port genuinely disjoint from the execution path for PPB targets, in which case I have excluded everything and am still missing the real cause? Is this documented anywhere? I have the Cortex-M33 TRM (100230_0100_07_en) and can see the D-AHB and the internal interconnect in it, but I have not found any statement about what a debug access to core-internal PPB space costs while the core is running. A pointer to the right section, or to anything MCXN947-specific about how the DAP is integrated on this part, would help me a great deal. Would CYCCNT even see such a stall? In other words, is the core genuinely held up, so that these are real execution cycles that CYCCNT counts, rather than CYCCNT being perturbed by some other route? Is there any way to slow down or disable the halt-state poll in LinkServer? That would give me the clean confirmation I am after: change the poll rate and see whether the outlier rate follows. I have not been able to find a setting for it, and anything that reduces or stops the periodic DHCSR read while the core runs would work for this test. If the mechanism is real, is measuring with no session attached simply the correct practice for cycle-accurate work on this part? That is what I do now, and where a session is unavoidable I fall back on taking the minimum across many windows and reporting how many deviated and by how much. I would like to know whether that is the accepted answer, or whether there is a supported way to measure cleanly with a live session. Core and Memory Development Board Re: MCU-Link - Linkserver - Injection of unwanted cyclecounts at performance tests Hi @hms-isyu  Thank you for your detailed analysis. I'm sorry, but this question is beyond the typical scope of NXP MCU application support. I can help with MCXN947, MCU-Link, SDK, and device usage questions. However, the behavior you are investigating involves Cortex-M33 debug architecture and cycle-accurate performance analysis, which is outside my area of expertise. For questions related to the injection of additional cycle counts during performance measurements, I would recommend contacting Arm support for further guidance. Thank you for your understanding. BR Alice
查看全文
[i.MX95/AAOS16] Bringup support HW: i.MX95 15x15 SW: AAOS16_1.3.0 We patched about all files. But, still has a kernel boot problem. Need a Richard-kim's support. Re: [i.MX95/AAOS16] Bringup support Hello @Jaeheon-Sim_Mobis, Please find the revised guideline attached. I have also attached all the patched files with the correct directory structure so that you can directly overwrite them in your source tree. Thank you. Re: [i.MX95/AAOS16] Bringup support Will this work for the 15x15 frdm-mx95? Re: [i.MX95/AAOS16] Bringup support No, those patches are for custom board based on i.MX95 15x15 EVK.
查看全文
MCU-Link - 链路服务器 - 性能测试中注入不必要的周期计数 你好呀, 首先:所有代码都是由 Claude 代理编写的,因为我所有的工作都在 Obsidian 仓库中完成,让代理编写代码速度更快。 🙂  我正在对 FRDM-MCXN947 进行周期精确计时测量,作为我的硕士论文的一部分,我在其中比较了一些实时操作系统的调度开销。我报告的每个数字都是两次 DWT->CYCCNT 读数的差值,因此测量结果必须能够重复到单个循环。事实并非如此,经过相当长时间的调查,我已将原因缩小到一种我无法从文档中确认的机制。我想请问一下我的解释是否正确,因为如果我的解释是错误的,那么我已经排除了所有其他可能性,就没有剩下的候选人了。 问题的简短版本是:当调试会话打开时,LinkServer 会定期读取 DHCSR 和 CPACR,以确定核心是否已停止运行。这两个都是私有外设总线内的 SCS 寄存器,因此访问是在内核内部进行的,永远不会出现在代码总线或系统总线上。我的假设是,这种访问仍然会与核心内部的指令获取和数据访问发生竞争,而这正是每次轮询落在测量窗口内时,我的测量都会消耗几个周期的原因。这个假设正确吗? 设置 该板为 FRDM-MCXN947,我只使用了 core0,实际测量频率为 150 MHz,而对照实验(详见下文)频率为 12 MHz。我通过板载 MCU-Link 和 LinkServer 进行调试,它通过 USB 批量传输 CMSIS-DAP v2,我已经尝试了 50 和 500 的 SWD 线时钟。用上市,不用发布配置传递了 --no-rtos 和 --semihost-port=-1,并且 liveWatch 已禁用,因此在核心运行时,IDE 不应该从目标读取任何内容。 被测代码从 RAM 的 0x2000_0000 处执行,这意味着它是通过系统总线获取的。缓存和内存纠错功能已关闭。图像进入 RAM 的方式还有第二种不同的变化:对于大多数工作,探针会直接将其加载到 RAM 中,但在一个实验中,我将图像存储在闪存中,并在启动时将其复制到 RAM 中,因为如果没有探针首先加载它,仅存在于 RAM 中的图像就无法启动。这种区别只对那一次实验有意义,我现在提一下是为了避免以后的设置产生歧义。 被测量的是一个空的计数循环,执行给定的次数,并通过在执行前后读取 CYCCNT 来计时。每项测量重复64次。 问题 两次进行相同的测量并不会得到相同的结果。在空循环中,64 个值分布在三到六个周期内;而在实际应用程序代码中,大约每十万次迭代中就有九次比其他所有迭代多出一到十个周期。偏差只会向上,不会向下,最小值完全稳定且可重复。最有启发性的是,价差会随着测量窗口长度的增加而增长,而不是每次测量调用都有固定成本,这已经排除了我的仪器中存在恒定开销的可能性。 以下是全部内容。每个单元格是空循环的 64 次测量;“异常值”统计了 64 次测量中有多少次高于第一次测量值,最小值和最大值以高于循环干净值的循环次数表示。 核心循环计数 SWD 50:异常值最小值最大值 SWD 500:异常值最小值最大值 核心 F 循环 每 64 次测量中的异常值 最小抖动计数 最大抖动计数 异常值/64mea。 最小抖动 最大抖动 12 MHz 100 0 +13 +13 0 +13 +13   1000 4 +13 +15 7 +13 +16   10000 24 +13 +16 18 +13 +17   100000 55 +13 +23 57 +13 +22   100万 56 +40 +69 59 +45 +102 150 MHz 100 0 +13 +13 0 +13 +13   1000 0 +13 +13 1 +13 +15   10000 4 +13 +15 3 +13 +15   100000 13 +13 +15 16 +13 +17   100万 53 +13 +20 60 +13 +25 从这张表格中可以得出三点结论。首先,常数 +13 不是问题的一部分。在两种核心时钟和两种线速下,它在每个未饱和的单元格中都显示为最小值,它只是循环序言加上 CYCCNT 读取本身。因为它与核心时钟和探针都无关,所以我减去的是一个固定的偏置,而所有高于 +13 的值都是我实际追求的目标。 其次,也是最重要的一点,干扰遵循的是实际时钟时间,而不是执行的周期数。如果比较两个时钟在相同循环次数下的情况,12 MHz 的异常值始终比 150 MHz 的异常值多:在 1000 次迭代时,12 MHz 的异常值比 150 MHz 的异常值多 4 个,150 MHz 的异常值比 0 个;在 10000 次迭代时,12 MHz 的异常值比 150 MHz 的异常值多 7 个,150 MHz 的异常值比 1 个;在 10000 次迭代时,12 MHz 的异常值比 150 MHz 的异常值多 24 ...50 MHz 的异常值多 24 个,150 MHz 的异常值比 150 MHz 的异常值多 24 个,150 MHz两种情况下指令流完全相同,因此执行的周期数也相同,唯一的区别是 12 MHz 的运行时间比 12 MHz 的运行时间长 12.5 倍。 第三,SWD 线时钟没有任何作用。在上述十对匹配数据中,计数结果在两个方向上分散,并且保持在计数噪声范围内,因此即使线路速率变化十倍也不会影响它们。决定节奏的因素并非电线。 排除根本原因 我想坦白地说,很多可能性都是通过在会话打开的情况下实际从目标读取相关寄存器来排除的,而不是假设RESET默认值仍然有效。 在 SoC 端,CPU1、eDMA0、eDMA1 和 SmartDMA 都被禁用,RAM ECC 也已关闭,代码缓存也已关闭,因此没有其他任何东西会争用内存。在跟踪方面,ITM 已禁用,未启用激励端口,时间戳已关闭,跟踪暂停位已清除,ETM 也已关闭,这意味着没有任何东西会生成跟踪数据包,因此也没有任何东西会暂停以传递它们。在 DWT 中,PC 采样已关闭,异常跟踪已关闭,所有事件计数器均已关闭,监视点比较器未使用,性能监测也已关闭。TRCENA 当然是设置好的,但是无论是否受到干扰,都必须设置 TRCENA,因为 CYCCNT 依赖于它,所以它不可能是两者之间的区别。 仅从大小角度来看,中断和异常就被排除在外。任何对这一核心的例外情况都会花费二十五到五十个周期,而我的偏差是一到十个周期。没有小版本的例外情况,因此无论中断掩码如何规定,整个类都会被排除在外。出于类似的原因,断点也被弃用了:FPB 比较器在匹配之前不消耗任何资源,而匹配时会停止核心运行,而不是稍微延迟核心运行。 由于需要进行对照实验,被测代码已移除。空循环不包含任何与数据相关的工作,因此它本身不会发生变化,但它仍然会发生变化。所以问题出在平台上,而不是我所衡量的指标上。 这样看来,调试器内存读取是目前为止最有希望的解释,我想解释一下我为什么放弃了它,因为这是大多数人都会合理怀疑的机制。对 SRAM 的调试读取会离开内核,并且会与内核争夺总线端口,因此该机制可以完美地工作。问题是,这种情况并没有发生。IDE 执行的每次读取操作都会以 GDB m 数据包的形式传输,但在 gdbserver 日志中,从开始执行的 $vCont;c 到 32 秒后的主机中断之间,没有一个数据包。日志中读取的每一次内存都是在程序停止后才出现的,这只是 IDE 在核心停止后填充其视图的过程。同样的论点也驳斥了调试器正在读取 CYCCNT 本身这一更具吸引力的理论,该理论将直接与我的测量结果相冲突:它也会显示为 m 数据包,但事实并非如此,而且 liveWatch 无论如何都被禁用了。 它看起来像是 为了将探针与会话分离,我运行了相同的二进制文件,同时将探针物理连接到电脑上。 但是没有打开调试会话。这项实验需要在启动时进行闪存到内存的复制。 如前所述,由于仅 RAM 映像没有探测就无法加载。探测器仍在运行 两次运行都连接上了,所以它们之间的唯一区别是是否附加了会话。 如果没有调试会话,抖动就会消失。相同的二进制文件、相同的时钟、相同的启动路径。所以这不是…… 探针已连接,但并非版本:探针只是连接上但没有发出任何信号。 交易无需任何费用,但附加会话又会恢复抖动。 那时我受到了干扰,这肯定是由会话引起的,而且会话的节奏是实时的。 而不是通过核心时钟,为此我已经排除了我能想到的所有机制。 为了找出 LinkServer 在核心运行时发送的内容,我使用 USBPcap 和 Wireshark 捕获了 MCU-Link 的 CMSIS-DAP 批量端点。两个 DAP_Transfer 请求持续重复,大约每隔 50 毫秒重复一次。 我应该立即对这个数字进行限定。轮询看起来不像是一个固定的计时器,因为主机似乎只有在收到前一个响应后才会发送下一个请求,这使得间隔至少部分是由事件驱动的——主机周转时间加上 USB 延迟加上主机自行插入的任何延迟。所以 50 毫秒是一个数量级数字,表示它重复的频率,而不是一个我想引用的周期,这也意味着我不能从速率中清晰地反推。 第一个请求同时读取了 DHCSR 和 CPACR。线路上的信息为 05 00 06 08 00 00 00 00 05 f0 ed 00 e0 0f 08 00 00 00 00 05 88 ed 00 e0 0f,解码后为: # 请求解码数据目标访问 1 08 DP 写入 SELECT 0x00000000 无(DP内部) 2 05 AP 写 TAR 0xE000EDF0 (DHCSR) 无(AP内部) 3 0F AP 阅读 DRW — 1次阅读,PPB 4 08 DP 写入 SELECT 0x00000000 无(DP内部) 5 05 AP 写 TAR 0xE000ED88(CPACR) 无(AP内部) 6 0F AP 阅读 DRW — 1次阅读,PPB 答案是 DHCSR = 0x01100001,表示内核正在启用安全调试并执行指令,CPACR = 0x00F00003,表示 FPU 完全可访问。第二个请求是 05 00 03 08 00 00 00 00 05 f0 ed 00 e0 0f,它只是上面请求的前半部分,只询问核心是否已停止运行,而没有进行 FPU 检查。 因此,在我的测量窗口期间到达目标的全部流量为两次 PPB 读取,或者在较短的请求情况下为一次。SELECT 和 TAR 写入操作根本不会产生任何目标访问,因为它们分别是 DP 和 AP 内部的,只有两个 DRW 读取操作才会真正访问目标。我检查了传输计数与数据字计数,确认了该适配器上存在直接的值到寄存器映射,没有读取后移位,因此我确信哪个值属于哪个地址。 这两个地址都是 PPB 内部的 SCS 寄存器,并且都没有出现在 SoC 总线矩阵上。其中没有任何 SRAM 访问,也没有对核心寄存器文件的访问,因为没有任何东西会通过 DCRSR/DCRDR 密钥孔进行访问,这需要先停止核心运行。为了完整起见:捕获中确实出现了 S0 到 S31 和 FPSCR 的单独 71 次传输转储,但仅在核心在 stopAtSymbol 断点处停止时出现,而不是在运行期间出现。我的猜测是,CPACR 与 DHCSR 捆绑在一起,正是为了使适配器在内核停止运行的那一刻就已经知道浮空寄存器是否处于活动状态。 待检验的假设: 我目前认为正在发生的事情是这样的。请求通过 D-AHB 调试进入核心。 端口,然后由核心内部互连仲裁,以对抗核心自身的指令。 获取和数据访问。在核心内部解决并不意味着访问路径一定是这样的 虽然与执行过程脱节,但它仍然在共享的内部阶段与执行过程相遇。核心优先。 因此,在正常情况下,调试访问会等待,而核心程序会继续运行而不受影响。剩余成本 仅当调试节拍已在进行中且无法被抢占时才会出现,在这种情况下,核心 必须等到那个节拍结束。我观察到的正是这种等待:几个周期,总是如此。 向上,并且仅在民意调查恰好落入的测量窗口的一部分上。 问题: 我上面描述的机制是否正确?通过 D-AHB 调试端口到达的 DAP 发起的对 PPB 或 SCS 寄存器(例如 DHCSR 或 CPACR)的读取操作,是否会与 M33 内部正在运行的内核自身的访问操作发生冲突,从而导致 M33 停滞几个周期?或者,调试端口是否真的与 PPB 目标的执行路径不相干?如果是这样,我已经排除了所有可能的原因,但仍然找不到真正的原因。 这方面有任何书面记录吗?我有 Cortex-M33 TRM (100230_0100_07_en),可以看到其中的 D-AHB 和内部互连,但我没有找到任何关于在内核运行时对内核内部 PPB 空间进行调试访问的成本的说明。如果能提供指向正确章节的链接,或者任何关于 MCXN947 中 DAP 如何集成到该部件上的具体信息,将对我有很大的帮助。 CYCCNT 会出现这样的停滞吗?换句话说,核心是否真的被阻塞,以至于这些是 CYCCNT 计算的真实执行周期,而不是 CYCCNT 受到其他途径干扰的周期? 有没有办法减慢或禁用 LinkServer 中的停止状态轮询?这样就能给我想要的明确确认:改变轮询率,看看异常值率是否随之改变。我一直没能找到相关的设置,任何能在核心运行时减少或停止周期性 DHCSR 读取的操作都适用于此测试。 如果该机制是真实存在的,那么对于该零件而言,在不附加任何测量步骤的情况下进行测量是否就是进行周期精确工作的正确做法?这就是我现在所做的,如果无法避免进行会话,我会取多个窗口中的最小值,并报告有多少窗口偏离了最小值以及偏离了多少。我想知道这是否是公认的答案,或者是否有官方支持的方法可以在实时会话中进行干净利落的测量。 核心与内存 开发板 Re: MCU-Link - Linkserver - Injection of unwanted cyclecounts at performance tests 你好@hms-isyu 感谢您详尽的分析。 很抱歉,这个问题超出了恩智浦MCU应用支持的通常范围。我可以解答有关 MCXN947、MCU-Link、SDK 和设备使用方面的问题。但是,您正在调查的行为涉及 Cortex-M33 调试架构和周期精确性能分析,这超出了我的专业领域。 对于有关在性能测量期间注入额外循环计数的问题,我建议联系 Arm 支持部门以获取进一步指导。 感谢您的理解。 BR 爱丽丝
查看全文