Multi Source Translation Content

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

Multi Source Translation Content

Discussions

Sort by:
STOP1やVLPSモードにS32K116できず、STOP2は動作します こんにちは、 私のプロジェクトでは、バッテリーの消費電力を抑えるために、S32K116をスリープモードにする必要があります。私はS32DS 3.6.1とSDK PlatformSDK_S32K1_S32M24、gccバージョン10.2を使っています。低消費電力機能について詳しくないので、評価ボードS32K116EVB-QSGを使用して小さなテストプロジェクトを作成しました。 私はLptmrをウェイクアップソースとして使用しており、LPOの1kHzクロックを使用しています。 終わりのないforループに入る前に青いLEDが切り替えられ、リセットとウェイクアップを区別します。ループに入るとカウンターが増え、赤いLEDが6回点滅してからスリープモードに入ります。スリープモード中はLptmrが経過し、S32K116を起動させ、Lptmr割り込みハンドラが緑色のLEDを切り替えて起動しているのを確認します。 これはSTOP2モードでは期待どおりに動作しますが、STOP1モードやVLPSモードでは動作しません。イライラして、見つけた限りすべてのクロックのクロックモニターを無効にしましたが、効果はありません。 STOP1とVLPSの場合、リセット時にPower_Ip_GetResetRawValue()は0x2000を返します。これは停止確認エラー(SACKERR)を示します。 インターネット上で適切なアプリケーションやスニペットが見つからなかったので、ここで問題を共有します。誰かが私が見落としている点、つまりSTOP1やVLPSに切り替えようと要求するとコントローラがリセットされる理由を教えてもらえればと思います。 アプリケーションノートAN5425を参照しましたが、私の意見にあまり実用的なヒントは与えられていません。 以下にコードを示します。 /*================================================================================================== * プロジェクト:RTD AUTOSAR 4.7 * プラットフォーム:CORTEXM * ペリフェラル:S32K14X * 依存関係:なし * * Autosar バージョン:4.7.0 * Autosar リビジョン:ASR_REL_4_7_REV_0000 * AUTOSAR 会議バリアント: * ソフトウェアバージョン:3.0.0 * ビルドバージョン:S32K1_RTD_3_0_0_QLP02_D2505_ASR_REL_4_7_REV_0000_20250530 * * 著作権 2020-2025 NXP * * NXPの機密情報および専有情報。このソフトウェアはNXPが所有または管理しており、以下の通りに *適用されるライセンス条項に厳密に従って使用してください。明示的に * 当該条件に同意するか、ダウンロード、インストール、アクティベート、および/またはその他 * ソフトウェアを使用することで、あなたは読んだこと、そして同意したことになります * 当該ライセンス条項を遵守し、それに拘束される。もしあなたが同意しない場合 * 該当するライセンス条項に拘束される場合、保持、インストール、 * ソフトウェアを有効化または使用してください。 == /** * @file main.c * * @addtogroup main_module メインモジュールドキュメント * @{ */ /* 必要な設定ファイルを含めます。*/ #include #include #include #include #include #include #include 列挙型 { MODE_RUN = 0、 MODE_VLPS 、 MODE_STOP1 、 モード停止2 }; bool wake_up = false; // プロトタイプ void lptmr0_irq_handler ( void ); void power_mode_report_errors_callback ( Power_Ip_ReportErrorType Error, uint8 ErrorCode); void TestDelay ( uint32 delay) { 静的揮発性uint32 DelayTimer = 0; while (DelayTimer < delay) { DelayTimer++; } 遅延タイマー=0; } int main ( void ) { uint8_t wait_cnt = 0; Power_Ip_Init(&Power_Ip_HwIPsConfigPB); volatile Power_Ip_RawResetType reason = Power_Ip_GetResetRawValue(); Clock_Ip_Init(&Clock_Ip_aClockConfig[0]); Port_Ci_Port_Ip_Init( NUM_OF_CONFIGURED_PINS_PortContainer_0_BOARD_InitPeripherals, g_pin_mux_InitConfigArr_PortContainer_0_BOARD_InitPeripherals); Lptmr_Gpt_Ip_Init(0, &LPTMR_0_InitConfig_PB); Power_Ip_InstallNotificationsCallback(power_mode_report_errors_callback); IntCtrl_Ip_Init(&IntCtrlConfig_0); IntCtrl_Ip_InstallHandler( LPTMR0_IRQn , lptmr0_irq_handler, NULL); // IRQハンドラをインストールします IntCtrl_Ip_EnableIrq( LPTMR0_IRQn ); // 関係するIRQを有効にする Power_Ip_SetMode (&Power_Ip_aModeConfigPB[ MODE_RUN ]); // コールドスタートの合図 Gpio_Dio_Ip_WritePin(BLUE_LED_ID_PORT, BLUE_LED_ID_PIN, 1U); テスト遅延(2000000/5); Gpio_Dio_Ip_WritePin(BLUE_LED_ID_PORT, BLUE_LED_ID_PIN, 0U); のために(;;) { Gpio_Dio_Ip_TogglePins(RED_LED_ID_PORT, 1 < RED_LED_ID_PIN); テスト遅延(1000000/5); if (++wait_cnt > 10) { wait_cnt = 0; // 時計モニターを無効にする Clock_Ip_DisableClockMonitor( FIRC_CLK ); Clock_Ip_DisableClockMonitor( FIRC_VLP_CLK ); Clock_Ip_DisableClockMonitor( FIRC_STOP_CLK ); Clock_Ip_DisableClockMonitor( FIRCDIV1_CLK ); Clock_Ip_DisableClockMonitor( FIRCDIV2_CLK ); Clock_Ip_DisableClockMonitor( SIRC_CLK ); Clock_Ip_DisableClockMonitor( SIRC_VLP_CLK ); Clock_Ip_DisableClockMonitor( SIRC_STOP_CLK ); Clock_Ip_DisableClockMonitor( SIRCDIV1_CLK ); Clock_Ip_DisableClockMonitor( SIRCDIV2_CLK ); Clock_Ip_DisableClockMonitor( LPO_128K_CLK ); Clock_Ip_DisableClockMonitor( LPO_32K_CLK ); Clock_Ip_DisableClockMonitor( LPO_1K_CLK ); Clock_Ip_DisableClockMonitor( SCS_CLK ); Clock_Ip_DisableClockMonitor( ADC0_CLK ); Clock_Ip_DisableClockMonitor( BUS_CLK ); Clock_Ip_DisableClockMonitor( BUS_RUN_CLK ); Clock_Ip_DisableClockMonitor( BUS_VLPR_CLK ); Clock_Ip_DisableClockMonitor( CLKOUT0_CLK ); Clock_Ip_DisableClockMonitor( CMP0_CLK ); Clock_Ip_DisableClockMonitor( CMU0_CLK ); Clock_Ip_DisableClockMonitor( CMU1_CLK ); Clock_Ip_DisableClockMonitor( CORE_CLK ); Clock_Ip_DisableClockMonitor( CORE_RUN_CLK ); Clock_Ip_DisableClockMonitor( CORE_VLPR_CLK ); Clock_Ip_DisableClockMonitor( CRC0_CLK ); Clock_Ip_DisableClockMonitor( DMA0_CLK ); Clock_Ip_DisableClockMonitor( DMAMUX0_CLK ); Clock_Ip_DisableClockMonitor( EIM0_CLK ); Clock_Ip_DisableClockMonitor( ERM0_CLK ); Clock_Ip_DisableClockMonitor( FIRC_MON1_CLK ); Clock_Ip_DisableClockMonitor( FIRC_MON2_CLK ); Clock_Ip_DisableClockMonitor( FLEXCAN0_CLK ); Clock_Ip_DisableClockMonitor( FTFC_CLK ); Clock_Ip_DisableClockMonitor( FTM0_CLK ); Clock_Ip_DisableClockMonitor( FTM0_EXT_CLK ); Clock_Ip_DisableClockMonitor( FTM1_CLK ); Clock_Ip_DisableClockMonitor( FTM1_EXT_CLK ); Clock_Ip_DisableClockMonitor( FlexIO_CLK ); Clock_Ip_DisableClockMonitor( GPIO0_CLK ); Clock_Ip_DisableClockMonitor( LPI2C0_CLK ); Clock_Ip_DisableClockMonitor( LPIT0_CLK ); Clock_Ip_DisableClockMonitor( LPO_CLK ); Clock_Ip_DisableClockMonitor( LPSPI0_CLK ); Clock_Ip_DisableClockMonitor( LPTMR0_CLK ); Clock_Ip_DisableClockMonitor( LPUART0_CLK ); Clock_Ip_DisableClockMonitor( LPUART1_CLK ); Clock_Ip_DisableClockMonitor( MPU0_CLK ); Clock_Ip_DisableClockMonitor( MSCM0_CLK ); Clock_Ip_DisableClockMonitor( PDB0_CLK ); Clock_Ip_DisableClockMonitor( PORTA_CLK ); Clock_Ip_DisableClockMonitor( PORTB_CLK ); Clock_Ip_DisableClockMonitor( PORTC_CLK ); Clock_Ip_DisableClockMonitor( PORTD_CLK ); Clock_Ip_DisableClockMonitor( PORTE_CLK ); Clock_Ip_DisableClockMonitor( RTC0_CLK ); Clock_Ip_DisableClockMonitor( RTC_CLK ); Clock_Ip_DisableClockMonitor( RUN_BUS_CLK ); Clock_Ip_DisableClockMonitor( RUN_CORE_CLK ); Clock_Ip_DisableClockMonitor( RUN_FLASH_CLK ); Clock_Ip_DisableClockMonitor( RUN_PRI_DIV_SYS_CLK ); Clock_Ip_DisableClockMonitor( RUN_SYS_CLK ); Clock_Ip_DisableClockMonitor( SCG_CLKOUT_CLK ); Clock_Ip_DisableClockMonitor( SCS_RUN_CLK ); Clock_Ip_DisableClockMonitor( SCS_VLPR_CLK ); Clock_Ip_DisableClockMonitor( SLOW_CLK ); Clock_Ip_DisableClockMonitor( SLOW_RUN_CLK ); Clock_Ip_DisableClockMonitor( SLOW_VLPR_CLK ); Clock_Ip_DisableClockMonitor( THE_LAST_PRODUCER_CLK ); Clock_Ip_DisableClockMonitor( VLPR_BUS_CLK ); Clock_Ip_DisableClockMonitor( VLPR_CORE_CLK ); Clock_Ip_DisableClockMonitor( VLPR_FLASH_CLK ); Clock_Ip_DisableClockMonitor( VLPR_PRI_DIV_SYS_CLK ); Clock_Ip_DisableClockMonitor( VLPR_SYS_CLK ); // タイマーIRQを有効にしてウェイクアップタイマーを起動する Lptmr_Gpt_Ip_EnableInterrupt(0); Lptmr_Gpt_Ip_StartTimer(0, 5000); // 1. SysTick(またはその他の定期的な割り込み)を無効にする S32_SysTick-> CSRr &= ~S32_SysTick_CSR_ENABLE_MASK; // 2.FIRC/SOSC/SPLL を用いた無効化/非init化ペリフェラル // (LPUART、ADC、PNETを使用しない場合はFlexCANなど) // 3. 保留中の割り込みフラグをすべてクリアする // (特に LPTMR、PORT など) IntCtrl_Ip_ClearPending( LPTMR0_IRQn ); // 4. スリープモードに入る //Power_Ip_SetMode(&Power_Ip_aModeConfigPB[MODE_VLPS]); Power_Ip_SetMode (&Power_Ip_aModeConfigPB[ MODE_STOP1 ]); //Power_Ip_SetMode(&Power_Ip_aModeConfigPB[MODE_STOP2]); ---MCUはここで目覚めます--- // 5. 異常終了が発生したかどうかを確認する if ((IP_SMC-> PMCTRL >> 3U) & 0x1U) { /* 中止処理 */ __asm ( "NOP" ); } // 6.SysTickおよびペリフェラルの再有効化 S32_SysTick-> CSRr |= S32_SysTick_CSR_ENABLE_MASK; } } } void lptmr0_irq_handler ( void ) { IntCtrl_Ip_ClearPending( LPTMR0_IRQn ); Lptmr_Gpt_Ip_StopTimer(0); wake_up = true; Gpio_Dio_Ip_TogglePins(GREEN_LED_ID_PORT, 1 } void power_mode_report_errors_callback ( Power_Ip_ReportErrorType Error, uint8 ErrorCode) { volatile Power_Ip_ResetType reset_type; reset_type = Power_Ip_GetResetReason(); __asm ( "NOP" ); } /** @} */ Re: Can't get S32K116 into STOP1 or VLPS mode, STOP2 does work こんにちは、@fruit_spinner 実は私も数週間前に全く同じ問題に遭遇しました。 根本原因は、S32K1のS32 SCTにCMUクロックゲートが搭載されていることだと判明しました。 デフォルトで有効になっています。これは低電力モードに入るときに問題を引き起こします。具体的には、 リセットがトリガーされ、リセット元はSACKERRビットがセットされることで示されます。 ご提供いただいたデモをレビューおよびテストした結果、以下の点をご提案いたします。 変更点: 1.S32 SCTクロック設定インターフェースでは、CMU0およびCMU1のクロックゲートを無効にします。 2. 以下のコードは不要なので、削除またはコメントアウトしてください。 Re: Can't get S32K116 into STOP1 or VLPS mode, STOP2 does work こんにちは、 ご回答いただきありがとうございました。おかげで問題が解決しました。今は期待通りに動作しています。 よろしくお願いいたします フイブ
View full article
Linux環境におけるS32K324開発に関するコンサルティング Ubuntu 24環境でS32DSを使用して低レベルのソフトウェア設定を行うことは可能でしょうか?特に、Linux環境におけるS32DSバージョン3.6.11について懸念しています。設定ツールを使用して設定を生成した後、 RTEはコードを生成できますか? Re: LINUX环境 下开发S32K324咨询 この要望を報告し、更新計画を策定したいと考えています。 Re: LINUX环境 下开发S32K324咨询 こんにちは@ han00 これはバグではありません。単にRTDがLinuxシステムと互換性がないだけで、RTDをLinuxシステムに対応させる計画も今のところ見当たりません。 Re: LINUX环境 下开发S32K324咨询 @Senlent 参照リンクの日付が2024年1月18日になっているのを確認しました。この問題がまだ解決されていないかどうか確認したいのですが。 Re: LINUX环境 下开发S32K324咨询 こんにちは@ han00 Linux環境ではRTD生成に問題が発生する可能性があるため、開発にはWindowsを使用することをお勧めします。 提案された回答: https://community.nxp.com/t5/S32-Design-Studio/S32K3-Linux-development-with-gcc-without-S32DS/td-p/1791431
View full article
S32K116 无法进入 STOP1 或 VLPS 模式,但 STOP2 模式可以正常工作。 你好, 为了节省电池电量,我的项目需要将 S32K116 置于睡眠模式。我使用的是 S32DS 3.6.1 和 SDK PlatformSDK_S32K1_S32M24,gcc 版本为 10.2。由于我不熟悉低功耗功能,所以我使用评估板 S32K116EVB-QSG 构建了一个小型测试项目。 我使用 Lptmr 作为唤醒源,它使用 LPO 1kHz 时钟。 在进入无限循环之前,蓝色 LED 会切换状态,以便区分 RESET 和唤醒。一旦进入循环,计数器就会增加,因此在进入睡眠模式之前,红色 LED 会闪烁 6 次。在睡眠模式下,Lptmr 超时后会唤醒 S32K116,Lptmr 中断处理程序会切换绿色 LED,以便我可以看到它正在被唤醒。 现在,这对于 STOP2 模式来说是可以正常工作的,但对于 STOP1 或 VLPS 模式则不行。出于沮丧,我禁用了所有能找到的时钟的监测,但这并没有什么效果。 对于 STOP1 和 VLPS,当 RESET 时,Power_Ip_GetResetRawValue() 返回 0x2000,表示停止确认错误 (SACKERR)。 我在互联网上找不到合适的应用程序/代码片段,所以我在这里分享我的问题,希望有人能帮我指出我遗漏了什么,例如,为什么当我要求控制器进入 STOP1 或 VLPS 时,控制器会 RESET。 我查阅了应用笔记 AN5425,但就我的观点而言,它并没有提供非常实用的建议。 我的代码: /*================================================================================================== * 项目:RTD AUTOSAR 4.7 * 平台:CORTEXM * 外设:S32K14X * 依赖项:无 * * Autosar版本:4.7.0 * Autosar版本:ASR_REL_4_7_REV_0000 * Autosar配置变体: 软件版本:3.0.0 * 构建版本:S32K1_RTD_3_0_0_QLP02_D2505_ASR_REL_4_7_REV_0000_20250530 * * 版权所有 2020-2025 NXP * * NXP 机密专有信息。本软件由恩智浦半导体(NXP)拥有或控制,且仅可由其授权使用。 * 严格按照适用的许可条款使用。明确地 * 接受此类条款或通过下载、安装、激活和/或以其他方式 使用本软件即表示您已阅读并同意以下条款: * 遵守并受此类许可条款的约束。如果您不同意, * 如果受适用许可条款的约束,则您不得保留、安装、 * 激活或以其他方式使用该软件。 =============================================================================================================*/ /** * @file main.c * * @addtogroup main_module 主模块文档 * @{ */ /* 包括必要的配置文件。*/ #include #include #include #include #include #include #include 枚举 { MODE_RUN = 0, MODE_VLPS , MODE_STOP1 , 模式停止2 }; bool wake_up = false; // 原型 void lptmr0_irq_handler ( void ); void power_mode_report_errors_callback ( Power_Ip_ReportErrorType Error, uint8 ErrorCode); void TestDelay ( uint32 delay) { 静态易失性uint32延迟定时器 = 0; while (DelayTimer { DelayTimer++; } 延迟定时器=0; } int main ( void ) { uint8_t wait_cnt = 0; Power_Ip_Init(&Power_Ip_HwIPsConfigPB); volatile Power_Ip_RawResetType reason = Power_Ip_GetResetRawValue(); Clock_Ip_Init(&Clock_Ip_aClockConfig[0]); Port_Ci_Port_Ip_Init( NUM_OF_CONFIGURED_PINS_PortContainer_0_BOARD_InitPeripherals, g_pin_mux_InitConfigArr_PortContainer_0_BOARD_InitPeripherals); Lptmr_Gpt_Ip_Init(0, &LPTMR_0_InitConfig_PB); Power_Ip_InstallNotificationsCallback(power_mode_report_errors_callback); IntCtrl_Ip_Init(&IntCtrlConfig_0); IntCtrl_Ip_InstallHandler( LPTMR0_IRQn , lptmr0_irq_handler, NULL); // 安装 IRQ 处理程序 IntCtrl_Ip_EnableIrq( LPTMR0_IRQn ); // 启用相关 IRQ Power_Ip_SetMode (&Power_Ip_aModeConfigPB[ MODE_RUN ]); // 发出冷启动信号 Gpio_Dio_Ip_WritePin(BLUE_LED_ID_PORT, BLUE_LED_ID_PIN, 1U); 测试延迟(2000000/5); Gpio_Dio_Ip_WritePin(BLUE_LED_ID_PORT, BLUE_LED_ID_PIN, 0U); 为了(;;) { Gpio_Dio_Ip_TogglePins(RED_LED_ID_PORT, 1 < RED_LED_ID_PIN); 测试延迟(1000000/5); 如果(++wait_cnt > 10) { wait_cnt = 0; // 禁用时钟监测 Clock_Ip_DisableClockMonitor( FIRC_CLK ); Clock_Ip_DisableClockMonitor( FIRC_VLP_CLK ); Clock_Ip_DisableClockMonitor( FIRC_STOP_CLK ); Clock_Ip_DisableClockMonitor( FIRCDIV1_CLK ); Clock_Ip_DisableClockMonitor( FIRCDIV2_CLK ); Clock_Ip_DisableClockMonitor( SIRC_CLK ); Clock_Ip_DisableClockMonitor( SIRC_VLP_CLK ); Clock_Ip_DisableClockMonitor( SIRC_STOP_CLK ); Clock_Ip_DisableClockMonitor( SIRCDIV1_CLK ); Clock_Ip_DisableClockMonitor( SIRCDIV2_CLK ); Clock_Ip_DisableClockMonitor( LPO_128K_CLK ); Clock_Ip_DisableClockMonitor( LPO_32K_CLK ); Clock_Ip_DisableClockMonitor( LPO_1K_CLK ); Clock_Ip_DisableClockMonitor( SCS_CLK ); Clock_Ip_DisableClockMonitor( ADC0_CLK ); Clock_Ip_DisableClockMonitor( BUS_CLK ); Clock_Ip_DisableClockMonitor( BUS_RUN_CLK ); Clock_Ip_DisableClockMonitor( BUS_VLPR_CLK ); Clock_Ip_DisableClockMonitor( CLKOUT0_CLK ); Clock_Ip_DisableClockMonitor( CMP0_CLK ); Clock_Ip_DisableClockMonitor( CMU0_CLK ); Clock_Ip_DisableClockMonitor( CMU1_CLK ); Clock_Ip_DisableClockMonitor( CORE_CLK ); Clock_Ip_DisableClockMonitor( CORE_RUN_CLK ); Clock_Ip_DisableClockMonitor( CORE_VLPR_CLK ); Clock_Ip_DisableClockMonitor( CRC0_CLK ); Clock_Ip_DisableClockMonitor( DMA0_CLK ); Clock_Ip_DisableClockMonitor( DMAMUX0_CLK ); Clock_Ip_DisableClockMonitor( EIM0_CLK ); Clock_Ip_DisableClockMonitor( ERM0_CLK ); Clock_Ip_DisableClockMonitor( FIRC_MON1_CLK ); Clock_Ip_DisableClockMonitor( FIRC_MON2_CLK ); Clock_Ip_DisableClockMonitor( FLEXCAN0_CLK ); Clock_Ip_DisableClockMonitor( FTFC_CLK ); Clock_Ip_DisableClockMonitor( FTM0_CLK ); Clock_Ip_DisableClockMonitor( FTM0_EXT_CLK ); Clock_Ip_DisableClockMonitor( FTM1_CLK ); Clock_Ip_DisableClockMonitor( FTM1_EXT_CLK ); Clock_Ip_DisableClockMonitor( FlexIO_CLK ); Clock_Ip_DisableClockMonitor( GPIO0_CLK ); Clock_Ip_DisableClockMonitor( LPI2C0_CLK ); Clock_Ip_DisableClockMonitor( LPIT0_CLK ); Clock_Ip_DisableClockMonitor( LPO_CLK ); Clock_Ip_DisableClockMonitor( LPSPI0_CLK ); Clock_Ip_DisableClockMonitor( LPTMR0_CLK ); Clock_Ip_DisableClockMonitor( LPUART0_CLK ); Clock_Ip_DisableClockMonitor( LPUART1_CLK ); Clock_Ip_DisableClockMonitor( MPU0_CLK ); Clock_Ip_DisableClockMonitor( MSCM0_CLK ); Clock_Ip_DisableClockMonitor( PDB0_CLK ); Clock_Ip_DisableClockMonitor( PORTA_CLK ); Clock_Ip_DisableClockMonitor( PORTB_CLK ); Clock_Ip_DisableClockMonitor( PORTC_CLK ); Clock_Ip_DisableClockMonitor( PORTD_CLK ); Clock_Ip_DisableClockMonitor( PORTE_CLK ); Clock_Ip_DisableClockMonitor( RTC0_CLK ); Clock_Ip_DisableClockMonitor( RTC_CLK ); Clock_Ip_DisableClockMonitor( RUN_BUS_CLK ); Clock_Ip_DisableClockMonitor( RUN_CORE_CLK ); Clock_Ip_DisableClockMonitor( RUN_FLASH_CLK ); Clock_Ip_DisableClockMonitor( RUN_PRI_DIV_SYS_CLK ); Clock_Ip_DisableClockMonitor( RUN_SYS_CLK ); Clock_Ip_DisableClockMonitor( SCG_CLKOUT_CLK ); Clock_Ip_DisableClockMonitor( SCS_RUN_CLK ); Clock_Ip_DisableClockMonitor( SCS_VLPR_CLK ); Clock_Ip_DisableClockMonitor( SLOW_CLK ); Clock_Ip_DisableClockMonitor( SLOW_RUN_CLK ); Clock_Ip_DisableClockMonitor( SLOW_VLPR_CLK ); Clock_Ip_DisableClockMonitor( THE_LAST_PRODUCER_CLK ); Clock_Ip_DisableClockMonitor( VLPR_BUS_CLK ); Clock_Ip_DisableClockMonitor( VLPR_CORE_CLK ); Clock_Ip_DisableClockMonitor( VLPR_FLASH_CLK ); Clock_Ip_DisableClockMonitor( VLPR_PRI_DIV_SYS_CLK ); Clock_Ip_DisableClockMonitor( VLPR_SYS_CLK ); // 启用定时器中断请求并启动唤醒定时器 Lptmr_Gpt_Ip_EnableInterrupt(0); Lptmr_Gpt_Ip_StartTimer(0, 5000); // 1. 禁用系统滴答(或任何周期性中断) S32_SysTick-> CSRr &= ~S32_SysTick_CSR_ENABLE_MASK; // 2. 使用 FIRC/SOSC/SPLL 禁用/取消初始化外设 //(如果不使用 PNET,则使用 LPUART、ADC、FlexCAN 等) 3. 清除所有待处理的中断标志 (尤其是 LPTMR、PORT 等) IntCtrl_Ip_ClearPending( LPTMR0_IRQn ); // 4. 进入睡眠模式 //Power_Ip_SetMode(&Power_Ip_aModeConfigPB[MODE_VLPS]); Power_Ip_SetMode (&Power_Ip_aModeConfigPB[ MODE_STOP1 ]); //Power_Ip_SetMode(&Power_Ip_aModeConfigPB[MODE_STOP2]); // --- MCU 在此处唤醒 --- // 5. 检查是否发生中止 如果((IP_SMC-> PMCTRL >> 3U) & 0x1U) { /* 处理中止 */ __asm ( "NOP" ); } // 6. 重新启用系统时钟和外设 S32_SysTick-> CSRr |= S32_SysTick_CSR_ENABLE_MASK; } } } void lptmr0_irq_handler ( void ) { IntCtrl_Ip_ClearPending( LPTMR0_IRQn ); Lptmr_Gpt_Ip_StopTimer(0); 唤醒 = true; Gpio_Dio_Ip_TogglePins(GREEN_LED_ID_PORT, 1 < GREEN_LED_ID_PIN); } void power_mode_report_errors_callback ( Power_Ip_ReportErrorType Error, uint8 ErrorCode) { volatile Power_Ip_ResetType reset_type; reset_type = Power_Ip_GetResetReason(); __asm ( "NOP" ); } /** @} */ Re: Can't get S32K116 into STOP1 or VLPS mode, STOP2 does work 你好@fruit_spinner 巧合的是,几周前我也遇到了完全相同的问题。 我发现根本原因是 S32K1 上的 S32 SCT 具有 CMU 时钟门 默认启用。这会导致进入低电源模式时出现问题——具体来说,就是 触发信号复位,复位源由 SACKERR 位设置指示。 我已审阅并测试了您提供的演示版本,并提出以下建议: 变更内容: 1.在 S32 SCT 时钟配置界面中,禁用 CMU0 和 CMU1 的时钟门。 2. 删除或注释掉以下代码,因为它是不必要的。 Re: Can't get S32K116 into STOP1 or VLPS mode, STOP2 does work 您好, 非常感谢您的回复,这解决了我的问题。现在运行正常了。 此致, 惠布
View full article
AN4908SW download Hi, My google-fu seems to be broken because I can't find "AN4908SW  Engine Control eTPU Demo Application" anywhere. Can someone provide me a link or the zip file?  Thanks! 回复: AN4908SW download Hi Peter, I am also looking for the AN4908SW package for MPC5674F development. Could you please send it to my email as well? Thank you! Re: AN4908SW download Hi, Thank you very much! Cheers, Jose Re: AN4908SW download Hello, I have send it to your email. Best regards, Peter
View full article
Can't get S32K116 into STOP1 or VLPS mode, STOP2 does work Hello, For my project I need to put the S32K116 into sleep mode in order to save power on the battery. I am using S32DS 3.6.1 and SDK PlatformSDK_S32K1_S32M24, gcc version 10.2. Since I'm not familiar with the low power functionality I've built a small test project using eval board S32K116EVB-QSG. I am using the Lptmr as a wake-up source and it is using the LPO 1kHz clock. Before entering a endless for loop the blue LED is toggled so I distinguish a reset from a wake-up. Once in the loop a counter is increased so we get 6 blinks of the red LED before entering sleep mode. During sleep mode the Lptmr will elapse and wake-up the S32K116, the Lptmr interrupt handler will toggle the green LED so I can see it is being woken up. Now this works as expected for STOP2 mode but not for STOP1 nor for VLPS. Out of frustration I disable clock monitor for all clocks I could find but this makes no difference. For STOP1 and VLPS, when it is resetting Power_Ip_GetResetRawValue() returns 0x2000 which indicates Stop Acknowledge Error (SACKERR). I could not find a suitable application/snippet on the internet so I am sharing my problem here hoping someone can shine a light what I am missing i.e. why the controller resets when I am demanding it to goto STOP1 or VLPS. I consulted application note AN5425 but this does not give very practical hints to my opinion. My code: /*================================================================================================== * Project : RTD AUTOSAR 4.7 * Platform : CORTEXM * Peripheral : S32K14X * Dependencies : none * * Autosar Version : 4.7.0 * Autosar Revision : ASR_REL_4_7_REV_0000 * Autosar Conf.Variant : * SW Version : 3.0.0 * Build Version : S32K1_RTD_3_0_0_QLP02_D2505_ASR_REL_4_7_REV_0000_20250530 * * Copyright 2020-2025 NXP * * NXP Confidential and Proprietary. This software is owned or controlled by NXP and may only be * used strictly in accordance with the applicable license terms. By expressly * accepting such terms or by downloading, installing, activating and/or otherwise * using the software, you are agreeing that you have read, and that you agree to * comply with and are bound by, such license terms. If you do not agree to be * bound by the applicable license terms, then you may not retain, install, * activate or otherwise use the software. ==================================================================================================*/ /** * @file main.c * * @addtogroup main_module main module documentation * @{ */ /* Including necessary configuration files. */ #include #include #include #include #include #include #include enum { MODE_RUN = 0, MODE_VLPS, MODE_STOP1, MODE_STOP2 }; bool wake_up = false; // Proto-types void lptmr0_irq_handler(void); void power_mode_report_errors_callback(Power_Ip_ReportErrorType Error, uint8 ErrorCode); void TestDelay(uint32 delay) { static volatile uint32 DelayTimer = 0; while(DelayTimer { DelayTimer++; } DelayTimer=0; } int main(void) { uint8_t wait_cnt = 0; Power_Ip_Init(&Power_Ip_HwIPsConfigPB); volatile Power_Ip_RawResetType reason = Power_Ip_GetResetRawValue(); Clock_Ip_Init(&Clock_Ip_aClockConfig[0]); Port_Ci_Port_Ip_Init( NUM_OF_CONFIGURED_PINS_PortContainer_0_BOARD_InitPeripherals, g_pin_mux_InitConfigArr_PortContainer_0_BOARD_InitPeripherals); Lptmr_Gpt_Ip_Init(0, &LPTMR_0_InitConfig_PB); Power_Ip_InstallNotificationsCallback(power_mode_report_errors_callback); IntCtrl_Ip_Init(&IntCtrlConfig_0); IntCtrl_Ip_InstallHandler(LPTMR0_IRQn, lptmr0_irq_handler, NULL); // Install IRQ handlers IntCtrl_Ip_EnableIrq(LPTMR0_IRQn); // Enable IRQ's involved Power_Ip_SetMode(&Power_Ip_aModeConfigPB[MODE_RUN]); // Signal a cold start Gpio_Dio_Ip_WritePin(BLUE_LED_ID_PORT, BLUE_LED_ID_PIN, 1U); TestDelay(2000000/5); Gpio_Dio_Ip_WritePin(BLUE_LED_ID_PORT, BLUE_LED_ID_PIN, 0U); for(;;) { Gpio_Dio_Ip_TogglePins(RED_LED_ID_PORT, 1 << RED_LED_ID_PIN); TestDelay(1000000/5); if(++wait_cnt > 10) { wait_cnt = 0; // Disable clock monitors Clock_Ip_DisableClockMonitor(FIRC_CLK); Clock_Ip_DisableClockMonitor(FIRC_VLP_CLK); Clock_Ip_DisableClockMonitor(FIRC_STOP_CLK); Clock_Ip_DisableClockMonitor(FIRCDIV1_CLK); Clock_Ip_DisableClockMonitor(FIRCDIV2_CLK); Clock_Ip_DisableClockMonitor(SIRC_CLK); Clock_Ip_DisableClockMonitor(SIRC_VLP_CLK); Clock_Ip_DisableClockMonitor(SIRC_STOP_CLK); Clock_Ip_DisableClockMonitor(SIRCDIV1_CLK); Clock_Ip_DisableClockMonitor(SIRCDIV2_CLK); Clock_Ip_DisableClockMonitor(LPO_128K_CLK); Clock_Ip_DisableClockMonitor(LPO_32K_CLK); Clock_Ip_DisableClockMonitor(LPO_1K_CLK); Clock_Ip_DisableClockMonitor(SCS_CLK); Clock_Ip_DisableClockMonitor(ADC0_CLK); Clock_Ip_DisableClockMonitor(BUS_CLK); Clock_Ip_DisableClockMonitor(BUS_RUN_CLK); Clock_Ip_DisableClockMonitor(BUS_VLPR_CLK); Clock_Ip_DisableClockMonitor(CLKOUT0_CLK); Clock_Ip_DisableClockMonitor(CMP0_CLK); Clock_Ip_DisableClockMonitor(CMU0_CLK); Clock_Ip_DisableClockMonitor(CMU1_CLK); Clock_Ip_DisableClockMonitor(CORE_CLK); Clock_Ip_DisableClockMonitor(CORE_RUN_CLK); Clock_Ip_DisableClockMonitor(CORE_VLPR_CLK); Clock_Ip_DisableClockMonitor(CRC0_CLK); Clock_Ip_DisableClockMonitor(DMA0_CLK); Clock_Ip_DisableClockMonitor(DMAMUX0_CLK); Clock_Ip_DisableClockMonitor(EIM0_CLK); Clock_Ip_DisableClockMonitor(ERM0_CLK); Clock_Ip_DisableClockMonitor(FIRC_MON1_CLK); Clock_Ip_DisableClockMonitor(FIRC_MON2_CLK); Clock_Ip_DisableClockMonitor(FLEXCAN0_CLK); Clock_Ip_DisableClockMonitor(FTFC_CLK); Clock_Ip_DisableClockMonitor(FTM0_CLK); Clock_Ip_DisableClockMonitor(FTM0_EXT_CLK); Clock_Ip_DisableClockMonitor(FTM1_CLK); Clock_Ip_DisableClockMonitor(FTM1_EXT_CLK); Clock_Ip_DisableClockMonitor(FlexIO_CLK); Clock_Ip_DisableClockMonitor(GPIO0_CLK); Clock_Ip_DisableClockMonitor(LPI2C0_CLK); Clock_Ip_DisableClockMonitor(LPIT0_CLK); Clock_Ip_DisableClockMonitor(LPO_CLK); Clock_Ip_DisableClockMonitor(LPSPI0_CLK); Clock_Ip_DisableClockMonitor(LPTMR0_CLK); Clock_Ip_DisableClockMonitor(LPUART0_CLK); Clock_Ip_DisableClockMonitor(LPUART1_CLK); Clock_Ip_DisableClockMonitor(MPU0_CLK); Clock_Ip_DisableClockMonitor(MSCM0_CLK); Clock_Ip_DisableClockMonitor(PDB0_CLK); Clock_Ip_DisableClockMonitor(PORTA_CLK); Clock_Ip_DisableClockMonitor(PORTB_CLK); Clock_Ip_DisableClockMonitor(PORTC_CLK); Clock_Ip_DisableClockMonitor(PORTD_CLK); Clock_Ip_DisableClockMonitor(PORTE_CLK); Clock_Ip_DisableClockMonitor(RTC0_CLK); Clock_Ip_DisableClockMonitor(RTC_CLK); Clock_Ip_DisableClockMonitor(RUN_BUS_CLK); Clock_Ip_DisableClockMonitor(RUN_CORE_CLK); Clock_Ip_DisableClockMonitor(RUN_FLASH_CLK); Clock_Ip_DisableClockMonitor(RUN_PRI_DIV_SYS_CLK); Clock_Ip_DisableClockMonitor(RUN_SYS_CLK); Clock_Ip_DisableClockMonitor(SCG_CLKOUT_CLK); Clock_Ip_DisableClockMonitor(SCS_RUN_CLK); Clock_Ip_DisableClockMonitor(SCS_VLPR_CLK); Clock_Ip_DisableClockMonitor(SLOW_CLK); Clock_Ip_DisableClockMonitor(SLOW_RUN_CLK); Clock_Ip_DisableClockMonitor(SLOW_VLPR_CLK); Clock_Ip_DisableClockMonitor(THE_LAST_PRODUCER_CLK); Clock_Ip_DisableClockMonitor(VLPR_BUS_CLK); Clock_Ip_DisableClockMonitor(VLPR_CORE_CLK); Clock_Ip_DisableClockMonitor(VLPR_FLASH_CLK); Clock_Ip_DisableClockMonitor(VLPR_PRI_DIV_SYS_CLK); Clock_Ip_DisableClockMonitor(VLPR_SYS_CLK); // Enable timer IRQ and spawn wake-up timer Lptmr_Gpt_Ip_EnableInterrupt(0); Lptmr_Gpt_Ip_StartTimer(0, 5000); // 1. Disable SysTick (or any periodic interrupt) S32_SysTick->CSRr &= ~S32_SysTick_CSR_ENABLE_MASK; // 2. Disable/de-init peripherals using FIRC/SOSC/SPLL // (LPUART, ADC, FlexCAN if not using PNET, etc.) // 3. Clear any pending interrupt flags // (especially LPTMR, PORT, etc.) IntCtrl_Ip_ClearPending(LPTMR0_IRQn); // 4. Enter sleep mode //Power_Ip_SetMode(&Power_Ip_aModeConfigPB[MODE_VLPS]); Power_Ip_SetMode(&Power_Ip_aModeConfigPB[MODE_STOP1]); //Power_Ip_SetMode(&Power_Ip_aModeConfigPB[MODE_STOP2]); // --- MCU wakes here --- // 5. Check if abort occurred if ((IP_SMC->PMCTRL >> 3U) & 0x1U) { /* handle abort */ __asm("NOP"); } // 6. Re-enable SysTick and peripherals S32_SysTick->CSRr |= S32_SysTick_CSR_ENABLE_MASK; } } } void lptmr0_irq_handler(void) { IntCtrl_Ip_ClearPending(LPTMR0_IRQn); Lptmr_Gpt_Ip_StopTimer(0); wake_up = true; Gpio_Dio_Ip_TogglePins(GREEN_LED_ID_PORT, 1 << GREEN_LED_ID_PIN); } void power_mode_report_errors_callback(Power_Ip_ReportErrorType Error, uint8 ErrorCode) { volatile Power_Ip_ResetType reset_type; reset_type = Power_Ip_GetResetReason(); __asm("NOP"); } /** @} */ Re: Can't get S32K116 into STOP1 or VLPS mode, STOP2 does work Hi@fruit_spinner As it happens, I encountered the exact same issue a few weeks ago. I discovered that the root cause was that the S32 SCT on the S32K1 has the CMU clock gate enabled by default. This causes problems when entering low-power modes—specifically, it triggers a reset, with the reset source indicated by the SACKERR bit being set. I have reviewed and tested the demo you provided, and I suggest the following modifications: 1. In the S32 SCT clock configuration interface, disable the clock gates of CMU0 and CMU1. 2. Remove or comment out the following code, as it is unnecessary. Re: Can't get S32K116 into STOP1 or VLPS mode, STOP2 does work Hi, Thanks a lot for your reply, this solved my problem. It works as expected now. regards, Huib
View full article
Enable SPI Communication for VL53L8CX ToF Sensor on i.MX8MP EVK We are trying to integrate an ST VL53L8CX ToF (Time-of-Flight) sensor over SPI on an NXP i.MX8MP LPDDR4 EVK using Yocto Linux. The objective is initially to achieve basic SPI communication and successfully detect the VL53L8CX device from a custom Linux kernel driver. Full ranging functionality is not required at this stage. Hardware Board: NXP i.MX8MP LPDDR4 EVK Sensor: VL53L8CX ToF sensor Interface: SPI EVK connector: J21 expansion connector SPI controller: ECSPI2 Chip select: ECSPI2 SS0 GPIO used for CS: GPIO5_IO13 SPI device: spi1.0 SPI speed: 1 MHz SPI mode: Mode 0 The device-tree configuration currently uses:   &ecspi2 { pinctrl-0 = <&pinctrl_ecspi2 &pinctrl_ecspi2_cs>; cs-gpios = <&gpio5 13 GPIO_ACTIVE_LOW>; status = "okay"; stmvl53l8cx: spi@0 { reg = <0>; compatible = "st,stmvl53l8cx"; spi-max-frequency = <1000000>; }; }; meta-vl53l8cx_8mp/ ├── conf/ │ └── layer.conf ├── recipes-kernel/ │ ├── linux/ │ │ ├── files/ │ │ │ └── 0001-add-vl53l8cx-spi-node.patch │ │ └── linux-imx_%.bbappend │ │ │ └── vl53l8cx/ │ ├── files/ │ │ ├── Makefile │ │ └── driver.c │ └── vl53l8cx.bb The SPI device is successfully created:   root@imx8mp-lpddr4-evk:~# ls -l /sys/bus/spi/devices/ spi0.0 spi1.0   The custom driver is also registered:   root@imx8mp-lpddr4-evk:~# ls -l /sys/bus/spi/drivers/ stmvl53l8cx   The driver probe() function is being called successfully. Could someone please advise what we should verify on the i.MX8MP EVK ECSPI2/J21 hardware and Device Tree configuration to make sure the VL53L8CX is communicating correctly over SPI? In particular, we would like to confirm: Is ECSPI2 / spi1.0 the correct SPI controller/device for the J21 expansion connector on the i.MX8MP LPDDR4 EVK? Is GPIO5_IO13 / ECSPI2_SS0 the correct chip-select for J21? Are the ECSPI2 SCK, MOSI, MISO and CS pinmux settings correct for this connector? Is any additional Device Tree configuration required for the VL53L8CX, such as: spi-cpol spi-cpha GPIO1/interrupt LPn/reset/power GPIO power-supply/regulator properties? Does the VL53L8CX require a particular SPI mode, timing, or initialization sequence before reading its device ID? Is there anything specific on the i.MX8MP ECSPI controller that needs to be configured for the VL53L8CX? Since spi_write() and spi_read() return 0, is there a recommended way to verify the actual MOSI/MISO electrical communication (for example with a logic analyzer) and determine whether the sensor is responding? We have also attached our custom driver.c driver and kernel logs for reference. Any guidance on the correct i.MX8MP EVK + J21 + ECSPI2 + VL53L8CX SPI configuration would be appreciated. I have attached custom driver file driver.c also I have attached logs Thank you. Re: Enable SPI Communication for VL53L8CX ToF Sensor on i.MX8MP EVK Hello @Manuel_Salas  Thank you for your response. We tried reading the device ID before proceeding with any further configuration. However, we are not able to read the device ID successfully. Our SPI driver is probing correctly, but the register read for the chip ID does not return the expected value. Because of this, we are unable to verify communication with the VL53L8CX and cannot proceed with the sensor initialization. We are currently checking our SPI configuration, device tree, and hardware connections to identify the issue. We will also attach our driver, logs and module image so you can review it. If you have any suggestions on what else we should verify for basic SPI communication with the VL53L8CX, we would greatly appreciate your guidance. Best regards, yogi96 Re: Enable SPI Communication for VL53L8CX ToF Sensor on i.MX8MP EVK Hello @yogi96  Hope you are doing very well. In general, all your steps looks good. The next step what yocan try is read any register of the sensor, for example, in your probe() function, read the ID from the chip. If ID is correct read, continue with the configuration. Also, I could not saw the driver attached. Please attach is possible. Best regards, Salas. Re: Enable SPI Communication for VL53L8CX ToF Sensor on i.MX8MP EVK Hello. Have you tried with the: https://www.st.com/en/embedded-software/stsw-img042.html Best regards, Salas. Re: Enable SPI Communication for VL53L8CX ToF Sensor on i.MX8MP EVK Hi @Manuel_Salas  thank you , I have tried the library you suggested but before that when I tried to read the device ID by writing simple C program User-Space Hardware Driver but I am getting different device ID and Revision ID each time I read. Logs : 1. root@imx8mp-lpddr4-evk:~# ./read_device_info ================================================== VL53L8CX SPI HARDWARE INITIAL DISCOVERY TEST i.MX8MP EVK Linux Target ================================================== [INFO] SPI device mapping : /dev/spidev1.0 [INFO] Active SPI mode : 3 [INFO] Transmit Bits/word: 8 [INFO] Operational Speed : 50000 Hz [WRITE] REG=0x7FFF VALUE=0x00 [READ] REG=0x0000 TX=40 00 00 00 RX=65 3A 12 C0 [READ] REG=0x0001 TX=40 01 00 00 RX=50 15 19 01 [WRITE] REG=0x7FFF VALUE=0x02 ================================================== DETECTION REPORT ================================================== Parsed Device ID : 0xC0 (Expected: 0xF0) Parsed Revision ID : 0x01 (Expected: 0x0C) -------------------------------------------------- 2. root@imx8mp-lpddr4-evk:~# ./read_device_info ================================================== VL53L8CX SPI HARDWARE INITIAL DISCOVERY TEST i.MX8MP EVK Linux Target ================================================== [INFO] SPI device mapping : /dev/spidev1.0 [INFO] Active SPI mode : 3 [INFO] Transmit Bits/word: 8 [INFO] Operational Speed : 50000 Hz [WRITE] REG=0x7FFF VALUE=0x00 [READ] REG=0x0000 TX=40 00 00 00 RX=63 C4 02 82 [READ] REG=0x0001 TX=40 01 00 00 RX=48 01 25 10 [WRITE] REG=0x7FFF VALUE=0x02 ================================================== DETECTION REPORT ================================================== Parsed Device ID : 0x82 (Expected: 0xF0) Parsed Revision ID : 0x10 (Expected: 0x0C) --------------------------------------------------
View full article
在 i.MX8MP EVK 上启用 VL53L8CX ToF 传感器的 SPI 通信 我们正在尝试使用 Yocto Linux 将ST VL53L8CX ToF(飞行时间)传感器通过SPI集成到NXP i.MX8MP LPDDR4 EVK上。 最初的目标是实现基本的 SPI 通信,并从自定义 Linux 内核驱动程序中成功检测到 VL53L8CX 设备。现阶段不需要全部功能。 硬件 板: NXP i.MX8MP LPDDR4 EVK 传感器: VL53L8CX ToF传感器 接口: SPI EVK 连接器: J21 扩展连接器 SPI 控制器: ECSPI2 片选: ECSPI2 SS0 用于 CS 的 GPIO: GPIO5_IO13 SPI 设备: spi1.0 SPI速度: 1 MHz SPI模式:模式0 当前设备树配置使用:   &ecspi2 { pinctrl-0 = <&pinctrl_ecspi2 &pinctrl_ecspi2_cs>; cs-gpios = <&gpio5 13 GPIO_ACTIVE_LOW>; status = "okay"; stmvl53l8cx: spi@0 { reg = <0>; compatible = "st,stmvl53l8cx"; spi-max-frequency = <1000000>; }; }; meta-vl53l8cx_8mp/ ├── conf/ │ └── 层.conf ├── recipes-kernel/ │ ├── linux/ │ │ ├── 文件/ │ │ │ └── 0001-add-vl53l8cx-spi-node.patch │ │ └── linux-imx_%.bbappend │ │ │ └── vl53l8cx/ │ ├── 文件/ │ │ ├── Makefile │ │ └── driver.c │ └── vl53l8cx.bb SPI设备创建成功:   root@imx8mp-lpddr4-evk:~# ls -l /sys/bus/spi/devices/ spi0.0 spi1.0   自定义驱动程序也已注册:   root@imx8mp-lpddr4-evk:~# ls -l /sys/bus/spi/drivers/ stmvl53l8cx   驱动程序 probe() 函数已成功调用。 请问有人可以指导一下,为了确保 VL53L8CX 通过 SPI 正确通信,我们应该检查i.MX8MP EVK ECSPI2/J21 硬件和设备树配置中的哪些内容吗? 我们尤其想确认以下几点: ECSPI2 / spi1.0是否是 i.MX8MP LPDDR4 EVK 上J21 扩展连接器的正确 SPI 控制器/设备? GPIO5_IO13 / ECSPI2_SS0是否是 J21 的正确片选信号? 此连接器的ECSPI2 SCK、MOSI、MISO 和 CS 引脚复用设置是否正确? VL53L8CX 是否需要任何其他设备树配置,例如: spi-cpol spi-cpha GPIO1/中断 LPn/RESET/电源 GPIO 电源/稳压器的特性? VL53L8CX 在读取其设备 ID 之前是否需要特定的SPI 模式、时序或初始化序列? 对于 VL53L8CX,i.MX8MP ECSPI 控制器是否需要进行任何特殊配置? 由于 spi_write() 和 spi_read() 返回 0,是否有推荐的方法来验证实际的 MOSI/MISO 电通信(例如使用逻辑分析仪),并确定传感器是否响应? 我们还附上了自定义的 driver.c 驱动程序和内核日志供您参考。 任何关于i.MX8MP EVK + J21 + ECSPI2 + VL53L8CX SPI 配置的正确指导都将不胜感激。 我已附上自定义驱动程序文件driver.c 另外,我还附上了日志。 谢谢! Re: Enable SPI Communication for VL53L8CX ToF Sensor on i.MX8MP EVK 你好@Manuel_Salas 感谢您的反馈, 在进行任何进一步配置之前,我们尝试读取设备 ID。但是,我们无法成功读取设备 ID。 我们的 SPI 驱动程序探测正常,但读取芯片 ID 的寄存器没有返回预期值。因此,我们无法验证与 VL53L8CX 的通信,也无法继续进行传感器初始化。 我们目前正在检查 SPI 配置、设备树和硬件连接,以确定问题所在。 我们还会附上驱动程序、日志和模块镜像,以便您查看。如果您对我们应该验证 VL53L8CX 基本 SPI 通信的哪些方面有任何建议,我们将非常感谢您的指导。 此致, yogi96 Re: Enable SPI Communication for VL53L8CX ToF Sensor on i.MX8MP EVK 你好@yogi96 希望你一切都好。 总的来说,你采取的所有步骤看起来都不错。 下一步你可以尝试读取传感器的任何寄存器,例如,在你的 probe() 函数中,读取芯片的 ID。 如果读取的 ID 正确,则继续配置。 另外,我没能看到连接的驱动器。 如果可以,请附上附件。 顺祝商祺! 萨拉斯。 Re: Enable SPI Communication for VL53L8CX ToF Sensor on i.MX8MP EVK 您好。 你试过用以下方法吗: https://www.st.com/en/embedded-software/stsw-img042.html 顺祝商祺! 萨拉斯。 Re: Enable SPI Communication for VL53L8CX ToF Sensor on i.MX8MP EVK 嗨@Manuel_Salas,谢谢! 我尝试过您建议的库,但在此之前,我尝试通过编写简单的 C 程序用户空间硬件驱动程序来读取设备 ID,但每次读取时都会得到不同的设备 ID 和修订 ID。 日志: 1. root@imx8mp-lpddr4-evk:~# ./read_device_info ================================================== VL53L8CX SPI硬件初始发现测试 i.MX8MP EVK Linux 目标 ================================================== [信息] SPI 设备映射:/dev/spidev1.0 [信息] 当前SPI模式:3 [信息] 发送比特/字:8 [信息] 运行速度:50000 Hz [写入] 寄存器=0x7FFF 值=0x00 [读取] REG=0x0000 TX=40 00 00 00 RX=65 3A 12 C0 [读取] 寄存器=0x0001 发送=40 01 00 00 接收=50 15 19 01 [写入] 寄存器=0x7FFF 值=0x02 ================================================== 检测报告 ================================================== 解析出的设备 ID:0xC0(预期值:0xF0) 已解析的修订 ID:0x01(预期:0x0C ) -------------------------------------------------- 2. root@imx8mp-lpddr4-evk:~# ./read_device_info ================================================== VL53L8CX SPI硬件初始发现测试 i.MX8MP EVK Linux 目标 ================================================== [信息] SPI 设备映射:/dev/spidev1.0 [信息] 当前SPI模式:3 [信息] 发送比特/字:8 [信息] 运行速度:50000 Hz [写入] 寄存器=0x7FFF 值=0x00 [读取] 寄存器=0x0000 发送=40 00 00 00 接收=63 C4 02 82 [读取] 寄存器=0x0001 发送=40 01 00 00 接收=48 01 25 10 [写入] 寄存器=0x7FFF 值=0x02 ================================================== 检测报告 ================================================== 解析出的设备 ID:0x82(预期值:0xF0) 已解析的修订 ID:0x10(预期:0x0C) --------------------------------------------------
View full article
Getting Started with UWB on the NXP Trimension® SR250 - Part 2: SR250UWBSHIELD + FRDM-RW612 Setup Guide (Japanese Blog) 1. Introduction In the first installment, we introduced the SR250 as a device that integrates UWB ranging and UWB radar onto a single chip, and that it was released for the mass market in March 2026. From this point on, we'll finally get the board working. Let's go through the process together, from obtaining the evaluation board to verifying its operation. 1st Basics of UWB and an overview of the SR250 Part 2 (This article) Setting up the SR250 evaluation board (SR250UWBSHIELD) 3rd Let's try UWB ranging. 4th Try out UWB radar. There are two main ways to try out the SR250: the build-free PnP (Plug-and-Play) route and the Zephyr SDK route for full-fledged development. The necessary preparations differ depending on which route you choose, so it's best to decide beforehand. Those who want to do both are also very welcome! While it can run on systems other than Windows, this guide will use the command prompt on a Windows PC. root For people like this Development environment A. PnP First, I want to try it out easily! Python + PySerial only B. Zephyr SDK I want to develop this seriously and combine it with BLE. Git・CMake・Python・Zephyr SDK 2. Hardware Preparation (Common to A and B) Required hardware For UWB distance measurement, a device on the other end is required. If you have two sets, you can measure distance between two SR250 UWB SHIELD boards. If you have a smartphone equipped with UWB, you can measure distance to the smartphone with just one set. SR250UWBSHIELD : Arduino-compatible shield board equipped with SR250. FRDM-RW612 : Host MCU board ( Wi-Fi 6 / Bluetooth Low Energy 5.4 / 802.15.4 equipped) Two USB Type-C cables One cable is included with the FRDM-RW612, so please prepare another one. You will need a cable that supports data communication, not just a charging-only cable. The connector that connects to the PC can be either Type-A or Type-C. Regarding USB connection The SR250UWBSHIELD + FRDM-RW612 requires two USB-C cables to operate. Let's review the purpose of each cable. connector Purpose remarks J10 (MCU-Link) Power supply, programming, and debugging. This connection is required. Without it, the power will not turn on. J8 (HS-USB) Serial communication (Virtual COM Port) When checking the COM port, use the port number on the J8 side. Two COM ports will appear in Windows Device Manager, but the one used for serial communication is the COM port on the J8 (HS-USB) device. It will be displayed as "USB Serial Device (COMx)". Rework: Critical tasks that need to be checked first. The SR250-ARD shield and FRDM-RW612 communicate via SPI, but SPI does not function correctly with the default Arduino header wiring. Please address this using one of the following two methods. Method 1: Rework by soldering (recommended) If you have a soldering iron, I recommend reworking the SPI lines. Once done, you won't need any cables, resulting in a cleaner setup. For detailed rework procedures, please refer to the Start Guide: Start Guide for the Trimension SR250 Development Board Method 2: Alternative connection using jumper wires (for those who want to try it easily) If you want to try it without soldering, connect the Arduino header pins of the FRDM-RW612 with two female-to-female jumper wires as shown below. If you'd like to test the functionality first, please use this method. 3A. PnP Route: Easily try it with just Python The PnP application requires no build; you can directly control the SR250 from your PC using the USB serial communication and SPI communication protocol converter firmware (PnP firmware) for the FRDM-RW612, available on GitHub. You can verify its operation simply by running a Python UCI script from your PC. When preparing, you will encounter two different firmwares. The first one to be written is the protocol conversion firmware that operates within the RW612. After that, you will update the SR250's firmware. The writing methods for each are different (RW612 via ISP mode, SR250 via PnP firmware), so please pay attention to the procedure.   Obtain the necessary files from GitHub. You can download the ZIP file from the "Code" dropdown menu in the upper right corner. GitHub: SR250 UWB Plug-and-Play Application Required software Python 3.12 or later PySerial: python -m pip install pyserial procedure Step 1: Write the firmware for RW612 PnP Connect two USB cables (J10 and J8). To start the RW612 in ISP mode (In-System Programming), which is a firmware writing-only mode: Press and hold SW3 (ISP), then press and release SW1 (Reset) → Release SW3. To write the firmware to the RW612 using ISP over USB, double-click the program_FRDM-RW612.bat file located in the FRDM-RW612_PnP folder to run the batch file: FRDM-RW612_PnP/program_FRDM-RW612.bat Most errors are caused by the device not starting in ISP mode. If you have difficulty entering ISP mode using switch 2, try connecting the USB to J10 while holding down SW3. Once the batch file processing is complete, unplug the USB cable, replug it, and restart the board. Step 2: SR250 FW Update To update the SR250's firmware, connect the SR250's shield board on top of the RW612 board, and then double-click Update_SR250_FW.bat in the SR250_FW folder to run the batch file: SR250_FW/Update_SR250_FW.bat If successful, unplug the USB cable, replug it, and restart the board. Step 3: Operation Check Check the COM port number for J8 in Device Manager (e.g., COM10). Start the Python script located in the Simple_demos folder, using the COM port number you just confirmed as an argument, and verify that communication is successful. If JLink is not installed, both devices will not be recognized as JLink, as shown in the diagram below (J10), and will both be displayed as "USB Serial Device." In this case, disconnect J8 and check which device disappears from the device list. The device that disappears corresponds to J8. python demo_ranging.py COM10 The PnP route setup is now complete! 3B. Zephyr SDK Route: For full-scale development This route uses a Zephyr OS-based SDK for building and debugging. It supports integration with BLE and the development of custom applications. There are two methods: using VS Code + MCUXpresso, and using the west command line. Either method is fine. Here, we will introduce the method using the west command in a Windows environment. Let's start by creating a folder as close to the root of the C drive as possible. For instructions on using VS Code with MCUXpresso, please refer to the Getting Started guide or the MCUXpresso for VS Code documentation . Please also refer to the important points regarding using VS Code with MCUXpresso, which are listed at the end of this document. Required software Git : Latest version CMake : 3.21.1 or later Zephyr SDK : 0.17.x There are dependencies between the Zephyr version and the Zephyr SDK. This procedure uses Zephyr SDK 0.17.x Please install it. Different SDK versions may cause build errors. Python : 3.8 or later Make sure you have Ninja and West installed. pip3 install west ninja Serial terminal: TeraTerm, PuTTY, or any other serial terminal of your choice. Environment setup procedure Step 1: Clone the repository git clone https://github.com/nxp-uwb/sr250-uwbiot-zephyr.git Step 2: west initialization cd sr250-uwbiot-zephyr west init -l --mf west.yml uwbiot-top Step 3: Obtain Dependencies west update west update This process will take some time to complete. If it stops midway, please restart it. Proceeding to the next step before completion will cause a build error. Step 4: Install Python dependency packages pip install -r zephyr\scripts\requirements.txt Step 5: Setting environment variables Set the path to the Zephyr SDK in your environment variables. zephyr\zephyr-env.cmd Build and write Since an update is required first, we will build a demo for the firmware update. west build -b frdm_rw612 -p auto uwbiot-top\demos\SR2xx\demo_sr2xx_fw_update\zephyr I will write to the file once the build is successful. west flash We will check the logs via serial communication. By default, the code is executed only after communication is established. Connect two USB cables (J10 and J8). Check the COM port number on the side connected to J8 (see Step 3: Operation Check for PnP Root). Launch your terminal software and configure the port as follows: Set the baud rate to 3,000,000 bps . Many terminal programs, such as TeraTerm and PuTTY, do not display 3,000,000 as a baud rate option. Even if it's not in the options, you can enter it manually . Type "3000000" into the text box. If the log message " Success!" appears at the end, as shown below, then it was successful. Similarly, build and flash the calibration demo. west build -b frdm_rw612 -p auto uwbiot-top\demos\SR2xx\demo_device_calibration\zephyr west flash The Zephyr SDK root setup is now complete! Points to note Windows path length limit (MAX_PATH) Windows has a default path length limit of 260 characters. Zephyr repositories have a deep directory structure, which can cause this limitation to be exceeded. We strongly recommend saving your project in a location close to the root of the C drive (e.g., C:\uwb\ ). Placing it in a deeper directory structure like C:\Users\username\Documents\Projects\... will cause the path generated by Zephyr's build system to exceed the limit and result in an error. This issue is more pronounced with VS Code + MCUXpresso. If it's difficult to place it close to the root of the C drive, please consider the following workarounds. How to do it: We recommend using WSL2 (Windows Subsystem for Linux). Alternatively, enable LongPathsEnabled in the Windows registry. Notes on importing projects in VS Code + MCUXpresso When importing a project, you need to set the App type to "Repository application" . This is not highlighted in the Getting Started guide, but it is a point where build errors are likely to occur if you get it wrong. Please be sure to check this. Cases where a pristine build is required If you change build options or the error persists, try a pristine build: west build --pristine -b frdm_rw612 sr250-uwbiot-zephyr/samples/demo_uwb_controller FW version error demo_sr2xx_fw_update Running other demos before executing this will result in a firmware version error. Always perform the firmware update first. Next episode preview Once the environment is set up, we'll finally run the demo. Next time, we'll explain how to run the UWB ranging demo using two different routes: the PnP route and the Zephyr SDK route. Stay tuned! Reference links Trimension SR250 Development Board Start Guide SR250 UWB Plug-and-Play Application (GitHub) sr250-uwbiot-zephyr (GitHub) FRDM-RW612 Product Page Trimension SR250 Evaluation Board MCUXpresso for VS Code ========================= We are currently unable to respond to comments left in the "Comment" section of this post. We apologize for the inconvenience, but please refer to " Technical Questions to NXP - How to Contact Us( Japanese Blog) " when making an inquiry. (If you are already an NXP distributor or have a relationship with NXP, you may ask your representative directly.) In the first installment, we introduced the features of the SR250 (integration of UWB ranging and UWB radar on a single chip). In the second installment, we will set up an environment to actually run the SR250 using the evaluation board SR250UWBSHIELD + FRDM-RW612. We will explain two routes: the build-free PnP (Plug-and-Play) route and the Zephyr SDK route for full-fledged development. (Estimated work time: 10 minutes) Japanese Blog
View full article
NXP Trimension® SR250 UWB 入门指南 - 第 2 部分:SR250UWBSHIELD + FRDM-RW612 设置指南(日语博客) 1. 引言 在第一期中,我们介绍了 SR250,这是一款将 UWB 测距和 UWB 雷达集成到单个芯片上的设备,并于 2026 年 3 月面向大众市场发布。 从现在开始,我们将最终让电路板正常工作。让我们一起完成整个过程,从获取评估板到验证其运行情况。 第一 UWB基础知识及SR250概述 第二部分(本文) 设置 SR250 评估板 (SR250UWBSHIELD) 第三 我们来试试超宽带测距。 第四 试试超宽带雷达。 体验 SR250 主要有两种方式:无需编译的即插即用 (PnP) 方式和使用 Zephyr SDK 进行全面开发的方式。根据您选择的方式,所需的准备工作有所不同,因此最好提前决定。我们也非常欢迎想要两种方式都尝试的用户! 虽然它可以在 Windows 以外的系统上运行,但本指南将使用 Windows PC 上的命令提示符。 根 对于像这样的人来说 开发环境 A. PnP 首先,我想先尝试一下! 仅限 Python + PySerial B. Zephyr SDK 我想认真开发这项技术,并将其与蓝牙低功耗技术结合起来。 Git、CMake、Python、Zephyr SDK 2. 硬件准备(A 和 B 通用) 所需硬件 对于UWB距离测量,另一端需要一个设备。如果您有两套设备,则可以测量两个SR250 UWB SHIELD板之间的距离。如果您有一部配备UWB功能的智能手机,则只需一套设备即可测量到该智能手机的距离。 SR250UWBSHIELD :配备 SR250 的 Arduino 兼容扩展板。 FRDM-RW612 :主机MCU板(支持Wi-Fi 6/蓝牙低功耗5.4/802.15.4 ) 两条 USB Type-C 数据线 FRDM-RW612 附带一根电缆,请另备一根。 你需要一根支持数据通信的线缆,而不仅仅是一根只能充电的线缆。 与电脑连接的接口可以是A型接口或C型接口。 关于USB连接 SR250UWBSHIELD + FRDM-RW612 需要两根 USB-C 数据线才能工作。我们来看看每根数据线的作用。 连接器 目的 备注 J10(MCU-Link) 电源供应、编程和调试。 这个连接是必需的。没有它,电源将无法开启。 J8(HS-USB) 串行通信(虚拟 COM 端口) 检查 COM 端口时,请使用 J8 端的端口号。 Windows 设备管理器中会出现两个 COM 端口,但用于串行通信的是 J8 (HS-USB) 设备上的 COM 端口。它会显示为“USB 串行设备 (COMx)”。 返工:需要首先检查的关键任务。 SR250-ARD扩展板和FRDM-RW612通过SPI接口通信,但使用默认的Arduino排针接线无法正常工作。请使用以下两种方法之一解决此问题。 方法一:焊接返工(推荐) 如果你有电烙铁,我建议你重新焊接SPI线路。焊接完成后,你就不需要任何线缆了,这样布线会更简洁。 有关详细的返工步骤,请参阅入门指南: 《Trimension SR250 开发板入门指南》 方法二:使用跳线连接(适合想要轻松尝试的人) 如果您想尝试不焊接,请按如下方式将 FRDM-RW612 的 Arduino 排针用两根母对母跳线连接起来。 如果您想先测试一下功能,请使用此方法。 3A. PnP 方案:只需使用 Python 即可轻松尝试 此即插即用 (PnP) 应用无需编译;您可以使用适用于 FRDM-RW612 的 USB 串口通信和 SPI 通信协议转换器固件(即 PnP 固件),直接从 PC 控制 SR250。该固件可在 GitHub 上获取。您只需在 PC 上运行 Python UCI 脚本即可验证其运行情况。 准备过程中,您会遇到两种不同的固件。首先要写入的是RW612内部运行的协议转换固件。之后,您需要更新SR250的固件。两者的写入方法不同(RW612通过ISP模式写入,SR250通过PnP固件写入),请务必仔细阅读操作步骤。   从 GitHub 获取所需文件。您可以从右上角的“代码”下拉菜单下载 ZIP 文件。 GitHub: SR250 UWB 即插即用应用程序 所需软件 Python 3.12 或更高版本 PySerial: python -m pip install pyserial 程序 步骤 1:写入 RW612 PnP 的固件 连接两根 USB 线缆(J10 和 J8)。 要启动 RW612 的 ISP 模式(系统内编程),即固件写入模式:按住 SW3(ISP),然后按下并松开 SW1(重置)→ 松开 SW3。 要使用 USB 上的 ISP 将固件写入 RW612,请双击位于 FRDM-RW612_PnP 文件夹中的 program_FRDM-RW612.bat 文件来运行该批处理文件: FRDM-RW612_PnP/program_FRDM-RW612.bat 大多数错误是由设备未以 ISP 模式启动引起的。如果您在使用开关 2 进入 ISP 模式时遇到困难,请尝试在按住 SW3 的同时将 USB 连接到 J10。 批处理文件处理完成后,拔下 USB 电缆,重新插上,然后重新启动开发板。 步骤 2:SR250 固件更新 要更新 SR250 的固件,请将 SR250 的扩展板连接到 RW612 板的顶部,然后双击 SR250_FW 文件夹中的 Update_SR250_FW.bat 文件来运行该批处理文件: SR250_FW/Update_SR250_FW.bat 如果成功,拔下 USB 连接线,重新插上,然后重启主板。 步骤 3:运行检查 在设备管理器中检查 J8 的 COM 端口号(例如,COM10)。 启动位于 Simple_demos 文件夹中的 Python 脚本,使用您刚刚确认的 COM 端口号作为参数,并验证通信是否成功。 如果未安装 JLink,则两个设备都不会被识别为 JLink 设备(如下图 J10 所示),而是都会显示为“USB 串口设备”。在这种情况下,请断开 J8 连接,并检查哪个设备从设备列表中消失。消失的设备对应于 J8。 python demo_ranging.py COM10 PnP路由设置现已完成! 3B. Zephyr SDK 方案:用于全面开发 此方案使用基于 Zephyr OS 的 SDK 进行构建和调试。它支持与 BLE 集成以及自定义应用程序的开发。 有两种方法:使用 VS Code + MCUXpresso,以及使用 west 命令行。两种方法都可以。这里,我们将介绍在 Windows 环境下使用 west 命令的方法。首先,在尽可能靠近 C 盘根目录的位置创建一个文件夹。 有关如何将 VS Code 与 MCUXpresso 配合使用的说明,请参阅入门指南或MCUXpresso for VS Code 文档。另请参阅本文档末尾列出的关于将 VS Code 与 MCUXpresso 配合使用的要点。 所需软件 Git :最新版本 CMake :3.21.1 或更高版本 Zephyr SDK :0.17.x Zephyr 版本与 Zephyr SDK 之间存在依赖关系。本教程使用Zephyr SDK 0.17.x 版本。请安装。不同版本的 SDK 可能会导致构建错误。 Python :3.8 或更高版本 请确保您已安装 Ninja 和 West。 pip3 install west ninja 串口终端:TeraTerm、PuTTY 或您选择的任何其他串口终端。 环境设置步骤 步骤 1:克隆存储库 git clone https://github.com/nxp-uwb/sr250-uwbiot-zephyr.git 步骤 2:西部初始化 cd sr250-uwbiot-zephyr west init -l --mf west.yml uwbiot-top 步骤 3:获取依赖关系 西部更新 west update 此过程需要一些时间才能完成。如果中途停止,请重新启动。在完成之前进行下一步操作会导致构建错误。 步骤 4:安装 Python 依赖包 pip install -r zephyr\scripts\requirements.txt 步骤 5:设置环境变量 在环境变量中设置 Zephyr SDK 的路径。 zephyr\zephyr-env.cmd 构建和编写 由于首先需要进行更新,我们将构建一个固件更新演示。 west build -b frdm_rw612 -p auto uwbiot-top\demos\SR2xx\demo_sr2xx_fw_update\zephyr 构建成功后,我会将信息写入文件。 west flash 我们将通过串口通信检查日志。默认情况下,代码仅在通信建立后执行。 连接两根 USB 线缆(J10 和 J8)。 检查连接到 J8 的一侧的 COM 端口号(参见步骤 3:PnP Root 的操作检查)。 启动终端软件并按如下方式配置端口: 将波特率设置为3,000,000 bps 。许多终端程序,例如 TeraTerm 和 PuTTY,不会将 3,000,000 列为波特率选项。即使选项中没有,您也可以手动输入。在文本框中输入“3000000”。 如果日志消息“成功!”出现在末尾,如下所示,则表示操作成功。 同样地,构建并刷写校准演示程序。 west build -b frdm_rw612 -p auto uwbiot-top\demos\SR2xx\demo_device_calibration\zephyr west flash Zephyr SDK 根目录设置已完成! 需要注意的事项 Windows 路径长度限制(MAX_PATH) Windows 默认路径长度限制为 260 个字符。Zephyr 仓库的目录结构较深,这可能会导致路径长度超出限制。我们强烈建议您将项目保存在C 盘根目录附近的位置(例如 C:\uwb\ )。如果将其放置在更深的目录结构中,例如 C:\Users\username\Documents\Projects\... ,Zephyr 构建系统生成的路径将超出长度限制,从而导致错误。使用 VS Code + MCUXpresso 时,此问题尤为突出。如果难以将其放置在 C 盘根目录附近,请考虑以下解决方法。 操作方法: 我们建议使用 WSL2(适用于 Linux 的 Windows 子系统)。 或者,在 Windows 注册表中启用 LongPathsEnabled。 关于在 VS Code + MCUXpresso 中导入项目的注意事项 导入项目时,您需要将应用类型设置为“存储库应用程序” 。入门指南中并未重点提及这一点,但如果设置错误,很可能会导致构建错误。请务必检查此项。 需要完美构建的情况 如果更改构建选项或错误仍然存在,请尝试全新构建: west build --pristine -b frdm_rw612 sr250-uwbiot-zephyr/samples/demo_uwb_controller 固件版本错误 demo_sr2xx_fw_update 在执行此操作之前运行其他演示程序会导致固件版本错误。请务必先执行固件更新。 下一集预告 环境搭建完毕后,我们就可以运行演示了。下次,我们将讲解如何使用两种不同的方式运行 UWB 测距演示:即插即用 (PnP) 方式和 Zephyr SDK 方式。敬请期待! 参考链接 Trimension SR250 开发板入门指南 SR250 UWB 即插即用应用程序(GitHub) sr250-uwbiot-zephyr(GitHub) FRDM-RW612 产品页面 Trimension SR250 评估板 适用于 VS Code 的 MCUXpresso ========================= 即使您在本文的“评论”栏留言,我们目前也无法回复。 给您带来不便,我们深感抱歉。请在询问时参阅“NXP技术问题-联系方式(日本博客)”。 (如果您已经是NXP的代理商或与其有合作关系,可以直接向负责人咨询。) 在第一部分中,我们介绍了SR250的特性(将UWB测距和UWB雷达集成在单个芯片上)。在第二部分中,我们将搭建一个环境,使用评估板SR250UWBSHIELD + FRDM-RW612实际运行SR250。我们将介绍两种方案:无需构建的即插即用(PnP)方案和用于完整开发的Zephyr SDK方案。 (预计工作时间:10分钟) 日本博客
View full article
NXP Trimension® SR250で始めるUWB入門 第2回:SR250UWBSHIELD + FRDM-RW612 セットアップガイド (日本語ブログ) 1. はじめに 第1回では、SR250がUWB測距とUWBレーダーを1チップに統合したデバイスであること、そして2026年3月にマスマーケット向けにリリースされたことを紹介しました。 今回からは、いよいよ実際にボードを動かします。評価ボードを入手して動作確認まで一緒に進めていきましょう。 第1回 UWBの基礎とSR250の概要 第2回(本記事) SR250評価ボード (SR250UWBSHIELD) のセットアップ 第3回 UWB測距 (Ranging) を試してみる 第4回 UWBレーダー (Radar) を試してみる SR250を試す方法は大きく2通りあります。ビルド不要のPnP (Plug-and-Play) ルートと、本格開発向けのZephyr SDKルート、どちらのルートかによって必要な準備が変わるため、先に決めておくとスムーズです。どちらも!という方も大歓迎です。 Windows以外でも動作可能ですが、今回はWindows PCのコマンドプロンプトを使用します。 ルート こんな方に 開発環境 A. PnP まず手軽に動かしてみたい! Python + PySerial のみ B. Zephyr SDK 本格的に開発したい・BLEと組み合わせたい Git・CMake・Python・Zephyr SDK 2. ハードウェアの準備 (A, B共通) 必要なハードウェア UWB測距の場合は相手側のデバイスが必要となります。2セットご用意いただければ、SR250 UWB SHIELDボード同士での測距を行うことができます。UWBが搭載されたスマートフォンをお持ちであれば、1セットのみでスマートフォンと測距することも可能です。 SR250UWBSHIELD:SR250搭載のArduino互換シールドボード FRDM-RW612:ホストMCUボード (Wi-Fi 6 / Bluetooth Low Energy 5.4 / 802.15.4 搭載) USB Type-Cケーブル × 2本 1本はFRDM-RW612に同梱されているので、もう1本ご準備ください 充電専用ケーブルではなく、データ通信対応のケーブルが必要です PCへの接続側はType-AでもType-Cでも構いません USB接続について SR250UWBSHIELD + FRDM-RW612の動作にはUSB-Cケーブルを2本接続します。それぞれの用途を確認しておきましょう。 コネクタ 用途 備考 J10 (MCU-Link) 電源供給・書き込み・デバッグ 接続必須。これがないと電源が入らない J8 (HS-USB) シリアル通信 (Virtual COM Port) COMポート確認時はJ8側のポート番号を使用 Windowsのデバイスマネージャーに2つのCOMポートが表示されますが、シリアル通信に使うのはJ8 (HS-USB) 側のCOMポートです。「USB Serial Device (COMx)」と表示されます。 リワーク:最初に確認が必要な重要作業 SR250-ARDシールドとFRDM-RW612はSPIで通信しますが、デフォルトのArduinoヘッダー配線ではSPIが正しく動作しません。以下の2通りのいずれかで対応してください。 方法1:半田付けによるリワーク(推奨) はんだごてをお持ちの方はSPIラインのリワークを行うことをお勧めします。一度やってしまえばケーブルも不要でスッキリします。 リワーク手順の詳細はスタートガイドを参照してください:Trimension SR250用開発ボードのスタート・ガイド 方法2:ジャンパ線での代替接続(手軽に試したい方) はんだ付けなしで試したい場合は、メスメス (Female-to-Female) のジャンパ線2本でFRDM-RW612のArduinoヘッダーピンを以下のように接続してください。 まず動作確認したい方はこちらの方法からどうぞ。 3A. PnPルート:Pythonだけで手軽に試す PnPアプリはビルド不要で、GitHubで提供されているFRDM-RW612用のUSBシリアル通信とSPI通信のプロトコル変換用FW (PnP用FW) を使ってSR250をPCから直接操作できます。PC側からPythonのUCIスクリプトを実行するだけで動作確認できます。 準備をするにあたって、2つの異なるFWが出てきます。最初に書き込むのは、RW612内で動作するプロトコル変換用のFWです。その後に、SR250のFW更新を行います。それぞれ書き込み方法が異なります (RW612はISPモード経由、SR250はPnP FW経由) ので、手順にご注意ください。   GitHubから必要なファイルを入手します。右上の "Code" のプルダウンメニューからZIPダウンロードが可能です。 GitHub: SR250 UWB Plug-and-Play Application 必要なソフトウェア Python 3.12以降 PySerial: python -m pip install pyserial 手順 Step 1: RW612 PnP用FWの書き込み USBケーブル2本 (J10・J8)を接続 ファームウェア書き込み専用モードであるISPモード(In-System Programming)でRW612を起動させる:SW3(ISP)を押しながらSW1 (リセット) を押して離す → SW3を離す ISP over USBでRW612へFWを書き込むため、FRDM-RW612_PnPフォルダにあるprogram_FRDM-RW612.batをダブルクリックでバッチファイルを実行: FRDM-RW612_PnP/program_FRDM-RW612.bat エラーが出る場合の多くはISPモードで起動できていないことが原因です。2のスイッチ操作でISPモードに入りにくい場合は、SW3を押しながらJ10にUSBを接続してみてください。 バッチファイルの処理が完了したら、USBケーブルを一度抜いて再接続し、ボードを再起動してください。 Step 2: SR250 FWアップデート SR250のFW更新のため、SR250のシールドボードをRW612ボードに重ねて接続し、SR250_FWフォルダにあるUpdate_SR250_FW.batをダブルクリックでバッチファイルを実行: SR250_FW/Update_SR250_FW.bat 成功したら、USBケーブルを一度抜いて再接続し、ボードを再起動してください。 Step 3: 動作確認 デバイスマネージャーでJ8側の通信用COMポート番号を確認します (例: COM10)  Simple_demosフォルダ内にあるPythonスクリプトで先ほど確認したCOMポート番号を引数にして起動し、通信が成功していることを確認します JLinkがインストールされていない場合、下図のJ10のようにJLinkとして認識されず、2つのデバイスがいずれも「USB Serial Device」と表示されます。その場合は、J8の接続を外し、デバイス一覧からどちらのデバイスが消えるかを確認してください。消えたデバイスがJ8に対応します。 python demo_ranging.py COM10 PnPルートの準備はこれで完了です! 3B. Zephyr SDKルート:本格開発向け Zephyr OSベースのSDKを使ってビルド・デバッグを行うルートです。BLEとの組み合わせや独自アプリの開発に対応しています。 VS Code + MCUXpressoを使う方法と、westコマンドラインを使う方法の二つあります。どちらでも構いません。ここではWindows環境でwestコマンドを使う方法を紹介します。なるべくCドライブ直下に近いところにフォルダを作成して始めましょう。 VS Code + MCUXpressoを使う方法についてはスタートガイドやMCUXpresso for VS Codeをご参照ください。VS Code + MCUXpressoを使う方法での注意点だけ最後に記載にしてますので、そちらもご参照ください。 必要なソフトウェア Git: 最新版 Cmake: 3.21.1以降 Zephyr SDK: 0.17.x ZephyrのバージョンとZephyr SDKには依存関係があります。本手順では Zephyr SDK 0.17.x をインストールしてください。異なるバージョンのSDKではビルドエラーが発生する場合があります。 Python: 3.8以降 ninjaとwestをインストールしておきましょう pip3 install west ninja シリアルターミナル: TeraTerm・PuTTYなど、お好みのシリアルターミナル 環境構築手順 Step 1: リポジトリのクローン git clone https://github.com/nxp-uwb/sr250-uwbiot-zephyr.git Step 2: west初期化 cd sr250-uwbiot-zephyr west init -l --mf west.yml uwbiot-top Step 3: 依存関係の取得 west update west update は完了まで時間がかかります。途中で止まった場合は再実行してください。未完了のまま次に進むとビルドエラーの原因になります。 Step 4: Python依存パッケージのインストール pip install -r zephyr\scripts\requirements.txt Step 5: 環境変数の設定 Zephyr SDKのパスを環境変数に設定します。 zephyr\zephyr-env.cmd ビルドと書き込み 最初に更新が必要なため、まずFW更新用のデモをビルドします。 west build -b frdm_rw612 -p auto uwbiot-top\demos\SR2xx\demo_sr2xx_fw_update\zephyr ビルドに成功したら書き込みます。 west flash シリアル通信でログを確認します。デフォルトでは通信が確立してはじめてコードを実行するようになっています。 USBケーブル2本 (J10・J8)を接続 J8に接続している側のCOMポート番号を確認 (PnPルートのStep 3: 動作確認を参照) ターミナルソフトを起動し、ポートを以下のように設定します。 ボーレートは 3,000,000 bps に設定します。TeraTerm・PuTTYなど多くのターミナルソフトでは、ボーレートの選択肢に3,000,000が表示されません。選択肢になくても直接手入力できます。テキストボックスに「3000000」と打ち込んでください。 以下のように、最後にSuccess!のログが出力されていれば成功です。 同様にキャリブレーションデモをビルドして書き込みます。 west build -b frdm_rw612 -p auto uwbiot-top\demos\SR2xx\demo_device_calibration\zephyr west flash Zephyr SDKルートの準備もこれで完了です! 注意点 Windowsのパス長制限(MAX_PATH) Windowsではデフォルトでパス長が260文字に制限されています。Zephyrのリポジトリは深いディレクトリ構造を持つため、この制限に引っかかることがあります。プロジェクトの保存場所はCドライブ直下に近い場所(例: C:\uwb\ など)を強くお勧めします。 C:\Users\username\Documents\Projects\... のような深い階層に置くと、Zephyrのビルドシステムが生成するパスが制限を超えてエラーになります。VS Code + MCUXpressoではこの問題がより顕著です。Cドライブ直下に近い場所に置くのが難しい場合は以下の対処方法をご検討ください。 対処方法: WSL2(Windows Subsystem for Linux)の使用を推奨 またはWindowsのレジストリでLongPathsEnabledを有効化 VS Code + MCUXpressoでのプロジェクトインポート時の注意 プロジェクトのインポート時には、App typeを「Repository application」に設定することが必要です。スタートガイドにはハイライトされていませんが、ここを誤るとビルドエラーになりやすいポイントです。必ず確認してください。 pristine buildが必要なケース ビルドオプションを変更した場合や、エラーが解消しない場合はpristineビルドを試してください: west build --pristine -b frdm_rw612 sr250-uwbiot-zephyr/samples/demo_uwb_controller FWバージョンエラー demo_sr2xx_fw_update を実行する前に他のデモを動かすとFWバージョンエラーが発生します。必ずFWアップデートを最初に実行してください。 次回予告 環境が整ったら、いよいよデモを動かします。次回はUWB測距デモを動かす方法について、PnPルートとZephyr SDKルート、2つのルートそれぞれ解説します。お楽しみに! 参考リンク Trimension SR250用開発ボードのスタート・ガイド SR250 UWB Plug-and-Play Application(GitHub) sr250-uwbiot-zephyr(GitHub) FRDM-RW612 製品ページ Trimension SR250 評価ボード MCUXpresso for VS Code ========================= 本投稿の「Comment」欄にコメントをいただいても、現在返信に対応しておりません。 お手数をおかけしますが、お問い合わせの際には「NXPへの技術質問 - 問い合わせ方法 (日本語ブログ)」をご参照ください。 (既に弊社NXP代理店、もしくはNXPとお付き合いのある方は、直接担当者へご質問いただいてもかまいません。) 第1回ではSR250の特長 (UWB測距+UWBレーダーの1チップ統合) を紹介しました。第2回では評価ボード SR250UWBSHIELD + FRDM-RW612 を使って、実際にSR250を動かすための環境を整えます。ビルド不要のPnP (Plug-and-Play) ルートと、本格開発向けのZephyr SDKルートの2通りを解説します。 (作業時間:最短10分) 日本語ブログ
View full article
eIQ Time Series Studioを使い始める このラボでは、eIQ Time Series Studio(TSS)の使用方法を説明します。この新しいツールはeIQ Tookitに含まれており、埋め込みマイクロコントローラ向けの時系列モデルの作成に使用されます。時系列データをインポートする方法、複数のMLアルゴリズムを生成する方法、生成モデルを開発ボードにデプロイする方法を取りあげます。 ラボではFRDM-MCXN947を使用しますが、eIQ Time Series Studioでサポートされているあらゆるデバイスで同じ手順が適用されます。 MCX FRDM-MCXA153 FRDM-MCXN947 MCX-N9XX-EVK i.MX RT i.MXRT685-EVK i.MXRT595-EVK MIMXRT1060-EVK MIMXRT1170-EVK MIMXRT1180-EVK LPC LPC55S69-EVK Kinetis FRDM-K66F FRDM-KV31F FRDM-K32L3A6 DSC MC56F83000-EVK MC56F80000-EVK   Time Series Studioプロセスの概要をすばやくつかむには、以下の動画もご覧ください。 (マイビデオで視聴) Time Series Studioで使用可能なセンサ・データの収集ツールについては、アプリケーション・コード・ハブのML Universal Datalogger もご覧ください。 i.MX RT
View full article
Getting Started with eIQ Time Series Studio This lab will walk through how to use eIQ Time Series Studio (TSS) to create time series models for embedded microcontrollers.  It covers how to import time series data, shows how the tool can generate multiple machine learning (ML) algorithms, and describes how to deploy those generated models to your development board. eIQ Time Series Studio is available as a standalone installer or via a web interface.  This lab uses the FRDM-MCXN947 but the same steps will apply to any of the devices supported by eIQ Time Series Studio. You can also use NXP devices not listed here by selecting the closest related device family while going through the lab: MCX FRDM-MCXA156 FRDM-MCXC444 FRDM-MCXE247 FRDM-MCXN236 FRDM-MCXN947 FRDM-MCXW71 i.MX RT i.MXRT700-EVK i.MXRT685-EVK i.MXRT595-EVK MIMXRT1060-EVK MIMXRT1170-EVK MIMXRT1180-EVK i.MX6 MCIMX6ULL-EVK i.MX8 8MPLUSLPD4-PEVK i.MX9 i.MX93EVK RW FRDM-RW612 LPC LPC55S69-EVK Kinetis FRDM-K66F FRDM-KV31F FRDM-K32L3A6 DSC MC56F83000-EVK MC56F80000-EVK The labs are written for VS Code but the same concepts can be used for other IDEs.  You can also view the video below for a quick overview of the Time Series Studio process.  (function() { var wrapper = document.getElementById('lia-vid-6390665301112w960h540r760'); var videoEl = wrapper ? wrapper.querySelector('video-js') : null; if (videoEl) { if (window.videojs) { window.videojs(videoEl).ready(function() { this.on('loadedmetadata', function() { this.el().querySelectorAll('.vjs-load-progress div[data-start]').forEach(function(bar) { bar.setAttribute('role', 'presentation'); bar.setAttribute('aria-hidden', 'true'); }); }); }); } }})(); (view in My Videos) Also check out the ML Universal Datalogger on the App Code Hub for a tool to collect sensor data that can be used with the Time Series Studio, as well as the Time Series Studio examples on App Code Hub. Also see this document for details on how to add TSS libraries to existing projects.  --- Updated October 2026 for TSS 2.1.4 release i.MX RT
View full article
eIQ 时间序列工作室入门指南 本实验将指导您如何使用 eIQ 时间序列工作室(TSS),这是一款集成于 eIQ 工具包 的全新工具,用于为嵌入式微控制器开发时间序列模型。实验内容涵盖:时间序列数据导入方法、工具如何生成多种机器学习算法,以及如何将生成的模型部署至开发板。本实验基于 FRDM-MCXN947 开发板,但相同步骤适用于所有 eIQ 时间序列工作室 支持的设备。 MCX FRDM-MCXA153 FRDM-MCXN947 MCX-N9XX-EVK i.MX RT i.MXRT685-EVK i.MXRT595-EVK MIMXRT1060-EVK MIMXRT1170-EVK MIMXRT1180-EVK LPC LPC55S69-EVK Kinetis FRDM-K66F FRDM-KV31F FRDM-K32L3A6 DSC MC56F83000-EVK MC56F80000-EVK   您还可以观看下方的视频,以快速了解 Time Series Studio 的流程。 (在 “我的视频” 中查看) 您还可通过 App Code Hub 获取 ML 通用数据记录器 工具,用于收集可与时间序列工作室配合使用的传感器数据。 i.MX RT
View full article
TJA1410 接收信号RX+ED 如何进行RZI解码? 根据手册中的波形可以看到,RX 忽略了第一次又高阻(或者0)开始的跳变,导致RX少一个跳变,RZI解码出错。 想问一下NXP,TJA1410 这种情况下,有建议的解码方式吗? Ethernet Re: TJA1410 接收信号RX+ED 如何进行RZI解码? 你好@li_wang , 首先,请您澄清一下,这是基于图 11 的理论问题,还是您在实现中观察到的实际 RZI 解码错误? 如果发现实际错误,请提供以下信息: TX、RX、ED 和差分线路电压波形涵盖了传输命令和数据传输的开始阶段 连接到 TJA1410 的数字 PHY 或自定义解码实现 实现开始将 RX 视为有效值的点 预期和实际解码的数据序列 如图 11 所示,突出显示的 VLINE 转换发生在从正常模式到传输模式的转换过程中。此时,线路阻抗从高阻抗变为有源阻抗,发射器开始驱动差分线路。在此转换过程中,RX 输出被明确标记为未定义。因此,高亮区域中显示的初始 VLINE 移动不应被解释为有效的 RZI 数据转换,该转换必须由 RX 上的脉冲表示。 在正常模式和发射模式下,接收端的默认电平为高电平。当差分 MDI 电压超过接收器触发阈值时,TJA1410 会在 RX 上产生一个低电平脉冲。此行为适用于有效的接收数据间隔。 因此,图 11 并不表明 TJA1410 忽略了第一个有效的 RZI 转换。这表明在发射器激活期间未定义 RX。有效的 RZI 解码应该只在 RX 处于有效工作区间时开始,而不是从模式转换引起的初始模拟 VLINE 移动开始。 顺祝商祺! 帕维尔 Re: TJA1410 接收信号RX+ED 如何进行RZI解码? Hi, PavelL 请问怎样可以获取  S32K5 + TJA1410测试套件? 谢谢 Li.Wang Re: TJA1410 接收信号RX+ED 如何进行RZI解码? TJA1410 实际测试波形, TJA1410 处于Normal 模式,只接收数据,不发送数据。 图中从上到下的信号分别为:ED, RX, Vline, TRX_P, TRX_N 接收到RX 信号,并进行解码时,按RZI规则,解码出来的数据为0x04,  实际上Vline 上的数据为0x08 (BEACON) 观察信号RX,发现在Vline 由高阻变为高时,RX 没有输出低电平脉冲,也就是说RX 少了1 bit 数据,导致解码错误。 非常感谢您的回复, 谢谢! Li.Wang Re: TJA1410 接收信号RX+ED 如何进行RZI解码? 你好@li_wang , 是的,TJA1410 可以通过常见的 10BASE-T1S 网络与 LAN8670 通信。 在“安全文件”下的“文档”中,有一个 TJA1410 VHDL-AMS 仿真模型。 本产品所需文档属于受控版本,可通过签署保密协议 (NDA) 后的安全文件访问。 请在此处申请访问权限: https://www.nxp.com/webapp-signup/docstoreReg 请注意,在提交表格时,您将被要求上传有效的保密协议副本。如果贵公司目前还没有任何保密协议,请先填写保密协议申请表: https://www.nxp.com/webapp-signup/ndaReqForm 保密协议准备就绪后,您可以申请安全文件访问权限。 请查看常见问题解答以了解流程: https://www.nxp.com/support/support/secure-access-rights:SEC-ACCESS https://www.nxp.com/support/support/secure-access-rights/secure-access-rights-faqs:SEC-ACCESS-FAQS 请注意,汽车以太网受出口管制政策约束,即使在授予保密协议和安全文件访问权限后,可能仍需要额外的批准。 顺祝商祺! 帕维尔 Re: TJA1410 接收信号RX+ED 如何进行RZI解码? 你好@li_wang , 感谢您提供测量数据。然而,当前的屏幕截图没有提供足够的时间分辨率来确定第一个预期的 RX 事件是否真的丢失,或者解码是否在接收到的突发信号的开头处错误对齐。 请问您能否提供以下信息: 数字 PHY 或自定义解码器的详细信息,包括 ED 和 RX 如何用于接收和比特对齐。 更高分辨率的捕获显示了突发信号开始附近的 ED、RX、TX 和差分 VLINE,理想情况下覆盖前 8 到 16 位周期。 根据目前的捕获结果,我们还不能断定 TJA1410 丢失了有效数据位。0x08 与 0x04 不匹配也可能是由于解码器如何使用 ED 和 RX 建立初始位对齐造成的。 顺祝商祺! 帕维尔 Re: TJA1410 接收信号RX+ED 如何进行RZI解码? 你好@li_wang , https://www.nxp.com/design/design-center/development-boards-and-designs/TJA1410-EVB可直接订购。 S32K5 是一款尚未正式发布的新产品 (NPI)。请注意,已获准提前体验此类产品的客户已指派了现场工程师。您指定的现场工程师应作为您解决有关本产品任何问题、疑虑或疑问的主要支持渠道。 顺祝商祺! 帕维尔 Re: TJA1410 接收信号RX+ED 如何进行RZI解码? 如图中,VLINE 由高阻变为高电压,这一变化没有在RX 上产生低电平脉冲,会导致RX 在进行RZI 解码时少产生1bit. 我还有两个问题: 1) TJA1410 可以和LAN8670 互联通行吗? 2) 贵公司由TJA1410 的 verilog 模型文件吗,或者其他可以用仿真的模型文件?用于设计数字PHY。 非常感谢回复! Li.Wang Re: TJA1410 接收信号RX+ED 如何进行RZI解码? 文件下载下来了,非常感谢! 里面由两个模型,如下是特定软件用的,想问一下,这两个文件支持在Synopsis VCS 中仿真吗,有没有帮助文档? Xpedition is registered trademark of Siemens. SABER is a registered trademark of Synopsis. 另外文档中有一个波形,如下,其中TX 不是RZI 编码的,我理解TAJ1410 芯片TX 发送通信时,应该是给RZI 编码格式的波形是吗? Re: TJA1410 接收信号RX+ED 如何进行RZI解码? 你好@li_wang , 感谢您确认软件包已成功下载。 由于仿真模型及其文档是通过安全文件提供的,我们应该避免在公共社区论坛上讨论其详细内容。 这两个问题在下载软件包中包含的仿真模型文档中均有解答。请参阅有关支持的仿真环境、模型接口和仿真示例的章节。 贝茨致意, 帕维尔 Re: TJA1410 接收信号RX+ED 如何进行RZI解码? 上图为 digital PHY 发送 beacon 时的波形, 从上到下信号分别为 ED, RX, TX, TRX_P. TX 上分别为 TRANSMIT cmd,  5 times BEACON code, RESET cmd. 由几个疑点: 1 在TX 发送TRANSMIT cmd 后,RX 上多了一个低电平脉冲; 2 在TX 发送RESET cmd 后, ED 没有在130ns 内变低。 想问一下,是什么原因引起的? 谢谢! Re: TJA1410 接收信号RX+ED 如何进行RZI解码? 你好@li_wang , 图 7 提供了完整传输序列的简化概述,而图 10 则详细显示了正常模式到传输模式的转换。因此,这两个图形展现了不同层次的细节,并且彼此一致。 图 7 显示了 TRANSMIT 命令之前和 RESET 命令之后的 VLINE 高 Z 区域。当 TJA1410 正在积极传输数据时,它们并不代表 VLINE 状态。 在发送数据之前,数字 PHY 必须发出图 13 所示的 TRANSMIT 命令。该命令包含两个低电平脉冲,中间由一个高电平间隔隔开。一旦识别到命令,TJA1410 就会进入发射模式,并将线路阻抗从高阻抗变为有源阻抗,如图 10 所示。 TX 上随后出现的短低电平脉冲代表已发送的数据。每个低电平脉冲都会反转差分总线信号的极性。 数据传输完成后,数字 PHY 发出如图 12 所示的 RESET 命令。这样 TJA1410 就恢复到正常模式,发射器输出再次变为高阻抗。 因此,数据传输前的正确顺序是 TRANSMIT 命令,而不是 RESET 命令或单个数据脉冲。 顺祝商祺! 帕维尔 Re: TJA1410 接收信号RX+ED 如何进行RZI解码? 根据图10, 进入Transmitting 模式之后,Vline 就不是高阻态。但是图7中显示在Transmiiting 模式下,Vline 为高阻,并且在一个低电平脉冲之后,Vline 变位高。 所以正式发送数据前,究竟是法两个低电平脉冲的RESET 命令,还是 发送一个低电平脉冲? Re: TJA1410 接收信号RX+ED 如何进行RZI解码? 你好@li_wang , 在发送命令之后,接收端可能会出现额外的低电平脉冲,这是因为发射器从高阻抗状态变为主动驱动状态,并且差分 MDI 电压超过了接收机阈值。在此模式转换期间的 RX 不应被解释为有效的接收数据,因此该脉冲不应包含在 BEACON 解码中。 关于 ED,RESET 命令指定的 55 ns 至 120 ns 时间是TX 命令解除断言时间,而不是 ED 的最大解除断言时间。即使 MDI 仍检测到活动,ED 也可能仍然很高。 为了进行更精确的评估,您应该测量差分 VLINE。 顺祝商祺! 帕维尔 Re: TJA1410 接收信号RX+ED 如何进行RZI解码? 上图为 digital PHY 发送 beacon 时的波形,测试中只有一个TJA1410,TRX_P. TRX_N 为floating 状态。 从上到下信号分别为 ED, RX, VLINE,TRX_P. TRX_N TX 上分别为 TRANSMIT cmd, 5 times BEACON code, RESET cmd. 与上一副图片一样。 TX  发送 TRANSMIT cmd, VLINE 上产生了一个变高的pulse;  不期望的异常情况; RESET cmd 之后,VLINE 为0, 但ED 持续了近20us; 不符合预期; 帮忙看一下是什么原因造成的? 请问Pavel, 贵公司有发送数据时的流程吗?以及对应的波形吗? 有的话可以提供给我,或在发我的邮件,谢谢! Re: TJA1410 接收信号RX+ED 如何进行RZI解码? 你好@li_wang , 请问在这种单节点架构下,MDI是如何终止的?尤其请确认是否使用了推荐的总线接口网络,以及是否启用了终端节点终止功能。 目前尚无来自两个 TJA1410 设备之间通信的测量参考波形。我也无法重现此设置,因为所需的数字 PHY 集成在 S32K5 中,而 S32K5 仍然是 NPI 设备,如前所述。因此,我的分析仅基于现有的 TJA1410 文档。 顺祝商祺! 帕维尔 Re: TJA1410 接收信号RX+ED 如何进行RZI解码? 你好@li_wang , 由于 TRX_P 和 TRX_N 处于浮空状态,因此测量结果不能代表正确连接的 10BASE-T1S 接口。 请将MDI端接至所需的差分阻抗,并重复测量。 顺祝商祺! 帕维尔 Re: TJA1410 接收信号RX+ED 如何进行RZI解码? Hi, PavelL 可能"floating 状态"  表述引起误解,这里实际时表示双绞线上只有一个Node 设备,即只有一个TJA1410. 所以没有任何其他干扰因素。同时VLINE 信号为TRX_P - TRX_N。 贵公司是否有demo 板上的测试波形,比如两个TJA1410 相关通行时的接收和发送实测波形?
View full article
PT2001 软件诊断 您好, 我想咨询一下关于PT2001软件诊断代码的问题。我想知道有没有人能帮帮我。 我正在研究微代码中的 STG 检测,并区分 HS 和 LS 故障。 我目前所做的就是将 HS vbat 打开一小段时间,然后检查 HS Vds,并判断是 LS 故障还是 HS 故障。 但这似乎行不通。即使我对 LS 漏极施加 STH,它仍然总是检测为 HS 故障。 如何区分 STG 故障与 HS(源)故障和 LS(漏)故障? 太感谢了, 阿提卡 Re: PT2001 SW diagnostic 你好,阿蒂卡 再会! 你观察到的这种行为是预期之内的。当 VBAT 高侧开启时,低侧漏极接地短路也会触发信号高侧 VDS 诊断。这是因为电流从 VBAT 流经高侧 MOSFET 和负载进入接地的低侧漏极,导致高侧 VDS 阈值被超过。 因此,短暂启用高侧无法可靠地确定物理短路位于高侧源极还是低侧漏极。对于这种拓扑结构,两种故障都可以在 PT2001 感知输入端产生相同的电气状态。 建议的方法是,在空闲诊断阶段,让 HS 和 LS MOSFET 都关闭,利用 HS VSRC 和 LS VDS 反馈来识别对地短路。如果两个反馈都很低,则结果应归类为“负载路径对地短路”。PT2001 可以检测到故障,但如果没有额外的外部传感或隔离电路,它无法唯一地将故障定位在高源极侧或低漏极侧。 希望这些信息对您有所帮助,如果您还需要其他帮助,请告诉我。 祝你今天过得愉快,一切顺利。 Re: PT2001 SW diagnostic 你好 RafaR, 在空闲阶段,发现负载路径对地短路,我需要区分对地短路故障是发生在HS源极还是LS漏极。 现在,通过短暂地打开外部 HS MOSFET 并降低 Vds 阈值,可以正确识别故障。 谢谢,祝您今天过得愉快!
View full article
S32K388 (4×Cortex-M7): Running FreeRTOS on 3 cores in AMP mode Hello, I am developing with the S32K388 (4× Cortex-M7, ASIL D) and would like to run FreeRTOS on 3 of the 4 cores (each core runs its own FreeRTOS instance, AMP mode).So far I have not been able to find complete reference material for this multi-core FreeRTOS setup, so I would appreciate any guidance. My questions: 1. Is AMP (one FreeRTOS instance per core) the recommended approach for running FreeRTOS on 3 cores of the S32K388? Is there an NXP application note / user guide describing the multi-core setup, e.g. boot sequence and core start-up (who starts core1/core2/core3 and how), VTOR / vector table per core, memory partitioning (TCM/RAM), clock and interrupt routing per core? 2. Is there an official example project (S32K388 or any S32K3 variant) that runs FreeRTOS on more than 2 cores? Where can I download it? 3. What is the recommended inter-core communication mechanism on S32K3 (IPCF vs shared memory + interrupts), and are there FreeRTOS-aware examples? 4. How should the project be structured in S32 Design Studio for this use case (single multi-core project vs one project per core), and how can I debug all 3 cores simultaneously? Re: S32K388 (4×Cortex-M7): Running FreeRTOS on 3 cores in AMP mode Hello @LeeKen, Neither AMP nor SMP is recommended; the choice depends on the application requirement. You can choose the multicore FreeRTOS approach that best fits the application. For AMP, use one independent S32 Design Studio project per core, based on the single-core FreeRTOS example. The main core should configure XRDC. Memory, vector tables, stacks, and application sections must be divided in the per-core linker files. The main core may start the other cores, or sBAF can enable the cores specified in the boot header/boot configuration word. IPCF 4.3.0 includes an S32K388 AMP FreeRTOS multicore example using CM7_1 and CM7_2, which can be used as a reference. IPCF is optional, anyone can implement their own solution. In general, debuggers provide multicore debug support. Regards, Daniel Re: S32K388 (4×Cortex-M7): Running FreeRTOS on 3 cores in AMP mode Hi Daniel, Thanks a lot for your detailed explanation. There are still some questions that I would like you to answer. 1. If using the AMP mode, each core is regarded as a single-core Free RTOS project, is that correct? 2. Only the main core needs to configure XRDC? Are there any precautions when configuring? 3. If the configurations for each core's Memory, vector tables, stacks are completely independent, do we need to assess the dependencies between the multi-cores? 4. If I use the main core to start the other two slave cores, is there any limitation or must there be a certain sequence when starting multiple slave cores one after another? Re: S32K388 (4×Cortex-M7): Running FreeRTOS on 3 cores in AMP mode Hello @LeeKen, 1. Yes. 2. XRDC is a global configuration and normally needs to be configured only once by the main core before the other cores access protected resources.  https://docs.nxp.com/bundle/AN14715/page/topics/extensible_resource_domain_controllerxrdc.html 3. The system-level dependencies still need to be assessed. These include shared memory, IPCF channels, shared peripherals, semaphores, clocks, watchdogs, reset handling, startup synchronization, low-power mode, etc. 4. This is also a functional-safety consideration. The secondary cores should not have unrestricted access to certain memories or peripherals, so XRDC must be initialized before they use those resources. XRDC domain assignment is also required for hardware SEMA42 operation, because SEMA42 uses the master domain ID for gate ownership. Regards, Daniel
View full article
MVR5510AMDAL 是否能进行程序调试 Hi  我在使用MVR5510AMDALTS和S32G399做硬件开发, 我看到MVR5510AMDALTS是预编程的IC。我还可以重新配置这个PMIC进入debug模式进行程序调试吗? 我想调试的内容:我想把BUCK2配置为1.2V输出,LDO2配置为2.5V输出。其他电源和预编程的保持不变。请问这是否可以实现? Re: MVR5510AMDAL 是否能进行程序调试 嗨,迈克尔, MVR5510AMDALTS 是出厂预编程的 DAL 设备(不是空白的 A0 版本)。其出厂预设的OTP配置无法被覆盖。   BRs,托马斯 Re: MVR5510AMDAL 是否能进行程序调试 我把BUCK2设置为1.2V给SJA1105SELY的核心供电。LDO2设置为2.5V是给SJA1105SELY的VDDA_SGMII供电。 我如果购买MVR5510AMDALTS,这个已经预编程的PMIC还可以进入OTP debug模式进行编程吗? Re: MVR5510AMDAL 是否能进行程序调试 OTP预程序已完成 设计方面会采用哪种负载?LPDDR4?
View full article
S32K3 ADC平均值 你好, 我目前正在使用S32K312,对ADC平均值有一个疑问。 3.858V(数字万用表实测值) 3.865V T32 AVGX 转换时间 100 3.865V T32 AVG4 转换时间 100 3.860V T32 AVG8 转换时间 100 3.855V T32 AVG16 转换时间 100 3.844V T32 AVG32 转换时间 100 3.864V T32 AVGX 转换时间 22 3.862V T32 AVG4 转换时间 22 3.860V T32 AVG8 转换时间 22 3.847V T32 AVG16 转换时间 22 3.844V T32 AVG32 转换时间 22 3.866V T32 AVGX 转换时间 255 3.844V T32 AVG32 转换时间 255 如上图所示,随着平均计数的增加,测得的电压会降低。 您能帮我分析一下这种行为可能的原因吗? Re: S32K3 ADC Average 你好@kjy106906 , 通常来说,最佳建议基于以下几点: AN4373,SAR ADC测量指南 - 应用笔记 AN5032:SoC 中 SAR ADC 的参考电路设计 – 应用笔记 主要方法是测试ADC引脚前的源阻抗,可以在电压基准和基准引脚之间添加基于运算放大器的缓冲电路,以满足负载条件。 此外,您还可以根据 AN4373 重新计算外部 RC 滤波器并启用预采样。 当 ADC 对模拟引脚进行采样时,该引脚会与 ADC 连接和断开。开关操作会向引脚注入少量电荷。增加两次转换之间的时间间隔也可能有所帮助。 作为最后的测试,您还可以只转换此通道,然后将 AVG32 与在相同触发信号条件下单独捕获的 32 个原始转换的软件平均值进行比较。 此致, 朱利安
View full article
TJA1410の受信信号RX+EDに対してRZI復号を行うにはどうすればよいですか? マニュアルの波形図からわかるように、RXは高インピーダンス(または0)から始まる最初の遷移を無視するため、RXは遷移を見逃し、RZI復号エラーが発生します。 NXP TJA1410について質問させてください。この場合、推奨されるデコード方法はありますか? イーサネット Re: TJA1410 接收信号RX+ED 如何进行RZI解码? こんにちは@li_wangさん まず、これは図11に基づく理論的な懸念なのか、それとも実装中に実際のRZIデコードエラーが見られているのか、明確にしていただけますか? 実際にエラーが確認された場合は、以下の情報を提供してください。 TRANSMITコマンドとデータ送信開始時のTX、RX、EDおよび差動線間電圧波形 デジタルPHYまたはカスタムデコード実装はTJA1410に接続されています 実装がRXを有効なものとして扱い始める時点 期待されるデータシーケンスと実際にデコードされたデータシーケンス 図11に関して、強調表示されているVLINEの遷移は、通常モードから送信モードへの遷移中に発生します。この時点でラインインピーダンスはハイZからアクティブインピーダンスに変わり、トランスミッタは差動線を駆動し始めます。この遷移の間、RX出力は明示的に未定義としてマークされます。したがって、強調表示された領域に示されている最初のVLINEの動きは、RX上のパルスによって表されなければならない有効なRZIデータ遷移として解釈されるべきではありません。 通常モードおよび送信モードでは、RXのデフォルトレベルはHIGHです。差動MDI電圧が受信機トリガー閾値を通過すると、TJA1410はRXに低パルスを生成します。この動作は、有効な受信データ間隔に適用されます。 したがって、図11はTJA1410が最初の有効なRZI遷移を無視することを示しているわけではない。トランスミッタの活性化時にRXが定義されていないことを示しています。有効なRZI復号は、RXが有効な動作区間内にある場合にのみ開始すべきであり、モード遷移による初期アナログVLINEの動きからは始めるべきではありません。 よろしくお願いいたします。 パベル Re: TJA1410 接收信号RX+ED 如何进行RZI解码? TJA1410の実際のテスト波形を見ると、TJA1410は通常モードで、データを受信するだけで送信はしていないことがわかります。 図の上から下への信号は、ED、RX、Vline、TRX_P、TRX_Nです。 RX信号が受信され、RZIルールに従って復号されると、復号されたデータは0x04になりますが、Vline上の実際のデータは0x08(BEACON)になります。 信号RXを観測したところ、Vlineが高インピーダンスから高インピーダンスに変化した際に、RXから低レベルのパルスが出力されないことが判明した。これは、RXで1ビットのデータが欠落していることを意味し、復号エラーの原因となっている。 ご返信いただき、誠にありがとうございます。 ありがとう! 李王 Re: TJA1410 接收信号RX+ED 如何进行RZI解码? こんにちは、パベル S32K5 + TJA1410テストキットはどのように入手できますか? ありがとう 李王 Re: TJA1410 接收信号RX+ED 如何进行RZI解码? 図に示すように、VLINEは高インピーダンスから高電圧に変化します。この変化によってRXに低レベルパルスが生成されないため、RZI復号時にRXが生成するビット数が1つ少なくなります。 あと2つ質問があります。 1) TJA1410はLAN8670と相互接続できますか? 2) 御社はTJA1410用のVerilogモデルファイル、またはデジタルPHYのシミュレーション設計に使用できるその他のモデルファイルをお持ちですか? ご返信いただき、本当にありがとうございます! 李王 Re: TJA1410 接收信号RX+ED 如何进行RZI解码? こんにちは@li_wangさん https://www.nxp.com/design/design-center/development-boards-and-designs/TJA1410-EVB直接注文可能です。 S32K5はNPI(新製品導入)で、まだ正式に発売されていません。これらの製品の早期アクセス権を得たお客様は、現場エンジニアを割り当てていることにご注意ください。指定されたフィールドエンジニアが、この製品に関する問題や懸念、問い合わせの主要なサポートチャネルとなります。 よろしくお願いいたします。 パベル Re: TJA1410 接收信号RX+ED 如何进行RZI解码? こんにちは@li_wangさん 測定値をご提供いただきありがとうございます。しかし、現在のスクリーンショットでは、最初の期待されるRXイベントが実際に欠落しているのか、受信バースト開始時にデコードが誤って整列されているのかを判断するのに十分な時間解像度を提供していません。 以下の情報を提供していただけますか: デジタルPHYまたはカスタムデコーダの詳細。EDとRXが受信およびビットアライメントにどのように使用されるかを含む。 バースト開始付近のED、RX、TX、および差動VLINEを示す高解像度キャプチャ。理想的には最初の8~16ビット期間をカバーする。 現在のキャプチャから判断すると、TJA1410が有効なデータビットを失ったと結論づけることはできません。0x08 0x04の不一致は、デコーダがEDとRXを使って初期ビットアライメントを設定する方法にも起因している可能性があります。 よろしくお願いいたします。 パベル Re: TJA1410 接收信号RX+ED 如何进行RZI解码? こんにちは@li_wangさん はい、TJA1410は共通の10BASE-T1Sネットワークを通じてLAN8670と通信できます。 「Documents in Secure Files」には、TJA1410 VHDL-AMSシミュレーションモデルが用意されています。 本製品の要求されたドキュメントは管理下で公開されており、NDA(秘密保持契約)の下でSecure Filesを通じてアクセス可能です。 こちらからアクセスを申請してください: https://www.nxp.com/webapp-signup/docstoreReg フォーム送信時に、有効な秘密保持契約書(NDA)のコピーをアップロードするよう求められますので、ご注意ください。もし御社にまだNDAがない場合は、まずNDAのフォームにご記入ください: https://www.nxp.com/webapp-signup/ndaReqForm NDAが整ったら、安全なファイルへのアクセスをリクエストできます プロセスを理解するためにFAQをご確認ください: https://www.nxp.com/support/support/secure-access-rights:SEC-ACCESS https://www.nxp.com/support/support/secure-access-rights/secure-access-rights-faqs:SEC-ACCESS-FAQS オートモーティブ イーサネットは輸出管理方針の対象となり、NDAやSecure Filesへのアクセスが認められた後でも追加の承認が必要になる場合がありますのでご注意ください。 よろしくお願いいたします。 パベル Re: TJA1410 接收信号RX+ED 如何进行RZI解码? こんにちは@li_wangさん パッケージが正常にダウンロードされたことを確認してくれてありがとうございます。 シミュレーションモデルとそのドキュメントはSecure Filesを通じて提供されているため、公開コミュニティフォーラムでの詳細な内容の議論は避けるべきです。 両方の質問は、ダウンロードされたパッケージに含まれるシミュレーションモデルのドキュメントで解説されています。サポートされているシミュレーション環境、モデルインターフェース、シミュレーション例を説明するセクションをご参照ください。 よろしくお願いいたします。 パベル Re: TJA1410 接收信号RX+ED 如何进行RZI解码? ファイルのダウンロードが完了しました。ありがとうございました! 内部には2つのモデルがあり、下のモデルは特定のソフトウェア用です。これらの2つのファイルをSynopsis VCSでシミュレーションできるかどうか、また、関連するヘルプドキュメントがあるかどうかをお伺いしたいです。 Xpeditionはシーメンスの登録商標です。 SABERはSynopsis社の登録商標です。 さらに、以下の図に示すように、TXがRZIエンコードされていない波形が文書中にあります。TAJ1410チップがTX経由で通信を送信する場合、RZIエンコードされた形式の波形を送信する必要がある、というのが私の理解です。 Re: TJA1410 接收信号RX+ED 如何进行RZI解码? 上の図は、デジタルPHYがビーコンを送信したときの波形を示しています。上から順に、信号はED、RX、TX、TRX_Pです。 TXのコマンドは、TRANSMITコマンド、BEACONコードを5回、およびRESETコマンドです。 いくつか疑問点があります。 1. TXがTRANSMITコマンドを送信した後、RXに追加の低レベルパルスが現れます。 2. TXがRESETコマンドを送信した後、EDは130ns以内にローにならない。 何が原因だったのか教えていただけますか? ありがとう! Re: TJA1410 接收信号RX+ED 如何进行RZI解码? 図10によれば、送信モードに入ると、Vlineはもはや高インピーダンス状態ではなくなります。しかし、図7は、送信モードではVlineが高インピーダンス状態であり、低レベルのパルスの後、Vlineが高レベルになることを示しています。 実際にデータを送信する前に、低レベルパルスを2つ含むRESETコマンドを送信すべきでしょうか、それとも低レベルパルスを1つだけ送信すべきでしょうか? Re: TJA1410 接收信号RX+ED 如何进行RZI解码? こんにちは@li_wangさん 図7は送信シーケンス全体の簡略化された概要を示しており、図10は通常モードから送信モードへの遷移を詳細に示している。したがって、この2つの図は異なるレベルのディテールを示しており、互いに矛盾はない。 図7では、VLINEの高インピーダンス領域が、TRANSMITコマンドの前とRESETコマンドの後に示されています。これらは、TJA1410がアクティブに送信している間のVLINEの状態を表すものではありません。 データを送信する前に、デジタルPHYは図13に示すTRANSMITコマンドを発行する必要があります。このコマンドは、HIGH間隔で区切られた2つのLOWパルスで構成されています。コマンドが認識されると、TJA1410は送信モードに入り、図10に示すように、ラインインピーダンスをハイZからアクティブインピーダンスに変更します。 TX側で続く短いLOWパルスは、送信されたデータを表します。各LOWパルスは、差動バス信号の極性を反転させる。 データ送信が完了すると、デジタルPHYは図12に示すRESETコマンドを発行します。これによりTJA1410はノーマルモードに戻り、トランスミッタの出力は再びハイZに戻ります。 したがって、データ送信前の正しい手順は、RESETコマンドや単一のデータパルスではなく、TRANSMITコマンドです。 よろしくお願いいたします。 パベル Re: TJA1410 接收信号RX+ED 如何进行RZI解码? 上記の画像は、デジタルPHYがビーコンを送信したときの波形を示しています。テストでは、TJA1410は1つだけであり、TRX_PとTRX_Nはフローティング状態でした。 上から順に、信号はED、RX、VLINE、TRX_Pです。TRX_N TXのコマンドは、TRANSMITコマンド、BEACONコードを5回、およびRESETコマンドです。前の写真と同じです。 TXがTRANSMITコマンドを送信すると、VLINEにハイパルスが発生します。これは予期しない例外です。 cmdをリセットした後、VLINEは0になりましたが、EDは20マイクロ秒近く持続しました。これは予想外でした。 何が原因なのか突き止めるのを手伝っていただけませんか? パベルさん、あなたの会社にはデータ送信プロセスと、それに対応する波形はありますか? もしお持ちでしたら、私に提供していただくか、メールで送ってください。ありがとうございます! Re: TJA1410 接收信号RX+ED 如何进行RZI解码? こんにちは@li_wangさん 送信コマンド後のRXに追加の低パルスは、トランスミッタが高-Z状態からアクティブ駆動状態に切り替わり、差動MDI電圧がレシーバの閾値を超えたときに発生します。このモード遷移中のRXは有効な受信データとして解釈されるべきではないため、このパルスはBEACONの復号に含めるべきではありません。 EDに関して、RESETコマンドに指定されている55ns~120nsのタイミングは、 TXコマンドのデアサート時間であり、EDの最大デアサート時間ではありません。MDIで活動が検出されている間は、EDはHIGHのままとなる可能性があります。 より正確な評価を行うには、差動VLINEを測定する必要があります。 よろしくお願いいたします。 パベル Re: TJA1410 接收信号RX+ED 如何进行RZI解码? こんにちは@li_wangさん TRX_PとTRX_Nが浮遊状態のままだったため、測定された挙動は適切にコネクテッドされた10BASE-T1Sインターフェースを代表していません。 MDIを必要な差動インピーダンスで終端し、測定を繰り返してください。 よろしくお願いいたします。 パベル Re: TJA1410 接收信号RX+ED 如何进行RZI解码? こんにちは、パベル 「フローティング状態」という表現は誤解を招く可能性があります。実際には、ツイストペアケーブル上にノードデバイスが1つしかない、つまりTJA1410が1つしかないことを意味します。 したがって、他に干渉要因はありません。一方、VLINE信号はTRX_P - TRX_Nです。 御社では、デモボード上にテスト波形、例えば2つのTJA1410が動作している際の実際の測定受信波形と送信波形などを用意されていますか? Re: TJA1410 接收信号RX+ED 如何进行RZI解码? こんにちは@li_wangさん このシングルノード構成でMDIの終端接続方法を確認していただけますか?特に、推奨されるバスインターフェースネットワークが使用されていること、そしてエンドノード終端が有効であることを必ず確認してください。 2台のTJA1410デバイス間の通信から得られる測定済み基準波形は、現在入手できません。また、必要なデジタルPHYがS32K5に統合されているため、この構成を再現することもできません。S32K5は、前述のとおり、まだNPIデバイスです。したがって、私の分析は利用可能なTJA1410ドキュメントのみに基づいています。 よろしくお願いいたします。 パベル
View full article
How to perform RZI decoding on the TJA1410 receiving signal RX+ED? As can be seen from the waveform in the manual, RX ignores the first transition starting with high impedance (or 0), resulting in RX missing a transition and RZI decoding error. I'd like to ask about NXP TJA1410. In this case, are there any recommended decoding methods? Ethernet Re: TJA1410 接收信号RX+ED 如何进行RZI解码? Hello @li_wang , First, could you please clarify whether this is a theoretical concern based on Figure 11 or whether you are observing an actual RZI decoding error in your implementation? If an actual error is observed, please provide: TX, RX, ED and differential line voltage waveforms covering the TRANSMIT command and the beginning of data transmission The digital PHY or custom decoding implementation connected to the TJA1410 The point at which the implementation starts treating RX as valid The expected and actually decoded data sequence Regarding Figure 11, the highlighted VLINE transition occurs during the transition from Normal mode to Transmitting mode. At this time, the line impedance changes from High-Z to active impedance and the transmitter begins driving the differential line. The RX output is explicitly marked as undefined during this transition. Therefore, the initial VLINE movement shown in the highlighted area should not be interpreted as a valid RZI data transition that must be represented by a pulse on RX. In Normal and Transmitting modes, the default level on RX is HIGH. When the differential MDI voltage crosses the receiver trigger threshold, the TJA1410 generates a LOW pulse on RX. This behavior applies to the valid receive-data interval. Consequently, Figure 11 does not indicate that the TJA1410 ignores the first valid RZI transition. It shows that RX is not defined during transmitter activation. Valid RZI decoding should begin only when RX is in its valid operating interval, not from the initial analog VLINE movement caused by the mode transition. Best regards, Pavel Re: TJA1410 接收信号RX+ED 如何进行RZI解码? Hi, PavelL How can I obtain the S32K5 + TJA1410 test kit? Thanks Li.Wang Re: TJA1410 接收信号RX+ED 如何进行RZI解码? The actual test waveform of TJA1410 shows that TJA1410 is in Normal mode, only receiving data and not sending data. The signals from top to bottom in the diagram are: ED, RX, Vline, TRX_P, TRX_N. When the RX signal is received and decoded, according to the RZI rule, the decoded data is 0x04, but the actual data on Vline is 0x08 (BEACON). Observing the signal RX, it was found that when Vline changed from high impedance to high, RX did not output a low-level pulse, which means that RX was missing 1 bit of data, resulting in a decoding error. Thank you very much for your reply. Thanks! Li.Wang Re: TJA1410 接收信号RX+ED 如何进行RZI解码? Hello @li_wang , Yes, the TJA1410 can communicate with the LAN8670 over a common 10BASE-T1S network. There is available a TJA1410 VHDL-AMS simulation model under Documents in Secure Files. Requested documentation for this product is under control release, accessible under NDA (Non-Disclosure Agreement) via Secure Files. Please Request Access here: https://www.nxp.com/webapp-signup/docstoreReg Please note, during the form submission you will be asked to upload valid NDA copy. If your company does not have any yet please fill the form for NDA first: https://www.nxp.com/webapp-signup/ndaReqForm When NDA is ready you can request secure files access Kindly check FAQs to understand the process: https://www.nxp.com/support/support/secure-access-rights:SEC-ACCESS https://www.nxp.com/support/support/secure-access-rights/secure-access-rights-faqs:SEC-ACCESS-FAQS Please note that Automotive Ethernet is subject to export control policies and additional approvals may be required even after NDA and Secure Files access is granted. Best regards, Pavel Re: TJA1410 接收信号RX+ED 如何进行RZI解码? As shown in the figure, VLINE changes from high impedance to high voltage. This change does not generate a low-level pulse on RX, which will cause RX to generate 1 less bit during RZI decoding. I have two more questions: 1) Can the TJA1410 interconnect with the LAN8670? 2) Does your company have Verilog model files for TJA1410, or other model files that can be used for simulation design of digital PHY? Thank you so much for your reply! Li.Wang Re: TJA1410 接收信号RX+ED 如何进行RZI解码? Hello @li_wang , https://www.nxp.com/design/design-center/development-boards-and-designs/TJA1410-EVB can be ordered directly. S32K5 is a NPI (New Product Introduction) which has not been officially launched yet. Please be advised that customers who have been granted early access to such products have assigned their field engineers. Your designated field engineer should serve as your primary support channel for any issues, concerns or queries you may have about this product. Best regards, Pavel Re: TJA1410 接收信号RX+ED 如何进行RZI解码? Hello @li_wang , Thank you for providing the measurement. However, the current screenshot does not provide sufficient time resolution to determine whether the first expected RX event is actually missing or whether the decoding is aligned incorrectly at the beginning of the received burst. Could you please provide: Details of the digital PHY or custom decoder, including how ED and RX are used for reception and bit alignment. A higher-resolution capture showing ED, RX, TX and differential VLINE around the beginning of the burst, ideally covering the first 8 to 16 bit periods. Based on the current capture, we cannot yet conclude that the TJA1410 loses a valid data bit. The 0x08 to 0x04 mismatch could also be caused by how the decoder establishes the initial bit alignment using ED and RX. Best regards, Pavel Re: TJA1410 接收信号RX+ED 如何进行RZI解码? The file has been downloaded, thank you very much! There are two models inside, the one below is for a specific software. I would like to ask if these two files can be simulated in Synopsis VCS, and if there is any help documentation? Xpedition is registered trademark of Siemens. SABER is a registered trademark of Synopsis. In addition, there is a waveform in the document, as shown below, where TX is not RZI encoded. I understand that when the TAJ1410 chip sends communication via TX, it should send a waveform in RZI encoded format, right? Re: TJA1410 接收信号RX+ED 如何进行RZI解码? Hello @li_wang , Thank you for confirming that the package was downloaded successfully. Since the simulation model and its documentation are provided through Secure Files, we should avoid discussing their detailed contents on the public Community forum. Both questions are addressed in the simulation model documentation included in the downloaded package. Please refer to the sections describing the supported simulation environments, the model interface and the simulation example. Bets regards, Pavel Re: TJA1410 接收信号RX+ED 如何进行RZI解码? The image above shows the waveform when the digital PHY sends a beacon. From top to bottom, the signals are ED, RX, TX, and TRX_P. The commands on TX are TRANSMIT cmd, 5 times BEACON code, and RESET cmd. Several points of doubt: 1. After TX sends TRANSMIT cmd, an additional low-level pulse appears on RX; 2. After TX sends RESET cmd, ED does not go low within 130ns. I'd like to ask what caused this? Thanks! Re: TJA1410 接收信号RX+ED 如何进行RZI解码? According to Figure 10, after entering Transmitting mode, Vline is no longer in a high-impedance state. However, Figure 7 shows that in Transmitting mode, Vline is high-impedance, and after a low-level pulse, Vline goes high. So before actually sending data, should we send a RESET command with two low-level pulses or send a single low-level pulse? Re: TJA1410 接收信号RX+ED 如何进行RZI解码? Hello @li_wang , Figure 7 provides a simplified overview of the complete transmission sequence, while Figure 10 shows the Normal-to-Transmitting mode transition in detail. The two figures therefore show different levels of detail and are consistent with each other. In Figure 7, the VLINE High-Z regions are shown before the TRANSMIT command and after the RESET command. They do not represent the VLINE state while the TJA1410 is actively transmitting. Before sending data, the digital PHY must issue the TRANSMIT command shown in Figure 13. This command contains two LOW pulses separated by a HIGH interval. Once the command is recognized, the TJA1410 enters Transmitting mode and changes the line impedance from High-Z to active impedance, as shown in Figure 10. The subsequent short LOW pulses on TX represent the transmitted data. Each LOW pulse inverts the polarity of the differential bus signal. After the data transmission is complete, the digital PHY issues the RESET command shown in Figure 12. This returns the TJA1410 to Normal mode and the transmitter output becomes High-Z again. Therefore, the correct sequence before data transmission is the TRANSMIT command, not a RESET command or a single data pulse. Best regards, Pavel Re: TJA1410 接收信号RX+ED 如何进行RZI解码? Hello @li_wang , The additional LOW pulse on RX after the TRANSMIT command can occur when the transmitter changes from High-Z to the actively driven state and the differential MDI voltage crosses the receiver threshold. RX during this mode transition should not be interpreted as valid received data, so this pulse should not be included in the BEACON decoding. Regarding ED, the 55 ns to 120 ns timing specified for the RESET command is the TX command de-assertion time, not the maximum ED de-assertion time. ED may remain HIGH while activity is still detected on the MDI. For a more precise evaluation, you should measure differential VLINE. Best regards, Pavel Re: TJA1410 接收信号RX+ED 如何进行RZI解码? The above image shows the waveform when the digital PHY sends a beacon. In the test, there was only one TJA1410, and TRX_P and TRX_N were in a floating state. The signals from top to bottom are ED, RX, VLINE, and TRX_P.TRX_N The commands on TX are TRANSMIT cmd, 5 times BEACON code, and RESET cmd.Same as the previous picture. TX sends a TRANSMIT command, which generates a high pulse on VLINE; an unexpected exception. After resetting cmd, VLINE was 0, but ED persisted for nearly 20us; this was not as expected. Could you please help me figure out what might be causing this? Pavel, does your company have a data sending process, and the corresponding waveform? If you have any, please provide them to me, or send them to my email. Thank you! Re: TJA1410 接收信号RX+ED 如何进行RZI解码? Hi, PavelL The phrase "floating state" may be misleading. In reality, it means there is only one Node device on the twisted pair, i.e., only one TJA1410. Therefore, there are no other interfering factors. Meanwhile, the VLINE signal is TRX_P - TRX_N. Does your company have test waveforms on a demo board, such as the actual measured receive and transmit waveforms when two TJA1410s are in operation? Re: TJA1410 接收信号RX+ED 如何进行RZI解码? Hello @li_wang , Since TRX_P and TRX_N were left floating, the measured behavior is not representative of a properly connected 10BASE-T1S interface. Please terminate the MDI with the required differential impedance and repeat the measurement.  Best regards, Pavel Re: TJA1410 接收信号RX+ED 如何进行RZI解码? Hello @li_wang , Could you please confirm how the MDI is terminated in this single-node setup? In particular, please confirm that the recommended bus interface network is used and that the end-node termination is enabled. Measured reference waveforms from communication between two TJA1410 devices are currently not available. I am also unable to reproduce this setup because the required digital PHY is integrated in the S32K5, which is still an NPI device, as mentioned previously. Therefore, my analysis is based only on the available TJA1410 documentation. Best regards, Pavel
View full article