Multi Source Translation Content

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

Multi Source Translation Content

Discussions

Sort by:
连接 USB3.0 设备后 IMX95 内核崩溃 您好, 我正在我们基于 i.MX95 15x15 SoC 的定制设计中引入 USB 3.0 接口。在我们的设计中,USB 集线器连接到原生 USB 3.0 端口。 集线器枚举成功,但是当我将任何 USB 3.0 设备(例如 USB 闪存盘)连接到集线器时,就会发生内核崩溃(日志如下)。这很奇怪,因为同一端口上的 USB 2.0 设备工作正常。 当我在设备树中将maximum-speed = "high-speed"设置为仅允许高速端口时,同一个 USB 3.0 U 盘会被枚举为 USB 2.0 设备并正常工作。 我还尝试在内核命令行中添加iommu.passthrough=1以排除 SMMU 问题,但行为并没有改变。 请问您能否帮我们找出根本原因? 我们使用的是 Linux 内核版本 6.18 NXP 电路板支持包。 以下是崩溃日志: root@imx95-15x15-lpddr4x-evk:~# lsusb Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 002: ID 05e3:0610 Genesys Logic, Inc. Hub Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 002 Device 002: ID 05e3:0620 Genesys Logic, Inc. GL3523 Hub Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub root@imx95-15x15-lpddr4x-evk:~# [ 527.354709] usb 2-1.1: new SuperSpeed USB device number 3 using xhci-hcd [ 527.379284] usb-storage 2-1.1:1.0: USB Mass Storage device detected [ 527.387024] scsi host0: usb-storage 2-1.1:1.0 [ 528.405103] scsi 0:0:0:0: Direct-Access USB SanDisk 3.2Gen1 1.00 PQ: 0 ANSI: 6 [ 528.423345] sd 0:0:0:0: [sda] 60125184 512-byte logical blocks: (30.8 GB/28.7 GiB) [ 528.431953] sd 0:0:0:0: [sda] Write Protect is off [ 528.437387] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA [ 528.492698] sda: sda1 [ 528.495895] sd 0:0:0:0: [sda] Attached SCSI removable disk [ 529.708851] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000008 [ 529.717662] Mem abort info: [ 529.720448] ESR = 0x0000000096000004 [ 529.724184] EC = 0x25: DABT (current EL), IL = 32 bits [ 529.729478] SET = 0, FnV = 0 [ 529.732521] EA = 0, S1PTW = 0 [ 529.735649] FSC = 0x04: level 0 translation fault [ 529.740511] Data abort info: [ 529.743380] ISV = 0, ISS = 0x00000004, ISS2 = 0x00000000 [ 529.748848] CM = 0, WnR = 0, TnD = 0, TagAccess = 0 [ 529.753884] GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0 [ 529.759179] user pgtable: 4k pages, 48-bit VAs, pgdp=00000001049be000 [ 529.765601] [0000000000000008] pgd=0000000000000000, p4d=0000000000000000 [ 529.772381] Internal error: Oops: 0000000096000004 [#1] SMP [ 529.778031] Modules linked in: polyval_ce mxc_jpeg_encdec v4l2_jpeg snd_soc_imx_card snd_soc_fsl_sai snd_soc_fsl_xcvr snd_soc_fsl_micfil imx_pcm_dma overlay snd_soc_fsl_utils pwm_fan fuse [ 529.794728] CPU: 1 UID: 0 PID: 217 Comm: kworker/1:2H Not tainted 6.18.2-g81bb96fa4952-dirty #15 PREEMPT [ 529.804281] Hardware name: NXP i.MX95 15X15 Mecha Comet (DT) [ 529.809929] Workqueue: blk_mq_run_work_fn (kblockd) [ 529.814899] pstate: 604000c9 (nZCv daIF +PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 529.821847] pc : process_one_work+0xc8/0x284 [ 529.826112] lr : worker_thread+0x2c4/0x3e0 [ 529.830205] sp : ffff800081ff3db0 [ 529.833504] x29: ffff800081ff3dc0 x28: 0000000000000000 x27: 0000000000000000 [ 529.840628] x26: 0000000000000000 x25: ffff00008459e4c0 x24: ffff0000fbb90480 [ 529.847752] x23: ffff000081f1f248 x22: ffff0000fbb90458 x21: 0000000000000000 [ 529.854876] x20: ffff000081f1f240 x19: ffff00008459e480 x18: 0000000000000001 [ 529.862000] x17: 000000040044ffff x16: 005000f2b5503510 x15: 00000027f3567fb3 [ 529.869124] x14: 00000000000000d2 x13: ffff00008495d800 x12: 0000000000000000 [ 529.876248] x11: 00000000000000c0 x10: 0000000000000ab0 x9 : ffff800081ff3d30 [ 529.883372] x8 : ffff00008495e290 x7 : 0000000000000001 x6 : 0000000000000000 [ 529.890496] x5 : 000000050a0a3e6a x4 : ffff000081f1f240 x3 : ffff0000fbb90478 [ 529.897620] x2 : 0000000000000020 x1 : 0000000000000008 x0 : ffff00008459e500 [ 529.904746] Call trace: [ 529.907181] process_one_work+0xc8/0x284 (P) [ 529.911444] worker_thread+0x2c4/0x3e0 [ 529.915188] kthread+0x12c/0x204 [ 529.918412] ret_from_fork+0x10/0x20 [ 529.921987] Code: d2800402 f84086f8 53041f01 b9003261 (f94006a1) [ 529.928068] ---[ end trace 0000000000000000 ]--- [ 529.932679] note: kworker/1:2H[217] exited with irqs disabled [ 529.938512] note: kworker/1:2H[217] exited with preempt_count 1 [ 529.938795] Internal error: Oops - Undefined instruction: 0000000002000000 [#2] SMP [ 529.952155] Modules linked in: polyval_ce mxc_jpeg_encdec v4l2_jpeg snd_soc_imx_card snd_soc_fsl_sai snd_soc_fsl_xcvr snd_soc_fsl_micfil imx_pcm_dma overlay snd_soc_fsl_utils pwm_fan fuse [ 529.968852] CPU: 3 UID: 0 PID: 648 Comm: syslogd Tainted: G D 6.18.2-g81bb96fa4952-dirty #15 PREEMPT [ 529.979530] Tainted: [D]=DIE [ 529.982398] Hardware name: NXP i.MX95 15X15 Mecha Comet (DT) [ 529.988041] pstate: 80400009 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 529.994990] pc : copy_folio_from_iter_atomic+0x260/0x89c [ 530.000303] lr : copy_folio_from_iter_atomic+0x250/0x89c [ 530.005607] sp : ffff800088073ac0 [ 530.008909] x29: ffff800088073b30 x28: 000000000000000f x27: 0001000000000000 [ 530.016033] x26: ffff00008e3236c0 x25: 0000000000000000 x24: 0000000000000462 [ 530.023157] x23: 0000000000000000 x22: ffff000081ba9180 x21: ffff800088073cd0 [ 530.030281] x20: 000000000000000f x19: 0000000000000085 x18: 0000000000000000 [ 530.037405] x17: 0000000000000000 x16: 0000000000000000 x15: 0000ffffcef03a40 [ 530.044529] x14: 0000000000000000 x13: 0000000000000000 x12: ffff000081ba9180 [ 530.051653] x11: ffff00008e3236c0 x10: 0000fffffffffff1 x9 : ffff000081ba9180 [ 530.058777] x8 : 000000000000000f x7 : ffff000091bff462 x6 : ffff000091bff471 [ 530.065901] x5 : 0000000000000085 x4 : ffff000081ba9180 x3 : ffff000091bff000 [ 530.073025] x2 : 000000000000000f x1 : 000000000000000f x0 : 0000000000000000 [ 530.080153] Call trace: [ 530.082595] copy_folio_from_iter_atomic+0x260/0x89c (P) [ 530.087898] generic_perform_write+0x14c/0x25c [ 530.092335] shmem_file_write_iter+0xa0/0xa8 [ 530.096598] do_iter_readv_writev+0xfc/0x1e0 [ 530.100863] vfs_writev+0x134/0x2c0 [ 530.104346] do_writev+0x7c/0x148 [ 530.107657] __arm64_sys_writev+0x20/0x34 [ 530.111661] invoke_syscall+0x48/0x104 [ 530.115405] el0_svc_common.constprop.0+0x40/0xe0 [ 530.120103] do_el0_svc+0x1c/0x28 [ 530.123413] el0_svc+0x34/0xec [ 530.126464] el0t_64_sync_handler+0xa0/0xf0 [ 530.130641] el0t_64_sync+0x198/0x19c [ 530.134302] Code: cb000281 a9408fe7 8b01039c a941a7e5 (8f010339) [ 530.140385] ---[ end trace 0000000000000000 ]--- Same way when we connect USB 2.0 Device on same port. root@imx95-15x15-lpddr4x-evk:~# lsusb Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 002: ID 05e3:0610 Genesys Logic, Inc. Hub Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 002 Device 002: ID 05e3:0620 Genesys Logic, Inc. GL3523 Hub Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub root@imx95-15x15-lpddr4x-evk:~# [ 106.150901] extcon-tusb320 2-0047: TUSB Device Detected [ 111.942409] usb 1-1.1: new full-speed USB device number 3 using xhci-hcd [ 112.166092] hid-generic 0003:3151:1020.0001: device has no listeners, quitting [ 112.191037] input: YICHIP 2.4G Receiver Mouse as /devices/platform/soc/4c010010.usb/4c100000.usb/xhci-hcd.2.auto/usb1/1-1/1-1.1/1-1.1:1.1/0003:3151:1020.0002/input/input1 [ 112.207047] input: YICHIP 2.4G Receiver System Control as /devices/platform/soc/4c010010.usb/4c100000.usb/xhci-hcd.2.auto/usb1/1-1/1-1.1/1-1.1:1.1/0003:3151:1020.0002/input/input2 [ 112.279679] input: YICHIP 2.4G Receiver Consumer Control as /devices/platform/soc/4c010010.usb/4c100000.usb/xhci-hcd.2.auto/usb1/1-1/1-1.1/1-1.1:1.1/0003:3151:1020.0002/input/input3 [ 112.296313] hid-generic 0003:3151:1020.0002: input: USB HID v2.00 Mouse [YICHIP 2.4G Receiver] on usb-xhci-hcd.2.auto-1.1/input1 root@imx95-15x15-lpddr4x-evk:~# lsusb Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 002: ID 05e3:0610 Genesys Logic, Inc. Hub Bus 001 Device 003: ID 3151:1020 YICHIP 2.4G Receiver Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 002 Device 002: ID 05e3:0620 Genesys Logic, Inc. GL3523 Hub Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Linux 多媒体 疑似软件缺陷 Re: IMX95 Kernel crash after connecting USB3.0 device 你好, 请问您能否分享一下您的设备树配置? 顺祝商祺! Re: IMX95 Kernel crash after connecting USB3.0 device 嗨@JorgeCas ,谢谢你的回复,请查看下面的 dt 配置。 /{ usb1_ss_mux: ptn36043 { compatible = "nxp,ptn36043"; pinctrl-names = "default"; switch-gpios = <&pca9535 00 GPIO_ACTIVE_LOW>; orientation-switch; port { usb1_sw_ep: endpoint { remote-endpoint = <&usb1_sw_ss>; }; }; }; &usb2 { dr_mode = "host"; disable-over-current; status = "okay"; }; &lpi2c3 { clock-frequency = <400000>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_lpi2c3>; status = "okay"; tcpc_1: tusb320@47 { compatible = "ti,tusb320"; reg = <0x47>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_tusb>; interrupt-parent = <&gpio4>; interrupts =<23 IRQ_TYPE_LEVEL_LOW>; vbus-gpios = <&pca9535 8 GPIO_ACTIVE_HIGH>; status = "okay"; connector { compatible = "usb-c-connector"; label = "USB-C-Port1"; data-role = "dual"; power-role = "source"; typec-power-opmode = "default"; ports { #address-cells = <1>; #size-cells = <0>; port@1 { reg = <1>; usb1_sw_ss: endpoint { remote-endpoint = <&usb1_sw_ep>; }; }; }; }; }; &usb3 { status = "okay"; disable-over-current; }; &usb3_dwc3 { dr_mode = "host"; snps,dis-u1-entry-quirk; snps,dis-u2-entry-quirk; status = "okay"; };
View full article
PIC CLBのユーレカ 特定のPIC MCU(例:pic16f13145ファミリ)には、Configurable Logic Blockと呼ばれるFPGA風のプログラム可能なロジックがあります。 私が使用しているpic16f13115は、それぞれ4入力ルックアップテーブルとDフリップフロップを備えた32個のセルで構成されています。 ツールの使い方を学ぶために、今日はPWM明るさ制御付き6つのLEDのチャーリープレックス対応を実装し、シミュレーションしました。ロジックCADキャンバスを使用する代わりに、Verilogを使用して回路を定義しました。 私は時間の半分くらいを壁に頭を打ち付けて過ごしていた。少しずつ、Verilogを正しく記述し、合成(ビルド)を行い、そしてシミュレーションを実行できるようにした。 CLBでプログラムされたロジックがCPUがスリープ状態でも動作するのは素晴らしい。セーフティに関わる用途に最適です。例えば、複雑な割り込みトリガーロジックの実装に利用できます。CLBロジックをペリフェラル入力・出力に接続する際の柔軟性は非常に高いです。これは、PICの定番となっている、扱いにくいCLCプログラマブルロジックよりもはるかに柔軟性が高い。 私のEureka体験を共有したかっただけです。
View full article
Eureka on PIC CLB Certain PIC MCUs (e.g., pic16f13145 family) have FPGA-like programmable logic called Configurable Logic Block. The pic16f13115 I'm using has 32 cells each with a 4-input lookup table and a D flip-flop. To learn to use the tools, today I implemented and simulated support for Charlieplexing of 6 LEDs with PWM brightness control. I used Verilog to define the circuit instead of using the logic CAD canvas. I was pounding my head on the wall for about half my time. Slowly, I got the Verilog right, got it to synthesize (build), then got it simulating. It is cool that the CLB programmed logic works even when the CPU is sleeping. It's perfect for safety-critical applications. Can be used, for example, to implement complex interrupt trigger logic. There is great flexibility in hooking up CLB logic to peripheral inputs and outputs. It's much more flexible than the clunkier CLC programmable logic that's been a fixture of PICs. Just thought I'd share my Eureka experience.
View full article
iMX8MP and Deserializers Hi all! We are using the i.MX 8M Plus in our Digital Video Registrator. We are currently tasked with modifying the design to connect at least two (4 better) cameras using SerDes chips. In researching this, I see that connecting the DS90UB960 or DS90UB954 might be problematic because the processor does not support virtual channels. Is there any information or positive experience regarding the connection of other deserializers (from TI, Analog Devices, THine Electronics, etc.)? Best regards, Serge Re: iMX8MP and Deserializers Hi, Thank you for your interest in NXP Semiconductor products, As you mention, serializers are not available for i.MX 8M Plus due to the lack of virtual channel, there is a reference for i.MX 8 series processors using i.MX8QM and i.MX8QXP, i.MX 95 supports VC and has a serializer reference as well. Regards Re: iMX8MP and Deserializers I understand that two cameras cannot be connected to a single MIPI interface using a deserializer. However, are there any proven deserializer solutions for connecting a single/two camera to a single/two CSI/MIPI interfaces? Is it possible to use, for example, the MAX96714 ? Re: iMX8MP and Deserializers Hi, No, there has not been any solutions proven like the one described, Regards, Re: iMX8MP and Deserializers That’s very strange. I personally saw and held in my hands a solution based on the THCV242A + iMXMP —though I don't recall whether it connected one camera or two... Re: iMX8MP and Deserializers Hi @sfatyushkin since the platform doesn't support virtual channel, you would only be able to stream from a single camera at a time per CSI/MIPI port. For example two deserializers each connected to one CSI/MIPI port. Here is a resource on GMSL if you wanna take a look. If you don't need continuous streaming or can tolerate a lower capture rate from all four sensors, another potential approach could be to implement a custom driver that switches between camera streams, starting and stopping each sensor as needed. Ideally, you'd also need a way to synchronize this with a userspace application to ensure frames are captured and associated with the correct camera. Best regards, Daniel Gonzalez Embedded SW Engineer at RidgeRun Developers wiki: https://developer.ridgerun.com Website: www.ridgerun.com
View full article
IMX95 Kernel crash after connecting USB3.0 device Hi there, I am bringing up the USB 3.0 interface on our custom design based on the i.MX95 15x15 SoC. In our design, a USB hub is connected to the native USB 3.0 port. The hub enumerates successfully, but when I connect any USB 3.0 device (for example, a USB pendrive) to the hub, I get a kernel crash (logs below). This is odd, because USB 2.0 devices on the same port work without any issues. When I limit the port to high-speed only by setting maximum-speed = "high-speed"; in the device tree, the same USB 3.0 pendrive enumerates as a USB 2.0 device and works well. I also tried adding iommu.passthrough=1 to the kernel command line to rule out an SMMU issue, but the behavior did not change. Could you please help us identify the root cause? We are on Linux Kernel Version 6.18 NXP BSP. Here are the crash logs:  root@imx95-15x15-lpddr4x-evk:~# lsusb Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 002: ID 05e3:0610 Genesys Logic, Inc. Hub Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 002 Device 002: ID 05e3:0620 Genesys Logic, Inc. GL3523 Hub Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub root@imx95-15x15-lpddr4x-evk:~# [ 527.354709] usb 2-1.1: new SuperSpeed USB device number 3 using xhci-hcd [ 527.379284] usb-storage 2-1.1:1.0: USB Mass Storage device detected [ 527.387024] scsi host0: usb-storage 2-1.1:1.0 [ 528.405103] scsi 0:0:0:0: Direct-Access USB SanDisk 3.2Gen1 1.00 PQ: 0 ANSI: 6 [ 528.423345] sd 0:0:0:0: [sda] 60125184 512-byte logical blocks: (30.8 GB/28.7 GiB) [ 528.431953] sd 0:0:0:0: [sda] Write Protect is off [ 528.437387] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA [ 528.492698] sda: sda1 [ 528.495895] sd 0:0:0:0: [sda] Attached SCSI removable disk [ 529.708851] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000008 [ 529.717662] Mem abort info: [ 529.720448] ESR = 0x0000000096000004 [ 529.724184] EC = 0x25: DABT (current EL), IL = 32 bits [ 529.729478] SET = 0, FnV = 0 [ 529.732521] EA = 0, S1PTW = 0 [ 529.735649] FSC = 0x04: level 0 translation fault [ 529.740511] Data abort info: [ 529.743380] ISV = 0, ISS = 0x00000004, ISS2 = 0x00000000 [ 529.748848] CM = 0, WnR = 0, TnD = 0, TagAccess = 0 [ 529.753884] GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0 [ 529.759179] user pgtable: 4k pages, 48-bit VAs, pgdp=00000001049be000 [ 529.765601] [0000000000000008] pgd=0000000000000000, p4d=0000000000000000 [ 529.772381] Internal error: Oops: 0000000096000004 [#1] SMP [ 529.778031] Modules linked in: polyval_ce mxc_jpeg_encdec v4l2_jpeg snd_soc_imx_card snd_soc_fsl_sai snd_soc_fsl_xcvr snd_soc_fsl_micfil imx_pcm_dma overlay snd_soc_fsl_utils pwm_fan fuse [ 529.794728] CPU: 1 UID: 0 PID: 217 Comm: kworker/1:2H Not tainted 6.18.2-g81bb96fa4952-dirty #15 PREEMPT [ 529.804281] Hardware name: NXP i.MX95 15X15 Mecha Comet (DT) [ 529.809929] Workqueue: blk_mq_run_work_fn (kblockd) [ 529.814899] pstate: 604000c9 (nZCv daIF +PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 529.821847] pc : process_one_work+0xc8/0x284 [ 529.826112] lr : worker_thread+0x2c4/0x3e0 [ 529.830205] sp : ffff800081ff3db0 [ 529.833504] x29: ffff800081ff3dc0 x28: 0000000000000000 x27: 0000000000000000 [ 529.840628] x26: 0000000000000000 x25: ffff00008459e4c0 x24: ffff0000fbb90480 [ 529.847752] x23: ffff000081f1f248 x22: ffff0000fbb90458 x21: 0000000000000000 [ 529.854876] x20: ffff000081f1f240 x19: ffff00008459e480 x18: 0000000000000001 [ 529.862000] x17: 000000040044ffff x16: 005000f2b5503510 x15: 00000027f3567fb3 [ 529.869124] x14: 00000000000000d2 x13: ffff00008495d800 x12: 0000000000000000 [ 529.876248] x11: 00000000000000c0 x10: 0000000000000ab0 x9 : ffff800081ff3d30 [ 529.883372] x8 : ffff00008495e290 x7 : 0000000000000001 x6 : 0000000000000000 [ 529.890496] x5 : 000000050a0a3e6a x4 : ffff000081f1f240 x3 : ffff0000fbb90478 [ 529.897620] x2 : 0000000000000020 x1 : 0000000000000008 x0 : ffff00008459e500 [ 529.904746] Call trace: [ 529.907181] process_one_work+0xc8/0x284 (P) [ 529.911444] worker_thread+0x2c4/0x3e0 [ 529.915188] kthread+0x12c/0x204 [ 529.918412] ret_from_fork+0x10/0x20 [ 529.921987] Code: d2800402 f84086f8 53041f01 b9003261 (f94006a1) [ 529.928068] ---[ end trace 0000000000000000 ]--- [ 529.932679] note: kworker/1:2H[217] exited with irqs disabled [ 529.938512] note: kworker/1:2H[217] exited with preempt_count 1 [ 529.938795] Internal error: Oops - Undefined instruction: 0000000002000000 [#2] SMP [ 529.952155] Modules linked in: polyval_ce mxc_jpeg_encdec v4l2_jpeg snd_soc_imx_card snd_soc_fsl_sai snd_soc_fsl_xcvr snd_soc_fsl_micfil imx_pcm_dma overlay snd_soc_fsl_utils pwm_fan fuse [ 529.968852] CPU: 3 UID: 0 PID: 648 Comm: syslogd Tainted: G D 6.18.2-g81bb96fa4952-dirty #15 PREEMPT [ 529.979530] Tainted: [D]=DIE [ 529.982398] Hardware name: NXP i.MX95 15X15 Mecha Comet (DT) [ 529.988041] pstate: 80400009 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 529.994990] pc : copy_folio_from_iter_atomic+0x260/0x89c [ 530.000303] lr : copy_folio_from_iter_atomic+0x250/0x89c [ 530.005607] sp : ffff800088073ac0 [ 530.008909] x29: ffff800088073b30 x28: 000000000000000f x27: 0001000000000000 [ 530.016033] x26: ffff00008e3236c0 x25: 0000000000000000 x24: 0000000000000462 [ 530.023157] x23: 0000000000000000 x22: ffff000081ba9180 x21: ffff800088073cd0 [ 530.030281] x20: 000000000000000f x19: 0000000000000085 x18: 0000000000000000 [ 530.037405] x17: 0000000000000000 x16: 0000000000000000 x15: 0000ffffcef03a40 [ 530.044529] x14: 0000000000000000 x13: 0000000000000000 x12: ffff000081ba9180 [ 530.051653] x11: ffff00008e3236c0 x10: 0000fffffffffff1 x9 : ffff000081ba9180 [ 530.058777] x8 : 000000000000000f x7 : ffff000091bff462 x6 : ffff000091bff471 [ 530.065901] x5 : 0000000000000085 x4 : ffff000081ba9180 x3 : ffff000091bff000 [ 530.073025] x2 : 000000000000000f x1 : 000000000000000f x0 : 0000000000000000 [ 530.080153] Call trace: [ 530.082595] copy_folio_from_iter_atomic+0x260/0x89c (P) [ 530.087898] generic_perform_write+0x14c/0x25c [ 530.092335] shmem_file_write_iter+0xa0/0xa8 [ 530.096598] do_iter_readv_writev+0xfc/0x1e0 [ 530.100863] vfs_writev+0x134/0x2c0 [ 530.104346] do_writev+0x7c/0x148 [ 530.107657] __arm64_sys_writev+0x20/0x34 [ 530.111661] invoke_syscall+0x48/0x104 [ 530.115405] el0_svc_common.constprop.0+0x40/0xe0 [ 530.120103] do_el0_svc+0x1c/0x28 [ 530.123413] el0_svc+0x34/0xec [ 530.126464] el0t_64_sync_handler+0xa0/0xf0 [ 530.130641] el0t_64_sync+0x198/0x19c [ 530.134302] Code: cb000281 a9408fe7 8b01039c a941a7e5 (8f010339) [ 530.140385] ---[ end trace 0000000000000000 ]--- Same way when we connect USB 2.0 Device on same port. root@imx95-15x15-lpddr4x-evk:~# lsusb Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 002: ID 05e3:0610 Genesys Logic, Inc. Hub Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 002 Device 002: ID 05e3:0620 Genesys Logic, Inc. GL3523 Hub Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub root@imx95-15x15-lpddr4x-evk:~# [ 106.150901] extcon-tusb320 2-0047: TUSB Device Detected [ 111.942409] usb 1-1.1: new full-speed USB device number 3 using xhci-hcd [ 112.166092] hid-generic 0003:3151:1020.0001: device has no listeners, quitting [ 112.191037] input: YICHIP 2.4G Receiver Mouse as /devices/platform/soc/4c010010.usb/4c100000.usb/xhci-hcd.2.auto/usb1/1-1/1-1.1/1-1.1:1.1/0003:3151:1020.0002/input/input1 [ 112.207047] input: YICHIP 2.4G Receiver System Control as /devices/platform/soc/4c010010.usb/4c100000.usb/xhci-hcd.2.auto/usb1/1-1/1-1.1/1-1.1:1.1/0003:3151:1020.0002/input/input2 [ 112.279679] input: YICHIP 2.4G Receiver Consumer Control as /devices/platform/soc/4c010010.usb/4c100000.usb/xhci-hcd.2.auto/usb1/1-1/1-1.1/1-1.1:1.1/0003:3151:1020.0002/input/input3 [ 112.296313] hid-generic 0003:3151:1020.0002: input: USB HID v2.00 Mouse [YICHIP 2.4G Receiver] on usb-xhci-hcd.2.auto-1.1/input1 root@imx95-15x15-lpddr4x-evk:~# lsusb Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 002: ID 05e3:0610 Genesys Logic, Inc. Hub Bus 001 Device 003: ID 3151:1020 YICHIP 2.4G Receiver Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 002 Device 002: ID 05e3:0620 Genesys Logic, Inc. GL3523 Hub Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Linux Multimedia Suspected Software Defect Re: IMX95 Kernel crash after connecting USB3.0 device Hello, Could you please share your device tree configuration? Best regards. Re: IMX95 Kernel crash after connecting USB3.0 device Hi @JorgeCas , Thanks for your reply please check the dt config below, /{ usb1_ss_mux: ptn36043 { compatible = "nxp,ptn36043"; pinctrl-names = "default"; switch-gpios = <&pca9535 00 GPIO_ACTIVE_LOW>; orientation-switch; port { usb1_sw_ep: endpoint { remote-endpoint = <&usb1_sw_ss>; }; }; }; &usb2 { dr_mode = "host"; disable-over-current; status = "okay"; }; &lpi2c3 { clock-frequency = <400000>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_lpi2c3>; status = "okay"; tcpc_1: tusb320@47 { compatible = "ti,tusb320"; reg = <0x47>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_tusb>; interrupt-parent = <&gpio4>; interrupts =<23 IRQ_TYPE_LEVEL_LOW>; vbus-gpios = <&pca9535 8 GPIO_ACTIVE_HIGH>; status = "okay"; connector { compatible = "usb-c-connector"; label = "USB-C-Port1"; data-role = "dual"; power-role = "source"; typec-power-opmode = "default"; ports { #address-cells = <1>; #size-cells = <0>; port@1 { reg = <1>; usb1_sw_ss: endpoint { remote-endpoint = <&usb1_sw_ep>; }; }; }; }; }; &usb3 { status = "okay"; disable-over-current; }; &usb3_dwc3 { dr_mode = "host"; snps,dis-u1-entry-quirk; snps,dis-u2-entry-quirk; status = "okay"; };
View full article
BFU910F 型号 11 年前的数据手册中承诺会推出与 SPICE 兼容的 Gummel-Poon 设备模型。仅提供专有格式的 Mextram 模型。LTspice声称兼容Mextram 504型号,这是怎么回事? 射频 Re: BFU910F model Hello 请注意,BFU910F 已停产。 Re: BFU910F model 我知道,但目前还没有替代品,尽管恩智浦半导体在 2021 年的一篇文章中称其为“高端射频的未来”。总之,从数据手册来看,这确实是一个相当出色的部件。我希望在剩余库存售罄之前,能看到更详尽的文档记录 :3
View full article
离线 MISR 值计算 我目前正在研究 S32K312 控制器的闪存阵列完整性实现。 根据参考手册,MISR 值是使用下图所示的特定多项式计算的。然而,即使多次尝试,我离线计算的 MISR 值也与用户模式 (UM) 寄存器中生成的值不符。 经进一步审查,我注意到 MISR 计算是在 ECC 检测之后进行的,而 ECC 奇偶校验不能离线计算。 能否请您提供一下该实现方案的标准生产级方法?具体来说,我想了解: 1. 是否可以离线计算预期的 MISR 值并将其存储在 Flash 或 NVM 中? 2. 或者是否需要运行一次代码,直接从 UM 寄存器中捕获计算出的 MISR 值并将其保存以供将来检查? 请指导我如何制定一个可用于生产环境的解决方案的推荐策略。 此致, 桑迪普·辛格 Re: Offline MISR value calculation 你好@sandeepSingh18606 , 1. 让我内部确认一下离线计算是否有任何进展。 我会尽快回复您。 2. 这也是一种选择。以下是一个示例: https://community.nxp.com/t5/S32K-Knowledge-Base/Example-S32K344-FLS-Integrity-Margin-Check-v1-0-S32DS36-RTD701/ta-p/2416160 BR,丹尼尔 Re: Offline MISR value calculation 嗨,丹尼尔, 过去七八个月以来,我一直收到同样的回复。之前我曾就此问题提交过工单,得到的回复与现在完全相同。我也联系过恩智浦的销售代表,但问题仍然没有解决。 请问NXP是否测试过此功能,以及目前是否有针对此问题的有效修复或变通方案? 期待您的尽快回复。 此致, 桑迪普·辛格
View full article
mcxn947 开启加密後、デュアル バンク A B 区固体物質昇级に何かがあるかどうか? MCXN947において、ファームウェア暗号化を有効にすると、デュアルバンクA、Bのファームウェアアップデートにどのような影響がありますか? 例えば、アプリケーションは現在バンクAから実行されています。新しいファームウェアイメージをバンクBにダウンロードし、その後アドレスマッピングを入れ替えてアプリケーションをバンクBから実行します。 ファームウェアの暗号化が有効になっている場合、このプロセスに影響はありますか?ファームウェアのダウンロード、アドレスマッピングの交換、バンクBからのアプリケーション起動の際に、追加の注意点や修正が必要ですか? Re: mcxn947 开启加密后,对dual bank A B区固件升级是否有什么影响? こんにちは@justdomyself 実装方法については、デュアルイメージブート機能をご参照ください。詳細については、MCXN947リファレンスマニュアルをご参照ください。 ROMブートローダーを使いたくない場合は、SDKに記載されているMCUbootの例を参照することもできます。   SDKのダウンロード先:   SDK ビルダー |MCUXpresso SDK ビルダー よろしくお願いします。 BR アリス Re: mcxn947 开启加密后,对dual bank A B区固件升级是否有什么影响? 私が言及しているのは、暗号化を有効にした場合のデュアルバンクアップグレード方式への影響についてであり、デュアルバンクとは何かを尋ねているのではありません。 Re: mcxn947 开启加密后,对dual bank A B区固件升级是否有什么影响? こんにちは@justdomyself 影響なし。 BR アリス
View full article
RW612: FlexSPI port mixing (CACHE64 write buffer), PMU gates CM33 clock, PSRAM FSEL lost after reset We build a communication stick on the RW612 (u-blox IRIS-W10 module, CHIP_INFO 0x7002). Code runs XIP from an external 16 MB QSPI NOR on FlexSPI port A1, and a 2 MB QSPI PSRAM (APS1604M-3SQR, no DQS) sits on port B1 of the same controller. Firmware: MCUXpresso SDK 25.06.00 + FreeRTOS, and Zephyr 4.5.0-rc1. We see three issues and would like the root cause and the recommended settings. The full report with measurements, what we ruled out, register addresses and code excerpts is attached. 1) Data mixing between the FlexSPI ports with the CACHE64_CTRL0 write buffer enabled With the PSRAM accessed through the code-bus window and code running XIP from port A, a PSRAM access sometimes returns a word of flash and an instruction fetch sometimes returns a wrong word (BusFault/UsageFault in our heap code and in the ENET interrupt). A/B on images with identical code addresses: buffer on, 9 faults in about 115 min; buffer off, 0 faults in about 195 min (p about 1e-4). The SDK SystemInit() enables this buffer under XIP. - Is there an erratum or restriction for CACHE64_CTRL0 CCR.ENWRBUF with PSRAM on port B and XIP on port A? Is the SDK default safe? - Is the system-bus window (0x28000000/0x38000000 with CACHE64_CTRL1, as suggested in Zephyr GitHub issue 99943) mandatory for PSRAM next to XIP? Is the CTRL1 write buffer safe? Which AHB RX buffer / prefetch setup do you recommend (buffer 7)? - What is the mechanism of the mixing in both directions? 2) The PMU gates the CM33 clock (gate_cpu_clk), the core resumes only when a debugger attaches The board freezes with no reset and no fault record, with no WFI in the image (FreeRTOS); the moment a debugger connects (even a bare Cortex-M33 attach) it runs again. SysTick/ENET counters read before a halt and DWT_PCSR samples show the core not advancing. Only an armed WWDT0 on LPOSC with reset enabled has prevented it (0 failures in 70 min vs 6-7 per 20 min without). On Zephyr the same class shows as a core that stays in WFI with an enabled OS timer interrupt pending; an idle loop without WFI avoids it. - When does the PMU gate the CPU clock without WFI and with SCR = 0? Why does a debug connection release it, and why does an armed WWDT reset prevent it? What does SYSCTL2 SOURCE_CLK_GATE CPU_CLK_EN actually control? - What wake-up / PMU configuration does plain WFI need on RW612? Is a busy idle without WFI an acceptable long-term strategy? 3) MCI_IO_MUX FSEL bit 3 (QUAD_SPI_PSRAM, 0x40004020) clear after a deeper reset After a WWDT reset following a hang, the QUAD_SPI_PSRAM function select bit was clear, the PSRAM pads floated, and every read returned 0x1797523E until our code applied the pin group again. Zephyr does not apply this pin group itself. - Which reset types reset MCI_IO_MUX FSEL and the pad pulls? Does the ROM touch FSEL? Is Zephyr support for PSRAM next to XIP (pins, LUT separation, cache policy) planned? Open item: ENET receive errors on Zephyr (ENET_GetRxFrameSize status 4001, BABR / CRC errors) with KSZ8081 over RMII at 100 Mbit/s full duplex - is this a known issue? Our current workarounds (CTRL0 write buffer off with PSRAM, system-bus window, WWDT0 on LPOSC with reset, idle without WFI, re-applying the PSRAM pin group at every boot) are in the attached report. Thank you for any guidance. Product: WiFi RW6XX Re: RW612: FlexSPI port mixing (CACHE64 write buffer), PMU gates CM33 clock, PSRAM FSEL lost after r Dear @dimush , Based on our overall analysis, we should first resolve the data corruption/mixing issue between Flash and PSRAM. We need to ensure that the following configuration is correct: FlexSPI Port A -> QSPI NOR Flash -> code-bus/cache0 -> XIP FlexSPI Port B -> PSRAM -> system-bus/cache1 -> heap/data We also recommend: CACHE64_CTRL0.ENWRBUF = 0 CACHE64_CTRL1.ENWRBUF = 0        // During troubleshooting PSRAM prefetch = disabled            // During troubleshooting [Note] Flash and PSRAM should use their respective correct AHB mapping paths. The RW612 Flash cache and PSRAM cache are mapped to the code bus and system bus, respectively. Only after modifying the FlexSPI LUT, reconfiguring a port, switching memory aliases, or modifying memory through an IP command is it necessary to wait until FlexSPI is idle and clear the corresponding AHB RX/TX buffers and CPU cache. The cache should not be cleared before every normal PSRAM heap access. During troubleshooting, the PSRAM non-cacheable system-bus alias can also be used to further isolate the cache mechanism. Thanks, Best Regards, Weidong Re: RW612: FlexSPI port mixing (CACHE64 write buffer), PMU gates CM33 clock, PSRAM FSEL lost after r Thank you, Weidong. Our Zephyr build already uses this layout: XIP from port A through the code bus / CACHE64_CTRL0 (ENWRBUF = 0), PSRAM on port B through the system bus 0x38000000 / CACHE64_CTRL1, no cache maintenance in the normal heap path. Since we moved to it, we have not seen the data mixing of issue 1. We will now also run with CACHE64_CTRL1.ENWRBUF = 0 and PSRAM prefetch disabled, A/B against our current image, and report the result. The remaining problem is issue 2: about once per 18-20 board-hours the whole core stops. The SysTick-driven timer and the work queue stop together within about 1 s after the last watchdog feed, and only the WWDT0 reset recovers it. This happens with idle without WFI and with the system-bus PSRAM window already in place. Could you comment on when the PMU gates the CM33 clock without WFI, and on issue 3 (MCI_IO_MUX FSEL bit 3 cleared after a WWDT reset)? Re: RW612: FlexSPI port mixing (CACHE64 write buffer), PMU gates CM33 clock, PSRAM FSEL lost after r Dear @dimush , Thanks for your update. Regarding Issue 2, please use the following reference flow to verify your PM2 entry and wake-up configuration. After making any necessary adjustments, please check whether the issue can still be reproduced. First, establish a PM1 baseline: PMU remains in PM0 SCR.SLEEPDEEP = 0 Execute WFI In PM1, any enabled and valid interrupt source should wake the CM33. Before entering PM2, the wake-up source must be configured at all required levels: Enable and configure the peripheral timer or GPIO interrupt; Enable the corresponding NVIC interrupt; Enable the corresponding PM2 wake-up source in the PMU wake-up mask; Ensure that the clock required by the wake-up source remains active in PM2; Clear any stale peripheral interrupt status; Program the next valid timer match/compare event. A pending NVIC interrupt alone does not prove that the source is configured as a PM2 wake-up source. PM2 supports wake-up sources such as timers, GPIO, FlexSPI, USB, DMA, and Ethernet. The documented PM2 transition is: PM0 -> PM2:     Set PMU pwr_mode = 2'b01 Execute WFI In PM2, the CM33 clock is gated while the CPU state is retained. The AON domain and the selected PM2 wake-up source remain active. The following code is intended only to illustrate the sequence and is not meant to be copied directly: configure_wakeup_source(); enable_peripheral_interrupt(); enable_nvic_interrupt(); enable_pmu_pm2_wakeup_source(); clear_peripheral_interrupt_status(); program_next_timer_event(); /* Keep CPU_CLK_EN enabled before entering PM2 */ set_pmu_power_mode(PM2); __DSB(); __ISB(); __WFI(); __ISB(); For the production implementation, please use the power-management API provided by the corresponding MCUXpresso SDK version instead of directly programming the PMU registers. The SDK API names may vary between SDK versions. Please also verify that SYSCTL2.SOURCE_CLK_GATE.CPU_CLK_EN remains enabled before entering PM2. This bit should not be cleared to emulate PM2; CPU clock gating should be performed by the PMU power-mode transition. Please record the following values immediately before entering PM2: PMU pwr_mode SCB->SCR SYSCTL2.SOURCE_CLK_GATE CPU_CLK_EN PM2 wake-up mask NVIC enable/pending status Timer enable/status registers Finally, please test the FreeRTOS no-WFI configuration separately: No WFI SCR.SLEEPDEEP = 0 PMU pwr_mode remains PM0 CPU_CLK_EN = 1 If the CM33 still stops under these conditions, the behavior should not be considered a normal PM2 transition. It should then be investigated as an unexpected clock-gate operation or a possible RW612 PMU/clock-gating silicon issue. Regarding Issue 3, after a WWDT reset, the RW612 restarts through the Boot ROM boot flow: Boot ROM -> FlexSPI NOR/FCB -> Application Image If the application image contains the PSRAM pin-mux configuration code, that code should be executed again and take effect. Therefore, please verify that the application code includes the required PSRAM pin-mux configuration. Thanks, Best Regards, Weidong Re: RW612: FlexSPI port mixing (CACHE64 write buffer), PMU gates CM33 clock, PSRAM FSEL lost after r Thank you, Weidong. We ran the FreeRTOS no-WFI test you asked for on our fast reproducer board. Conditions, set explicitly after BoardInit and re-checked every second: no WFI anywhere in the image (verified by disassembly; tickless idle off), SCB->SCR = 0 (SLEEPDEEP = 0, SLEEPONEXIT = 0), PMU PWR_MODE = PM0 (PWR_MODE_STATUS = 0), SYSCTL2.SOURCE_CLK_GATE = 0x700100D2 (CPU_CLK_EN = 1), WWDT disabled. Note: ROM/bootloader left SOURCE_CLK_GATE = 0x300000C6, i.e. CPU_CLK_EN = 0, with the core running. Result: the CM33 stopped 3 times within about 7 minutes (first stop after about 6 minutes of uptime). SysTick and the OS timer gap check show that the core did not advance until our debugger attached: 12.4 s for the first stop, then whenever we attached. Each time the interrupted thread was the lwIP RX task, PC 0x20002344 (code in SRAM). Register snapshot 1 s before the stop: PWR_MODE 0, PWR_MODE_STATUS 0, WAKEUP_LEVEL 0x3, WAKEUP_MASK 0x20, WAKEUP_STATUS 0, PM2 masks 0x0/0x200/0x800000, SCR 0, ICSR 0x00400000, SOURCE_CLK_GATE 0x700100D2, NVIC ISER 0x00010400/0x00040000/0/0x00080000, ISPR3 0x120, SysTick CTRL 0x10007, CLKCTL0 PSCCTL0..2 0x02410E07/0x0E020001/0x8, CLKCTL1 PSCCTL0..2 0x08000D00/0x00010003/0x8000004D. After the attach DHCSR = 0x01100001 (running). By your criterion this is an unexpected clock-gate, not a PM2 transition. Two more observations: with WWDT0 armed on LPOSC the stop did not occur on FreeRTOS earlier (0 in 70 min). On Zephyr, a build whose idle loop reads the OS timer on every pass ran 91 board-hours without a stop (about 4 expected), and we are isolating that now. We can attach the full register dumps. What would you suggest as the next step, and is there a known erratum for this? Re: RW612: FlexSPI port mixing (CACHE64 write buffer), PMU gates CM33 clock, PSRAM FSEL lost after r Dear @dimush , Thanks for you update. Continuing the investigation at the lowest register and IP-command levels may lead us in the wrong direction. We should take a different approach: assume that the RW612 and the u-blox W10 module are functioning correctly, and restart the investigation from the SDK level. You mentioned that you are using a W10 module. I have previously debugged the u-blox W10 EVK. Please confirm whether your module uses the FM25Q128A QSPI NOR Flash. We can then verify: The FCB Flash timing configuration; The runtime LUT configuration. In addition, the PSRAM on the W10 is customer-added. Please provide its part number and specifications. We also need to verify its LUT configuration.   Thanks, Regards, weidong Re: RW612: FlexSPI port mixing (CACHE64 write buffer), PMU gates CM33 clock, PSRAM FSEL lost after r Thank you, Weidong. Here is the configuration; the full FCB, the runtime registers and the LUT words read back from a running board are in the attached RW612_FlexSPI_config_dongle_c0.txt. Flash: yes, it is the FM25Q128A - Fidelix, JEDEC ID F8 42 18, 16 MB, on port A1, XIP (our first report wrongly said "Fudan"). The FCB at 0x08000400 is the u-blox IRIS-W1 "Fidelex 8/16 MB" flash_config.c (FRDM-RW612 based): readSampleClkSrc 1 (DQS-pad loopback), CS hold/setup 3/3, sflashPadType 4, serialClkFreq 7 (133 MHz enum; FRDM-RW612 has 5 = 100 MHz), QE set via WRSR 01h with 0x0200, read sequence EBh 1-4-4 with mode byte 0x00 and 4 dummy cycles (LUT 0x0A1804EB 0x32041E00 0x00002604). The ROM cannot read this part's SFDP, so the full FCB is used. Runtime: the bootloader sets the FlexSPI root to 130 MHz; the Zephyr application keeps the controller setup under XIP, the runtime read LUT is identical to the FCB, and our PSRAM init sets the root divider to /3. With MCR0.SERCLKDIV = 1 the serial clock is about 43 MHz on both ports (measured: 43 MHz on the PSRAM SCLK). MCR0 0xFFFF1110, MCR2 0x200009F7, AHBCR 0x00200078, FLSHA1CR1 0x63. PSRAM: AP Memory APS1604M-3SQR, 16 Mbit, 2.7-3.6 V (3.3 V supply), QSPI SDR, no DQS pin (RDQS pulled down), 109 MHz max at 3.3 V, tCEM 8 us. Port B1: 2 MB, CS hold/setup 3/3, dataValidTime 1, write mask off. LUT read EBh 1-4-4 with 6 dummy cycles (0x0A1804EB 0x26043206), write 38h 1-4-4 (0x0A180438 0x00002200), reset 66h/99h. It is accessed only through the system bus at 0x39000000 with CACHE64_CTRL1; XIP uses the code bus with CACHE64_CTRL0.ENWRBUF = 0. Measured with a scope on the PSRAM in this configuration: SCK 43 MHz and CE# low pulses up to 19 us (APS1604M tCEM is 8 us). Port B sampling matches the FRDM-RW612 reference (DQS-pad loopback for both ports, RX_CLK_SRC_DIFF = 0). On the core stop: on Zephyr it also happened with your troubleshooting settings (CTRL1 write buffer off, prefetch off). Our two current builds - one with a trace hook and no idle hook, one whose idle loop reads the OS timer - ran about 50 board-hours without a stop (about 2 expected). Re: RW612: FlexSPI port mixing (CACHE64 write buffer), PMU gates CM33 clock, PSRAM FSEL lost after r Dear @dimush , Thanks for your update. The attachment contains the FCB configuration files, flash_config.c/.h, runtime LUT, and mflash_drv.c/.h. Please keep a backup of your original files before replacing them with the files I shared. One of my customers previously encountered a BLE FW related issue on a custom board, so I investigated and tuned the LUT for FM25Q128A. The attached files are from that verified configuration and may be useful for comparison. To narrow down the debugging scope, I suggest temporarily putting Zephyr aside and reproducing the issue using a FreeRTOS SDK example. I am concerned that upstream Zephyr may not fully support all RW612 features or configurations. In addition, could you let me know whether the three issues you mentioned can also be reproduced on the FRDM-RW612 board? Thanks, Best Regards, Weidong Re: RW612: FlexSPI port mixing (CACHE64 write buffer), PMU gates CM33 clock, PSRAM FSEL lost after r Thank you, Weidong, for the FM25Q128A files. We compared them and ran the tests you suggested, including on an FRDM-RW612. FCB/LUT comparison: your flash_config.c is identical to the FCB on our boards except deviceModeType (yours kDeviceConfigCmdType_QuadEnable, ours Generic); serialClkFreq 7, readSampleClkSrc 1, CS 3/3, QE via WRSR 01h 0x0200 and the EBh read sequence are the same. Your mflash_drv.c differs from the driver in our (frozen) FreeRTOS firmware in three places: EBh mode byte 0x00 (ours 0xF0), quad page program 33h 1-4-4 (ours 32h 1-1-4), and WRSR with 2 bytes (ours 4). Our product firmware is Zephyr, which uses its own NOR driver; only the FCB is shared. FRDM-RW612, SDK 25.06.00 lwip_ping FreeRTOS example, FRDM board files unchanged, Ethernet load from a PC (about 4000 ENET RX interrupts/s through lwip_rx: TCP ~8.7 Mbit/s, UDP, ping 1400 B): - Issue 2 (no WFI anywhere - checked in the disassembly, SCR = 0, PM0, CPU_CLK_EN = 1, WWDT off): 0 core stops in 111 minutes. On our board the same configuration stopped 3 times in about 7 minutes. - Issue 1 (PSRAM through the code-bus window, non-cacheable, CACHE64_CTRL0 write buffer on vs off): 0 mismatches in 36 minutes each (about 4e9 PSRAM words written in the write-buffer-on run). On our board: 9 faults in about 115 minutes with the buffer on. So neither issue reproduces on the FRDM-RW612 with the SDK example. The FRDM run has no mbedTLS/ELS/PKC, TRNG or HTTPS load, and other flash/PSRAM parts. Four things we had to change to get the SDK example running on the FRDM-RW612: 1. app.h uses MDIO address 2 for the KSZ8081; the PHY on this board answers at address 1 ("Cannot initialize PHY", then a hang). 2. The OS timer is not clocked by the example; the first OSTIMER read hangs the bus. 3. BOARD_InitPsRam() called from XIP hangs the core: FLEXSPI_SetFlashConfig() sets MCR0.MDIS while code runs from the same FlexSPI. We had to run it from SRAM with interrupts masked. 4. With the SDK FlexSPI setup (AHB alignment not set, 130 MHz root), 2 KB PSRAM read-backs went wrong exactly at 1 KB page boundaries (data from 1 KB lower), independent of the CTRL0 write buffer. AHBCR alignment 512 B plus clearing the AHB RX buffers after writes removed it. Our board, issue 1 / PSRAM integrity: with prefetch on and 256 B AHB RX buffers, CE# low on the APS1604M lasted up to 19 us at SCK 43 MHz (measured; tCEM is 8 us). We changed SCK to 65 MHz (root /2, SERCLKDIV /2), gave the system-bus master (master 1, the PSRAM window at 0x39000000) its own AHB RX buffer of 64 B without prefetch (XIP keeps buffer 6, 256 B with prefetch) and set CSINTERVAL 3 on port B: CE# low is now at most 1.4 us (measured). A board left at 43 MHz had TLS heap corruption in PSRAM after 76 hours (the third such event); the boards at 65 MHz have run about 80 board-hours without it so far. Our board, issue 2 on Zephyr: without changes the core stops about once per 22 board-hours. Two builds ran about 150 board-hours together without a stop (about 7 expected): one with Zephyr tracing hooks on every context switch and interrupt, and one whose idle loop only adds a read of the OS timer counter on every pass (no WFI in either). That points to the core clock being gated when the idle loop leaves the peripheral bus quiet, in PM0 without WFI. This completes our investigation for now: with SCK 65 MHz and the separate short PSRAM AHB buffer the PSRAM is clean, and the idle-loop timer read keeps the core running. Thank you very much for your support and for the verified FM25Q128A configuration.
View full article
MX8MP ENET 电压 你好, 我们正在从 MX8X 控制器迁移到 MX8MP 控制器。在旧版本中,ENET0 和 ENET1 支持 1.8V、2.5V、3.3V 电压(RMII 支持所有三种电压,RGMII 仅支持前两种电压)。 MX8MP 取消了 2.5V 选项,但允许选择 1.8V 和 3.3V。绝对最大电压为 3.8V。问题是,当 NVCC_ENET 工作电压为 2.5V 时会发生什么?2.5 不会超过绝对最大值。但是 MAC 信号是如何配置的?长期 2.5V 工作电压会产生什么样的影响? 我这么问是因为最好不要更新目前电源和VDDIO都为2.5V的旧PHY。 谢谢! Mike 通信与控制(I3C | I2C | SPI | FlexCAN | 以太网 | FlexIO) Re: MX8MP ENET voltage 谢谢你,豪尔赫。很喜欢你的头像。 🙂 Re: MX8MP ENET voltage 你好, 正如文档中所述,该接口仅支持两种电压等级,即 1.8 V 和 3.3 V。即使 2.5 V 在整体工作电压范围内,2.5 V 信号也可能不符合有效逻辑电平的规定阈值,这可能会导致不可预测的行为。 我建议此接口使用 1.8V 或 3.3V 电压。 顺祝商祺!
View full article
MX8MP ENET voltage Hello, We are migrating from an MX8X controller to MX8MP. In the older one, ENET0 and ENET1 supported voltage 1.8V, 2.5V, 3.3V (RMII all three, RGMII first two only). MX8MP removes the 2.5V option, but allows 1.8V and 3.3V choices. Absolute Vmax is 3.8V. The question is, what happens in a 2.5V operation on NVCC_ENET? 2.5 will not exceed the absolute max. But how are the MAC signals configured and what kind of impact would 2.5V operation have long term? I ask because it would be great to avoid updating the older PHY that is currently running both its supply and VDDIO on 2.5V. Thank you, Mike Communication & Control(I3C | I2C | SPI | FlexCAN | Ethernet | FlexIO) Re: MX8MP ENET voltage Thank you, Jorge. Love the avatar.  🙂 Re: MX8MP ENET voltage Hello, As mentioned in the documentation, the interface supports only two voltage levels, 1.8 V and 3.3 V. Even if 2.5 V is within the overall operating voltage range, 2.5 V signals may not meet the specified thresholds for valid logic levels, which could result in unpredictable behavior. I recommend using either 1.8 V or 3.3 V for this interface. Best regards.
View full article
BFU910F model A SPICE compatible Gummel-Poon device model was promised 11 years ago in the datasheet. Only a Mextram model, in a proprietary format, is provided. LTspice claims Mextram 504 model compatibility, so what gives?  RF Re: BFU910F model I'm aware, but no replacement exists, despite a NXP article from 2021 calling it "the Future of High-End RF". In any case, it's a fairly impressive part judging by the datasheet. I'd like to see it documented more thoroughly before the remaining stock runs out :3 Re: BFU910F model Hello Please note that the BFU910F is no longer manufactured.
View full article
オフラインMISR値計算 現在、S32K312コントローラー用のFlash Array Integrity実装に取り組んでいます。 リファレンス・マニュアルによると、MISR値は下の画像に示された特定の多項式で計算されます。しかし、オフラインで計算したMISR値は、複数回試してもユーザーモード(UM)レジスタで生成される値と一致しません。 さらに詳しく調べたところ、MISRの計算はECC検出後に行われ、ECCパリティはオフラインでは計算できないことが分かりました。 この実装における標準的な本環境レベルのアプローチについてアドバイスいただけますか?具体的には、以下の点を知りたいです: 1. オフラインで期待されるMISR値を計算し、それをFlashやNVMに保存することは可能ですか? 2. それとも、UMレジスタから直接計算されたMISR値を取得し、FUTUREのチェックのために保存するためにコードを一度実行する必要があるのでしょうか? 本番環境に対応できるソリューションを実現するための推奨戦略についてご指導ください。 よろしくお願いします、 サンディープ・シン Re: Offline MISR value calculation こんにちは、ダニエルさん。 過去7~8ヶ月間、ずっと同じ回答を受け取っています。以前にもこの件について問い合わせましたが、その時の回答も今回と全く同じでした。NXPの営業担当者にも確認しましたが、未だに解決策は見つかっていません。 この機能がNXPによってテストされたのか、またこの問題に対する有効な修正や回避策があるのか、教えていただけますか? 迅速なご回答をお待ちしております。 よろしくお願いします、 サンディープ・シン Re: Offline MISR value calculation こんにちは、@sandeepSingh18606 さん。 1. オフライン計算の進捗状況について、社内で確認してみます。 できるだけ早くご連絡いたします。 2. これは選択肢の一つです。以下に例を示します。https: //community.nxp.com/t5/S32K-Knowledge-Base/Example-S32K344-FLS-Integrity-Margin-Check-v1-0-S32DS36-RTD701/ta-p/2416160 BR、ダニエル
View full article
BFU910Fモデル SPICE対応のGummel-Poonデバイスモデルは11年前のデータシートで約束されていました。提供されているのは、独自のフォーマットで作られたMextramモデルのみです。LTspiceはMextram 504モデルの互換性を謳っていますが、なぜでしょうか? RF Re: BFU910F model 知っていますが、2021年のNXPの記事で「ハイエンドRFのFUTURE」と称されているにもかかわらず、代替品は存在しません。いずれにせよ、データシートを見る限りかなり印象的な部品です。在庫がなくなる前に、もっと詳しく記録に残してほしいですね :3 Re: BFU910F model Hello BFU910Fは現在製造中止となっておりますのでご注意ください。
View full article
Offline MISR value calculation I am currently working on the Flash Array Integrity implementation for the S32K312 controller. According to the reference manual, the MISR value is calculated using a specific polynomial shown in below image. However, my offline calculated MISR values do not match the values generated in the User Mode (UM) registers even after multiple tries. Upon further review, I noted that the MISR calculation occurs after ECC detection, and ECC parity cannot be calculated offline. Could you please advise on the standard production-level approach for this implementation? Specifically, I would like to know: 1.  Is it possible to calculate expected MISR values offline and store them in Flash or NVM? 2.  Or is it necessary to run the code once to capture the calculated MISR value directly from the UM registers and save it for future checks? Please guide me on the recommended strategy for a production-ready solution. Best regards, Sandeep Singh Re: Offline MISR value calculation Hi Daniel, I have been receiving this same response for the past 7 to 8 months. I previously raised a ticket regarding this issue, and the response was identical to what I am receiving now. I also followed up with our NXP sales representative, but we still do not have a solution. Could you please clarify if this functionality was tested by NXP and whether there is an active fix or workaround available for this issue? I look forward to your prompt response. Best regards, Sandeep Singh Re: Offline MISR value calculation Hi @sandeepSingh18606, 1. Let me check internally whether there has been any progress with the offline calculation. I will get back to you as soon as possible. 2. This is an option. Here is an example: https://community.nxp.com/t5/S32K-Knowledge-Base/Example-S32K344-FLS-Integrity-Margin-Check-v1-0-S32DS36-RTD701/ta-p/2416160 BR, Daniel
View full article
推奨されるBSP / Neutron SDKのバージョン管理戦略 こんにちは、 私たちはi.MX95をプラットフォームとして用いる自動車アプリケーション向けのPoCを開発しており、推奨されるNeutron SDKのバージョン管理戦略について明確にしたいと思います。 NeutronSDKUserGuide.md 年の「Neutron SDK Version Compatibility with Yocto BSP」の表を読み、コンパイラとランタイムは同じSDKから来なければならないと理解しています。しかし、ガイドにはどのバージョンが推奨されているかは明記されていない。 現在のBSPでは常に最新のNeutron SDKバージョン(ランタイムがアップグレードされたもの)を使うべきでしょうか、それともそのBSPのデフォルトバージョンを使うべきでしょうか? 環境 - ボード:IMX95LPD5EVK-19 - BSP:LF_6.18.20_2.0.0 - Neutron SDK: eiq-neutron-sdk-linux-3.2.3 - NeutronFirmware.elf、libNeutronDriver.so、libneutron_delegate.soはNeutron SDK 3.2.3のバージョンに更新されています。 ご回答をお待ちしています。 Re: Recommended BSP / Neutron SDK versioning strategy こんにちは、 NXP Semiconductors製品にご関心いただきありがとうございます。 機械 学習ユーザーガイドの最後に、すべてのBSPに含まれるNeutron SDKバージョンを確認できます。Neutron SDK v3.2.1はLF6.18.37_2.1.0に含まれています。 しかし、開発に関しては、お客様に最新のSDKリビジョンを使用することが推奨されており、ドキュメントには変換に使われるバイナリをコピーして以下を対象にすることが推奨されています: - Neutron ランタイムの更新 - ターゲットデバイスでNeutronランタイムを更新するには、ファイルを IRは以下の通りにディレクトリを指定しています: | ファイル | 対象ディレクトリ | |------|------------------| | `NeutronFirmware.elf`|'/lib/firmware/' | |「libNeutronDriver.so」|'/lib/' | |『libneutron_delegate.so』 |『/lib/』 | よろしくお願いします。 Re: Recommended BSP / Neutron SDK versioning strategy こんにちは、ジョセフさん。 お返事ありがとうございます。推奨される最新のSDKリビジョンを使用します。 よろしくお願いいたします
View full article
MX8MP ENET電圧 こんにちは、 MX8XコントローラーからMX8MPに移行しています。旧型では、ENET0とENET1は1.8V、2.5V、3.3Vの電圧をサポートしていました(RMIIは3つすべて、RGMIIは最初の2つのみ)。 MX8MPでは2.5Vのオプションは削除されましたが、1.8Vと3.3Vの選択肢は残されています。絶対最大電圧は3.8Vです。問題は、NVCC_ENETが2.5Vで動作する場合、何が起こるかということです。2.5は絶対最大値を超えません。しかし、MAC信号はどのように構成されているのか、また2.5V動作は長期的にどのような影響を与えるのか? 私が質問したのは、現在電源とVDDIOの両方が2.5Vで動作している古いPHYをアップデートせずに済むと非常に助かるからです。 ありがとうございました。 Mike 通信・制御(I3C |I2C |SPI |FlexCAN |イーサネット |FlexIO) Re: MX8MP ENET voltage ありがとう、ホルヘ。アバターが気に入りました。 🙂 Re: MX8MP ENET voltage こんにちは、 ドキュメントに記載されているように、インターフェースは1.8Vと3.3Vの2つの電圧レベルのみをサポートしています。たとえ2.5Vが全体の動作電圧範囲内であっても、2.5V信号は有効な論理レベルの指定閾値を満たさず、予測不能な挙動を引き起こす可能性があります。 このインターフェースには1.8Vか3.3Vの使用をおすすめします。 よろしくお願いいたします。
View full article
mcxn947 开启加密后,对dual bank A B区固件升级是否有什么影响? On the MCXN947, what impact does enabling firmware encryption have on Dual Bank A、B firmware updates? For example, the application is currently running from Bank A. A new firmware image is downloaded to Bank B, and then the address mapping is swapped so that the application runs from Bank B. When firmware encryption is enabled, will it affect this process? Are there any additional considerations or modifications required for downloading the firmware, swapping the address mapping, or booting the application from Bank B? Re: mcxn947 开启加密后,对dual bank A B区固件升级是否有什么影响? Hello @justdomyself  Please refer to the Dual Image Boot feature for your implementation. For details, please refer to the MCXN947 Reference Manual. If you do not want to use the ROM bootloader, you can also refer to the MCUboot examples provided in the SDK.   Download SDK from:   SDK Builder | MCUXpresso SDK Builder Thank you. BR Alice Re: mcxn947 开启加密后,对dual bank A B区固件升级是否有什么影响? I'm referring to the impact of enabling encryption on dual bank upgrade methods, not asking what a dual bank is. Re: mcxn947 开启加密后,对dual bank A B区固件升级是否有什么影响? Hello @justdomyself No impact. BR Alice
View full article
mcxn947开启加密后,对双银行A B区固件升级是否有什么影响? 在 MCXN947 上,启用固件加密对双库 A、B 固件更新有何影响? 例如,应用程序当前在 Bank A 上运行。将新的固件映像下载到 Bank B,然后交换地址映射,以便应用程序在 Bank B 上运行。 启用固件加密后,这会影响此过程吗?从 Bank B 下载固件、交换地址映射或启动应用程序是否需要任何额外的注意事项或修改? Re: mcxn947 开启加密后,对dual bank A B区固件升级是否有什么影响? 你好@justdomyself 请参考双镜像启动功能进行实现。详情请参阅 MCXN947 参考手册。 如果您不想使用 ROM 引导加载程序,也可以参考 SDK 中提供的 MCUboot 示例。   从以下位置下载 SDK:   SDK 构建器 | MCUXpresso SDK 构建器 谢谢! BR 爱丽丝 Re: mcxn947 开启加密后,对dual bank A B区固件升级是否有什么影响? 我是说 ,  开启加密对 dual bank  升级方式的影响,  不是问什么是dual  bank Re: mcxn947 开启加密后,对dual bank A B区固件升级是否有什么影响? Hello @justdomyself  没影响。 BR Alice
View full article
RW612:FlexSPI端口混合(CACHE64写缓冲区),PMU门控CM33时钟,复位后PSRAM FSEL丢失 我们在 RW612(u-blox IRIS-W10 模块,CHIP_INFO 0x7002)上构建了一个通信棒。代码从 FlexSPI 端口 A1 上的外部 16 MB QSPI 或非 运行 XIP,并且 2 MB QSPI PSRAM(APS1604M-3SQR,无 DQS)位于同一控制器的端口 B1 上。固件:MCUXpresso SDK 25.06.00 + FreeRTOS,以及 Zephyr 4.5.0-rc1。我们发现了三个问题,希望了解根本原因和推荐设置。附件包含完整的测量结果、我们排除的因素、注册地址和代码摘录。 1) 启用 CACHE64_CTRL0 写缓冲区后,FlexSPI 端口之间会发生数据混合。 通过代码总线窗口访问 PSRAM,并且代码从端口 A 运行 XIP,PSRAM 访问有时会返回一个闪存字,而指令获取有时会返回错误的字(在我们的堆代码和 ENET 中断中为 BusFault/UsageFault)。对具有相同代码地址的图像进行 A/B 测试:缓冲区开启,约 115 分钟内出现 9 次故障;缓冲区关闭,约 195 分钟内出现 0 次故障(p 约为 1e-4)。SDK 的 SystemInit() 函数在 XIP 下启用此缓冲区。 - 当端口 B 上的 PSRAM 和端口 A 上的 XIP 时,CACHE64_CTRL0 CCR.ENWRBUF 是否存在勘误或限制?SDK 的默认设置是否安全? - 对于 PSRAM 而言,除了 XIP 之外,系统总线窗口(0x28000000/0x38000000,使用 CACHE64_CTRL1,如 Zephyr GitHub 问题 99943 中所建议的)是否是必需的?CTRL1 写入缓冲区是否安全?您推荐哪种 AHB RX 缓冲区/预取设置(缓冲区 7)? - 双向混合的机制是什么? 2) PMU 控制 CM33 时钟 (gate_cpu_clk),只有当调试器连接时,内核才会恢复运行。 板死机,没有 RESET,也没有故障记录,映像中没有 WFI(FreeRTOS);一旦调试器连接(即使是裸露的 Cortex-M33 连接),它就会再次运行。在停止之前读取的 SysTick/ENET 计数器和 DWT_PCSR 样本显示核心没有前进。只有在 LPOSC 上启用复位功能的 WWDT0 才能防止这种情况发生(70 分钟内发生 0 次故障,而未启用复位功能时每 20 分钟发生 6-7 次故障)。在 Zephyr 上,同一类核心会保持 WFI 状态,并且启用了操作系统定时器中断挂起;没有 WFI 的空闲循环可以避免这种情况。 - 在无 WFI 且 SCR = 0 的情况下,PMU 何时会对 CPU 时钟进行门控?为什么调试连接会释放它,而已激活的 WWDT RESET 又会阻止它?SYSCTL2 SOURCE_CLK_GATE CPU_CLK_EN 实际上控制的是什么? - RW612 上的普通 WFI 需要什么样的唤醒/PMU 配置?长期来看,没有WFI的繁忙闲置状态是否是一种可接受的策略? 3) 深度复位后,MCI_IO_MUX FSEL 位 3(QUAD_SPI_PSRAM,0x40004020)被清除 在 WWDT 复位后,系统出现卡顿,QUAD_SPI_PSRAM 功能选择位被清除,PSRAM 焊盘处于浮空状态,每次读取都返回 0x1797523E,直到我们的代码再次应用引脚组。Zephyr 本身并不应用此引脚组。 - 哪些复位类型会复位 MCI_IO_MUX FSEL 并拉出焊盘?ROM 是否涉及 FSEL?Zephyr 是否计划支持 PSRAM 以及 XIP(引脚、LUT 分离、缓存策略)? 未解决的问题:在 Zephyr 上使用 KSZ8081 通过 RMII 以 100 Mbit/s 全双工速率传输数据时,出现 ENET 接收错误(ENET_GetRxFrameSize 状态 4001,BABR / CRC 错误)——这是一个已知问题吗? 我们目前的解决方法(关闭 CTRL0 写缓冲区并使用 PSRAM、系统总线窗口、在 LPOSC 上启用 WWDT0 并进行 RESET、不使用 WFI 的空闲状态、每次启动时重新应用 PSRAM 引脚组)已在附件报告中列出。感谢您的指导。 产品:WiFi RW6XX Re: RW612: FlexSPI port mixing (CACHE64 write buffer), PMU gates CM33 clock, PSRAM FSEL lost after r 亲爱的@dimush , 根据我们的总体分析,我们首先应该解决闪存和 PSRAM 之间的数据损坏/混合问题。 我们需要确保以下配置正确: FlexSPI 端口 A -> QSPI 或非 Flash -> 代码总线/缓存 0 -> XIP FlexSPI 端口 B -> PSRAM -> 系统总线/缓存 1 -> 堆/数据 我们还推荐: CACHE64_CTRL0.ENWRBUF = 0 CACHE64_CTRL1.ENWRBUF = 0 // 故障排除期间 PSRAM 预取 = 已禁用 // 故障排除期间 [注意] Flash 和 PSRAM 应该使用各自正确的 AHB 映射路径。RW612 Flash 缓存和 PSRAM 缓存分别映射到代码总线和系统总线。 只有在修改 FlexSPI LUT、重新配置端口、切换内存别名或通过 IP 命令修改内存之后,才需要等待 FlexSPI 空闲并清除相应的 AHB RX/TX 缓冲区和 CPU 缓存。不应在每次正常 PSRAM 堆访问之前清除缓存。 在故障排除过程中,还可以使用 PSRAM 非缓存系统总线别名来进一步隔离缓存机制。 谢谢! 顺祝商祺! 卫东 Re: RW612: FlexSPI port mixing (CACHE64 write buffer), PMU gates CM33 clock, PSRAM FSEL lost after r 谢谢你,卫东。我们的 Zephyr 版本已经使用了这种布局:XIP 从端口 A 通过代码总线 / CACHE64_CTRL0 (ENWRBUF = 0),PSRAM 在端口 B 通过系统总线 0x38000000 / CACHE64_CTRL1,在正常的堆路径中没有缓存维护。自从我们迁移到新系统后,就没有再出现过第 1 期数据混合的问题。现在我们还将运行 CACHE64_CTRL1.ENWRBUF = 0 并禁用 PSRAM 预取,与我们当前的镜像进行 A/B 对比,并报告结果。 剩下的问题是问题 2:大约每 18-20 个板小时,整个核心就会停止运行一次。SysTick 驱动的定时器和工作队列在最后一次看门狗馈送后大约 1 秒内同时停止,只有 WWDT0 复位才能恢复它。即使在没有 WFI 且系统总线 PSRAM 窗口已就位的情况下,也会发生这种情况。您能否评论一下 PMU 何时在没有 WFI 的情况下控制 CM33 时钟,以及问题 3(WWDT 复位后 MCI_IO_MUX FSEL 位 3 被清除)? Re: RW612: FlexSPI port mixing (CACHE64 write buffer), PMU gates CM33 clock, PSRAM FSEL lost after r 亲爱的@dimush , 谢谢你的更新。 关于问题 2 ,请使用以下参考,引用流程来验证您的 PM2 条目和唤醒配置。进行必要的调整后,请检查是否还能重现该问题。 首先,建立 PM1 基线: PMU 仍位于 PM0 SCR.SLEEPDEEP = 0 执行 WFI 在 PM1 中,任何已启用且有效的中断源都应该唤醒 CM33。 进入 PM2 之前,必须先配置唤醒源的所有必要级别: 启用并配置外设定时器或GPIO中断; 启用相应的NVIC中断; 在 PMU 唤醒掩码中启用相应的 PM2 唤醒源; 确保唤醒源所需的时钟在 PM2 中保持活动状态; 清除所有过期的外围设备中断状态; 编写下一个有效的计时器匹配/比较事件程序。 仅凭待处理的 NVIC 中断并不能证明该源配置为 PM2 唤醒源。PM2 支持定时器、GPIO、FlexSPI、USB、DMA 和以太网等唤醒源。 有据可查的PM2.5转变过程是: PM0 -> PM2: 设置 PMU pwr_mode = 2'b01 执行 WFI 在 PM2 中,CM33 时钟被门控,而 CPU 状态保持不变。AON 域和选定的 PM2 唤醒源保持活动状态。 以下代码仅用于说明操作步骤,请勿直接复制: 配置唤醒源(); 启用外设中断(); 启用 nvic_interrupt(); 启用 pmu_pm2_唤醒源(); 清除外设中断状态(); program_next_timer_event(); /* 进入 PM2 之前,请保持 CPU_CLK_EN 启用 */ 设置 pmu 功率模式(PM2); __DSB(); __ISB(); __WFI(); __ISB(); 对于生产环境的实现,请使用相应 MCUXpresso SDK 版本提供的电源管理单元 API,而不是直接对 PMU 寄存器进行编程。SDK API 名称在不同的 SDK 版本之间可能有所不同。 另外,请在进入 PM2 之前确认 SYSCTL2.SOURCE_CLK_GATE.CPU_CLK_EN 是否仍然启用。不应清除此位以模拟 PM2;CPU 时钟门控应由 PMU 电源模式转换执行。 请在进入 PM2 之前立即记录以下数值: PMU 电源模式 SCB->SCR SYSCTL2.SOURCE_CLK_GATE CPU_CLK_EN PM2唤醒面罩 NVIC启用/待处理状态 定时器使能/状态寄存器 最后,请单独测试 FreeRTOS 的无 WFI 配置: 无注射用水 SCR.SLEEPDEEP = 0 PMU 电源模式仍为 PM0 CPU_CLK_EN = 1 如果 CM33 在这些条件下仍然停止运行,则该行为不应被视为正常的 PM2 转换。那么应该调查这是意外的时钟门操作还是 RW612 PMU/时钟门控硅的问题。 关于问题 3 ,在 WWDT RESET 后,RW612 会通过 Boot ROM 启动流程重新启动: 启动 ROM -> FlexSPI 或非/FCB ->应用程序映像 如果应用程序映像包含 PSRAM 引脚复用配置代码,则应再次执行该代码并使其生效。因此,请确认应用程序代码包含所需的 PSRAM 引脚复用配置。 谢谢! 顺祝商祺! 卫东 Re: RW612: FlexSPI port mixing (CACHE64 write buffer), PMU gates CM33 clock, PSRAM FSEL lost after r 谢谢你,卫东。我们在快速复现板上运行了您要求的 FreeRTOS 无 WFI 测试。在 BoardInit 之后显式设置的条件,并每秒重新检查一次:映像中任何地方都没有 WFI(通过反汇编验证;无滴答空闲关闭),SCB->SCR = 0(SLEEPDEEP = 0,SLEEPONEXIT = 0),PMU PWR_MODE = PM0(PWR_MODE_STATUS = 0),SYSCTL2.SOURCE_CLK_GATE = 0x700100D2(CPU_CLK_EN = 1),WWDT 已禁用。注意:ROM/引导加载程序左侧 SOURCE_CLK_GATE = 0x300000C6,即CPU_CLK_EN = 0,核心正在运行。 结果:CM33 在大约 7 分钟内停止了 3 次(第一次停止是在运行约 6 分钟后)。SysTick 和操作系统定时器间隙检查显示,在我们的调试器连接之前,内核没有前进:第一次停止用了 12.4 秒,然后每次我们连接时都是如此。每次中断的线程都是 lwIP RX 任务,PC 为 0x20002344(SRAM 中的代码)。停止前 1 秒的快照寄存器:PWR_MODE 0,PWR_MODE_STATUS 0,WAKEUP_LEVEL 0x3,WAKEUP_MASK 0x20,WAKEUP_STATUS 0,PM2 掩码 0x0/0x200/0x800000,SCR 0,ICSR 0x00400000,SOURCE_CLK_GATE 0x700100D2,NVIC ISER 0x00010400/0x00040000/0/0x00080000,ISPR3 0x120,SysTick CTRL 0x10007,CLKCTL0 PSCCTL0..2 0x02410E07/0x0E020001/0x8,CLKCTL1 PSCCTL0..2 0x08000D00/0x00010003/0x8000004D。附加后 DHCSR = 0x01100001(运行中)。 按照你的标准,这是一个意外的时钟门,而不是 PM2 转换。还有两点观察:在 LPOSC 上启用 WWDT0 后,FreeRTOS 上更早地没有发生停止(70 分钟内停止)。在 Zephyr 上,一个空闲循环在每次运行中都会读取操作系统计时器的构建版本运行了 91 个板小时而没有停止(预期约为 4 个板小时),我们现在正在隔离这个问题。我们可以附上完整的寄存器转储文件。您建议下一步该怎么做?是否有相关的勘误表? Re: RW612: FlexSPI port mixing (CACHE64 write buffer), PMU gates CM33 clock, PSRAM FSEL lost after r 亲爱的@dimush , 谢谢你的更新。 继续在最低注册级别和 IP 命令级别进行调查可能会让我们走错方向。我们应该采取不同的方法:假设 RW612 和 u-blox W10 模块运行正常,并从 SDK 级别重新开始调查。 您提到您使用的是W10模块。我之前调试过 u-blox W10 EVK。请确认您的模块是否使用 FM25Q128A QSPI 或非 Flash。然后我们可以验证: FCB Flash 定时配置; 运行时查找表配置。 此外,W10 上的 PSRAM 是用户自行添加的。请提供其零件编号和规格。我们还需要验证其查找表配置。   谢谢! 此致, 卫东 Re: RW612: FlexSPI port mixing (CACHE64 write buffer), PMU gates CM33 clock, PSRAM FSEL lost after r 谢谢你,卫东。以下是配置信息;完整的 FCB、运行时寄存器和从运行板读取的 LUT 字都在附件 RW612_FlexSPI_config_dongle_c0.txt 中。 Flash:是的,它是 FM25Q128A - Fidelix,JEDEC ID F8 42 18,16 MB,位于 A1 端口,XIP(我们之前的报告错误地写成了“复旦”)。位于 0x08000400 的 FCB 是 u-blox IRIS-W1“Fidelex 8/16 MB” flash_config.c(基于 FRDM-RW612):readSampleClkSrc 1(DQS 焊盘环回),CS 保持/建立 3/3,sflashPadType 4,serialClkFreq 7(133 MHz 枚举;FRDM-RW612 有 5 = 100 MHz),QE 通过 WRSR 01h 设置为 0x0200,读取序列 EBh 1-4-4,模式字节为 0x00,4 个虚拟周期(LUT 0x0A1804EB 0x32041E00 0x00002604)。ROM 无法读取该部分的 SFDP,因此使用完整的 FCB。 运行时:引导加载程序将 FlexSPI 根设置为 130 MHz;Zephyr 应用程序在 XIP 下保持控制器设置,运行时读取 LUT 与 FCB 相同,我们的 PSRAM 初始化将根分频器设置为 /3。当 MCR0.SERCLKDIV = 1 时,两个端口上的串行时钟约为 43 MHz(测量结果:PSRAM SCLK 为 43 MHz)。MCR0 0xFFFF1110,MCR2 0x200009F7,AHBCR 0x00200078,FLSHA1CR1 0x63。 PSRAM:AP 存储器 APS1604M-3SQR,16 Mbit,2.7-3.6 V(3.3 V 供电),QSPI SDR,无 DQS 引脚(RDQS 下拉),3.3 V 时最大频率为 109 MHz,tCEM 为 8 μs。端口 B1:2 MB,CS 保持/建立 3/3,数据有效时间 1,写掩码关闭。LUT 读取 EBh 1-4-4,使用 6 个虚拟周期 (0x0A1804EB 0x26043206),写入 38h 1-4-4 (0x0A180438 0x00002200),重置 66h/99h。它只能通过位于 0x39000000 的系统总线访问,CACHE64_CTRL1;XIP 使用代码总线,CACHE64_CTRL0.ENWRBUF = 0。在此配置下,使用示波器测量 PSRAM:SCK 43 MHz,CE# 低脉冲长达 19 微秒(APS1604M tCEM 为 8 微秒)。 端口 B 采样与 FRDM-RW612 参考值匹配(两个端口均为 DQS 焊盘环回,RX_CLK_SRC_DIFF = 0)。 关于核心停止:在 Zephyr 上,即使使用您的故障排除设置(CTRL1 写入缓冲区关闭,预取关闭),也会出现这种情况。我们目前的两个版本——一个带有跟踪钩子但没有空闲钩子,另一个的空闲循环读取操作系统计时器——运行了大约 50 个板小时而没有停止(预计大约 2 个板小时)。 Re: RW612: FlexSPI port mixing (CACHE64 write buffer), PMU gates CM33 clock, PSRAM FSEL lost after r 亲爱的@dimush , 谢谢你的更新。 附件包含 FCB 配置文件、flash_config.c/.h、运行时 LUT 和 mflash_drv.c/.h。 请先备份您的原始文件,然后再用我分享的文件替换它们。 我的一个客户之前在定制板上遇到了 BLE 固件相关的问题,所以我调查并调整了 FM25Q128A 的 LUT。附件中的文件来自已验证的配置,可用于对比。 为了缩小调试范围,我建议暂时将 Zephyr 放在一边,并使用 FreeRTOS SDK 示例重现该问题。我担心上游 Zephyr 可能无法完全支持所有 RW612 功能或配置。 另外,您能否告知我您提到的这三个问题是否也能在 FRDM-RW612 板上重现? 谢谢! 顺祝商祺! 卫东 Re: RW612: FlexSPI port mixing (CACHE64 write buffer), PMU gates CM33 clock, PSRAM FSEL lost after r 谢谢魏东提供的FM25Q128A文件。我们进行了比较,并按照您的建议进行了测试,包括在 FRDM-RW612 上进行的测试。 FCB/LUT 对比:您的 flash_config.c 与我们板上的 FCB 完全相同,只是 deviceModeType 不同(您的是 kDeviceConfigCmdType_QuadEnable,我们的是 Generic);serialClkFreq 7、readSampleClkSrc 1、CS 3/3、QE 通过 WRSR 01h 0x0200 以及 EBh 读取序列也相同。您的 mflash_drv.c 与我们(冻结的)FreeRTOS 固件中的驱动程序有三处不同:EBh 模式字节 0x00(我们的 0xF0),四页程序 33h 1-4-4(我们的 32h 1-1-4),以及 WRSR 为 2 个字节(我们的 4 个字节)。我们的产品固件是 Zephyr,它使用自己的 或非 驱动程序;只有 FCB 是共享的。 FRDM-RW612,SDK 25.06.00 lwip_ping FreeRTOS 示例,FRDM 板文件未更改,以太网负载来自 PC(通过 lwip_rx 每秒约 4000 次 ENET RX 中断:TCP ~8.7 Mbit/s,UDP,ping 1400 B): - 问题 2(任何地方都没有 WFI - 在反汇编中检查过,SCR = 0,PM0,CPU_CLK_EN = 1,WWDT 关闭):111 分钟内 0 个核心停止。在我们的板上,同样的配置在大约 7 分钟内停止了 3 次。 - 问题 1(通过代码总线窗口的 PSRAM,不可缓存,CACHE64_CTRL0 写入缓冲区开与关):每次 36 分钟内出现 0 次不匹配(在写入缓冲区开启的运行中写入了约 4e9 个 PSRAM 字)。我们的电路板上,启用缓冲功能后,大约 115 分钟内出现 9 次故障。 因此,使用 SDK 示例在 FRDM-RW612 上不会重现这两个问题。FRDM 运行没有 mbedTLS/ELS/PKC、TRNG 或 HTTPS 加载,以及其他闪存/PSRAM 部分。 为了让 SDK 示例在 FRDM-RW612 上运行,我们做了以下四项更改: 1. app.h 使用 KSZ8081 的 MDIO 地址 2;此板上的 PHY 在地址 1 处响应(“无法初始化 PHY”,然后挂起)。 2. 示例中没有对 OS 定时器进行时钟控制;第一次读取 OSTIMER 会导致总线挂起。 3. 从 XIP 调用 BOARD_InitPsRam() 会导致内核挂起:当代码从同一个 FlexSPI 运行时,FLEXSPI_SetFlashConfig() 设置了 MCR0.MDIS。我们不得不从SRAM运行它,并且屏蔽了中断。 4. 使用 SDK FlexSPI 设置(未设置 AHB 对齐,130 MHz 根),2 KB PSRAM 读取回读在 1 KB 页边界处(数据来自低 1 KB 处)出错,与 CTRL0 写入缓冲区无关。AHBCR 对齐 512 B 加上写入后清除 AHB RX 缓冲区将其移除。 我们的板,问题 1 / PSRAM 完整性:在预取开启且有 256 B AHB RX 缓冲区的情况下,APS1604M 上的 CE# 低电平持续时间最长为 19 微秒(SCK 43 MHz 时测量;tCEM 为 8 微秒)。我们将 SCK 改为 65 MHz(根 /2,SERCLKDIV /2),为系统总线主控(主控 1,PSRAM 窗口位于 0x39000000)分配了 64 B 的 AHB RX 缓冲区(无预取)(XIP 保留缓冲区 6,256 B,有预取),并将端口 B 上的 CSINTERVAL 设置为 3:CE# 低电平现在最多为 1.4 微秒(测量值)。一块运行频率为 43 MHz 的板在运行 76 小时后,PSRAM 中的 TLS 堆出现损坏(这是第三次发生此类事件);而运行频率为 65 MHz 的板到目前为止已经运行了大约 80 个板小时,没有出现这种情况。 我们的板,关于 Zephyr 的第 2 号问题:如果不做任何更改,核心大约每 22 个板小时就会停止一次。两个构建版本一起运行了大约 150 个板小时而没有停止(预计大约 7 个板小时):一个版本在每次上下文切换和中断时都使用了 Zephyr 跟踪钩子,另一个版本的空闲循环在每次循环中只增加了对操作系统定时器计数器的读取(两个版本都没有 WFI)。这表明,当空闲循环使外设总线保持静默时,核心时钟会被门控,在 PM0 中没有 WFI。 至此,我们的调查就完成了:使用 SCK 65 MHz 和单独的短 PSRAM AHB 缓冲区,PSRAM 是干净的,空闲循环定时器读取保持内核运行。非常感谢您的支持,以及对 FM25Q128A 配置的验证。
View full article