Multi Source Translation Content

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

Multi Source Translation Content

Discussions

Sort by:
主题:MPC5605 内存读取问题,地址为 0x00100010 你好, 我们遇到一个使用 MPC5605 的 ECU 问题。 在执行 EOL 内存转储操作期间,我们的工具箱使用直接 CPU 字节访问来读取内存: *((uint8_t *)地址) 从 CAN 日志中可以看到: ```文本 从 0x00100008 读取 8 个字节 -> 成功 从 0x00100010 读取 8 个字节 -> ECU 停止响应并重置 ``` 我们查阅了 MPC5606BK 参考手册,`16234_MPC5606BRM`,修订版 2: - 表 3-1,第 49 页显示“0x00100000 - 0x001FFFFF”为**保留**。 - 第 871-872 页描述了闪存映射和闪存仿真映射。 请问您能否澄清一下: 1. `0x00100010` 是 MPC5605 的有效/可读地址吗? 2. 如果这是一个保留地址,当软件直接读取它时会发生什么?它会导致异常或 RESET 吗? 3. 我们应该使用哪一参考手册章节来获取准确的 MPC5605 内存映射? 我们还会从 ECU 硬件中收集完整的 MPC5605 零件编号和芯片版本。 此致, 卡西拉詹 C 开发板 Re: Subject: MPC5605 memory-read issue at 0x00100010 你好, 地址 0x00100010 属于 0x00100000-0x001FFFFF 范围,该范围在 MPC560xB 内存映射中标记为保留。应用程序不得访问保留区域。访问此类位置可能会产生与总线相关的异常或其他设备特定的故障响应,如果不处理该异常,可能会导致通信丢失或RESET。 第三章 记忆映射 petervlna_0-1789455244473.pngpetervlna_0-1789455244473.png 顺祝商祺! Peter Re: Subject: MPC5605 memory-read issue at 0x00100010 谢谢你的回复
View full article
Subject: MPC5605 memory-read issue at 0x00100010 Hello, We have an issue with an ECU using MPC5605. During an EOL memory-dump operation, our toolbox reads memory using a direct CPU byte access: *((uint8_t *)address) From the CAN log: ```text Read 8 bytes from 0x00100008 -> successful Read 8 bytes from 0x00100010 -> ECU stops responding and resets ``` We checked the MPC5606BK Reference Manual, `16234_MPC5606BRM`, Rev. 2: - Table 3-1, page 49, shows `0x00100000 - 0x001FFFFF` as **Reserved**. - Pages 871-872 describe the flash-memory map and flash-emulation mapping. Could you please clarify: 1. Is `0x00100010` a valid/readable address for MPC5605? 2. If it is a reserved address, what happens when software reads it directly? Can it cause an exception or reset? 3. Which reference manual section should we use for the exact MPC5605 memory map? We are also collecting the full MPC5605 part number and silicon revision from the ECU hardware. Best regards, kasirajan C Development Board Re: Subject: MPC5605 memory-read issue at 0x00100010 Hello, Address 0x00100010 belongs to the range 0x00100000-0x001FFFFF, which is marked as Reserved in the MPC560xB memory map. Reserved regions must not be accessed by application software. Accessing such locations may generate a bus-related exception or other device-specific fault response, which can result in loss of communication or a reset if the exception is not handled. Chapter 3 Memory Map petervlna_0-1789455244473.pngpetervlna_0-1789455244473.png Best regards, Peter Re: Subject: MPC5605 memory-read issue at 0x00100010 Thanks for your reply
View full article
S32K311引导加载程序移植 我目前正在将一个可运行的 Bootloader 项目从 S32K312 移植到 S32K311。我正在使用 S32 Design Studio、NXP RTD 4.9.0 和 GCC 编译器。我遇到了两个与矢量表和复位处理程序相关的严重问题,这些问题似乎是 S32K311 / RTD 4.9 环境特有的。 问题 1:立即使用调试器 RESET 故障 启动 PEMicro 调试器时,内核在 RESET 脚本执行期间立即崩溃,甚至在到达 main() 之前就崩溃了。 重置脚本(……)已完成。 UsageFault:执行指令时使用了无效的 EPSR.T 或 EPSR.IT 字段。 硬故障:故障已升级为硬故障。 我们检查了 startup_cm7.s和 Vector_Table.s。我们注意到 Reset_Handler 缺少 .type。Reset_Handler 的 %function 指令导致 ELF 入口点为偶数地址(例如,0x00402420 而不是 0x00402421),这自然会导致 Cortex-M7 上出现 ARM 模式 UsageFault。 即使在修复了 .type 指令并确保向量表已为 Thumb 模式设置了 LSB 之后,PEMicro 调试器仍然偶尔会在复位后立即抛出此 UsageFault。 问题 2:中断跳转到 0x0(未初始化的 RAM 向量表)当我们成功绕过复位问题并到达 main() 时,一旦硬件中断(如 FlexCAN 或 SWT)触发,系统就会崩溃。PC跳转到0x00000000。 在检查内存时,我们发现 __interrupts_ram_start (0x20000000) 处的 RAM 向量表完全未初始化(填充为零)。我们发现: startup_cm7.s在初始化结束时将 VTOR 设置为 __RAM_INTERRUPT_START,但从未从 ROM 复制该表。 IntCtrl_Ip_Init(&IntCtrlConfig_0)(由平台元器件生成)在启用 INT_CTRL_IP_ENABLE_VTOR_CONFIG 时设置 VTOR,但它也不会将默认向量表从闪存复制到 RAM。 为了解决这个问题,我们不得不在 main.c 中编写一个手动 for 循环,将向量表从 __interrupts_init_start 物理复制到 __interrupts_ram_start,并在调用 IntCtrl_Ip_InstallHandler() 之前更新 S32_SCB->VTOR。 基础代码来自统一引导加载程序演示 有人知道哪里有移植并发布了适用于带 CAN 总线的 S32K311 的引导加载程序吗? Re: S32K311 bootloader porting 你好@ujwal12 对于 Cortex-M7,向量表中的复位处理程序条目必须通过使用 LSB 已设置的地址来指示 Thumb 模式。如果 Reset_Handler 符号没有正确生成为函数符号,链接器可能会在向量表中放置偶数地址,这可能会导致启动期间出现 UsageFault。因此,我们通常不建议修改 startup_cm7.s 文件。或 Vector_Table.s。 S32K3 RTD 采用基于 RAM 的可重定位中断向量表设计。启动时,向量表从闪存复制到 RAM,并且 VTOR 更新为指向基于 RAM 的表。 关于 S32K311 引导加载程序示例的可用性,目前还没有专门针对 S32K311 的官方引导加载程序示例。最接近的参考资料是Example S32K312 Bootloader to Application Jump DS3.5 RTD300和您已经在使用的 Unified Bootloader Demo。 另外请注意,统一引导加载程序是 NXP 的非官方演示程序,仅发布在社区论坛上,因此 NXP 技术支持不提供任何支持。 BR,VaneB
View full article
LPC55S28 CASPER ECC 乗算実行時間 以下のコードが計測時間内に実行されることが想定されているのか、それとも設定に何か問題があって実行が非常に遅くなっているのかを突き止めようとしています。このコードは、kCASPER_ECC_P256を使用して指定された秘密鍵から公開鍵を生成する関数の一部です。 以下のコードは、GPIOトグルを使用して実行時間を計測します。Set および Clear GPIO 呼び出しの間には 337 ミリ秒かかります。これは、この演算におけるハードウェアアクセラレーションによる計算処理としては遅いように思われる。これは想定内のことでしょうか?私のMCUのコアクロックは148MHzです。CASPERエンジンのクロックソースを選択して処理速度を向上させる方法はありますか? /* Base Generator Point G(x, y) for secp256r1 in 32-bit Little-Endian word arrays */ static const uint32_t G_x_le[8] = { 0xD898C296, 0xF4A13945, 0x2DEB33A0, 0x77037D81, 0x63A440F2, 0xF8BCE6E5, 0xE12C4247, 0x6B17D1F2 }; static const uint32_t G_y_le[8] = { 0x37BF51F5, 0xCBB64068, 0x6B315ECE, 0x2BCE3357, 0x7C0F9E16, 0x8EE7EB4A, 0xFE1A7F9B, 0x4FE342E2 }; uint32_t scalar_le[8]; uint32_t Q_x_le[8]; uint32_t Q_y_le[8]; /* Copy Big-Endian private scalar and convert to Little-Endian for CASPER */ memcpy(scalar_le, key_buffer, 32); swap_endian_32((uint8_t *)scalar_le); /* 1. Initialize CASPER coprocessor */ CASPER_Init(CASPER); CASPER_ecc_init(kCASPER_ECC_P256); HW_DB_PinSet(); /* 2. Compute Q = d * G using CASPER hardware */ CASPER_ECC_SECP256R1_Mul( CASPER, Q_x_le, Q_y_le, G_x_le, G_y_le, scalar_le ); HW_DB_PinClear(); 回复: LPC55S28 CASPER ECC Multiply Execution Time こんにちは、 @guitardenver 同じ操作を、150MHzで動作するLPC55S28 EVK上でMCUXpresso SDK CASPER例を用いて測定しました。CASPER_ECC_SECP256R1_Mul() を 1 回呼び出すのに約 2410 万 CPU サイクルが必要で、これは約 160 ミリ秒の実行時間に相当します。 この結果に基づくと、アプリケーションで測定された337msは、特に追加のキーフォーマット、データ変換、初期化、デバッグビルドのオーバーヘッドが含まれれば、不合理とは思えません。 CASPERは、ユーザーが設定可能な別のクロックソースを提供していません。実行時間は主にCASPARアクセラレータを利用したECCソフトウェア実装によって決定されます。 BR ハリー Re: LPC55S28 CASPER ECC Multiply Execution Time 以下のコードが計測時間内に実行されることが想定されているのか、それとも何か設定がされているのかを調べています。 ちょっと、そこ!ハードウェアアクセラレーションによるECC動作での337msは、P256でも148MHzのMCUとしてはやや高く感じます。調べてくれてありがとう。時にはドライバのオーバーヘッドや時計の問題が忍び込むこともあります。CASPERエンジンの特定のクロックソースや、その性能最適化に関する利用可能なドキュメントは確認しましたか? Re: LPC55S28 CASPER ECC Multiply Execution Time できることがいくつかあります。しかし、このMCUでCASPERエンジンのクロック設定オプションは見当たりません。 1. 速度向上のためにO2最適化を使用する 2.フラッシュアクセラレータのプリフェッチと待機状態の最適化を有効にしてください。 SYSCON -> FMCCR |= SYSCON_FMCCR_PREFEN_MASK ;   その後、160ミリ秒まで短縮することができました。  
View full article
S32K3XXがローカルIPアドレスを自動的に作成できない問題について。 スクリーンショット 2026-09-18 100140.png スクリーンショット 2026-09-18 100315.png スクリーンショット 2026-09-18 100756.png こんにちは: S32DSで独自のローカルIPアドレスを作成し、LWIPプロトコルスタックでローカルIPアドレスを無効にしましたが、上の右下の画像に示すように、シングルステップデバッグ中に接続確立に失敗するエラーが発生します。何が問題なのでしょうか?設定が不足しているのでしょうか?ローカルIPアドレスの作成は許可されておらず、プロトコルスタックで設定する必要があるということでしょうか? お忙しい中、お返事いただき、改めてありがとうございました! Re: 关于S32K3XX无法自己建立本地IP地址的问题 こんにちは、@sunshine88 さん。 IPv4アドレス自体がこのエラーの原因ではありません。lwIPでは、 netif_add() を介して静的IPv4アドレスを直接提供できます。 デバッガのスクリーンショットによると、 netif_add() はネットワークインターフェースの初期化コールバック ETHIF_INIT が ERR_OK 返さないため、 NULL を返します。したがって、エラーはイーサネットインターフェースまたはその下位ドライバの初期化時に発生し、インターフェースがlwIPに追加される前に発生します。 TCP/IPスタック構成のスクリーンショットでは、 「ifaceを有効にする」オプションが選択されていません。ネットワークインターフェースを有効にし、必要な静的IPv4アドレス、サブネットマスク、ゲートウェイを設定してください。次に、設定を再生成し、対応するS32K3 lwIPの例にある初期化シーケンスを使用します。 アプリケーションで住所を割り当てたい場合は、まず成功 netif_add() 確認してください。 これは初期化の失敗を検出しやすくするだけのものであることにご注意ください。GMAC/イーサネットの基礎設定を修正するわけではありません。 まずは、ネットワーク初期化を変更しずに、あなたのS32K3デバイスとソフトウェアパッケージのバージョンに合わせて元のlwIP例をビルドし実行することをお勧めします。元の例が正常に動作したら、静的IPv4アドレスのみを変更して結果を確認してください。 初期化がそれでも失敗する場合は、以下の情報も提供してください。 正確なS32K3デバイスと評価ボード S32 Design Studio版 RTDおよびTCP/IPスタックパッケージのバージョン ETHIF_INIT の定義と、その関数が返すエラー 変更されていないlwIPの例が同じハードウェアで動作するかどうか 同じ質問が3つの別々のコミュニティ投稿で寄せられたようです。トラブルシューティング情報を一箇所にまとめるため、議論はどちらか一方のフォーラムのみで行ってください。 よろしくお願いいたします。 パベル
View full article
MAYA-W166 WITH IW416 HOW TO BT_WAKE_HOST BT_WAKE_HOSTをトリガにしてOSレジウムする方法を教えてください Re: MAYA-W166 WITH IW416 HOW TO BT_WAKE_HOST こんにちは、 どのOSとホストを使っているのか教えていただけますか? AN12849をご覧ください。 よろしくお願いいたします。 ダニエル。
View full article
S32K311ブートローダーの移植 現在、S32K312で動作するブートローダープロジェクトをS32K311に移植しています。私はS32 Design StudioとNXP RTD 4.9.0、GCCコンパイラを併用しています。S32K311 / RTD 4.9環境に特有の、ベクターテーブルとリセットハンドラに関連する2つの深刻な問題に遭遇しています。 問題 1: デバッガーのリセット時にすぐに UsageFault が発生します。PEMicro デバッガーを起動すると、main() に到達する前にリセット スクリプト中にコアがすぐにクラッシュします。 スクリプトのリセット(…)が完了しました。 UsageFault: 無効な EPSR.T または EPSR.IT フィールドで実行された命令。 ハードフォールト:障害がハードフォールトにエスカレートしました。 startup_cm7.sを確認しました。および Vector_Table.s。Reset_Handler に .type が欠落していることに気づきましたReset_Handler、%function指令が出され、ELFのエントリポイントが偶数アドレス(例:0x00402421ではなく0x00402420)となり、自然とCortex-M7でARMモードのUsageFaultが発生します。 .type ディレクティブを修正し、ベクター テーブルで LSB が Thumb モードに設定されていることを確認した後でも、PEMicro デバッガーはリセット直後にこの UsageFault を時折スローします。 問題 2: 割り込みが 0x0 (初期化されていない RAM ベクタ テーブル) にジャンプする リセットの問題を正常に回避して main() に到達すると、ハードウェア割り込み (FlexCAN や SWT など) がトリガーされた瞬間にシステムがクラッシュします。PCは0x00000000にジャンプします。 メモリを調査したところ、__interrupts_ram_start (0x20000000) にある RAM ベクタ テーブルが完全に初期化されていない(ゼロで埋められている)ことがわかりました。私たちは以下のことを発見しました。 startup_cm7.s初期化の最後にはVTORを__RAM_INTERRUPT_STARTに設定しますが、ROMからテーブルをコピーすることはありません。 IntCtrl_Ip_Init(&IntCtrlConfig_0)(プラットフォームコンポーネントによって生成)は、INT_CTRL_IP_ENABLE_VTOR_CONFIGが有効であればVTORを設定しますが、デフォルトのベクターテーブルをフラッシュからRAMにコピーしません。 この問題を回避するために、main.c に手動で for ループを記述し、ベクター テーブルを __interrupts_init_start から __interrupts_ram_start に物理的にコピーし、IntCtrl_Ip_InstallHandler() を呼び出す前に S32_SCB->VTOR を更新する必要がありました。 Unified bootloader Demoからベースコードを取得しました CANのS32K311ブートローダーが移植されて投稿された投稿を知っている人はいますか? Re: S32K311 bootloader porting こんにちは、 @ujwal12さん Cortex-M7の場合、ベクターテーブルのリセットハンドラエントリは、LSBが設定されたアドレスを使ってサムモードを示す必要があります。Reset_Handler記号が関数記号として正しく生成されていないと、リンカーがベクトルテーブルに偶数アドレスを配置し、起動時にUsageFaultが発生することがあります。そのため、一般的にはstartup_cm7.sの変更は推奨しません。または Vector_Table.s。 設計上、S32K3 RTDはRAMベースのリロケーション可能な割り込みベクトルテーブルを使用しています。起動時に、ベクターテーブルがフラッシュメモリからRAMにコピーされ、VTORはRAM上のテーブルを指すように更新されます。 S32K311用ブートローダーのサンプルコードの入手可能性に関してですが、現時点ではS32K311を特に対象とした公式のブートローダーのサンプルコードは存在しません。最も近い参考文献は、 Bootloader to アプリケーション Jump DS3.5 RTD300 S32K312 、すでに使っているUnified Bootloaderデモです。 また、Unified Bootloaderは非公式のNXPデモであり、コミュニティフォーラムでのみ公開されているため、NXPの技術サポートからはサポートされていません。 BR、VaneB
View full article
USB implementation on m7 core for i.MX 8M Nano processor I need some guideance for implementing usb for i.MX 8M Nano processor m7 core, I used the nxp sdk for it. But the drive is not responding back and the signal from the controller is weak. Re: USB implementation on m7 core for i.MX 8M Nano processor Hello, Unfortunately, there is no driver available for USB in the official i.MX SDK release. It may be possible to port it from other devices for example i.MXRT, but the PHY and USB non-core registers are different, and it will not be straightforward to port but, needs to be implemented in your side. Best regards.
View full article
MAYA-W166 与 IW416 如何使用 BT_WAKE_HOST 唤醒主机 请问如何使用 BT_WAKE_HOST 触发操作系统注册器? Re: MAYA-W166 WITH IW416 HOW TO BT_WAKE_HOST 您好, 请问您使用的是什么操作系统和主机? 请查看AN12849 。 问候, 丹尼尔。
View full article
8M Nanoプロセッサ向けのm7コア i.MX USB実装 8M NanoプロセッサのM7コア i.MX USBを実装するための指針が欲しいです。NXP SDKを使いました。しかしドライブは応答せず、コントローラからの信号も弱いです。 Re: USB implementation on m7 core for i.MX 8M Nano processor こんにちは、 残念ながら、公式の i.MX SDKリリースにはUSB用のドライバーは提供されていません。 i.MXRTなどの他のデバイスから移植することは可能かもしれませんが、PHYとUSBの非コアレジスタが異なるため、移植は容易ではなく、お客様側で実装する必要があります。 よろしくお願いいたします。
View full article
LPC55S28 CASPER ECC Multiply Execution Time I am trying to figure out if the below code is expected to execute within the time I'm measuring or if I have something set up wrong and it's making it very slow. This code is part of a function that generates a Public Key from given private key using kCASPER_ECC_P256. The below code uses a GPIO toggle to measure execution time. Between the Set and Clear GPIO calls, it takes 337mS. Which seems slow for hardware accelerated math for this operation. Is this expected? My MCU has a core clock of 148MHz. Is there a way to choose the clock source for the CASPER engine to speed this up? /* Base Generator Point G(x, y) for secp256r1 in 32-bit Little-Endian word arrays */ static const uint32_t G_x_le[8] = { 0xD898C296, 0xF4A13945, 0x2DEB33A0, 0x77037D81, 0x63A440F2, 0xF8BCE6E5, 0xE12C4247, 0x6B17D1F2 }; static const uint32_t G_y_le[8] = { 0x37BF51F5, 0xCBB64068, 0x6B315ECE, 0x2BCE3357, 0x7C0F9E16, 0x8EE7EB4A, 0xFE1A7F9B, 0x4FE342E2 }; uint32_t scalar_le[8]; uint32_t Q_x_le[8]; uint32_t Q_y_le[8]; /* Copy Big-Endian private scalar and convert to Little-Endian for CASPER */ memcpy(scalar_le, key_buffer, 32); swap_endian_32((uint8_t *)scalar_le); /* 1. Initialize CASPER coprocessor */ CASPER_Init(CASPER); CASPER_ecc_init(kCASPER_ECC_P256); HW_DB_PinSet(); /* 2. Compute Q = d * G using CASPER hardware */ CASPER_ECC_SECP256R1_Mul( CASPER, Q_x_le, Q_y_le, G_x_le, G_y_le, scalar_le ); HW_DB_PinClear(); 回复: LPC55S28 CASPER ECC Multiply Execution Time Hi @guitardenver  We measured the same operation using the MCUXpresso SDK CASPER example on an LPC55S28 EVK running at 150 MHz. A single call to CASPER_ECC_SECP256R1_Mul() required approximately 24.1 million CPU cycles, corresponding to about 160 ms execution time. Based on this result, the measured 337 ms in your application does not appear unreasonable, especially if additional key formatting, data conversion, initialization, or debug-build overhead is included. CASPER does not provide a separate user-configurable clock source. The execution time is primarily determined by the ECC software implementation that utilizes the CASPER accelerator. BR Harry Re: LPC55S28 CASPER ECC Multiply Execution Time There are a couple things you can do.  But I do not see any configurable clock options for CASPER engine on this MCU. 1. Use O2 optimizations for speed 2. Enable the Flash accelerator prefetch and wait state optimization.  SYSCON->FMCCR |= SYSCON_FMCCR_PREFEN_MASK;   After this I am able to get it down to 160mS   Re: LPC55S28 CASPER ECC Multiply Execution Time I am trying to figure out if the below code is expected to execute within the time I'm measuring or if I have something set up  Hey there! That 337ms for a hardware-accelerated ECC operation definitely sounds a bit high for a 148MHz MCU, even with P256. It's good you're looking into it. Sometimes driver overhead or clocking issues can sneak in. Have you checked the CASPER engine's specific clock source or any available documentation on optimizing its performance?
View full article
MAYA-W166 WITH IW416 HOW TO BT_WAKE_HOST Please tell me how to trigger OS Registrar using BT_WAKE_HOST. Re: MAYA-W166 WITH IW416 HOW TO BT_WAKE_HOST Hi, Could you please tell me what OS and host are you using? Please take a look at AN12849. Regards, Daniel.
View full article
基于 i.MX 8M Nano 处理器的 m7 内核上的 USB 实现 我需要一些关于在 i.MX 8M Nano 处理器 m7 核心上实现 USB 的指导,我使用了 nxp sdk。但是驱动器没有反应,控制器发出的信号很弱。 Re: USB implementation on m7 core for i.MX 8M Nano processor 你好, 遗憾的是,官方 i.MX SDK 版本中没有 USB 驱动程序。 或许可以从其他设备(例如 i.MXRT)移植过来,但是 PHY 和 USB 非核心寄存器不同,移植起来并不容易,需要你自己来实现。 顺祝商祺!
View full article
Regarding the issue of S32K3XX being unable to automatically create a local IP address. Screenshot 2026-09-18 100140.png Screenshot 2026-09-18 100315.png Screenshot 2026-09-18 100756.png Hello: I've created my own local IP address in S32DS and disabled the local IP address in the LWIP protocol stack, but I get an error during single-step debugging, failing to establish a connection, as shown in the bottom right image above. What could be the problem? Is some setting missing? Is it that creating a local IP address is not allowed and must be configured in the protocol stack? Thank you again for taking the time to reply despite your busy schedule! Re: 关于S32K3XX无法自己建立本地IP地址的问题 Hello @sunshine88   , The IPv4 address itself is not the cause of this error. lwIP allows a static IPv4 address to be provided directly through netif_add() . According to the debugger screenshot, netif_add() returns NULL because the network-interface initialization callback, ETHIF_INIT , does not return ERR_OK . Therefore, the failure occurs during initialization of the Ethernet interface or its lower-level driver, before the interface can be added to lwIP. In your TCP/IP Stack configuration screenshot, the Enable iface option is not selected. Please enable the network interface and configure the required static IPv4 address, subnet mask, and gateway there. Then regenerate the configuration and use the initialization sequence from the corresponding S32K3 lwIP example. If you still want to assign the address in the application, please first verify whether netif_add() succeeds. Please note that this only makes the initialization failure easier to detect. It does not correct the underlying GMAC/Ethernet configuration. I recommend first building and running the original lwIP example for your exact S32K3 device and software-package versions without modifying its network initialization. Once the original example works, change only the static IPv4 address and confirm the result. Please also provide the following information if the initialization still fails: Exact S32K3 device and evaluation board S32 Design Studio version RTD and TCP/IP Stack package versions The definition of ETHIF_INIT and the error returned by that function Whether the unmodified lwIP example works on the same hardware It appears that the same question was submitted in three separate Community posts. To keep the troubleshooting information in one place, please continue the discussion in only one of them. Best regads, Pavel
View full article
S32K311 bootloader porting I am currently porting a working Bootloader project from the S32K312 to the S32K311. I am using S32 Design Studio along with NXP RTD 4.9.0 and the GCC compiler. I am encountering two severe issues related to the Vector Table and Reset Handler that seem specific to the S32K311 / RTD 4.9 environment. Issue 1: Immediate UsageFault on Debugger Reset When launching the PEMicro debugger, the core crashes immediately during the reset script before ever reaching main(). Reset script (...) completed. UsageFault: An instruction executed with an invalid EPSR.T or EPSR.IT field. HardFault: A fault has been escalated to a hard fault. We checked startup_cm7.s and Vector_Table.s. We noticed that Reset_Handler was missing the .type Reset_Handler, %function directive, causing the ELF entry point to be an even address (e.g., 0x00402420 instead of 0x00402421), which naturally causes an ARM-mode UsageFault on the Cortex-M7. Even after fixing the .type directive and ensuring the Vector Table has the LSB set for Thumb mode, the PEMicro debugger still occasionally throws this UsageFault immediately upon reset. Issue 2: Interrupts jump to 0x0 (Uninitialized RAM Vector Table) When we successfully bypass the reset issue and reach main(), the system crashes the moment a hardware interrupt (like FlexCAN or SWT) triggers. The PC jumps to 0x00000000. Upon investigating memory, we found that the RAM vector table at __interrupts_ram_start (0x20000000) is completely uninitialized (filled with zeroes). We discovered that: startup_cm7.s sets VTOR to __RAM_INTERRUPT_START at the end of initialization but never copies the table from ROM. IntCtrl_Ip_Init(&IntCtrlConfig_0) (generated by the Platform component) sets VTOR if INT_CTRL_IP_ENABLE_VTOR_CONFIG is enabled, but it also does not copy the default vector table from flash to RAM. To work around this, we had to write a manual for-loop in main.c to physically copy the vector table from __interrupts_init_start to __interrupts_ram_start and update S32_SCB->VTOR before calling IntCtrl_Ip_InstallHandler(). got the base code from Unified bootloader Demo does anyone know a post where the bootloader for S32K311 with CAN was ported and posted?? Re: S32K311 bootloader porting Hi @ujwal12  For the Cortex-M7, the Reset Handler entry in the vector table must indicate Thumb mode by using an address with the LSB set. If the Reset_Handler symbol is not generated correctly as a function symbol, the linker may place an even address in the vector table, which can lead to a UsageFault during startup. For this reason, we generally do not recommend modifying startup_cm7.s or Vector_Table.s. By design, the S32K3 RTD uses a RAM-based relocatable interrupt vector table. During startup, the vector table is copied from Flash to RAM, and VTOR is updated to point to the RAM-based table. Regarding the availability of an S32K311 bootloader example, there is currently no official bootloader example specifically targeting the S32K311. The closest references available are the Example S32K312 Bootloader to Application Jump DS3.5 RTD300 and the Unified Bootloader Demo that you are already using.  Also, please note that the Unified Bootloader is an unofficial NXP demo that has only been published on the community forum, and therefore it is not supported by NXP technical support. BR, VaneB
View full article
关于S32K3XX无法自己建立本地IP地址的问题 屏幕截图 2026-09-18 100140.png 屏幕截图 2026-09-18 100315.png 屏幕截图 2026-09-18 100756.png 你好:            现在我在S32DS 中中自己建立本机IP地址,设置LWIP协议栈中本地IP地址失效,但是单步调试时会报错,无法建立链接,如上最下面右侧所示,请问问题出在哪里?是缺少什么设置吗?难道时不允许自己建立本地IP,必须在协议栈中配置吗?          再次感谢在百忙之中回复! Re: 关于S32K3XX无法自己建立本地IP地址的问题 你好@sunshine88 , IPv4 地址本身并不是造成此错误的原因。lwIP 允许通过 netif_add() 直接提供静态 IPv4 地址。 根据调试器截图, netif_add() 返回 NULL ,因为网络接口初始化回调函数 ETHIF_INIT 没有返回 ERR_OK 。因此,故障发生在以太网接口或其底层驱动程序初始化期间,在将接口添加到 lwIP 之前。 在您的 TCP/IP 协议栈配置截图中, “启用接口”选项未被选中。请启用网络接口,并在该接口上配置所需的静态 IPv4 地址、子网掩码和网关。然后重新生成配置,并使用相应的 S32K3 lwIP 示例中的初始化序列。 如果您仍然想在应用程序中分配地址,请先验证 netif_add() 是否成功。 请注意,这只是使初始化失败更容易被检测到。它无法修正底层 GMAC/以太网配置。 我建议首先针对您的 S32K3 设备和软件包版本构建并运行原始的 lwIP 示例,不要修改其网络初始化。如果原示例运行正常,则仅更改静态 IPv4 地址并确认结果。 如果初始化仍然失败,请同时提供以下信息: 精确的 S32K3 设备和评估板 S32 设计工作室版本 RTD 和 TCP/IP 协议栈软件包版本 ETHIF_INIT 的定义以及该函数返回的错误 未经修改的 lwIP 示例是否能在相同的硬件上运行 同一个问题似乎在三个不同的社区帖子中被提交了。为了将故障排除信息集中在一个地方,请只在一个地方继续讨论。 此致敬礼, 帕维尔
View full article
LPC55S28 CASPER ECC 乘法执行时间 我正在尝试弄清楚下面的代码是否应该在我测量的时间内执行完毕,或者我的设置是否出错导致它运行速度非常慢。这段代码是使用 kCASPER_ECC_P256 从给定的私钥生成公钥的函数的一部分。 以下代码使用 GPIO 开关来测量执行时间。设置和清除 GPIO 调用之间需要 337 毫秒。对于这种硬件加速的数学运算来说,这个速度似乎太慢了。这是预期之内的吗?我的MCU核心时钟频率为148MHz。有没有办法选择 CASPER 引擎的时钟源来加快速度? /* Base Generator Point G(x, y) for secp256r1 in 32-bit Little-Endian word arrays */ static const uint32_t G_x_le[8] = { 0xD898C296, 0xF4A13945, 0x2DEB33A0, 0x77037D81, 0x63A440F2, 0xF8BCE6E5, 0xE12C4247, 0x6B17D1F2 }; static const uint32_t G_y_le[8] = { 0x37BF51F5, 0xCBB64068, 0x6B315ECE, 0x2BCE3357, 0x7C0F9E16, 0x8EE7EB4A, 0xFE1A7F9B, 0x4FE342E2 }; uint32_t scalar_le[8]; uint32_t Q_x_le[8]; uint32_t Q_y_le[8]; /* Copy Big-Endian private scalar and convert to Little-Endian for CASPER */ memcpy(scalar_le, key_buffer, 32); swap_endian_32((uint8_t *)scalar_le); /* 1. Initialize CASPER coprocessor */ CASPER_Init(CASPER); CASPER_ecc_init(kCASPER_ECC_P256); HW_DB_PinSet(); /* 2. Compute Q = d * G using CASPER hardware */ CASPER_ECC_SECP256R1_Mul( CASPER, Q_x_le, Q_y_le, G_x_le, G_y_le, scalar_le ); HW_DB_PinClear(); 回复: LPC55S28 CASPER ECC Multiply Execution Time 嗨@guitardenver 我们使用 MCUXpresso SDK CASPER 示例在运行频率为 150 MHz 的 LPC55S28 EVK 上测量了相同的操作。对 CASPER_ECC_SECP256R1_Mul() 的一次调用大约需要 2410 万个 CPU 周期,相当于大约 160 毫秒的执行时间。 根据这一结果,您应用程序中测得的 337 毫秒似乎并不算不合理,特别是如果考虑到额外的密钥格式化、数据转换、初始化或调试版本开销的话。 CASPER 不提供单独的用户可配置时钟源。执行时间主要取决于使用 CASPER 加速器的 ECC 软件实现。 BR 哈里 Re: LPC55S28 CASPER ECC Multiply Execution Time 你可以做以下几件事。但是,我没有在这个MCU上看到CASPER引擎的任何可配置时钟选项。 1. 使用 O2 优化来提高速度 2.启用 Flash 加速器预取和等待状态优化。 SYSCON -> FMCCR |= SYSCON_FMCCR_PREFEN_MASK ;   之后我把它降到了160毫秒。   Re: LPC55S28 CASPER ECC Multiply Execution Time 我正在尝试弄清楚下面的代码是否应该在我测量的时间内执行,或者我是否设置了某些限制。 嘿!即使使用 P256,对于 148MHz 的 MCU 来说,硬件加速的 ECC 操作耗时 337 毫秒也确实有点高。你调查这件事是件好事。有时驱动程序开销或时钟问题可能会悄悄出现。您是否检查过 CASPER 引擎的具体时钟源,或者是否有任何关于优化其性能的可用文档?
View full article
Is there a way to prevent task switching while BluetoothLEHost_Init() is executing? Hi, I have a question regarding BluetoothLEHost_Init() in the KW47 SDK. My application is running on FreeRTOS, and several tasks are created in advance using xTaskCreateStatic(). After creating these tasks, I call BluetoothLEHost_Init() to initialize BLE. While stepping through the SDK, I observed that during communication with the NBU, the initialization process waits for inter-task events. As a result, other lower-priority tasks are scheduled and start running while BluetoothLEHost_Init() is still executing and before the function call itself returns. To clarify, I am not referring to the host initialization completion callback provided to BluetoothLEHost_Init(). I do not need to wait for that callback. My concern is that task switching occurs before BluetoothLEHost_Init() returns. I would like to prevent other application tasks from running until the BluetoothLEHost_Init() function call itself has returned. My questions are: ・Is there any configuration, API, or recommended method to prevent task switching while BluetoothLEHost_Init() is executing (for example, while waiting for NBU communication)? ・Is there a way to ensure that BluetoothLEHost_Init() completes and returns without yielding execution to other tasks? ・If such a method exists, could you please provide guidance or an example of the recommended approach? My goal is to ensure that no application tasks begin their normal processing until BluetoothLEHost_Init() has returned. Any advice would be greatly appreciated. Re: Is there a way to prevent task switching while BluetoothLEHost_Init() is executing? Hi @t_hosomi, hope you are doing well. You can hold the execution of other tasks with different FreeRTOS approaches as explained below: Suspend tasks (vTaskSuspend) after creating them before starting the scheduler, this will make the task start in a suspended state which will make the scheduler not to switch to other tasks. Therefore, after returning from the BLE initialization, you would resume their execution (vTaskResume). Create an event group that blocks all tasks you require to run after BLE initialization and configure the wait for the event group bits to be indefinite. This approach would require jumping to each task and block them through the event group wait time, this will make the tasks to be inactive until the event group bits are cleared by the BLE initialization task. For both options I'd suggest referring to the FreeRTOS Reference Manual and for the second option, you may refer to the "freertos_event_cm33_core0" example from the SDK as it demonstrates how to create event groups and set tasks to wait for events. Please let me know if the information helps cover your requirements.
View full article
Regarding the issue of S32K3XX failing to establish its own IP address on the LWIP protocol stack. Screenshot 2026-09-18 100140.png Screenshot 2026-09-18 100315.png Screenshot 2026-09-18 100756.png Hello: I've created my own local IP address in S32DS and disabled the local IP address in the LWIP protocol stack, but I get an error during single-step debugging, failing to establish a connection, as shown in the bottom right image above. What could be the problem? Is some setting missing? Is it that creating a local IP address is not allowed and must be configured in the protocol stack? Thank you again for taking the time to reply despite your busy schedule! Re: 关于S32K3XX 在LWIP 协议栈上自己建立IP地址无法建立的问题 Hello @sunshine88 , The IPv4 address itself is not the cause of this error. lwIP allows a static IPv4 address to be provided directly through netif_add() . According to the debugger screenshot, netif_add() returns NULL because the network-interface initialization callback, ETHIF_INIT , does not return ERR_OK . Therefore, the failure occurs during initialization of the Ethernet interface or its lower-level driver, before the interface can be added to lwIP. In your TCP/IP Stack configuration screenshot, the Enable iface option is not selected. Please enable the network interface and configure the required static IPv4 address, subnet mask, and gateway there. Then regenerate the configuration and use the initialization sequence from the corresponding S32K3 lwIP example. If you still want to assign the address in the application, please first verify whether netif_add() succeeds. Please note that this only makes the initialization failure easier to detect. It does not correct the underlying GMAC/Ethernet configuration. I recommend first building and running the original lwIP example for your exact S32K3 device and software-package versions without modifying its network initialization. Once the original example works, change only the static IPv4 address and confirm the result. Please also provide the following information if the initialization still fails: Exact S32K3 device and evaluation board S32 Design Studio version RTD and TCP/IP Stack package versions The definition of ETHIF_INIT and the error returned by that function Whether the unmodified lwIP example works on the same hardware It appears that the same question was submitted in three separate Community posts. To keep the troubleshooting information in one place, please continue the discussion in only one of them. Best regads, Pavel
View full article
BluetoothLEHost_Init() の実行中にタスクの切り替えを防止する方法はありますか? こんにちは、 KW47 SDKのBluetoothLEHost_Init()について質問があります。 私のアプリケーションはFreeRTOS上で動作しており、いくつかのタスクはxTaskCreateStatic()を使って事前に作成しています。 これらのタスクを作成した後、BluetoothLEHost_Init() を呼び出して BLE を初期化します。SDKsをステップアップしていると、NBUとの通信中に初期化プロセスがタスク間イベント情報を待っていることに気づきました。その結果、BluetoothLEHost_Init() がまだ実行中で、関数呼び出し自体が戻る前に、他の優先度の低いタスクがスケジュールされ、実行が開始されます。 念のため申し上げますが、私が言及しているのは、BluetoothLEHost_Init() に提供されるホスト初期化完了コールバックのことではありません。私はそのコールバックを待つ必要はありません。 私が懸念しているのは、BluetoothLEHost_Init() が戻る前にタスク切り替えが発生することです。BluetoothLEHost_Init()関数呼び出し自体が戻るまで、他のアプリケーションタスクの実行を防ぎたいです。 私の質問は以下のとおりです。 ・BluetoothLEHost_Init()を実行している間(例えばNBU通信待ち中)にタスク切り替えを防ぐための設定、API、または推奨される方法はありますか? ・BluetoothLEHost_Init()が完了し戻ることを他のタスクに譲ることなく確実にする方法はありますか? ・もしそのような方法が存在するなら、推奨される方法の指針や例を教えていただけますか? 私の目標は、BluetoothLEHost_Init()が戻るまで、アプリケーションタスクが通常のプロセッシングを開始しないようにすることです。 どんなアドバイスでも大変ありがたいです。 Re: Is there a way to prevent task switching while BluetoothLEHost_Init() is executing? こんにちは、 @t_hosomi さん。お元気でお過ごしでしょうか。 以下に説明するように、異なるFreeRTOSアプローチで他のタスクの実行を保留することができます: スケジューラを起動する前にタスクを作成した後、タスクを一時停止(サスペンド)すると、タスクが一時停止状態に始まるため、スケジューラが他のタスクに切り替わらなくなります。したがって、BLEの初期化から戻った後、それらの実行を再開します(vTaskResume)。 BLE初期化後に実行すべきすべてのタスクをブロックするイベントグループを作成し、イベントグループのビットを無期限に待つ設定をしてください。この方法は各タスクにジャンプし、イベントグループの待ち時間でブロックする必要があり、これによりBLE初期化タスクによってイベントグループのビットがクリアされるまでタスクは非アクティブになります。 どちらの選択肢も FreeRTOSリファレンスマニュアル を参照することをお勧めします。後者については、イベントグループの作成方法やイベント待ちタスクの設定を示すSDKの「freertos_event_cm33_core0」例を参照することをお勧めします。 この情報がご要望にお応えできるかどうか、お知らせください。
View full article