Multi Source Translation Content

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

Multi Source Translation Content

ディスカッション

ソート順:
frequency measurement example code for the s32k3xx Hi all, I am working with an S32K3 series MCU and I want to measure the frequency of an external signal coming on a GPIO pin using the eMIOS peripheral. I have checked the S32K3 reference manual, S32 Design Studio, MCUXpresso Config Tools, and available SDK examples, but I could not find any clear documentation or example that explains how to configure eMIOS for frequency measurement, including pin routing, channel mode selection, clock configuration, or the required settings in the .mex file. I would appreciate it if you could guide me on the correct eMIOS mode to use for this purpose or share any reference example, code snippet, or configuration screenshot that demonstrates a working frequency measurement setup on S32K3. Re: frequency measurement example code for the s32k3xx Hi Please refer to these examples for configuring eMIOS in IPWM mode: Example S32K344 eMIOS DS3.5 RTD500 S32K344_Example_Emios_Icu_IPWM_measurement_DS34_RTD_100_v2 Example IP S32K312 EMIO PWM Generation & Duty capture using Polling DS3.5 RTD300 Example IP S32K312 EMIO PWM Generation & Duty capture using Interrupt DS3.5 RTD300 Example ASR S32K312 EMIO PWM Generation & Duty capture using Polling DS3.5 RTD300 Example ASR S32K312 EMIO PWM Generation & Duty capture using Interrupt DS3.5 RTD300 Please note that the S32K3 projects are usually used with S32DS(S32 Configuration Tool) or EBTresos as configuration tools, and not with MCUXpresso Config Tools. Best Regards, Robin ------------------------------------------------------------------------------- Note: - If this post answers your question, please click the "ACCEPT AS SOLUTION" button. Thank you! - We are following threads for 7 weeks after the last post, later replies are ignored Please open a new thread and refer to the closed one, if you have a related question at a later point in time. ------------------------------------------------------------------------------- Re: frequency measurement example code for the s32k3xx Hi @Robin_Shen, I am using the Example S32K344 eMIOS DS3.5 RTD500 as my base code. I modified the project to measure input frequency by configuring eMIOS_1 Channel 7 as an input (IPWM mode). I updated the S32 Configuration Tool accordingly and added the required changes in the main file. I am reading the measured value using the Ipwm_duty_cycle_array(checked inside the watchdog task). However, even when no external signal is applied on PTA24, the measured value is always 100. Could you please explain why a constant value is reported without any input signal? Is this expected behavior due to default pin state, internal pull-up, clock source, or IPWM configuration? I have attached snapshots for reference. Re: frequency measurement example code for the s32k3xx If you want to use polling method instead of interrupt method, please poll the status via Emios_Icu_Ip_GetInputState before calling Emios_Icu_Ip_GetDutyCycleValues. while(TRUE != Emios_Icu_Ip_GetInputState(INSTANCE_1, CHANNEL_7)){} Emios_Icu_Ip_GetPulseWidth(INSTANCE_1, CHANNEL_7); Emios_Icu_Ip_GetDutyCycleValues(INSTANCE_1, CHANNEL_7, &Ipwm_duty_cycle); Ipwm_duty_cycle_array[index] = (Ipwm_duty_cycle.ActiveTime * 100) / Ipwm_duty_cycle.PeriodTime; Re: frequency measurement example code for the s32k3xx Hi @Robin_Shen , As I want to use interrupt-based measurement, I unchecked IcuSignalMeasureWithoutInterrupt (please refer to the image below) and modified the main.c according to the interrupt-based example code. Currently, the IRQ handler is triggered, which confirms that the interrupt configuration is working. However, the measured ActiveTime and Period Time values are always 0. Could you please help explain why the interrupt is generated but both timing values remain zero? Is this related to IPWM mode configuration, edge selection, signal level on the pin, or missing ICU start/notification API calls? I have attached the configuration snapshot for reference. In this code same as the example code but I just changed the channel 5 instead of 7. Re: frequency measurement example code for the s32k3xx This seems similar to the discussion in the S32K344 MCAL IPWM ICU CAPTURE: Please call Emios_Icu_Ip_IrqHandler first, and then call Emios_Icu_Ip_GetDutyCycleValues. Re: frequency measurement example code for the s32k3xx Hi @Robin_Shen , Thank you for the clarification, the issue is resolved now and the interrupt-based measurement is working as expected.I have one additional question. I want to know how to run the eMIOS module using an external clock source? Could you please guide me on what key configuration changes are required for this? Re: frequency measurement example code for the s32k3xx You are welcome.  I may not have understood your question. Please correct me if I am wrong. I see that your Emios_Icu has IcuEmiosBusSelect set to EMIOS_ICU_BUS_A. Would you like to change it to something else? By the way, the S32K3_RTD_Training_eMIOS_public.pdf file in the S32K311 EMIOS GPT might be helpful to you. Please post a new question in community you have any questions that are not related to the original topic of an existing case. It helps to keep it clear. Re: frequency measurement example code for the s32k3xx Hi @Robin_Shen , I am trying to measure input frequency on multiple eMIOS channels. When I configure and enable only one channel, the project builds and works correctly. However, when I enable a second eMIOS/ICU channel for frequency measurement, I immediately get configuration errors and the project fails to build. I have attached a screenshot of the configuration error for reference. Re: frequency measurement example code for the s32k3xx Hi @Robin_Shen,  I am trying to measure the input frequency on PTE25 (eMIOS1 Channel 5). I am applying a 10 Hz signal from a DSO, and I have verified that the input signal is stable. However, the measured frequency value is unstable and fluctuates around 900–1200, even though the input is only 10 Hz. To debug this, I changed the IcuSignalMeasurementProperty to ICU_PERIOD_TIME and updated the IRQ handler as shown below: void EMIOS1_4_IRQ_Customized(void) {     Emios_Icu_Ip_IrqHandler(1, 5);     period_time = Emios_Icu_Ip_GetTimeElapsed(1, 5);     if (period_time)    {         uint64_t emios_freq = 48000000ULL; // hardcoded         signal_frequency = emios_freq / period_time; captured = 1;    } } Even after these changes, the frequency value remains unstable. Could you please help me understand why the measured frequency is incorrect and unstable for a low-frequency input, and what configuration changes are required to correctly measure a 10 Hz signal using eMIOS/ICU?   Re: frequency measurement example code for the s32k3xx I will be on leave until February 2nd. I suggest you post a new question; my colleague will provide technical support. Thank you for your understanding.
記事全体を表示
IMX8MP - No audio during playback with SOF sound card Hi, I am trying to run playback using the SOF sound card on the IMX8M Plus EVK, but I am not able to hear any audio from the headphone jack. Here are the steps I am using to run the playback: Boot the device and interrupt to enter uboot Use "editenv fdtfile" and change the device tree name to "imx8mp-evk-sof-wm8960.dtb" Continue the boot Run "aplay -l" to obtain SOF sound card ID Run the following commands to initiate playback: amixer -c [sof_card_id] cset name="Left Output Mixer PCM Playback Switch" on amixer -c [sof_card_id] cset name="Right Output Mixer PCM Playback Switch" on aplay -Dhw:[sof_card_id],0 [path_to_wav_file] The wav file used in this case is 32 bit, 48Khz stereo. I see no error when running the playback command. I have also tried playing the same wav file using the default device tree and the wm8960 sound card, and I am able to hear the output. Please let me know what I can do to solve this issue. i.MX 8 Family | i.MX 8QuadMax (8QM) | 8QuadPlus Multimedia Re: IMX8MP - No audio during playback with SOF sound card Hi @aporter28  Did you refer this guide? SOF User Guide on NXP i.MX8 platforms — SOF Project 2.11.0 documentation Best Regards, Zhiming Re: IMX8MP - No audio during playback with SOF sound card That worked great, thanks! I am currently just exploring the capabilities of SOF on NXP boards. Re: IMX8MP - No audio during playback with SOF sound card Hello @aporter28 , On my setup the control you want to modify is named 'Headphone'. Assuming SOF card number is 0 please try this. amixer -c 0 sset Headphone 80% Also you can use the alsamixer TUI and modify the Headphone control Can you share with us what project are you working on with the Sound Open Firmware? 
記事全体を表示
IMX8MP - 使用 SOF 声卡播放时没有音频 您好, 我正试图使用 IMX8M Plus EVK 上的 SOF 声卡进行播放,但无法从耳机插孔听到任何音频。 以下是我运行回放的步骤: 启动设备并中断以进入 uboot 使用 " editenv fdtfile " 将设备树名称更改为 " imx8mp-evk-sof-wm8960.dtb " 继续启动 运行"aplay -l" 获取 SOF 声卡 ID 运行以下命令启动播放: amixer -c [sof_card_id] cset name="左输出混音器 PCM 回放开关" on amixer -c [sof_card_id] cset name="Right Output Mixer PCM Playback Switch" on aplay -Dhw:[sof_card_id],0 [path_too_wav_file] [path_too_wav_file 这里使用的是 32 位、48Khz 立体声的 wav 文件。运行回放命令时没有发现任何错误。 我还尝试使用默认设备树和 wm8960 声卡播放相同的 wav 文件,我能够听到输出。 请告诉我如何才能解决这个问题。 i.MX 8 系列 | i.MX 8QuadMax (8QM) | 8QuadPlus 多媒体 Re: IMX8MP - No audio during playback with SOF sound card 您好@aporter28 ,您参考过这份指南吗? 恩智浦 i.MX8 平台上的 SOF 用户指南 - SOF 项目 2.11.0 文档 致: Zhiming Re: IMX8MP - No audio during playback with SOF sound card 效果很好,谢谢!我目前只是在探索恩智浦板上SOF的功能。 Re: IMX8MP - No audio during playback with SOF sound card 您好@aporter28, 在我的设置中,您要修改的控件名为 "耳机"。 假设 SOF 卡号为 0,请试试这个。 amixer -c 0 sset Headphone 80% 此外,您还可以使用 alsamixer TUI 修改耳机控制 ,您能告诉我们您正在使用声音开放固件开发什么项目吗?
記事全体を表示
#TJA1104 SAF9000 OM7 RTDとのドライバ統合 こんにちは、 私はQuantum (SAF9000) OM7の お客様 アプリケーション サポート エンジニアとして働いています。 現在、弊社の お客様 (Hirschmann) は SGMII インターフェースに関する問題に直面しています。TX 極性が逆になっているように見えますが、ボードは CONFIG レジスタを通じてこれを修正することを想定し、このように設計されました。 彼らは # TJA1104デバイスを使用しており、システムとの互換性を確保するために適切なドライバを統合したいと考えています。 TJA1104 ドライバーを既存のRTD ドライバーと統合する方法をお客様にご案内してサポートしていただけますか? ご返信よろしくお願いします。 よろしくお願いいたします。 ナガ・セギレディ AA SW - 外部デバイス Re: #TJA1104 Driver integration with SAF9000 OM7 RTD こんにちは、 AASW チームは、Quantum のコンテキストでこのコンポーネントに対する SW サポートのリクエストを受け取りませんでした。CES チーム (Florea Simona または Salam Zeidan が対応可能) までお問い合わせください。 Re: #TJA1104 Driver integration with SAF9000 OM7 RTD こんにちは、ナガさん 昨日、Simona Florea と話をしましたが、最新情報に基づいて、Quantum プロジェクトのコア チームである Harm Voss (APM) と Ron Leenders (RTE) に連絡することを強くお勧めします。 Re: #TJA1104 Driver integration with SAF9000 OM7 RTD こんにちは、 情報をいただきありがとうございました。 サポートについては、@Florea Simona または Salam Zeidan に連絡しました。 よろしくお願いいたします。 ナガ・セギレディ
記事全体を表示
#TJA1104 Driver integration with SAF9000 OM7 RTD Hello, I am working as Customer application support engineer for Quantum (SAF9000) OM7. Our customer(Hirschmann) is currently facing an issue with the SGMII interface. The TX polarity appears to be reversed, and their board was designed this way with the expectation of correcting it through the CONFIG register. They are using the #TJA1104 device and now would like to integrate the appropriate drivers to ensure compatibility with their system.  Could you please support the customer by guiding them on how to integrate the TJA1104 drivers with the existing RTD drivers? Thank you very much! Best Regards, Naga Segireddy AA SW - External Device Re: #TJA1104 Driver integration with SAF9000 OM7 RTD Hello, The AASW team didn't received any request for SW support for this component in context of Quantum. Please address to the CES team (possible @Florea Simona or Salam Zeidan) Re: #TJA1104 Driver integration with SAF9000 OM7 RTD Hello, Thank you very much for the information. I have contacted @Florea Simona or Salam Zeidan for the support. Best Regards, Naga Segireddy Re: #TJA1104 Driver integration with SAF9000 OM7 RTD Hi Naga, I spoke with Simona Florea yesterday, and based on the latest information, I strongly recommend reaching out to the Quantum project core team: Harm Voss (APM) and Ron Leenders (RTE).
記事全体を表示
#TJA1104 驱动器与 SAF9000 OM7 RTD 集成 你好 我是 Quantum (SAF9000) OM7 的客户应用支持工程师。 我们的客户(赫希曼)目前正面临 SGMII 接口的问题。TX 极性似乎发生了逆转,他们的电路板是这样设计的,希望通过 CONFIG 寄存器进行校正。 他们正在使用 # TJA1104 设备,现在想集成相应的驱动程序以确保与系统的兼容性。 您能否通过指导客户如何将 TJA1104 驱动程序与现有 RTD 驱动 程序 集成来支持他们? 非常感谢! 顺祝商祺! 纳加-塞吉雷迪 AA SW - 外部设备 Re: #TJA1104 Driver integration with SAF9000 OM7 RTD 你好 AASW 团队没有收到任何在 Quantum 背景下为该元器件提供软件支持的请求。请联系 CES 团队(可能的 @Florea Simona 或 Salam Zeidan)。 Re: #TJA1104 Driver integration with SAF9000 OM7 RTD 你好 非常感谢你提供的信息。 我已联系@Florea Simona 或 Salam Zeidan 寻求支持。 顺祝商祺! 纳加-塞吉雷迪 Re: #TJA1104 Driver integration with SAF9000 OM7 RTD 嗨,娜迦, ,我昨天与 Simona Florea 交谈过,根据最新信息,我强烈建议与量子项目核心团队联系:Harm Voss(APM)和 Ron Leenders(RTE)。
記事全体を表示
IMX8MP - SOFサウンドカードで再生中にオーディオが出ない こんにちは、 IMX8M Plus EVK の SOF サウンド カードを使用して再生を試みていますが、ヘッドフォン ジャックからオーディオが聞こえません。 再生を実行するために使用している手順は次のとおりです。 デバイスを起動し、ubootに入るために割り込みます 「editenv fdtfile」を使用して、デバイスツリー名を「imx8mp-evk-sof-wm8960.dtb」に変更します。 ブートを続行 「aplay -l」を実行してSOFサウンドカードIDを取得します。 再生を開始するには、次のコマンドを実行します。 amixer -c [sof_card_id] cset name="左出力ミキサPCM再生スイッチ" on amixer -c [sof_card_id] cset name="右出力ミキサPCM再生スイッチ" on aplay -Dhw:[sof_card_id],0 [wavファイルへのパス] このCASEに使用される wav ファイルは 32 ビット、48Khz ステレオです。再生コマンドを実行してもエラーは表示されません。 また、デフォルトのデバイス ツリーと wm8960 サウンド カードを使用して同じ wav ファイルを再生してみましたが、出力を聞くことができました。 この問題を解決するために何ができるか教えてください。 i.MX 8ファミリ | i.MX 8QuadMax (8QM) | 8QuadPlus マルチメディア Re: IMX8MP - No audio during playback with SOF sound card こんにちは@aporter28 このガイドを参照しましたか? NXP i.MX8 プラットフォームの SOF ユーザーガイド — SOF プロジェクト 2.11.0 ドキュメント よろしくお願いします、 志明 Re: IMX8MP - No audio during playback with SOF sound card うまくいきました、ありがとう!現在、NXP ボード上の SOF の機能を調査しているところです。 Re: IMX8MP - No audio during playback with SOF sound card こんにちは@aporter28さん、 私のセットアップでは、変更したいコントロールの名前は「ヘッドフォン」です。 SOF カード番号が 0 であると仮定して、これを試してください。 amixer -c 0 sset Headphone 80% また、alsamixer TUIを使用してヘッドフォンコントロールを変更することもできます。 Sound Open Firmware でどのようなプロジェクトに取り組んでいるのか教えていただけますか?
記事全体を表示
LCD に画像を表示するために、uboot は Linux カーネルにどのようなブート引数を渡すのでしょうか -- iMX93EVK こんにちは、NXPサポートスペシャリスト様。 iMX93EVK は LVDS 経由で LCD に接続されます。 LCD にイメージを表示するために、u-boot はどのようなブート引数を Linux カーネルに渡す必要がありますか? imx93_evk.h を変更する方法ファイル? よろしくお願いいたします。
記事全体を表示
s32k312 int sram' 溢出了 8 字节 亲爱的恩智浦工程师 在我使用 S32K312 期间,当我尝试增加全局变量时,S32DS 在编译后报告了一个 " int SRAM 溢出 8 字节 " 错误。我已经上传了地图和链接文件。能否请您帮忙分析一下这个问题?谢谢。 Re: s32k312 int sram' overflowed by 8 bytes 你好,@fengba_360、 这仅仅意味着您使用的 sram 超过了链接器文件中声明的 64KB。你可以尝试缩小堆,将全局变量、不可缓存变量和可共享变量移出 sram,或者改用闪存。 请检查项目编译的地图文件,并根据程序的大小调整链接文件。有关定义和建议,您可以参考社区的一些旧帖子: 无法增加 s32 中的堆大小 - NXP Community 调整 S32K312 的 int_sram 内存分配 致以最诚挚的问候, Julián
記事全体を表示
MM9z1J638D PTBxによる時間指定ウェイクアップは1回のみ機能します こんにちは、 PTB1 で時間指定ウェイクアップ機能を動作させることができました。しかし、PTB1 から起動するのは 1 回だけです。最初のウェイクアップ後はすべて正常に動作しているようで、LIN とアプリケーション コードは問題なく実行されています。 2回目にスリープモードに入ると、MCUは理解できない別の状態になるようです 電流消費は、電流が基本的にゼロになる最初のスリープ時とは異なり、通常動作時よりわずかに減少します。 デバッガーが接続を失い、再接続できない MCU が保護されます。 この状態から抜け出す唯一の方法は、電源を入れ直すことです。 もう 1 つの観察結果は、ウェイクアップが LIN によってトリガーされる場合、複数回ウェイクアップしても問題はないと思われることです。ウェイクアップが時間指定ウェイクアップ PTB1 によってトリガーされた場合にのみ、問題が発生します。 これが私のスリープモードの設定です #define Wakeup_counter (unsigned int) 10*1000 // counter value in terms of ALFCLK (1ms by default) char Wakeup_counter_hi = (char) ((Wakeup_counter & 0xFF00U) >> 8); // get the high byte char Wakeup_counter_lo = (char) ((Wakeup_counter & 0x00FFU) >> 0); // get the low byte void Handle_SleepRequest() { ....... // save parameters to EEPROM RTIDisable(); ADCDisable(); TsenseDisable(); B_GPIO_VSENSE = 0; l_sys_irq_disable(BSC2_Node1); // only SCI!!! B_TIE_C3I = 0; // LIN timer interrupt disabled IrqDisable(); B_GPIO_IN1_TCAP1 = 0; // PTB1 input buffer disconnected from Timer channel 1 - input capture B_GPIO_OUT1_TCOMP1 = 1; // Timer channel 1 - output compare connected to PTB1 output buffer OR gate (needs to be configured to allow OC to generate a system wakeup) B_GPIO_CTL |= B_GPIO_CTL_DIR1_MASK | B_GPIO_CTL_DIR1M_MASK; // set PTB1 to output B_GPIO_CTL |= 0|B_GPIO_CTL_PE1M_MASK; // PTB1 I/O to high impedance mode so that it's not connected to outside of MCU // force internal PTB1 to low B_TSCR1_TEN = 1; B_TCTL1 = B_TCTL1_OM1_MASK; // clear on OC B_CFORC_FOC1 = 1; // force OC to clear because TCTL1 set to clear on OC B_TSCR1_TEN = 0; // disable the timer to setup timer B_TCNT = 0x0000U; // reset counter B_TIOS_IOS1 = 1; // Timer channel 1 acts as an output compare to allow TC1 write /*Timer clock selection to be Timerclk/1 see table 647*/ B_TSCR2_PR0 = 0; B_TSCR2_PR1 = 0; B_TSCR2_PR2 = 0; B_TSCR2_TCRE = 0; //Inhibits timer counter reset and couter continuews to run // setup a rising edge on hitting the OC B_TCTL1 = B_TCTL1_OM1_MASK | B_TCTL1_OL1_MASK; // configure to be set on OC B_TC1Hi = Wakeup_counter_hi; // compare register needs to write the high byte before low byte B_TC1Lo = Wakeup_counter_lo; B_TFLG1_C1F = 1; // enable Timer channel 1 to cause a hardware interrupt ADCLpEnable(); B_PCR_WUEH_WUPTB1 = 1; // enable PTB1 as the internal timed wake up source PCREnterSleepMode(); while(1) DO_NOTHING; // should not reach here } 私のウェイクアップ処理関数 void Wakeup_Process(void){ if (B_PCR_CTL_OPM & 2) { // Check if Wake Up from Sleep mode (see page RM3.0 110 Intermediate Mode) B_PCR_CTL = OPM_SET_NORMAL; // set normal mode while (!(B_PCR_SRH_WLPMF )) DO_NOTHING; // Wait for Clock Domain Change } else{ if(!B_PCR_SR_HWRF) { PCRReset(); } } } メイン関数 void main () { SYS_Init(); CPMUInit(&ClockConf); D2DInit((TYPE_D2DCLKDIV) ClockConf.D2dDiv); XirqEnable(); // enable XIRQ -> isrD2DErr() "write-once" Wakeup_Process(); // Process wakeup event to bring CPU to normal if it is waken up B_WD_CTL = WD_OFF; PCRInit(ClockConf.PCRprescaler); SYSStartupTrimming(); ADCInit(); GPIOInit(); RTIInit(); RTIEnable(); IrqEnable(); EEPROM_Init(0x05);// 6.25MHz busclk ReadEEPROM(); for EVER { ...... // main application loop if (SleepRequested){Handle_SleepRequest();} } } ご協力に感謝します。 Re: MM9z1J638D Timed wakeup by PTBx only works for once これらはPCREnterSleepMode()関数ですでにクリアされています。 void PCREnterSleepMode_SMP(void){ IrqDisable(); B_INT_MSK = 0xFF3F; // Mask Analog Interrupts B_ACQ_SRH = 0xFF; // Clear pending Flags B_INT_MSK = 0xFF00; // Enable Analog Int B_PCR_SR = 0xFFFF; // Clear Flags B_TFLG1 = 0xFF; // Clear timer interrupt flag1 B_PCR_CTL = OPM_SET_SLEEP; // Goto Sleep Mode StopEnable(); StopEnter(); } しかし、問題点は分かったと思います。ウェイクアップが発生するたびに実行されるデコンディショニング関数があり、カウンター OC をリセットしたり、GPIO 構成を逆にするなど、ウェイクアップ ソースの PTB1 を構成するのとは逆に PTB1 構成を逆にします。しかし、問題は、レジスタが更新されたかどうかを確認するための while ループを配置しない限り、リセットが登録されないということのようです。たとえば、while ループを配置しないと、デコンディショニング関数で TC1 を 0x0000 に設定しているにもかかわらず、TC1 カウンターはスリープ状態になる前に設定した期間を保持し続けます。 レジスタがリセットされていることを確認するための while ループ チェックを追加したので、ウェイクアップは正常に機能し、毎回成功します。 void PTB1_WU_Decondition(allow_Continue){ /* Configure port before enable it*/ B_GPIO_IN1_TCAP1 = 0; // PTB1 input buffer disconnected from Timer channel 1 - input capture // B_GPIO_IN1_TCAP1 = 1; // PTB1 input buffer disconnected from Timer channel 1 - input capture B_GPIO_OUT1_TCOMP1 = 0; // Timer channel 1 - output compare connected to PTB1 output buffer OR gate (needs to be configured to allow OC to generate a system wakeup) B_GPIO_CTL |= 0 | B_GPIO_CTL_DIR1M_MASK; // set PTB1 to output // B_GPIO_CTL |= 0 | B_GPIO_CTL_DIR1M_MASK; // set PTB1 to input // B_GPIO_CTL |= B_GPIO_CTL_PE1_MASK|B_GPIO_CTL_PE1M_MASK; // PTB1 I/O enable mask enabled PTB1 enabled (not seem necessary due to figure 33.) B_GPIO_CTL |= 0|B_GPIO_CTL_PE1M_MASK; // PTB1 I/O to high impedance mode so that it's not connected to outside of MCU B_TIOS_IOS1 = 0; // Timer channel 1 disabled /* Timer clock selection to be Timerclk/1 see table 647*/ B_TSCR2_PR0 = 0; B_TSCR2_PR1 = 0; B_TSCR2_PR2 = 0; B_TSCR2_TCRE = 0; //Inhibits timer counter reset and couter continuews to run // setup a rising edge on hitting the OC B_TSCR1_TEN = 1; // enable the timer to reset TC1 B_TC1Hi = 0x00U; // compare register needs to write the high byte before low byte B_TC1Lo = 0x00U; B_TSCR1_TEN = 0; // disable the timer B_TFLG1_C1F = 1; // clear timer 1 flag while(B_TFLG1_C1F != 0 && B_TC1 != 0x0000U || allow_Continue){}; // MUST WAIT otherwise, the settings don't register B_PCR_WUEH_WUPTB1 = 0; // disable PTB1 as the internal timed wake up source } Re: MM9z1J638D Timed wakeup by PTBx only works for once こんにちは@WWsmp 、 書き込み後の読み取りシーケンスは良い方法です。 関数を再配置すれば、待機ループなしでも成功するでしょうか? B_GPIO_OUT1_TCOMP1 = 0;// Detach OC from PTB1 B_GPIO_IN1_TCAP1= 0;// No capture routing B_GPIO_CTL|= B_GPIO_CTL_DIR1M_MASK;// Internal buffer direction benign B_GPIO_CTL|= B_GPIO_CTL_PE1M_MASK;// High impedance to outside B_TSCR1_TEN= 0;// Stop counter B_TIOS_IOS1= 1;// Channel 1 acts as Output Compare B_TCTL1&= ~(B_TCTL1_OM1_MASK | B_TCTL1_OL1_MASK);// No OC action B_TSCR2_PR0 = 0; B_TSCR2_PR1 = 0; B_TSCR2_PR2 = 0; B_TFLG1_C1F= 1;// write-1-to-clear B_TCNT= 0x0000U;// ensure counter starts from 0 B_TC1Hi= 0x00U;// high byte first B_TC1Lo= 0x00U; B_TSCR1_TEN= 1; B_PCR_WUEH_WUPTB1 = 0; Re: MM9z1J638D Timed wakeup by PTBx only works for once こんにちは@danielmartynek 、 修正したと思いましたが、実際には 100% 機能していません。問題はまだ解決していませんが、while ループを追加したため、状況が変わりました。MCU を一貫してスリープ状態にして起動することができているように見えましたが、PCRReset() は何らかの理由でトリガーされましたが、それはアプリケーションからではありませんでした。PCRReset() は isrD2DErr() によってトリガーされます。 /*! \brief Interrupt Service Routine for D2D error interrupts. * * Interrupts are caused by errors detected by the D2D Initiator (uC side) * during D2D transferes. This error is critical NMI and you need to have the * CCR X-bit cleared */ interrupt VectorNumber_Vd2di_err void isrD2DErr(void) { while(1) { if(D2DSTAT0_ERRIF) { D2DSTAT0_ERRIF = 1; // clear flag }else{ PCRReset(); // issue an analog die reset } } } 私がそれをどのように実現したかというと、ウェイクアップ理由とリセット理由を保存する変数があるということです。通常、PTB1 から起動すると、B_PCR_SRL_WUPTB1F が 1 に設定され、B_PCR_SRH_HVRF が 1 に設定されます。しかし、「修正」後、B_PCR_SRH_HVRF、B_PCR_SRH_WDRF、および B_PCR_SRH_HWRF がすべて 1 に設定され、WU ビットが設定されていないことに気付きました。これは PCRReset() と呼ぶ動作に似ています。そして、D2D エラーまで追跡しました。 このエラーを引き起こす可能性がある具体的な理由はありますか? Re: MM9z1J638D Timed wakeup by PTBx only works for once こんにちは@WWsmp 、 開発チームとの議論を開始させてください。 少し時間がかかるかもしれません。 ありがとうございました。 ダニエル Re: MM9z1J638D Timed wakeup by PTBx only works for once こんにちは@WWsmp 、 投稿したコードには問題は見つかりませんでした。 以下は、isrD2Derr エラーの考えられる原因です。isrD2Derr は、アナログ ダイと MCU (S12Z) ダイ間のダイ間 (D2D) インターフェースでエラーが検出されたことを示します。エラーは、電気、タイミング、電源、モード制御、またはソフトウェアの問題によって発生する可能性があります。 電源関連の問題 VDDH / VDDD2D(2.5 V D2D電源)の不安定性 電圧低下、リップル、または不十分なデカップリングにより、D2D 信号が破損する可能性があります。 多くの場合、パリティ エラーまたは確認応答エラーが発生します。 供給順序の問題 一方のダイがもう一方のダイよりも早く動作可能になります。 D2D アクセスは、ターゲット ダイがまだリセットまたはブラウンアウト状態の間に発生します。 クランキングまたはVSUP低電圧 オートモーティブ クランキング中、一方のダイがリセットまたは保持状態になり、もう一方のダイが動作を継続する場合があります。 タイムアウト エラーが発生します。 時計とタイミングの問題 D2Dクロックの不安定性 PLL ロック解除、IRC ドリフト、またはクロック モニター イベントにより、D2D タイミングが壊れる可能性があります。 過剰なD2Dクロック周波数マージン 最大 D2D 周波数に近い値で実行すると、ノイズ マージンが減少します。 EMC と温度に対してより敏感です。 クロックドメインの不一致 一方のダイのクロックがゲートまたは遅くなる一方で、もう一方は D2D トランザクションの発行を継続します。 リセットおよび電源モード同期エラー ダイ間の非同期リセット アナログダイがアクティブな間、MCU はリセットされます (またはその逆)。 このウィンドウ中に D2D アクセスが発生すると、タイムアウトまたは ACK エラーが発生します。 停止/スリープモードの不一致 アナログ ダイが NORMAL モードのままである間、MCU は STOP/SLEEP に入ります。 ターゲット ダイ クロックがゲートされている間に D2D アクセスが試行されました。 不適切なウェイクアップシーケンス ターゲットダイが低電力モードを完全に終了する前に発行された D2D トランザクション。 D2Dプロトコル/トランザクションタイミングの問題 サービスの遅延によるタイムアウト 長い割り込みマスクまたはクリティカルセクションは D2D サービスをブロックします。 ISR 負荷が高い、またはプリエンプティブでないコード パスが長い。 過剰なバーストアクセス 間隔を空けずに、D2D レジスタの読み取り/書き込みを大規模または高速に実行するシーケンス。 内部サービスのレイテンシを超える可能性があります。 無効または不正なD2Dアクセス マップされていない、または制限されている D2D レジスタ ウィンドウへのアクセス。 トランザクションのサイズまたはシーケンスが正しくありません。 ソフトウェアの初期化と構成エラー スタートアップトリミングが正しく実行されません 起動時に IFR 値がコピーされません。 クロック/リファレンス ドリフトが発生し、ビット エラーの確率が高くなります。 不適切なD2D初期化順序 クロック、電源ドメイン、またはエラー フラグが完全にクリアされる前に使用される D2D。 競合する構成モード 自動温度ゲイン補正 (ATGCE) は、キャリブレーション要求割り込みとともに有効になります。 過剰な D2D トラフィックと競合が発生します。 EMC、ノイズ、環境ストレス EMI / ESD障害 高速過渡現象により D2D データ ビットが反転し、パリティ エラーが発生する可能性があります。 ISO 7637‑2 パルス テスト中によく使用されます。 グランドバウンスまたは接地不良 高電流の共有リターンパス (シャント、LIN、CAN)。 D2D 信号の整合性に影響します。 高温または温度勾配 クロックのドリフトとレギュレータのディレーティングにより、タイミング マージン違反が増加します。 レイアウトとハードウェア実装の問題 VDDH/VDDD2Dピン付近のデカップリングが不十分 アナログ、デジタル、高電流パス間の分離が不十分 リファレンス・デザインの逸脱 NXP リファレンス デザインと比較して、フィルタリング コンポーネントが欠落しているか変更されています。 BR、ダニエル
記事全体を表示
MM9z1J638D Timed wakeup by PTBx only works for once Hi there, I got the timed wakeup function working with PTB1. But it only would wake up once from PTB1. Everything seems fine after the first wakeup, LIN and application code running no problem. The second time going to SLEEP mode, the uC seems to go to a different state that I can't understand the current draw slightly drops from normal operation, unlike the first time it goes to sleep where the current is basically zero debugger loses connection and cannot reconnect uC becomes secured. The only way to get out of this state is by power cycling.  One more observation is that if the wakeup is triggered by LIN, there seems no issue waking up multiple times. Only if the wake up is triggered the timed wakeup PTB1, the issue occurs. Here's my SLEEP mode configuration #define Wakeup_counter (unsigned int) 10*1000 // counter value in terms of ALFCLK (1ms by default) char Wakeup_counter_hi = (char) ((Wakeup_counter & 0xFF00U) >> 8); // get the high byte char Wakeup_counter_lo = (char) ((Wakeup_counter & 0x00FFU) >> 0); // get the low byte void Handle_SleepRequest() { ....... // save parameters to EEPROM RTIDisable(); ADCDisable(); TsenseDisable(); B_GPIO_VSENSE = 0; l_sys_irq_disable(BSC2_Node1); // only SCI!!! B_TIE_C3I = 0; // LIN timer interrupt disabled IrqDisable(); B_GPIO_IN1_TCAP1 = 0; // PTB1 input buffer disconnected from Timer channel 1 - input capture B_GPIO_OUT1_TCOMP1 = 1; // Timer channel 1 - output compare connected to PTB1 output buffer OR gate (needs to be configured to allow OC to generate a system wakeup) B_GPIO_CTL |= B_GPIO_CTL_DIR1_MASK | B_GPIO_CTL_DIR1M_MASK; // set PTB1 to output B_GPIO_CTL |= 0|B_GPIO_CTL_PE1M_MASK; // PTB1 I/O to high impedance mode so that it's not connected to outside of MCU // force internal PTB1 to low B_TSCR1_TEN = 1; B_TCTL1 = B_TCTL1_OM1_MASK; // clear on OC B_CFORC_FOC1 = 1; // force OC to clear because TCTL1 set to clear on OC B_TSCR1_TEN = 0; // disable the timer to setup timer B_TCNT = 0x0000U; // reset counter B_TIOS_IOS1 = 1; // Timer channel 1 acts as an output compare to allow TC1 write /*Timer clock selection to be Timerclk/1 see table 647*/ B_TSCR2_PR0 = 0; B_TSCR2_PR1 = 0; B_TSCR2_PR2 = 0; B_TSCR2_TCRE = 0; //Inhibits timer counter reset and couter continuews to run // setup a rising edge on hitting the OC B_TCTL1 = B_TCTL1_OM1_MASK | B_TCTL1_OL1_MASK; // configure to be set on OC B_TC1Hi = Wakeup_counter_hi; // compare register needs to write the high byte before low byte B_TC1Lo = Wakeup_counter_lo; B_TFLG1_C1F = 1; // enable Timer channel 1 to cause a hardware interrupt ADCLpEnable(); B_PCR_WUEH_WUPTB1 = 1; // enable PTB1 as the internal timed wake up source PCREnterSleepMode(); while(1) DO_NOTHING; // should not reach here }  My wakeup handling function  void Wakeup_Process(void){ if (B_PCR_CTL_OPM & 2) { // Check if Wake Up from Sleep mode (see page RM3.0 110 Intermediate Mode) B_PCR_CTL = OPM_SET_NORMAL; // set normal mode while (!(B_PCR_SRH_WLPMF )) DO_NOTHING; // Wait for Clock Domain Change } else{ if(!B_PCR_SR_HWRF) { PCRReset(); } } } main function void main () { SYS_Init(); CPMUInit(&ClockConf); D2DInit((TYPE_D2DCLKDIV) ClockConf.D2dDiv); XirqEnable(); // enable XIRQ -> isrD2DErr() "write-once" Wakeup_Process(); // Process wakeup event to bring CPU to normal if it is waken up B_WD_CTL = WD_OFF; PCRInit(ClockConf.PCRprescaler); SYSStartupTrimming(); ADCInit(); GPIOInit(); RTIInit(); RTIEnable(); IrqEnable(); EEPROM_Init(0x05);// 6.25MHz busclk ReadEEPROM(); for EVER { ...... // main application loop if (SleepRequested){Handle_SleepRequest();} } } Appreciate your help. Re: MM9z1J638D Timed wakeup by PTBx only works for once They are already cleared in PCREnterSleepMode() function. void PCREnterSleepMode_SMP(void){ IrqDisable(); B_INT_MSK = 0xFF3F; // Mask Analog Interrupts B_ACQ_SRH = 0xFF; // Clear pending Flags B_INT_MSK = 0xFF00; // Enable Analog Int B_PCR_SR = 0xFFFF; // Clear Flags B_TFLG1 = 0xFF; // Clear timer interrupt flag1 B_PCR_CTL = OPM_SET_SLEEP; // Goto Sleep Mode StopEnable(); StopEnter(); } But I think I found out the problem. I have a decondition function executed everytime the wakeup happens, that reverses the PTB1 configuration as the opposite of configuring PTB1 for wake-up source, like resetting counter OC, reversing GPIO configuration, etc. But the problem seems to be the resets don't register unless I put a while loop to check if the registers are updated. For example, if I don't put the while loop, the TC1 counter still holds the period I set up before going to sleep even though I am setting TC1 to 0x0000 in the deconditioning function.  Now that I added a while loop check to make sure the registers are reset, the wake-up functions normally and succeeds every time. void PTB1_WU_Decondition(allow_Continue){ /* Configure port before enable it*/ B_GPIO_IN1_TCAP1 = 0; // PTB1 input buffer disconnected from Timer channel 1 - input capture // B_GPIO_IN1_TCAP1 = 1; // PTB1 input buffer disconnected from Timer channel 1 - input capture B_GPIO_OUT1_TCOMP1 = 0; // Timer channel 1 - output compare connected to PTB1 output buffer OR gate (needs to be configured to allow OC to generate a system wakeup) B_GPIO_CTL |= 0 | B_GPIO_CTL_DIR1M_MASK; // set PTB1 to output // B_GPIO_CTL |= 0 | B_GPIO_CTL_DIR1M_MASK; // set PTB1 to input // B_GPIO_CTL |= B_GPIO_CTL_PE1_MASK|B_GPIO_CTL_PE1M_MASK; // PTB1 I/O enable mask enabled PTB1 enabled (not seem necessary due to figure 33.) B_GPIO_CTL |= 0|B_GPIO_CTL_PE1M_MASK; // PTB1 I/O to high impedance mode so that it's not connected to outside of MCU B_TIOS_IOS1 = 0; // Timer channel 1 disabled /* Timer clock selection to be Timerclk/1 see table 647*/ B_TSCR2_PR0 = 0; B_TSCR2_PR1 = 0; B_TSCR2_PR2 = 0; B_TSCR2_TCRE = 0; //Inhibits timer counter reset and couter continuews to run // setup a rising edge on hitting the OC B_TSCR1_TEN = 1; // enable the timer to reset TC1 B_TC1Hi = 0x00U; // compare register needs to write the high byte before low byte B_TC1Lo = 0x00U; B_TSCR1_TEN = 0; // disable the timer B_TFLG1_C1F = 1; // clear timer 1 flag while(B_TFLG1_C1F != 0 && B_TC1 != 0x0000U || allow_Continue){}; // MUST WAIT otherwise, the settings don't register B_PCR_WUEH_WUPTB1 = 0; // disable PTB1 as the internal timed wake up source } Re: MM9z1J638D Timed wakeup by PTBx only works for once Hi @WWsmp, The read-after-write sequence is a good practice. Maybe you can rearrange the function, will it pass without the wait loop? B_GPIO_OUT1_TCOMP1 = 0;// Detach OC from PTB1 B_GPIO_IN1_TCAP1= 0;// No capture routing B_GPIO_CTL|= B_GPIO_CTL_DIR1M_MASK;// Internal buffer direction benign B_GPIO_CTL|= B_GPIO_CTL_PE1M_MASK;// High impedance to outside B_TSCR1_TEN= 0;// Stop counter B_TIOS_IOS1= 1;// Channel 1 acts as Output Compare B_TCTL1&= ~(B_TCTL1_OM1_MASK | B_TCTL1_OL1_MASK);// No OC action B_TSCR2_PR0 = 0; B_TSCR2_PR1 = 0; B_TSCR2_PR2 = 0; B_TFLG1_C1F= 1;// write-1-to-clear B_TCNT= 0x0000U;// ensure counter starts from 0 B_TC1Hi= 0x00U;// high byte first B_TC1Lo= 0x00U; B_TSCR1_TEN= 1; B_PCR_WUEH_WUPTB1 = 0; Re: MM9z1J638D Timed wakeup by PTBx only works for once Hi @danielmartynek , I thought I fixed it but actually it is not 100% working. The issue still persists but in a different way now that I added the while loop. It looked like I was able to put the uC sleep and wake up consistently but the PCRReset() was somehow triggered but not from my application. The PCRReset() is triggered by isrD2DErr().  /*! \brief Interrupt Service Routine for D2D error interrupts. * * Interrupts are caused by errors detected by the D2D Initiator (uC side) * during D2D transferes. This error is critical NMI and you need to have the * CCR X-bit cleared */ interrupt VectorNumber_Vd2di_err void isrD2DErr(void) { while(1) { if(D2DSTAT0_ERRIF) { D2DSTAT0_ERRIF = 1; // clear flag }else{ PCRReset(); // issue an analog die reset } } } How I realized it is that I have a variable saving the wakeup reason and reset reason. Normally, when it wakes up from PTB1, B_PCR_SRL_WUPTB1F is set to 1 and B_PCR_SRH_HVRF is set to 1. But after my "fix", I realized B_PCR_SRH_HVRF, B_PCR_SRH_WDRF and B_PCR_SRH_HWRF are all set to 1 and no WU bits are set. It is like the behavior I'd call PCRReset(). And I traced down to D2D error.  Is there a specific reason you would think of that can trigger this error?  Re: MM9z1J638D Timed wakeup by PTBx only works for once Hi @WWsmp, Let me trigger a discussion with the development team. It may take some time. Thank you, Daniel Re: MM9z1J638D Timed wakeup by PTBx only works for once Hi @WWsmp, No issue has been found in the code you posted. Below is the possible source of isrD2Derr errors. The isrD2Derr indicates that an error was detected on the Die‑to‑Die (D2D) interface between the Analog Die and the MCU (S12Z) Die. The error can be caused by electrical, timing, power, mode‑control, or software issues. Power Supply–Related Issues VDDH / VDDD2D (2.5 V D2D supply) instability Voltage dips, ripple, or insufficient decoupling can corrupt D2D signaling. Often results in parity errors or acknowledge errors. Supply sequencing problems One die becomes operational earlier than the other. D2D access occurs while the target die is still in reset or brown‑out. Cranking or VSUP undervoltage During automotive cranking, one die may enter reset or retention while the other continues running. Leads to timeout errors. Clock and Timing Problems D2D clock instability PLL unlock, IRC drift, or clock monitor events can break D2D timing. Excessive D2D clock frequency margin Running close to the maximum D2D frequency reduces noise margin. More sensitive to EMC and temperature. Clock domain mismatch One die clock gated or slowed while the other continues issuing D2D transactions. Reset and Power‑Mode Synchronization Errors Asynchronous reset between dies MCU resets while analog die stays active (or vice versa). Any D2D access during this window triggers timeout or ACK error. Stop / Sleep mode mismatch MCU enters STOP/SLEEP while analog die remains in NORMAL mode. D2D access attempted while the target die clock is gated. Improper wake‑up sequence D2D transaction issued before the target die has fully exited low‑power mode. D2D Protocol / Transaction Timing Issues Timeout due to delayed servicing Long interrupt masking or critical sections block D2D servicing. High ISR load or long non‑preemptible code paths. Excessive burst access Large or rapid sequences of D2D register reads/writes without spacing. Can exceed internal service latency. Invalid or illegal D2D access Access to unmapped or restricted D2D register windows. Incorrect transaction size or sequence. Software Initialization and Configuration Errors Startup trimming not executed correctly IFR values not copied at startup. Leads to clock/reference drift and higher bit‑error probability. Improper D2D initialization order D2D used before clocks, power domains, or error flags are fully cleared. Conflicting configuration modes Automatic temperature gain compensation (ATGCE) enabled together with calibration request interrupts. Causes excessive D2D traffic and contention. EMC, Noise, and Environmental Stress EMI / ESD disturbances Fast transients can flip D2D data bits, causing parity errors. Common during ISO 7637‑2 pulse tests. Ground bounce or poor grounding Shared return paths with high current (shunt, LIN, CAN). Affects D2D signal integrity. High temperature or thermal gradients Clock drift and regulator derating increase timing margin violations. Layout and Hardware Implementation Issues Insufficient decoupling near VDDH/VDDD2D pins Poor separation between analog, digital, and high‑current paths Reference design deviations Missing or altered filtering components compared to NXP reference designs. BR, Daniel
記事全体を表示
MIMXRT1170-EVK 的 .alg 文件 有什么办法能让我获得 .alg请提供 mimxrt1170-evk 的文件或一些 ascii 文件,以便我将其导入 altium。我没有 allegro,但我以前在这里看到过有人问我这个问题,也发过信息。 @Pavel_Hernandez 谢谢! Re: .alg file for MIMXRT1170-EVK 你好@hawk2020、 我们通常不提供 AD 和 Cadence 之间的这种转换,在转换过程中往往会导致文件丢失。此外,约束设置和布线规则将是不完整的,因此一般不建议使用这种方法,但让我在内部检查一下是否已经有一些转换文件。 祝您愉快, Kan ------------------------------------------------------------------------------- 注: - 如果本帖回答了您的问题,请点击"标记正确" 按钮。谢谢! - 我们会在最后一次发帖后的 7 周内跟踪主题,之后的回复将被忽略 如果您以后有相关问题,请打开一个新主题并参考已关闭的主题。 -------------------------------------------------------------------------------
記事全体を表示
Interfacing KSZ9131Rnxi to iMX 8M Nano Hi,  I want to operate the KSZ9131RNxi with the iMx8M Nano SOM in our carrier Board. the driver of the phy and the fec mac are loading proprely but I do get the communication just at 10Mbits and only when I type the following after OS Boot up : $ ethtool -s eth0 speed 10 duplex full The PHY is wired to operate in RGMII mode and with a speed of 1000Mbit/S. How to solve this issue to operate the phy without using to type this command after boot up  ? and why 100Mbits and 1000Mbits is not working? I would be very thankful for your contributions. Re: Interfacing KSZ9131Rnxi to iMX 8M Nano Hi @Elias_M, Thank you for contacting NXP Support! How are you setting this up in the device tree? I believe this issue can be resolved with a correct device tree configuration. Could you please share your device tree file so I can review it? If sharing it is not possible, you can refer to the examples provided in the following link Best regards, Chavira Re: Interfacing KSZ9131Rnxi to iMX 8M Nano Hi @Chavira , Thank you for your support. Hier is how the fec device tree in Linux described:  &fec1 { fsl,magic-packet; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_fec1_gpio>,                    <&pinctrl_fec1>; phy-mode = "rgmii-id"; phy-handle = <&ethphy0>; phy-supply = <&reg_3v3_eth0>; status = "okay";     mdio { #address-cells = <1>; #size-cells = <0>;   ethphy0: ethernet-phy@0 { compatible = "ethernet-phy-ieee802.3-c22"; reg = <0>; interrupt-parent = <&gpio5>;          interrupts = <2 IRQ_TYPE_LEVEL_LOW>;   micrel,led-mode=<1>; }; }; }; reg_3v3_eth0: regulator-ethphy { compatible = "regulator-fixed"; off-on-delay=<500000>; regulator-always-on; regulator-boot-on;   regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; regulator-name = "3v3_eth0"; startup-delay-us = <200000>;   }; pinctrl_fec1_gpio: fec1gpiogrp { fsl,pins = <   /* PHY interrupt */ MX8MN_IOMUXC_SAI3_MCLK_GPIO5_IO2           0x19 >; };   pinctrl_fec1: fec1grp { fsl,pins = < MX8MN_IOMUXC_ENET_MDC_ENET1_MDC                              0x3 MX8MN_IOMUXC_ENET_MDIO_ENET1_MDIO                            0x3 MX8MN_IOMUXC_ENET_TD3_ENET1_RGMII_TD3                     0x1f MX8MN_IOMUXC_ENET_TD2_ENET1_RGMII_TD2                     0x1f MX8MN_IOMUXC_ENET_TD1_ENET1_RGMII_TD1                       0x1f MX8MN_IOMUXC_ENET_TD0_ENET1_RGMII_TD0                    0x1f MX8MN_IOMUXC_ENET_RD3_ENET1_RGMII_RD3                   0x91 MX8MN_IOMUXC_ENET_RD2_ENET1_RGMII_RD2                   0x91 MX8MN_IOMUXC_ENET_RD1_ENET1_RGMII_RD1                     0x91 MX8MN_IOMUXC_ENET_RD0_ENET1_RGMII_RD0                  0x91 MX8MN_IOMUXC_ENET_TXC_ENET1_RGMII_TXC                  0x1f MX8MN_IOMUXC_ENET_RXC_ENET1_RGMII_RXC                 0x91 MX8MN_IOMUXC_ENET_RX_CTL_ENET1_RGMII_RX_CTL     0x91 MX8MN_IOMUXC_ENET_TX_CTL_ENET1_RGMII_TX_CTL     0x1f >; }; Re: Interfacing KSZ9131Rnxi to iMX 8M Nano Hi @Elias_M,  For a better understanding I need to check the entire device tree file. Best regards, Chavira Re: Interfacing KSZ9131Rnxi to iMX 8M Nano Hi @Chavira , these are the the dts files for uboot v2020.04 and linux v5.5.  how to add the delays in the board_phy_config or they are already in the driver ?
記事全体を表示
s32k388 无法 ping 以太网 rgmii gmac0 你好,工程师们、 我在 S32K388 评估板上测试 RGMII GMAC0 以太网接口时遇到了问题——我无法成功 ping 分配的 IP 地址。从标准 LwIP 示例(使用 GMAC1)开始,我修改了 P IN S 多路复用以将信号路由到 GMAC0,相应地更新了时钟,调整了设备初始化功能,并在 Mcal 组件选项卡中更改了平台。尽管进行了这些更改,但链接仍无法正常建立,Ping 尝试失败。 能否请您查看我的修改,或使用所附的 zip 文件(包含修改后的项目)测试一下您的 GMAC0 接口?如果您对 GMAC0 和 GMAC1 之间的潜在配置差异、PHY 初始化问题或 lwIP 示例中 GMAC0 的已知限制有任何见解,我们将不胜感激。 感谢您的协助 Re: S32K388 CANNOT PING ETHERNET RGMII GMAC0 你好@vinmotion、 如您所见,代码片段中并非所有行都与 GMAC0 有关。我的所有示例都使用了这段代码,它可以修复 GMAC0 和 GMAC1。 顺祝商祺! 帕维尔 Re: S32K388 CANNOT PING ETHERNET RGMII GMAC0 谢谢先生,但你能否确认在使用 RGMII GMAC0 和 s32k388 时我们会修改设备初始化函数示例变成这样: 用这些行取代device_init()中的 DCMRWF 设置: /* 手动旁路 MUX_7,GMAC0_RX_CLK 直接来自输入引脚。*/ IP_DCM_GPR->DCMRWF3 |= DCM_GPR_DCMRWF3_MAC_RX_CLK_MUX_BYPASS(1u); /* 手动旁路 MUX_15,GMAC1_RX_CLK 直接来自输入引脚。*/ IP_DCM_GPR->DCMRWF4 |= DCM_GPR_DCMRWF4_MAC2_RX_CLK_MUX_BYPASS(1u); /* 手动启用 GMAC1_TX_RMII_CLK 回环。*/ ip_dcm_gpr->dcmrwf2 |= dcm_gpr_dcmrwf2_mac2_loobpack_clk_sel_mask | dcm_gpr_dcmrwf2_mac2_tx_rmii_clk_lpbck_en_mask; /* 手动将 GMAC1 配置为 RGMII 模式。*/ IP_DCM_GPR->DCMRWF4 |= DCM_GPR_DCMRWF4_MAC2_CONF_SEL(1u); 您可以选择注释掉 test.c 中的第 622 至 642 行,以删除 lwIP 示例的有限时间。 顺祝商祺! Re: S32K388 CANNOT PING ETHERNET RGMII GMAC0 你好@vinmotion、 我认为这个问题与本主题重复: 已解决:S32K388 RGMII GMAC0 以太网无法 ping - NXP Community 顺祝商祺! 帕维尔
記事全体を表示
有关禁用核心 API(K3)的问题 你好,团队 请问核心禁用 API 的情况如何? 客户使用的是双核 S32K324。 此外,客户正在实施 BIST。 对于 Bist,客户正在尝试禁用 Core1。 对于此实施,RTD(或 SPD、SAF)是否支持 Core1 禁用的 API?(例如以下序列) 谢谢。 RTD SAFETY_SW 资料来源直接客户 Re: Question about Core disable API(K3) 你好@Luke_Chun、 据我所知,从主内核关闭活动应用内核包括"停止任何正在进行的内核通信" 并通过无线网络让应用内核进入休眠状态,从主内核关闭应用内核时钟。它是根据您提到的图表绘制的。 在 Mcu_SetMode()中,内核将再次按照配置进行设置,其中包括图中提到的关闭内核时钟的步骤。这段代码位于函数 Power_Ip_MC_ME_ConfigureCore() 中,但它是静态函数,因此用户只需使用函数 Power_Ip_MC_ME_ConfigCoreCOFBClock()。 如果在配置中启用了内核时钟,这将与内核初始化序列相对应。 顺祝商祺! Nhi Re: Question about Core disable API(K3) 你好@Nhi_Nguyen 感谢您的回复。 你提及的 " post 版本 " 用于进行不同的配置,例如 Core1 时钟盒和 Core1 非时钟外壳。 这样做对吗? (您这样做的原因是什么?) 谢谢。 Re: Question about Core disable API(K3) 你好@Luke_Chun、 为此,微控制器驱动程序支持关闭核心应用时钟: 但应用程序必须导出 WFI,主核将检查应用程序核的 WFI 状态并执行下一步操作,如:禁用核时钟......如上图所示。 例如,主内核为 CM7_0,关闭内核 CM7_1 时钟,在配置中需要进行如下配置: 调用 Mcu_SetMode(),核心时钟 CM7_1 将被禁用。 顺祝商祺! Nhi
記事全体を表示
MCU Stuck in Reset – Unable to Debug via S32 Debug Probe I am unable to debug the MCU using the S32 Debug Probe. The status I observe is as follows: SoC Reset: Asserted SoC Type: GenericDevice SoC IDCODE: 0xFFFF SoC UID: 0xFFFF When I attempt to start debugging, the following message appears during the board initialization stage: ccs: Initialization sequence error in command 0x5 In addition, I have measured the MCU RESET_B pin, and it is continuously held at a low voltage level. Could you please advise how to troubleshoot or resolve this issue? Thank you for your assistance. Re: MCU Stuck in Reset – Unable to Debug via S32 Debug Probe Could you specify used EVB? Re: MCU Stuck in Reset – Unable to Debug via S32 Debug Probe I am using a self-designed custom board, not the S32K148 EVB. The MCU I am using is S32K148HAT0MLLT. I am using S32 Design Studio (S32DS) together with the NXP Debug Probe. I have tried both DEBUG_RAM and DEBUG_FLASH build configurations, but I am unable to connect in either case. The error messages are shown in my previous post. Regarding the hardware status: The RESET_B pin remains at a low level continuously. Even without connecting the Debug Probe, the RESET_B pin is still low. During power-up, RESET_B does not go high even momentarily. There is no external reset IC or supervisor on the board. The SoC ID is read as 0xFFFF. VDD, VDDA, and VDDIO voltages are normal. The RESET_B pin has a 3.3 V pull-up resistor, and I have confirmed that it is not being pulled low by any external circuitry. I have also confirmed there is no miswiring. The RESET_B pin is connected to SWD pin 6 (nRESET) on the debug connector. Even when the Debug Probe is not connected, SWD pin 6 (nRESET) remains low. This board was working before, and the issue occurred suddenly during development, so it is unlikely to be a soldering or assembly issue.   At this moment, I am not sure what is holding the device in reset or preventing debug access. Please help me analyze and resolve this issue. Thank you.
記事全体を表示
kds_quick_start 有遗漏错误。 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 对于 Windows 版本的 SDK,我无法使用在 FRDM-KL25Z 上运行的带有 CMSIS-DAP 的 OpenSDA。 快速入门指南图 12 显示“其他选项”的空白字段。 您必须输入“-f kinetis.cfg”否则您将无法调试。 见下文。 概述
記事全体を表示
BlueBox <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> Demo 该演示展示了一个智能高效的汽车系统,其中包括环视视图(360 度摄像机)和激光雷达(360 度激光环视视图),用于行人检测、交通标志识别、速度检测等。 产品 链接 恩智浦BlueBox https://www.nxp.com/design/development-boards/automotive-development-platforms/nxp-bluebox-autonomous-driving-development-platform:BLBX?&fsrch=1&sr=2&pageNum=1 QorIQ® LS2088A参考设计板 https://www.nxp.com/design/qoriq-developer-resources/qoriq-ls2088a-reference-design-board:LS2088A-RDB?&lang_cd=en S32V230系列处理器 https://community.nxp.com/external-link.jspa?url=http %3A% 2F %2Fwww.nxp.com% 2Fproducts %2Fautomotive-products% 2Fmicrocontro… S32R雷达微控制器 - S32R27 https://community.nxp.com/external-link.jspa?url=http %3A% 2F %2Fwww.nxp.com% 2Fproducts %2Fautomotive-products% 2Fmicrocontro… 32位汽车通用MCU https://community.nxp.com/external-link.jspa?url=http %3A% 2F %2Fwww.nxp.com% 2Fproducts %2Fautomotive-products% 2Fmicrocontro… 其他链接 ADAS与自动驾驶|恩智浦 V2X通信|恩智浦 汽车电子
記事全体を表示
フリースケールのコンセプト・カー <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> デモオーナー: レベッカ   フリースケールのコンセプトカーは、パワートレイン、インフォテインメント、クラスタ、セーフティ、ボディなどのアプリケーションにおける自動車システム向けの複数のソリューションを展示しています。具体的なシステムソリューションには、エンジン制御、小型および大型モーター制御、ランプ制御、ラジオ、デジタルクラスター、ゲージドライバー、TPMS、タッチコントロール、サラウンドビューカメラ、メディアプレーヤー、高速ブートLinux®などがあります。     https://community.nxp.com/players.brightcove.net/4089003392001/default_default/index.html?videoId=4282635362001」style="color: #05afc3;background-color: #ffffff;フォントサイズ:14.4px;" target="_blank   注目のNXP製品 Qorivva S12マグニV S08 i.MX6 リンク オートモーティブ オートモーティブ Re:フリースケールコンセプトカー <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> イアン、今後数週間でコミュニティで共有されたすべてのフリースケールのYouTubeビデオは新しいビデオプロバイダーに移行され、すべての国で利用できるようになります。 Re:フリースケールコンセプトカー <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 静止画もいくつか入れていただけると嬉しいです。ビデオは、中国や他の一部の国では再生されないことがよくあります。
記事全体を表示
RT1015 APP BEE加密操作方法 RT1015 APP BEE加密操作方法 1 简介   NXP RT 产品 BEE 加密可以采用主密钥(固定的 OTPMK SNVS 密钥)或用户密钥(User Key)方式。主密钥方式是固定密钥,用户无法修改。实际使用中,很多客户需要自定义密钥,在这种情况下,客户可以使用用户密钥方式。本文将以 NXP RT1015 为例,使用灵活的用户密钥方式实现无需 HAB 认证的 BEE 加密。 BEE加密测试将在MIMXRT1015-EVK板上进行,主要实现三种方式:MCUBootUtility工具、配合MFGTool的Commander线方式以及使用MCUXPresso Secure Provisioning工具下载BEE加密代码。   2 准备 2.1 工具准备   MCUBootUtility下载链接: https://github.com/JayHeng/NXP-MCUBootUtility/archive/v2.3.0.zip    image_enc2.zip download link: https://www.cnblogs.com/henjay724/p/10189602.html 解压image_enc2.zip后,将获得 image_enc.exe,将其放在MCUBootUtility工具文件夹下:NXP-MCUBootUtility-2.3.0\tools\image_enc2\win RT1015 SDK下载链接: https://mcuxpresso.nxp.com/ 2.2 app文件准备 本文档将以 SDK_2.8.0_EVK-MIMXRT1015 中的 iled_blinky MCUXpresso IDE 项目为例,生成不带 XIP 启动头的应用程序。生成evkmimxrt1015_igpio_led_output.s19,稍后会用到。 图1 3 使用用户密钥对 MCUbootUtility BEE 进行加密  本章将使用MCUBootUtility工具实现app使用用户密钥进行BEE加密,无需HAB认证。 3.1 MIMXRT1015-EVK原装保险丝图   在进行 BEE 加密之前,需要先读出原始的保险丝图,用于与 BEE 加密操作后的保险丝图进行比较。使用 MCUbootUtility 工具的 effuse 操作实用程序页面可以读出所有保险丝图。 图2 3.2 MCUbootutility BEE加密配置 图3 本文档只使用了BEE加密,没有使用HAB证书,所以在“启用HAB(BEE/OTFAD)加密证书”中选择:否。 参见图4,选择“密钥存储区域”为灵活用户密钥,保护区域0从0X60001000开始,长度为0x2000,没有加密整个应用程序区域,只是用来比较原始应用程序和BEE加密的应用程序代码,我们可以从0X60003000开始找到该代码为明文代码。但从 0X60001000 到 0X60002FFF 将是 BEE 加密代码。 配置完成后,点击“all in one action”按钮,将代码烧录到外部QSPI flash中。 图4 图5 SW_GP2区域里的fuse可以单独烧录,点击“烧录DEK数据”按钮即可。 图6 然后再次读出所有的保险丝图,我们可以在cfg1中找到,BEE_KEY0_SEL是SW-GP2,它定义了BEE密钥采用灵活使用密钥方法,而不是固定主密钥。 图7 然后从flash中读出BEE烧录的代码和正常烧录的代码,进行对比,具体情况是: 图8 图9 图10 图11 图12 我们可以发现,经过BEE加密后,0X60001000到0X60002FFF为加密后的代码,0X6000400区域添加了EKIB0数据,0X6000480区域添加了EPRDB0数据。因为我们只选择了BEE引擎0,没有选择BEE引擎1,所以发现0X60000800的EKIB1和EPRDB1全部为0,不是有效数据。 从0X60003000处,我们可以发现app data是明文数据,与我们预期的BEE配置app加密范围结果一致。 至此,我们已经实现了MCUBootUtility工具的BEE加密。退出串口下载模式,将板子上的MIMXRT10150-EVK SW8配置为:1-ON,2-OFF,3-ON,4-OFF,复位板子,发现板子上的用户LED在闪烁,BEE加密代码正在工作。 4 使用命令行模式的 BEE 加密 在实际使用中,很多客户也需要使用命令行模式来实现BEE加密操作,并选择MFGTool下载方式。所以本文档也会给出如何使用SDK SDK_2.8.0_EVK-MIMXRT1015\middleware\mcu-boot\bin\Tools和image_enc工具实现BEE commander line方法加密操作,然后使用MFGTool将BEE加密后的代码下载到RT1015外部QSPI flash中。 由于从SDK2.8.0开始,blhost、elftosb相关工具不会直接打包在SDK中间件中,客户需要从此链接下载: www.nxp.com/mcuboot 4.1 命令行文件准备   准备一个文件夹,将 elftosb.exe、image_enc.exe 、应用程序文件 evkmimxrt1015_iled_blinky_0x60002000.s19和RemoveBinaryBytes.exe 放入该文件夹。 RemoveBinaryBytes.exe 用于修改 bin 文件,可以从以下链接下载: https://community.nxp.com/pwmxy87654/attachments/pwmxy87654/imxrt/8733/2/Test.zip ( https://community.nxp.com/t5/i-MX-RT/RT1015-BEE-XIP-Step-Confirm/mp/1070076/page/2 ) 然后准备以下文件: imx-flexspinor-正常-无符号.bd imxrt1015_app_flash_sb_gen.bd burn_fuse.bd 4.1.1imx-flexspinor-正常-无符号.bd imx-flexspinor-normal-unsigned.bd文件用于生成app文件evkmimxrt1015_iled_blinky_0x60002000.s19相关的启动.bin文件,其中包括 IVT 头代码: ivt_evkmimxrt1015_iled_blinky_0x60002000.bin ivt_evkmimxrt1015_iled_blinky_0x60002000_nopadding.bin bd 文件内容是 /*********************file start****************************/ options {     flags = 0x00;     startAddress = 0x60000000;     ivtOffset = 0x1000;     initialLoadSize = 0x2000;     //DCDFilePath = "dcd.bin";     # Note: This is required if the default entrypoint is not the Reset_Handler     #       Please set the entryPointAddress to Reset_Handler address     // entryPointAddress = 0x60002000; }   sources {     elfFile = extern(0); }   section (0) { } /*********************file end****************************/‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍   4.1.2 imxrt1015_app_flash_sb_gen.bd 该文件用于配置外部QSPI flash,并实现烧写功能,通常使用这个.bd生成 .sb 文件文件,然后使用 MFGtool 选择这个 .sb文件并将代码下载到外部闪存。 /*********************file start****************************/ sources {     myBinFile = extern (0); }   section (0) {     load 0xc0000007 > 0x20202000;     load 0x0 > 0x20202004;     enable flexspinor 0x20202000;     erase  0x60000000..0x60005000;     load 0xf000000f > 0x20203000;     enable flexspinor 0x20203000;     load  myBinFile > 0x60000400; } /*********************file end****************************/‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ 4.1.3burn_fuse.bd     BEE加密操作需要烧录保险丝图,但保险丝数据是从0到1的一次性操作,这里将烧录保险丝的操作分开,只在第一次烧录时,RT芯片还没有修改保险丝图的时候进行烧录操作。否则,下次操作时,只需修改应用程序代码,无需烧录保险丝。Burn_fuse.bd主要用于配置需要烧录相关保险丝图的保险丝数据,然后生成.sb文件,并与应用程序一起使用MFGTool进行烧录。 /*********************file start****************************/ # The source block assign file name to identifiers sources { }   constants { }   #                !!!!!!!!!!!! WARNING !!!!!!!!!!!! # The section block specifies the sequence of boot commands to be written to the SB file # Note: this is just a template, please update it to actual values in users' project section (0) {     # program SW_GP2     load fuse 0x76543210 > 0x29;     load fuse 0xfedcba98 > 0x2a;     load fuse 0x89abcdef > 0x2b;     load fuse 0x01234567 > 0x2c;         # Program BEE_KEY0_SEL     load fuse 0x00003000 > 0x6;     } /*********************file end****************************/‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ 4.2 BEE指挥官线路操作步骤 创建rt1015_bee_userkey_gp2.bat文件,内容为: elftosb.exe -f imx -V -c imx-flexspinor-normal-unsigned.bd -o ivt_evkmimxrt1015_iled_blinky_0x60002000.bin evkmimxrt1015_iled_blinky_0x60002000.s19 image_enc.exe hw_eng=bee ifile=ivt_evkmimxrt1015_iled_blinky_0x60002000.bin ofile=evkmimxrt1015_iled_blinky_0x60002000_bee_encrypted.bin base_addr=0x60000000 region0_key=0123456789abcdeffedcba9876543210 region0_arg=1,[0x60001000,0x2000,0] region0_lock=0 use_zero_key=1 is_boot_image=1 RemoveBinaryBytes.exe evkmimxrt1015_iled_blinky_0x60002000_bee_encrypted.bin evkmimxrt1015_iled_blinky_0x60002000_bee_encrypted_remove1K.bin 1024 elftosb.exe -f kinetis -V -c program_imxrt1015_qspi_encrypt_sw_gp2.bd -o boot_image_encrypt.sb evkmimxrt1015_iled_blinky_0x60002000_bee_encrypted_remove1K.bin elftosb.exe -f kinetis -V -c burn_fuse.bd -o burn_fuse.sb pause‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ 图13 图14 主要有5个步骤: 4.2.1 elftosb生成带IVT头的app文件 elftosb.exe -f imx -V -c imx-flexspinor-normal-unsigned.bd -o ivt_evkmimxrt1015_iled_blinky_0x60002000.bin evkmimxrt1015_iled_blinky_0x60002000.s19 此命令执行后,将生成两个带有 IVT 头的文件: ivt_evkmimxrt1015_iled_blinky_0x60002000.bin,ivt_evkmimxrt1015_iled_blinky_0x60002000_nopadding.bin 这里我们将使用 ivt_evkmimxrt1015_iled_blinky_0x60002000.bin 4.2.2 image_enc 生成app相关的BEE加密代码 image_enc.exe hw_eng=bee ifile=ivt_evkmimxrt1015_iled_blinky_0x60002000.bin ofile=evkmimxrt1015_iled_blinky_0x60002000_bee_encrypted.bin base_addr=0x60000000 region0_key=0123456789abcdeffedcba9876543210 region0_arg=1,[0x60001000,0x2000,0] region0_lock=0 use_zero_key=1 is_boot_image=1 关于image_enc中的关键字含义,我们可以直接运行image_enc来查找。 图15 此命令行运行结果将与 MCUBootUtility 配置相同。加密区域从0X60001000开始,长度为0x2000,更多细节可以参考图4。 运行之后我们可以得到这个文件: evkmimxrt1015_iled_blinky_0x60002000_bee_encrypted.bin 4.2.3RemoveBinaryBytes 删除1024字节以上的BEE加密文件 RemoveBinaryBytes.exe evkmimxrt1015_iled_blinky_0x60002000_bee_encrypted.bin evkmimxrt1015_iled_blinky_0x60002000_bee_encrypted_remove1K.bin 1024 此命令用于删除BEE加密文件中,上述0X400长度的数据,修改后加密文件将直接从EKIB0开始。 运行之后会得到这个文件: evkmimxrt1015_iled_blinky_0x60002000_bee_encrypted_remove1K.bin   4.2.4 elftosb生成BEE加密app相关sb文件 elftosb.exe -f kinetis -V -c program_imxrt1015_qspi_encrypt_sw_gp2.bd -o boot_image_encrypt.sb evkmimxrt1015_iled_blinky_0x60002000_bee_encrypted_remove1K.bin 该命令将使用 evkmimxrt1015_iled_blinky_0x60002000_bee_encrypted_remove1K.bin 和 program_imxrt1015_qspi_encrypt_sw_gp2.bd 生成 sb 文件,该文件可以使用 MFGTool 将代码下载到外部闪存 运行之后我们可以得到这个文件: 启动映像加密.sb 4.2.5 elftosb生成烧录fuse相关的sb文件 elftosb.exe -f kinetis -V -c burn_fuse.bd -o burn_fuse.sb 该命令用于生成BEE代码相关的保险丝位sb文件,该sb文件将与MFGTool中的boot_image_encrypt.sb一起刻录。但是烧录保险丝之后,下次修改app操作就不需要添加烧录保险丝的操作了,直接下载添加即可。 运行之后可以得到这个文件: burn_fuse.sb   4.3 MFGTool下载 MIMXRT1015-EVK板进入串口下载器模式,找到两根USB线,分别插在J41和J9处,连接到PC。MFGTool 位于以下文件夹中: SDK_2.8.0_EVK-MIMXRT1015\中间件\mcu-boot\bin\Tools\mfgtools-rel 如果需要烧录burn_fuse.sb,需要修改ucl2.xml,文件夹路径: \SDK_2.8.0_EVK-MIMXRT1015\middleware\mcu-boot\bin\Tools\mfgtools-rel\Profiles\MXRT1015\OS固件 添加以下列表即可实现。         Loading Flashloader.     Jumping to Flashloader.       Get Property 1.     Program Boot Image.     Reset.        Get Property 1.     Program Boot Image.     Done ‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ 如果已经烧录了Fuse位,只需要更新应用程序,然后我们就可以使用MIMXRT1015-DevBoot         Loading Flashloader.     Jumping to Flashloader.        Get Property 1.     Program Boot Image.     Done ‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ 选择哪个详细列表,由 cfg.ini 名称项决定 [profiles] chip = MXRT1015 [platform] board = [LIST] name = MXRT1015-DevBoot‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ 因为我这边先做了MCUbootUtility操作,然后保险丝就烧了,所以在命令行里,我就直接用MXRT1015-DevBoot下载app.sb 图16 可以发现,烧录成功,点击停止按钮,将板子上的MIMXRT1015-EVK的SW8配置为1-ON,2-OFF,3-ON,4-OFF,重启板子,可以发现板子上的LED在闪烁,说明命令行也能成功完成BEE加密。 5 MCUXpresso 安全配置 BEE 无符号操作 这部分将使用MCUXPresso Secure Provisioning工具完成BEE unsigned image的下载,BEE unsigned image只是使用BEE,没有经过认证。 5.1 工具下载 MCUXPresso Secure Provisioning下载链接为: https://www.nxp.com/design/software/development-software/mcuxpresso-software-and-tools-/mcuxpresso-secure-provisioning-tool:MCUXPRESSO-SECURE-PROVISIONING 下载并安装,最好先阅读工具文档: C:\nxp\MCUX_Provi_v2.1\MCUXpresso Secure Provisioning Tool.pdf 5.2 操作步骤 步骤1:创建新的工具工作区 File->New Workspace,选择工作区路径。 图17 Step2:芯片启动相关配置 图18 这里需要注意的是,boot type需要选择为XIP Encrypted(BEE User Keys) unsigned,即没有添加HAB认证功能。 步骤3:USB连接 连接选择USB,会使用USB HID以串行下载模式连接开发板,所以MIMXRT1015-EVK开发板需要将USB口插入J9,开发板需要进入串行下载模式: SW8:1-开,2-关,3-关,4-开 连接测试连接按钮,连接结果为: 图19 可以看到连接正常,由于这块板子之前做过BEE操作,所以相应的BEE保险丝被烧了,然后发现BEE按键和按键源SW-GP2的保险丝已经有数据了。 步骤4:图像选择 和前面的内容一样,准备一个应用程序镜像。 步骤5:XIP加密(BEE用户密钥)配置 图20 这里需要选择使用哪个引擎,我们选择Engine0,BEE引擎KEY使用零密钥,密钥源使用SW-GP2,那么详细的用户密钥数据为:0123456789abcdeffedcba9876543210 将被写入swGp2保险丝区域。 因为我的电路板已经做了那个保险丝操作,所以这里不会再烧保险丝了。 步骤6:构建镜像 图21 这里我们会发现,这个操作之后,工具会生成5个文件: 1) evkmimxrt1015_iled_blinky_0x60002000.bin 2) evkmimxrt1015_iled_blinky_0x60002000_bootable.bin 3)evkmimxrt1015_iled_blinky_0x60002000_bootable_nopadding.bin 4) evkmimxrt1015_iled_blinky_0x60002000_nopadding.bin 5) evkmimxrt1015_iled_blinky_0x60002000_nopadding_ehdr0.bin 1)、2)、3)是纯文本文件,1)和2)完全相同,此文件从基数0开始映射数据,从0x1000开始是IVT+BD+DCD,从0X2000开始是app,因此这些文件是整个图像,只是FlexSPI配置块数据除外,这些数据应从基址0开始放置。3)它是2)图像,只是删除了前0X1000个数据,并且仅来自IVT+BD+DCD+app。 4)、5)是BEE加密后的图像,4)和3)相关,只是BEE加密后的图像,5)是EKIB0、EPRDB0的数据,这些数据应该放在从0X60000400开始的真实地址中,也就是BEE Encrypted Key Info Block 0和Encrypted Protection Region Descriptor Block 0的数据,因为我们刚才用到了engine0,所以只有engin0的数据。 实际上BEE整个镜像包含:FlexSPI配置块数据+IVT+BD+DCD+APP FlexSPI 配置块数据是明文,但从 0X60001000 到 0X60002fff 是加密图像。 步骤7:刻录加密映像 图22 点击Write Image按钮,完成BEE图像程序。 这里只需打开 bee_user_key0.bin,我们会发现,它正是图20中定义的用户密钥数据,也应该写入swGp2保险丝中。 查看日志,我们会发现主要有这些进程: 从 0x60000000 擦除图像,长度为 0x5000。 生成 flexSPI 配置块数据,并从 0x60000000 下载 将 evkmimxrt1015_iled_blinky_0x60002000_nopadding_ehdr0.bin 烧录至 0X60000400 将 evkmimxrt1015_iled_blinky_0x60002000_nopadding.bin 烧录至 0x60001000 修改MIMXRT1015-EVK SW8:1-ON,2-OFF,3-ON,4-OFF,复位或重新给板子上电,我们会发现板载LED灯闪烁,这说明蜜蜂加密镜像已经运行正常。 请注意:SW8_1 是加密 XIP 引脚,必须启用,否则,即使将 BEE 加密映像下载到外部闪存,启动也会失败,因为 ROM 将使用正常启动而不是 BEE 加密启动。因此,SW8_1 应该处于 ON 状态。 下面的图片是BEE加密图像读出文件,与工具生成的文件进行比较。 图23 图24 图25 图26 图27 关于MCUBootUtility缺少BEE工具image_enc.exe,我们还可以使用 MCUXPresso Secure Provisioning 的 image_enc.exe: 复制: C:\nxp\MCUX_Provi_v2.1\bin\tools\image_enc\win\image_enc.exe 到 MCUbootUtility 文件夹: NXP-MCUBootUtility-3.2.0\tools\image_enc2\win 附件还包含有关此工具使用操作的视频。 i.MXRT 101x
記事全体を表示