Multi Source Translation Content

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

Multi Source Translation Content

Discussions

Sort by:
FAQs – NXP TJA1445, TJA1446, TJA1465 and TJA1466 CAN Transceivers with Partial Networking Introduction This document summarizes the most common customer questions regarding the NXP TJA1445, TJA1446, TJA1465 and TJA1466 CAN transceivers. It is intended as a practical guide covering basic product selection, partial networking, wake-up behavior, low-power operation, and key implementation considerations. 1) What are the TJA1445, TJA1446, TJA1465 and TJA1466 devices? They are high-speed CAN transceivers that provide the physical interface between a CAN/CAN FD controller and the two-wire CAN bus. All four devices support partial networking via selective wake-up, enabling low-power ECU operation while still allowing wake-up by a valid bus event or local wake input. 2) What is the main difference between the 1445/1446 and 1465/1466 families? The TJA1445/TJA1446 are high-speed CAN FD transceivers, while the TJA1465/TJA1466 are CAN SIC transceivers with Signal Improvement Capability, which reduces ringing and enables reliable communication in more complex topologies and at higher CAN FD speeds. The TJA1465/TJA1466 can support CAN FD up to 8 Mbit/s, whereas the TJA1445/TJA1446 target up to 5 Mbit/s CAN FD. 3) What is the difference between TJA1445 and TJA1446? Both support CAN FD and partial networking, but the TJA1446 adds advanced system monitoring features such as a Q&A watchdog, RST_N, LIMPFSO_N, and accurate VIO undervoltage/overvoltage monitoring. The TJA1445 does not include these monitoring and safety interface features. 4) What is the difference between TJA1465 and TJA1466? Both devices support CAN SIC, partial networking, and CAN FD/XL passive behavior, but the TJA1466 additionally integrates the watchdog, VIO monitoring, RST_N, and LIMPFSO_N fail-safe/limp-home support. The TJA1465 is the simpler CAN SIC partial networking transceiver without these advanced monitoring functions. 5) What is Partial Networking (PN), and why is it useful? Partial Networking allows ECUs that are not needed to remain in low-power mode while selected ECUs remain active on the bus. A sleeping node can be woken by a local wake event or by a remote selective wake-up frame containing the ECU-specific CAN identifier. This reduces vehicle power consumption and is especially useful for modern vehicles and EVs. 6) What is selective wake-up? Selective wake-up is the PN feature in which the transceiver does not wake up on arbitrary CAN traffic, but only on a valid wake-up frame matching the configured identifier, and optionally also matching DLC and data mask conditions. This helps keep undesired ECUs asleep even while other CAN messages are present on the bus. 7) What is the difference between CAN wake-up pattern (WUP) and wake-up frame (WUF)? A Wake-Up Pattern (WUP) is a low-level CAN bus pattern used to activate biasing and trigger wake-up when selective wake-up is not active. A Wake-Up Frame (WUF) is a valid CAN frame checked by the PN filter and used for selective wake-up when PN is configured and enabled. 😎 Which device should I choose for 8 Mbit/s CAN FD or more demanding network topologies? For higher CAN FD speeds and more challenging topologies, the TJA1465/TJA1466 are the preferred options because they include Signal Improvement Capability, which significantly reduces signal ringing and enables reliable operation up to 8 Mbit/s CAN FD. 9) Which VIO voltages are supported? The TJA1445/TJA1465 support interfacing with 1.8 V, 3.3 V, and 5 V MCUs. The TJA1446/TJA1466 are offered as dedicated variants: A = 1.8 V, B = 3.3 V, and C = 5 V-oriented / higher-voltage VIO variants. The 1446/1466 variant must be chosen to match the target MCU I/O level. 10) What supply pins do these transceivers use? They use three main supply pins: VBAT, VCC, and VIO. VBAT is the main supply and must be present in all operating modes, VCC supplies the CAN transmitter and biasing, and VIO supplies the digital interface level adaptation to the MCU. 11) What operating modes are available? The devices support Normal, ListenOnly, Standby, and Sleep modes. In Normal, the node can transmit and receive. In ListenOnly, the receiver is active but the transmitter is disabled. Standby is the first-level low-power mode with INH active, and Sleep is the deeper low-power mode with INH inactive. 12) What is the purpose of ListenOnly mode? ListenOnly mode is intended for node diagnosis, failure containment, and pretended networking use cases. In this mode the device can receive CAN traffic but does not actively transmit onto the bus. In low-power ListenOnly configurations, the receiver can remain active while minimizing current consumption. 13) How is local wake-up performed? Local wake-up is performed through the WAKE pin, which can be configured to detect rising and/or falling edges. A local wake-up request is registered when the new WAKE level remains stable for at least the configured wake filter time. 14) What are typical WAKE pin application examples? Typical examples include a switch to ground, connection to an ignition signal, or using the INH output of another transceiver as the wake source. We also provide design guidance for ESD protection and resistor/capacitor selection in these WAKE circuits. 15) What is the INH pin used for? The INH output is used to control external regulators or high-side enable logic so that the MCU and related circuitry can be automatically powered down in low-power modes and re-enabled on wake-up. In Sleep mode, it allows the transceiver to keep wake-up capability while the rest of the ECU is powered down. 16) How is selective wake-up configured? Selective wake-up is configured via SPI by programming the PN ID registers, ID mask, frame control, and data rate/filter registers. If data-field-based wake-up is needed, the DLC and data mask registers are also configured. The configuration becomes active after setting CPNC = 1 and PNCOK = 1. 17) What happens if I change a PN register after configuration? When the content of any PN-related register is changed, PNCOK is automatically cleared, and it must be set again to load and activate the updated PN configuration. 18) Can the device wake on identifier only, or also on data? Both are possible. The devices support identifier-only filtering when PNDM = 0, and identifier + DLC + data mask filtering when PNDM = 1. With data mask filtering, the wake-up decision also depends on the configured DLC and data mask bits. 19) Can Remote frames be used for selective wake-up? If PNDM = 1 and the selective wake-up checks the data field, Remote frames are not supported because they do not carry data. If Remote frames need to be able to trigger wake-up, identifier-only filtering should be used instead PNDM = 0. 20) How many MCU pins are needed to interface these devices? For the TJA1445/TJA1465, typically six MCU pins are needed: four SPI pins plus TXD and RXD. For the TJA1446/TJA1466, typically seven MCU pins are needed because the RST_N pin should also be connected to the MCU. 21) Are the SPI pins shareable with other peripherals? Yes. SCK, SDI, and SDO may be shared with other devices, but the transceiver requires its own dedicated SCSN chip-select. Daisy-chain SPI connections are not supported. 22) What are the GPIO pins used for? On the TJA1445B/TJA1465B, three GPIOs are available, and on the TJA1446/TJA1466, two GPIOs are available. They can be configured for general-purpose I/O and various special functions, including additional TXD/RXD, status signaling, wake-up input behavior, and other remote I/O style uses. 23) Can one transceiver be connected to two CAN controllers? Yes. GPIO1/2 can be configured as RXD2/TXD2, allowing a second CAN controller in the MCU to connect to the same transceiver. 24) What is TXEN_N and how does it behave? On the TJA1445B/TJA1465B, TXEN_N is the transmitter enable/disable control. A HIGH level on TXEN_N disables the CAN transmitter. In low-power modes, special care is needed so that the pin does not unnecessarily increase quiescent current if VIO remains present. 25) What extra features do TJA1446/TJA1466 provide for safety and system monitoring? The TJA1446/TJA1466 provide a Q&A watchdog, RST_N, LIMPFSO_N, and VIO undervoltage/overvoltage monitoring. They can supervise the MCU, detect fault conditions, trigger system reset, and support limp-home or fail-safe strategies in the ECU. 26) What is LIMPFSO_N used for? LIMPFSO_N can be configured either as a limp-home output or as a fail-safe output, depending on the system safety concept. In a limp-home application, it can activate backup hardware in case of failure. In a fail-safe application, it can keep safety-relevant hardware disabled until correct system operation is confirmed. 27) What is RST_N used for on TJA1446/TJA1466? RST_N is a bidirectional active-low reset pin used both to reset the MCU in response to transceiver-detected failures and to allow the transceiver to detect reset-related fault conditions from the system side. It should be connected to the MCU reset input. 28) What ESD robustness is specified on CANH and CANL? The quick reference data in the datasheets specifies ±8 kV IEC 61000-4-2 ESD handling capability on CANH and CANL. External protection components can still be considered if required by the application environment. 29) Is there any timing requirement for the first SPI access after power-up or wake-up? Yes. For the TJA1445/TJA1465 family, the first SPI interaction should occur within the MCU reaction timeout after power-up or wake-up from Sleep; otherwise the device may automatically enter Sleep mode with wake-up sources enabled. This mechanism helps limit battery drain if the MCU fails to initialize correctly. 30) Are there any common pitfalls when entering Sleep mode? Yes. Before entering Sleep, the required wake-up sources must be enabled and pending wake-up interrupts should be cleared. The transceiver will not enter Sleep unless at least one main wake-up source is enabled and all wake-up interrupts are cleared. 31) Can these devices support in-system MCU flashing through the CAN bus? Yes. The datasheets describe Start-to-Normal (SNM) behavior, which allows the device to enter Normal mode directly after boot if the CAN bus is held dominant before the internal check completes. This can support generic bootloader or end-of-line flashing use cases. 32) Are these devices safety-oriented parts? Yes. All four families were developed in compliance with ISO 26262 and achieve ASIL B. The TJA1446/TJA1466 go further with advanced monitoring and fail-safe-oriented interfacing. 33) Which packages are available? The TJA1445A/TJA1465A are available in SO14 and HVSON14, while the B variants are available in DHVQFN18. The TJA1446/TJA1466 are available in DHVQFN18. 34) Where can I find example initialization and SPI command guidance? For practical implementation guidance, we provide AN14388 for TJA1445/TJA1465 and AN14452 for TJA1446/TJA1466. These application notes include SPI usage guidance, initialization considerations, PN setup recommendations, WAKE pin examples, GPIO usage examples, and low-power mode handling. 35) In one sentence, when should I choose each family? Choose TJA1445 for CAN FD + PN, TJA1446 for CAN FD + PN + advanced system monitoring, TJA1465 for CAN SIC + PN + higher-speed or more demanding networks, and TJA1466 when you need CAN SIC plus advanced monitoring and safety-oriented system supervision. CAN PHY Transceiver
View full article
#FRDM-IMX93 #YOCTO I recently purchased an FRDM iMX93 development board. I followed the instructions at https://www.nxp.com/document/guide/getting-started-with-frdm-imx93:GS-FRDM-IMX93?_gl=1*zkk08q*_ga* MTUyMTQ0MDk5NS4xNzgwNTY1MTg4*_ga_WM5LE0KMSH*czE3ODA2Mzk2ODgkbzQkZzEkdDE3ODA2NDAzMDgkajQwJGwwJGg1MzYwMjA4MTc.&section=build-and-run When following the tutorial and running the command “$ bitbake imx-image-full”, the following error appears. How can I resolve this? Thank you! ERROR: linux-imx-headers-6.6-r0 do_fetch: Fetcher failure: Fetch command export PSEUDO_DISABLED=1; export DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/998/bus"; export PATH="/home/yejx/imx93/frdm-imx93/tmp/sysroots-uninative/x86_64-linux/usr/bin:/home/yejx/imx93/sources/poky/scripts:/home/yejx/imx93/frdm-imx93/tmp/work/armv8a-mx93-poky-linux/linux-imx-headers/6.6/recipe-sysroot-native/usr/bin/aarch64-poky-linux:/home/yejx/imx93/frdm-imx93/tmp/work/armv8a-mx93-poky-linux/linux-imx-headers/6.6/recipe-sysroot/usr/bin/crossscripts:/home/yejx/imx93/frdm-imx93/tmp/work/armv8a-mx93-poky-linux/linux-imx-headers/6.6/recipe-sysroot-native/usr/sbin:/home/yejx/imx93/frdm-imx93/tmp/work/armv8a-mx93-poky-linux/linux-imx-headers/6.6/recipe-sysroot-native/usr/bin:/home/yejx/imx93/frdm-imx93/tmp/work/armv8a-mx93-poky-linux/linux-imx-headers/6.6/recipe-sysroot-native/sbin:/home/yejx/imx93/frdm-imx93/tmp/work/armv8a-mx93-poky-linux/linux-imx-headers/6.6/recipe-sysroot-native/bin:/home/yejx/imx93/sources/poky/bitbake/bin:/home/yejx/imx93/frdm-imx93/tmp/hosttools"; export HOME="/home/yejx"; LANG=C git -c gc.autoDetach=false -c core.pager=cat -c safe.bareRepository=all clone --bare --mirror https://github.com/nxp-imx/linux-imx.git /home/yejx/imx93/downloads//git2/github.com.nxp-imx.linux-imx.git --progress failed with exit code 128, see logfile for output ERROR: linux-imx-headers-6.6-r0 do_fetch: Bitbake Fetcher Error: FetchError('Unable to fetch URL from any source.', 'git://github.com/nxp-imx/linux-imx.git;protocol=https;branch=lf-6.6.y') ERROR: Logfile of failure stored in: /home/yejx/imx93/frdm-imx93/tmp/work/armv8a-mx93-poky-linux/linux-imx-headers/6.6/temp/log.do_fetch.2202373 ERROR: Task (/home/yejx/imx93/sources/meta-imx/meta-imx-bsp/recipes-kernel/linux/linux-imx-headers_6.6.bb:do_fetch) failed with exit code '1' NOTE: Tasks Summary: Attempted 3099 tasks of which 1313 didn't need to be rerun and 9 failed. Summary: 9 tasks failed: /home/yejx/imx93/sources/meta-imx/meta-imx-bsp/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.24.0.imx.bb:do_fetch /home/yejx/imx93/sources/meta-imx/meta-imx-ml/recipes-nnstreamer/nnstreamer/nnstreamer_2.2.0.bb:do_fetch virtual:native:/home/yejx/imx93/sources/meta-imx/meta-imx-ml/recipes-libraries/tensorflow-lite/tensorflow-lite-host-tools_2.16.2.bb:do_fetch /home/yejx/imx93/sources/meta-imx/meta-imx-bsp/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.24.0.imx.bb:do_fetch /home/yejx/imx93/sources/meta-freescale-distro/recipes-graphics/imx-gpu-sdk/libxdg-shell.bb:do_fetch /home/yejx/imx93/sources/meta-imx/meta-imx-bsp/recipes-kernel/linux/linux-imx_6.6.bb:do_fetch /home/yejx/imx93/sources/meta-imx/meta-imx-bsp/recipes-bsp/imx-atf/imx-atf_2.10.bb:do_fetch /home/yejx/imx93/sources/meta-imx/meta-imx-bsp/recipes-bsp/imx-secure-enclave/imx-secure-enclave_git.bb:do_fetch /home/yejx/imx93/sources/meta-imx/meta-imx-bsp/recipes-kernel/linux/linux-imx-headers_6.6.bb:do_fetch Summary: There were 30 WARNING messages. Summary: There were 18 ERROR messages, returning a non-zero exit code. Re: #FRDM-IMX93 #YOCTO Hi, Thank you for your interest in NXP Semiconductor products, Bitbake do_fetch errors can be related to network and proxy configurations on every host and fetch tools. 1. Install host packages from 3.2 Host packages  2. Confirm Proxy and firewall blocking configuration, look for TLS/SSL issues as well, 3. Review https://medium.com/@pitchaimuthu321/common-yocto-build-failures-and-how-to-fix-them-embedded-bsp-debugging-guide-fcd20e133add  Try again with: $ bitbake -c cleansstate imx-image-full $ bitbake imx-image-full Regards
View full article
Unable to measure 1PPS signal on J12 pin of LS1028A evaluation board? After booting the development board, I enabled PPS output using the command echo 1 > /sys/class/ptp/ptp0/pps_enable. Then, by running cat /sys/class/pps/pps0/assert, I can see the timestamp incrementing. However, I cannot capture the PPS signal on the 1588_PULSE_OUT2 pin. I searched for similar issues in the forum and then modified the device tree by referring to the devicetree/bindings/ptp/ptp-qoriq.txt document. The steps are as follows: First, I obtained the clock value for QORIQ_CLK_HWACCEL 3 on the board using the following command. The value is 400 MHz: root@ls1028ardb:# find /sys/kernel/debug/clk -name "clk_summary" -exec cat {} ; | grep -i hwaccel cg-hwaccel3 0 0 0 400000000 0 0 50000 Y deviceless no_connection_id cg-hwaccel0 0 0 0 400000000 0 0 50000 Y deviceless no_connection_id cg-hwaccel2 0 0 0 600000000 0 0 50000 Y f200000.display clk_core cg-hwaccel1 0 0 0 1200000000 0 0 50000 Y deviceless no_connection_id So I modified the device tree file fsl-ls1028a.dtsi as follows: ethernet@0,4 { compatible = "pci1957,ee02", "fsl,enetc-ptp"; reg = <0x000400 0 0 0 0>; clocks = <&clockgen QORIQ_CLK_HWACCEL 3>; little-endian; fsl,extts-fifo; // The following lines are newly added fsl,cksel = <1>; fsl,tclk-period = <10>; fsl,tmr-prsc = <100>; fsl,tmr-add = <0x40000000>; fsl,tmr-fiper1 = <0x3B9AC9F6>; fsl,max-adj = <2999999999>; }; After booting, the modified node entries are visible: root@ls1028ardb:~# ls /sys/class/ptp/ptp0/device/of_node/ clocks compatible fsl,cksel fsl,extts-fifo fsl,max-adj fsl,tclk-period fsl,tmr-add fsl,tmr-fiper1 fsl,tmr-prsc little-endian name reg Even after these modifications, I still cannot capture the signal correctly. Therefore, I checked the RCW values. The detailed log is as follows: Reset Configuration Word (RCW): 00000000: 3c004010 00000030 00000000 00000000 00000010: 00000000 018f0000 0030c000 00000000 00000020: 020031a0 00002580 00000000 00003296 00000030: 00000000 00000010 00000000 00000000 00000040: 00000000 00000000 00000000 00000000 00000050: 00000000 00000000 00000000 00000000 00000060: 00000000 00000000 200e705a 00000000 00000070: bb580000 00000000 In the LS1028ARDBRM.pdf document, I found that for 1PPS output, the EC1_SAI4_5_PMUX[835:833] field must be set to 101. The word address is the 32-bit word at offset 0x68 (word 26), with value 0x200e705a. Extracting this field: shift right by 1 and mask lower 3 bits: (0x200e705a >> 1) & 0x7 = 0x5, which is binary 101 – so that is also correct. However, I still cannot capture the signal. I would like to know whether my device tree configuration is incorrect, or if there might be other hardware limitations. I have attached the ptp-qoriq.txt, LS1028ARDBRM.pdf, and the oscilloscope capture for reference. Re: Unable to measure 1PPS signal on J12 pin of LS1028A evaluation board? I performed a loopback test with the following commands and got no signal. It is indeed possible that the CPLD is not routing the signal correctly. root@ls1028ardb:~# find /sys/kernel/debug/ -name fiper1-loopback /sys/kernel/debug/0000:00:00.4/fiper1-loopback root@ls1028ardb:~# echo 1 > /sys/kernel/debug/0000:00:00.4/fiper1-loopback root@ls1028ardb:~# cat /sys/class/ptp/ptp0/fifo root@ls1028ardb:~# cat /sys/class/ptp/ptp0/fifo root@ls1028ardb:~# cat /sys/class/ptp/ptp0/fifo The CPLD software version I am using is LS1028ARDB_HDL_2020_0330_1829_V8. Is additional programming required? Or is there an issue with this version? As for the routing problem, I will have our hardware team check it. Re: Unable to measure 1PPS signal on J12 pin of LS1028A evaluation board? Hello, The documentation supports that LS1028A can output PPS on LS1028ARDB J12, but your symptom most likely points to missing board RCW/CPLD mux routing or incomplete external FIPER pin programming rather than a lack of PPS support. Regards 回复: Unable to measure 1PPS signal on J12 pin of LS1028A evaluation board? This was caused by the pulse width being set too small and the oscilloscope used failing to capture it.
View full article
2S TDM 主设备:在连续 DMA 数据流期间持续向下移动 1 个插槽 1.测试配置 I2S 配置为TDM 主站,DSP 模式,短 WS 每帧 8 个插槽,每个插槽 32 位,帧长 = 256 位 使用fsl_i2s_dma驱动程序 双缓冲器乒乓传输 FreeRTOS 任务等待来自 DMA 回调的信号,填满缓冲区,然后调用 I2S_TxTransferSendDMA 重新提交。 测试数据模式:固定 0x000Axxxx(高 16 位 = 0x000A,低 16 位包含插槽索引和采样序列号) 2.持续的单槽下移(100% 可复制) 逻辑分析器捕获显示: 传输的数据始终向下移动整整一个时隙 插槽 0的数据出现在插槽 1的物理位置上 插槽 1的数据出现在插槽 2的物理位置上 推而广之,原本用于插槽 7的数据会出现在下一帧的插槽 0中(或丢失)。 该偏移在数据流启动后保持稳定,不会随着时间的推移而进一步漂移,并保持固定的 1 个槽位偏移量 3.启动数据错位(间歇性) 逻辑分析仪偶尔会观察到 在 WS 帧同步脉冲之后,数据线在一段时间内保持在低电平(全部为零) 空白 1~3 帧后,突然出现有效测试数据 一旦空白间隔结束,数据仍会显示第 2 项所述的 第 2 项所述的 1 个槽偏移 音频(PDM | I2S | SAI) Re: 2S TDM Master: Persistent 1-slot downward shift during continuous DMA streaming 你好@Xanderwangx、 感谢您的来信。你能告诉我们你使用的是哪款恩智浦微控制器吗?另外,你在使用我们的评估板还是定制板?您使用的是 SDK 示例代码,还是基于自己的实现?如果这是您自己的代码,您能否与我们分享以作进一步分析? BR 西莱斯特 Re: 2S TDM Master: Persistent 1-slot downward shift during continuous DMA streaming 你好@Xanderwangx、 谢谢您的答复。但是,RT 系列不在我的支持范围内。我主要支持 MCX 和 Kinetis 系列。另外,这是MCX频道,不适用于RT产品。 你能在 i.MX RT 跨界 MCU - NXP 社区 下写一篇新文章吗?RT 支持团队将能为您提供帮助。 BR 西莱斯特 Re: 2S TDM Master: Persistent 1-slot downward shift during continuous DMA streaming MCU :MIMXRT685-EVK (i.MX RT685) 主板 :基于 RT685 的定制产品板。 我正在使用 带有乒乓缓冲区的 循环 DMA 模式 。 DMA 使用 2 个描述符配置 i2s_transferSendLoopdMA ()。在 DMA 回调中,我填充下一个缓冲区,循环自动继续。 void I2S1_TDM_Init(void) { I2S_Type *base = I2S1; /* I2S Configuration */ i2s_config_t cfg; I2S_TxGetDefaultConfig(&cfg); cfg.masterSlave = kI2S_MasterSlaveNormalMaster; cfg.mode = kI2S_ModeDspWsShort; /* TDM = DSP mode */ cfg.divider = 24576000 / (TDM_SAMPLE_RATE * TDM_SLOT_NUM * TDM_SLOT_WIDTH); cfg.dataLength = TDM_SLOT_WIDTH; /* 32-bit */ cfg.frameLength = TDM_FRAME_LENGTH; /* 256-bit */ cfg.oneChannel = false; cfg.position = 0; cfg.wsPol = true; /* DSP A or B */ I2S_TxInit(base, &cfg); /* Enable 8 slots (Primary + 3 Secondary Channels) */ /* Note: Using 4 channels to cover 8 slots with 32-bit data */ I2S_EnableSecondaryChannel(base, kI2S_SecondaryChannel1, false, 32 * 2); I2S_EnableSecondaryChannel(base, kI2S_SecondaryChannel2, false, 32 * 4); I2S_EnableSecondaryChannel(base, kI2S_SecondaryChannel3, false, 32 * 6); /* DMA Loop Transfer Setup */ DMA_Init(DMA0); DMA_EnableChannel(DMA0, I2S_TX_DMA_CH); DMA_SetChannelPriority(DMA0, I2S_TX_DMA_CH, kDMA_ChannelPriority3); DMA_CreateHandle(&dma_handle, DMA0, I2S_TX_DMA_CH); I2S_TxTransferCreateHandleDMA(base, &i2s_handle, &dma_handle, I2S1_Callback, tdm_xfer); I2S_TransferInstallLoopDMADescriptorMemory(&i2s_handle, tdm_desc, 2); if (I2S_TransferSendLoopDMA(base, &i2s_handle, &tdm_xfer[0], 2) != kStatus_Success) { while (1); /* Fails if TDM_FRAMES * 8 > DMA_MAX_TRANSFER_COUNT(1024) */ } } 插槽偏移量在电源循环之间是随机的,并非固定值。我之前还尝试过在 DMA 传输前后禁用中断以强制同步,但插槽错位的问题仍然存在。 在 RT685 上,I2S_TransferSendLoopDMA() 是否保证 DMA 启动时对齐到帧边界?如果不行,该如何强制对齐到 WS 边界? i.MX-RT600 
View full article
S32K3 LPSPIに関する質問 NXPのエキスパートの皆様へ: GPIOピンを使用してLPSPIチップセレクト(CS)を手動で制御する場合、S32DS設定ツールのSpiCsPolarity設定は依然として影響しますか?ツールでPCS(周辺チップセレクト)の選択を無効にする必要がありますか?また、SpiHostRequestパラメータの目的は何ですか? Re: S32K3 LPSPI pcs question こんにちは、 @focusdoit GPIOピンを使用してLPSPIチップセレクト(CS)を手動で制御する場合、S32DS設定ツールのSpiCsPolarity設定は依然として影響しますか? いいえ、動作には影響しないはずです。 チップセレクトとしてGPIOを使用する場合は、その制御はユーザーの責任となります。SpiCsPolarityパラメータは、LPSPI周辺機器によって管理されるハードウェア制御のCSに適用され、GPIO制御信号には適用されません。 ツールでPCS(周辺チップセレクト)の選択を無効にする必要がありますか? ConfigToolsで低レベルドライバ(IP)を使用する場合は、目的のピンをGPIOとして設定するだけでよく、PCSピンを設定する必要はありません。 高レベルドライバ(MCAL)の場合、ピンをGPIOとして設定することに加えて、SpiCsSelectionというパラメータがあります。このパラメータはCS_VIA_GPIOに設定する必要があります。この**CASE**、ドライバは通知(SpiJobStartNotificationノードとSpiJobEndNotificationノードで定義)を使用して、各SPIジョブのGPIOを介してCSピンを制御します。 また、SpiHostRequestパラメータの目的は何ですか? マスターモードでは、このパラメータにより、LPSPIモジュールはホストからの要求入力がアサートされた場合にのみ、新しいSPI転送を開始できます。LPSPIがビジー状態の場合、ホストからの要求入力は無視されます。 スレーブモードでは、送信可能なデータが利用可能になったときに、HREQ出力ピンがアサート状態になります。 BR、VaneB
View full article
LINが通信のスレーブとして動作する場合の切断の問題 こんにちは。LPUART1をLINスレーブデバイスとして使用すると、一定時間後に通信が途切れてしまいます。この時点では、データの受信と送信は不可能です。受信したフレーム数をカウントするためにカウンターを使用しました。接続が中断されるたびに、カウンターの値は異なっていた。中断するまでに700フレーム以上かかる場合もあれば、3000フレームかかる場合もあった。以下の図は、割り込み発生後のLPUART1のレジスタ値を示しています。レジスタのどこに問題があるのか分析するのを手伝ってください。ご協力ありがとうございました。 Re: The problem of disconnection when LIN acts as a slave for communication こんにちは、 @Aoyng さん。 このトピックに関する以下のスレッドに返信しました。 https://community.nxp.com/t5/S32K/The-S32K314-uses-the-LPUART-to-configure-as-a-LIN-slave/mp/2365972/highlight/false#M58611 https://community.nxp.com/t5/S32K/The-LIN-communication-issue-using-the-FS6500-chip/mp/2366021/highlight/false#M58615 よろしくお願いいたします。 ダニエル Re: The problem of disconnection when LIN acts as a slave for communication LINのボーレートを変更して、その違いを確認してみましたか?
View full article
Errata ERR053404: Use Cases for Different Message Buffer Configurations This article discusses the different use cases and configuration of the errata "ERR053404: FlexCAN: Message Buffer (MB) and Enhanced RX FIFO Filter Element (ERFFEL) Memory Corruption". The errata is impacting Messabe Buffers (MB) and Enhanced RX FIFO Filter Elements (ERFFEL), the impact of each MB or ERFFEL depends on the configuration of the payload buffer, MB and/or ERFFEL. In this post, we plan to provide some examples of such configuration and impact on the FlexCAN IP.  Taking a 64-byte payload as an example, the following configurations illustrate the trade-off between the number of Message Buffers (MBs) and acceptance filters: /* ERR053404: This errata explains affected words depends on MB payload size, this example applies for MB configured for 64-byte payload */ #define BYTES_IN_MB kFLEXCAN_64BperMB FLEXCAN_FDInit(EXAMPLE_CAN, &flexcanConfig, EXAMPLE_CAN_CLK_FREQ, BYTES_IN_MB, true); 1. MB0 is not used, MB1 is used. In this configuration, ERFFEL[0–29] can be fully utilized as acceptance filters, while MB1–MB6 are available as Message Buffers, maximum ERFCR[NFE] is 14. The following code can be used as reference for the driver configuration for this case.  /* Config fifo filters to make it accept STD frame with ID 0x123 ~ 0x140. Used ERFFEL[0–29], ERFCR[NFE]=14 */ uint32_t rxEnFifoFilter[] = {FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(0x123, 0, 0x3F, 0), FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(0x124, 0, 0x3F, 0), FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(0x125, 0, 0x3F, 0), FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(0x126, 0, 0x3F, 0), FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(0x127, 0, 0x3F, 0), FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(0x128, 0, 0x3F, 0), FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(0x129, 0, 0x3F, 0), FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(0x12A, 0, 0x3F, 0), FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(0x12B, 0, 0x3F, 0), FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(0x12C, 0, 0x3F, 0), FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(0x12D, 0, 0x3F, 0), FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(0x12E, 0, 0x3F, 0), FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(0x12F, 0, 0x3F, 0), FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(0x130, 0, 0x3F, 0), FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(0x131, 0, 0x3F, 0), FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(0x132, 0, 0x3F, 0), FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(0x133, 0, 0x3F, 0), FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(0x134, 0, 0x3F, 0), FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(0x135, 0, 0x3F, 0), FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(0x136, 0, 0x3F, 0), FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(0x137, 0, 0x3F, 0), FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(0x138, 0, 0x3F, 0), FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(0x139, 0, 0x3F, 0), FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(0x13A, 0, 0x3F, 0), FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(0x13B, 0, 0x3F, 0), FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(0x13C, 0, 0x3F, 0), FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(0x13D, 0, 0x3F, 0), FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(0x13E, 0, 0x3F, 0), FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(0x13F, 0, 0x3F, 0), FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(0x140, 0, 0x3F, 0)}; flexcan_enhanced_rx_fifo_config_t rxEhFifoConfig; flexcan_rx_mb_config_t mbConfig; /* Setup Enhanced Rx FIFO. */ rxEhFifoConfig.idFilterTable = rxEnFifoFilter; rxEhFifoConfig.idFilterPairNum = sizeof(rxEnFifoFilter) / sizeof(rxEnFifoFilter[0]) / 2U; rxEhFifoConfig.extendIdFilterNum = 0; rxEhFifoConfig.fifoWatermark = RX_MESSAGE_COUNT - 1U; /* Reduce the frequency to enter IRQ. */ rxEhFifoConfig.dmaPerReadLength = kFLEXCAN_19WordPerRead; rxEhFifoConfig.priority = kFLEXCAN_RxFifoPrioHigh; FLEXCAN_SetEnhancedRxFifoConfig(EXAMPLE_CAN, &rxEhFifoConfig, true); rxFifoXfer.framefd = &rxFrame[0]; rxFifoXfer.frameNum = RX_MESSAGE_COUNT; /* Set Rx Masking mechanism for MB. Only accept data frame with desired ID. */ FLEXCAN_SetRxMbGlobalMask(EXAMPLE_CAN, FLEXCAN_RX_MB_STD_MASK(0x7FFU, 0, 0)); #define RX_MESSAGE_BUFFER_1 (1U) /* Setup Rx Message Buffer 1. */ mbConfig.format = kFLEXCAN_FrameFormatStandard; mbConfig.type = kFLEXCAN_FrameTypeData; mbConfig.id = FLEXCAN_ID_STD(0x121U); FLEXCAN_SetFDRxMbConfig(EXAMPLE_CAN, RX_MESSAGE_BUFFER_1, &mbConfig, true); 2. MB0 and MB1 are not used. In this case, ERFFEL[0–31] are available for acceptance filtering, and MB2–MB6 are reserved as Message Buffers, maximum ERFCR[NFE] is 15. The following code can be used as reference for the driver configuration for this case.  /* Config fifo filters to make it accept STD frame with ID 0x123 ~ 0x142. Used ERFFEL[0–31], ERFCR[NFE]=15 */ uint32_t rxEnFifoFilter[] = {FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(0x123, 0, 0x3F, 0), FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(0x124, 0, 0x3F, 0), FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(0x125, 0, 0x3F, 0), FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(0x126, 0, 0x3F, 0), FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(0x127, 0, 0x3F, 0), FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(0x128, 0, 0x3F, 0), FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(0x129, 0, 0x3F, 0), FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(0x12A, 0, 0x3F, 0), FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(0x12B, 0, 0x3F, 0), FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(0x12C, 0, 0x3F, 0), FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(0x12D, 0, 0x3F, 0), FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(0x12E, 0, 0x3F, 0), FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(0x12F, 0, 0x3F, 0), FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(0x130, 0, 0x3F, 0), FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(0x131, 0, 0x3F, 0), FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(0x132, 0, 0x3F, 0), FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(0x133, 0, 0x3F, 0), FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(0x134, 0, 0x3F, 0), FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(0x135, 0, 0x3F, 0), FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(0x136, 0, 0x3F, 0), FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(0x137, 0, 0x3F, 0), FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(0x138, 0, 0x3F, 0), FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(0x139, 0, 0x3F, 0), FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(0x13A, 0, 0x3F, 0), FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(0x13B, 0, 0x3F, 0), FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(0x13C, 0, 0x3F, 0), FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(0x13D, 0, 0x3F, 0), FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(0x13E, 0, 0x3F, 0), FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(0x13F, 0, 0x3F, 0), FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(0x140, 0, 0x3F, 0), FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(0x141, 0, 0x3F, 0), FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(0x142, 0, 0x3F, 0)}; flexcan_enhanced_rx_fifo_config_t rxEhFifoConfig; /* Setup Enhanced Rx FIFO. */ rxEhFifoConfig.idFilterTable = rxEnFifoFilter; rxEhFifoConfig.idFilterPairNum = sizeof(rxEnFifoFilter) / sizeof(rxEnFifoFilter[0]) / 2U; rxEhFifoConfig.extendIdFilterNum = 0; rxEhFifoConfig.fifoWatermark = RX_MESSAGE_COUNT - 1U; /* Reduce the frequency to enter IRQ. */ rxEhFifoConfig.dmaPerReadLength = kFLEXCAN_19WordPerRead; rxEhFifoConfig.priority = kFLEXCAN_RxFifoPrioHigh; FLEXCAN_SetEnhancedRxFifoConfig(EXAMPLE_CAN, &rxEhFifoConfig, true); rxFifoXfer.framefd = &rxFrame[0]; rxFifoXfer.frameNum = RX_MESSAGE_COUNT; 3. MB0 and MB1 are both used. Under this configuration, only ERFFEL[0–11] can be used as acceptance filters. ERFFEL[12–31] are not available, while MB0–MB6 can be used as Message Buffers, maximum ERFCR[NFE] is 5. The following code can be used as reference for the driver configuration for this case.  /* Config fifo filters to make it accept STD frame with ID 0x123 ~ 0x12E. Used ERFFEL[0–11], ERFCR[NFE]=5 */ uint32_t rxEnFifoFilter[] = {FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(0x123, 0, 0x3F, 0), FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(0x124, 0, 0x3F, 0), FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(0x125, 0, 0x3F, 0), FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(0x126, 0, 0x3F, 0), FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(0x127, 0, 0x3F, 0), FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(0x128, 0, 0x3F, 0), FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(0x129, 0, 0x3F, 0), FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(0x12A, 0, 0x3F, 0), FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(0x12B, 0, 0x3F, 0), FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(0x12C, 0, 0x3F, 0), FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(0x12D, 0, 0x3F, 0), FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(0x12E, 0, 0x3F, 0)}; flexcan_enhanced_rx_fifo_config_t rxEhFifoConfig; flexcan_rx_mb_config_t mbConfig; /* Setup Enhanced Rx FIFO. */ rxEhFifoConfig.idFilterTable = rxEnFifoFilter; rxEhFifoConfig.idFilterPairNum = sizeof(rxEnFifoFilter) / sizeof(rxEnFifoFilter[0]) / 2U; rxEhFifoConfig.extendIdFilterNum = 0; rxEhFifoConfig.fifoWatermark = RX_MESSAGE_COUNT - 1U; /* Reduce the frequency to enter IRQ. */ rxEhFifoConfig.dmaPerReadLength = kFLEXCAN_19WordPerRead; rxEhFifoConfig.priority = kFLEXCAN_RxFifoPrioHigh; FLEXCAN_SetEnhancedRxFifoConfig(EXAMPLE_CAN, &rxEhFifoConfig, true); rxFifoXfer.framefd = &rxFrame[0]; rxFifoXfer.frameNum = RX_MESSAGE_COUNT; /* Set Rx Masking mechanism for MB. Only accept data frame with desired ID. */ FLEXCAN_SetRxMbGlobalMask(EXAMPLE_CAN, FLEXCAN_RX_MB_STD_MASK(0x7FFU, 0, 0)); #define RX_MESSAGE_BUFFER_0 (0U) /* Setup Rx Message Buffer 0. */ mbConfig.format = kFLEXCAN_FrameFormatStandard; mbConfig.type = kFLEXCAN_FrameTypeData; mbConfig.id = FLEXCAN_ID_STD(0x120U); FLEXCAN_SetFDRxMbConfig(EXAMPLE_CAN, RX_MESSAGE_BUFFER_0, &mbConfig, true); #define RX_MESSAGE_BUFFER_1 (1U) /* Setup Rx Message Buffer 1. */ mbConfig.format = kFLEXCAN_FrameFormatStandard; mbConfig.type = kFLEXCAN_FrameTypeData; mbConfig.id = FLEXCAN_ID_STD(0x121U); FLEXCAN_SetFDRxMbConfig(EXAMPLE_CAN, RX_MESSAGE_BUFFER_1, &mbConfig, true); Recommendation: To achieve a balanced trade-off between the number of Message Buffers and acceptance filters, Option 1 is recommended.
View full article
[FRDM-IMX95] Installing the i.MX 95 Camera Application (Japanese Blog) Introduction Here are two examples of how to implement camera-based applications using the FRDM-IMX95 board. Display preview images using Gstreamer Capture camera images using Python, process them with OpenCV, and then display the results. Strictly speaking, both methods use GStreamer, but the latter also serves as a foundation for use cases where each acquired image frame is input into an AI model. (Estimated time: 10 minutes) *Assuming the Linux image has been successfully written to the FRDM-IMX95. Required hardware FRDM-IMX95 (The photo shows a prototype, so the appearance may differ slightly from the commercially available product.) OS08A20 Camera Module HDMI input display For instructions on how to use the FRDM-IMX95, please refer to the FRDM-IMX95 Board User Manual .   Required software Linux demo image (running on L6.18.2_1.0.0) You are welcome to use an image file you built yourself. In that case, please use imx-image-full. Please also refer to "[Beginner's Guide] How to Build Yocto Linux BSP - i.MX FRDM Board Edition" (Japanese Blog) . The procedure for writing the image is described in section 4.2.2 of the method for writing the image generated by building a Linux BSP to the target board . Please refer to "Writing with uuu - Writing the entire wic image". table of contents 1. Modify the device tree and boot Linux. 2. Check the hardware and device tree. 3. Preview display in Gstreamer 4. Perform camera capture and image processing. 4.1 Camera Capture + Image Processing in Python 4.2 Code Explanation In conclusion 1. Modify the device tree and boot Linux. In the u-boot console, execute the following: This is the device tree configuration to allow Linux to recognize the OS08A20 camera module. u-boot=> setenv fdtfile imx95-15x15-frdm-os08a20-isp.dtb u-boot=> saveenv 2. Check the hardware and device tree. The i.MX 95 uses a framework called libcamera. The `cam -l` command can be used to verify that the hardware is correctly connected and that the configured device tree is correct. The following is the expected result: root@imx95-15x15-lpddr4x-frdm:~# cam -l [0:27:23.440218928] [901] INFO Camera camera_manager.cpp:340 libcamera v0.0.0+6489-lf-6.18.2-1.0.0 [0:27:23.544276996] [902] INFO MediaPipeline media_pipeline.cpp:240 Found pipeline: [os08a20 3-0036|0] -> [0|csidev-4ad30000.csi|1] -> [0|4ac10000.syscon:formatter@20|1] -> [2|crossbar] [0:27:23.545335314] [902] INFO Camera camera_manager.cpp:223 Adding camera '/base/soc/bus@42000000/i2c@42540000/os08a20_mipi@36' for pipeline handler imx8-isi Available cameras: 1: External camera 'os08a20' (/base/soc/bus@42000000/i2c@42540000/os08a20_mipi@36) The last line displayed (/base/soc/bus@42000000/i2c@42540000/os08a20_mipi@36) will be used later as the camera name. 3. Preview display in Gstreamer Execute the following two lines to set the appropriate environment variables. root@imx95-15x15-lpddr4x-frdm:~# export LIBCAMERA_IPA_MODULE_PATH="/usr/lib/libcamera/ipa" root@imx95-15x15-lpddr4x-frdm:~# export LIBCAMERA_PIPELINES_MATCH_LIST="nxp/neo,imx8-isi,uvc" Next, the following two commands should display a preview of the camera on the HDMI-connected display. root@imx95-15x15-lpddr4x-frdm:~# CAMERA0=/base/soc/bus@42000000/i2c@42540000/os08a20_mipi@36 root@imx95-15x15-lpddr4x-frdm:~# gst-launch-1.0 libcamerasrc camera-name="${CAMERA0}" ! \ video/x-raw, width=3840,height=2160,framerate=30/1,format=YUY2 ! \ queue ! \ waylandsink The first line defines a variable called "CAMERA0" and specifies the camera name (path) found using the `cam -l` command after Linux has started. This is then passed as `camera-name` to the `libcamerasrc` plugin of Gstreamer (gst-launch-1.0), specifying which camera to use. If you have multiple cameras, you can specify them in this way. You can also pass the `camera-name` directly without setting the variable CAMERA0. 4. Camera capture + image processing execution   4.1 Camera Capture + Image Processing in Python Next, create the following text file and save it as run-opencv.py. import os import cv2 os.environ["LIBCAMERA_IPA_MODULE_PATH"] = "/usr/lib/libcamera/ipa-nxp-neo-uguzzi/" os.environ["LIBCAMERA_PIPELINES_MATCH_LIST"] = "nxp/neo,imx8-isi,uvc" CAMERANAME = r"/base/soc/bus@42000000/i2c@42540000/os08a20_mipi@36" pipeline = ( f'libcamerasrc camera-name="{CAMERANAME}" ! ' 'video/x-raw,width=3840,height=2160,framerate=30/1,format=YUY2 ! ' 'imxvideoconvert_g2d ! ' 'video/x-raw,width=1280,height=720,framerate=30/1,format=BGRA ! ' 'appsink drop=true max-buffers=1' ) cap = cv2.VideoCapture(pipeline, cv2.CAP_GSTREAMER) if not cap.isOpened(): print("cannot open camera") exit() while True: ret, frame = cap.read() if not ret: break # BGRA -> BGR に変.してから処理 frame_bgr = cv2.cvtColor(frame, cv2.COLOR_BGRA2BGR) # エッジ強調処理 gray = cv2.cvtColor(frame_bgr, cv2.COLOR_BGR2GRAY) laplacian = cv2.Laplacian(gray, cv2.CV_64F, ksize=5) edge = cv2.convertScaleAbs(laplacian) edge_bgr = cv2.cvtColor(edge, cv2.COLOR_GRAY2BGR) result = cv2.addWeighted(frame_bgr, 1.0, edge_bgr, 0.5, 0) cv2.imshow('Edge Enhanced', result) if cv2.waitKey(1) & 0xFF == ord('q'): break cap.release() cv2.destroyAllWindows() To do this, do the following: python3 run-opencv.py 4.2 Code Explanation This sample uses Python and the OpenCV API. OpenCV has a mechanism for receiving data from Gsteamer pipelines, and this is utilized in the example. As shown, we are configuring the Gstmeamer pipeline using pipeline. The purpose of resizing is to improve the frame rate by reducing the CPU processing load in subsequent stages. The purpose of the format conversion is to convert to BGR, a format that OpenCV can use. These processes are performed on 2D GPUs to reduce CPU load. A simplified diagram of the pipeline is shown below. This is frame-by-frame processing. It receives one frame at a time from the pipeline configured in Gstmeamer and passes it on to the subsequent edge enhancement processing. In this way, the process is divided into two parts: the initial stage, which heavily relies on the SoC hardware (libcamerasrc (MIPI-CSI + ISP) → imxvideoconvert_g2d (GPU 2D)), is performed by Gstreamer, and the subsequent stage involves edge enhancement using the CPU/OpenCV. Since images can be extracted frame by frame with cap.read(), subsequent processing becomes easier. In conclusion We've shown you two examples of how to implement camera-based applications using the FRDM-IMX95 board. Use cases where acquired image frames are input into an AI model will be introduced in a separate article. *This article includes content that has been reviewed by the author based on AI-generated code. ========================= We are currently unable to respond to comments left in the " Comment " section of this post . We apologize for the inconvenience, but please refer to " Technical Questions to NXP - How to Contact Us( Japanese Blog) " when making inquiries.(If you are already an NXP distributor or have a relationship with NXP, you may ask your representative directly.) Let's try moving the camera using the FRDM-IMX95 board. Gstreamer Python/OpenCV We will implement these two methods. I am using Linux BSP 6.18.2_1.0.0. (Estimated time: 10 minutes) *Assuming the Linux image has been successfully written to the FRDM-IMX95. i.MX Processors Japanese Blog
View full article
S32K311 UTest 编程:编程过程中出现 RWE 错误和崩溃 我正在对 S32K311 微控制器进行 UTest 编程,在闪存编程过程中遇到了读写错误 (RWE) 和控制器崩溃。 问题:触发信号 uTest 编程序列 后: 控制器跳转到默认处理程序(崩溃) RWE(读写错误)标志已设置 上下文: 应用程序正在从 pFlash @ 0x00480000 执行 uTest 编程是在从 pFlash 运行时启动实际的触发函数(EHV 设置 + 轮询)是从 RAM 执行的 实施流程: 1.初始化 & 准备 (flash_gsetPublickey_prepare) 解锁 uTest 扇区:PFLASH.PFCBLKU_SPELOCK [0] .R & = ~ (1U < < 0); RESET 操作模式 bits: EHV = 0,PGM = 0,ERS = 0,ERS = 0 加载目标地址:PFLASH.PFCPGM_PEADR_L.R = 0x1b000100U;将数据加载到闪存寄存器:for (i = 0 U;i < Flash_lnumofWords; i++) {FLASH.DATA [i] .R = flash_psrc [i]; } 启用编程模式:FLASH.MCR.B.PGM = 1U; 2.执行编程(从 RAM) (FLASH_gSetPublicKey_Trigger) 开始编程:FLASH.MCR.B.EHV = 1U; 轮询直至完成:等待 DONE = 1 停止编程: FLASH.MCR.B.EHV = 0U; FLASH.MCR.B.PGM = 0U; 重新锁定UTest 扇区 观察: 尽管触发器函数从 RAM 运行,但系统仍然: 遇到 RWE 错误 & 跳转到默认处理程序 根据上述流程,如果您能帮助确定 RWE 故障的确切原因,并提出必要的修正建议,以确保可靠的 UTest 编程,我将不胜感激。 谢谢。 Re: S32K311 UTest Programming: RWE Error and Crash During Programming 您是否禁用了中断?此外,还需要禁用闪存预取和高速缓存,因为对闪存 0 块的投机或预取访问可能会发生,而闪存 0 块与 UTEST 是同一个块。
View full article
CAAMのパフォーマンス こんにちは、 添付のプロジェクト例(SDK 25.06.00 CAAM サンプルから派生したもの)では、CRC のみを計算して CAAM のパフォーマンスを測定したいと考えています。実際、サンプルを実行してみたところ、すぐに動作が遅すぎると感じました。これを実現するために、私はDWT->CYCCNTレジスタを使用します。 ソフトウェアによる実装とも比較してみました。 RT1170-EVKBで実行したところ、以下の結果が得られました。   最初の計算がCAAMのようなアクセラレータにとって既に遅すぎるように思えるなら(ソフトウェア実装よりもさらに遅い)、2番目の計算はとんでもないものだ。 何が問題なのですか?SDKのバグかもしれません。 よろしくお願いいたします 最大 Re: CAAM performaces こんにちは@Kan_Li ご返信ありがとうございます。 残念ながら、あなたの回答はまさに私が抱いていた懸念を裏付けるものでした。添付されたプロジェクトファイルは、返信前に開かれることすらなかったようです。 私がこう言う理由は非常に単純かつ客観的です。プロジェクトは既にCAAM_CRC()を使用しているからです。それは私が見落としていた理論上の可能性でも、試すのを忘れていた代替手段でもありません。添付の例に既に示されており、私の測定結果ではまさにその経路が最も悪い結果を示しました。 念のためもう一度明確にしておきますが、私はドライバの使い方に関する一般的な質問を投稿したわけではありません。NXPのサポート担当者が直接ビルド、実行、動作確認ができるように、SDKのサンプルを基にした完全なプロジェクトを作成し、添付しました。 同じCRCの計算結果を比較しました。 ソフトウェアにおいて CAAMと共に そして結果はまさに私が報告している問題点そのものでした。ハードウェアアクセラレータとしては、測定された性能が予想外に悪く、テストしたケースの一つでは、ソフトウェア実装よりも著しく劣っていました。 それが問題なのです。 「CAAM_CRC() を試してみる」ということではありません。 それは既に済んでいます。 お客様がすぐに実行できるプロジェクトを添付する場合、通常はフォーラムのストレージ容量、ネットワーク帯域幅、または誰かの時間を無駄にしないためです。なぜなら、お客様はサポートが問題を実践形式で再現することを期待しているからであり、特にプロジェクトがその目的のために既に最小化されている場合はなおさらである。 添付された再現プロジェクトが回答前に実際に検証されるという考えに、私は過信しすぎているのかもしれない。もしそうなら、それは私の責任です。 しかし、完全な再現手順が添付された技術的な投稿に対して、このようなレベルの対応しかされないのであれば、多くのユーザーが受けるサポートの質について不満を漏らすのも当然と言えるでしょう。 それでは、誤解の余地が全くないような形で質問を言い換えてみましょう。 添付のプロジェクトは既にCAAM_CRC()を使用しています。 DWT->CYCCNTを用いてサイクル数を計測しました。 同じターゲットに対して、ソフトウェアCRCとCAAM CRCを比較しました。 CAAMの性能は予想よりも悪く、あるケースではソフトウェアと比べて非常に大きな差で劣っていた。 これらの事実を踏まえ、NXP社には以下のいずれかを実施していただきたい。 添付のプロジェクトを使用して結果を再現してください。 オーバーヘッドがどこから発生するのか説明してください。 これがSDK/ドライバーの問題であるかどうかを明記してください。 または、これらの業績数値は予想値であることを明確に述べる。 添付の例自体によって既に矛盾している提案よりも、具体的な技術分析の方がはるかにありがたいです。 よろしくお願いします、 マックス Re: CAAM performaces こんにちは、 @mastupristi さん。 SDKのサンプルでは、CRCの初期化、更新、および終了の各関数が別々に使用されています。ドライバには、代わりに使用できるワンタイムのCAAM_CRC()関数があり、そちらの方が高速であるはずです。CAAM_CRC() を使ってみて、違いが出るかどうか確認してください。 すてきな一日を、 カン ------------------------------------------------------------------------------- 注記: この投稿があなたの質問への回答になっている場合は、「正解としてマーク」ボタンをクリックしてください。ありがとう! - 最後の投稿から7週間はThreadをフォローしますが、それ以降の返信は無視されます。 後日、関連する質問がある場合は、新しいThreadを作成し、閉じられたThreadを参照してください。 ------------------------------------------------------------------------------- Re: CAAM performaces こんにちは、 @mastupristi さん。 ごめんなさい、私のミスです!CRCエンディアンに関する別のプロジェクトを拝見しました。私のプロジェクトビューでは、あなたのプロジェクトが非常に似通っており、main() 関数もほぼ同じです。見落としてしまい申し訳ありません。   異なるCRC入力データ長であなたのプロジェクトをテストしたところ、CRC処理対象のデータが十分に長い場合(例えば、テストで使用したデータ長の2倍)、CRC初期化、更新、終了に基づくハードウェア計算はソフトウェア実装よりも優れていることがわかりました。しかし、CAAM_CRC()は常にテストで最悪のケースでした。現在、この問題について社内で調査しており、詳細が分かり次第お知らせします。 お待ちいただきありがとうございます! すてきな一日を、 カン ------------------------------------------------------------------------------- 注記: この投稿があなたの質問への回答になっている場合は、「正解としてマーク」ボタンをクリックしてください。ありがとう! - 最後の投稿から7週間はThreadをフォローしますが、それ以降の返信は無視されます。 後日、関連する質問がある場合は、新しいThreadを作成し、閉じられたThreadを参照してください。 ------------------------------------------------------------------------------- Re: CAAM performaces こんにちは、 @mastupristi さん。 どうやら私のボードに何か問題があるようです。別のRT1170EVKBボードを使ってみたところ、以下の結果になりました。 別のボードで再度試すことはできますか? すてきな一日を、 カン ------------------------------------------------------------------------------- 注記: この投稿があなたの質問への回答になっている場合は、「正解としてマーク」ボタンをクリックしてください。ありがとう! - 最後の投稿から7週間はThreadをフォローしますが、それ以降の返信は無視されます。 後日、関連する質問がある場合は、新しいThreadを作成し、閉じられたThreadを参照してください。 ------------------------------------------------------------------------------- Re: CAAM performaces こんにちは@Kan_Li 3つのボードと合計4つのテストにおいて、非常に異なる行動と非常に異なる数値が見られることに懸念を抱いています。 ここで一つ覚えておいていただきたいのは、CAAMはMCUの内部ペリフェラルであり、MCU内部のRAMと相互作用するということです。取締役会の外部コンポーネントのうち、現実的に考えて、CAAMにこれほど重大かつ一貫性のない影響を与える可能性のあるものは何だろうか? 現段階では、根本的な問題は実はMCU側にあるのではないかと検討するのは妥当と思われる。 これが私のEVKに搭載されているものです また、3回のテストで得られた数値は、具体的にどのような条件下で得られたものなのか、詳しく教えていただけますでしょうか?特に: どのボードが使用されたか、 どのMCUが搭載されていたか、 また、設定や条件に関して、他に何か関連する違いがあったかどうかも確認した。 最も重要なのは、私の数字とあなたの数字の差をどのように説明するのかということです。 現時点では、さらなるテストに使用できる他の基板がありません。 よろしくお願いします。 最大   Re: CAAM performaces こんにちは、 @mastupristi さん、 私のデバイスはMIMXRT1176DVMAA/0P94B/CTAS2152Aで、あなたのものと同じです。私のテストでは、あなたのコードのデバッグ前にフラッシュメモリで実行中のプログラムが起動しないように、ブートモードをシリアルダウンロードモードに設定し、SRAMであなたのコードを実行しました。あなたも同じようにしましたか?あなたのボード間で結果を共有していただけますか? よろしくお願いいたします。 カン Re: CAAM performaces こんにちは@Kan_Li 「アプリケーションをRAMにリンクする」を試してみました(プロジェクトを添付)。 この設定で、以下の結果が得られました。 ご覧のとおり、状況は大幅に改善されていますが、本当に驚くべきことは、CAAMを使用した最初のCRC計算にかかる時間が、ソフトウェア版と同じであるということです。 CAAM(CAAM_CRC())を使用した最新のCRC計算には3億3700万サイクルかかります(以前は14億2200万サイクルかかっていたので、わずか4分の1に減っただけです)。 このマイクロコントローラを搭載した別のEVKBを借りることができました 以下のような結果が得られました。 つまり、ソフトウェアの実装は両方のボードで全く同じように動作するということです。それは驚くべきことではない。むしろ、私が予想していた通りだ。 最初のCAAMはわずかに時間がかかるだけであるのに対し、2回目のCAAMは大幅に短い時間(2億5200万サイクル)で完了する。 注意点として、憶測を立てる前に、コードを確認して、「第一」と「第二」のソフトウェアとハードウェアの意味を理解してください。 以下に概要を示します。 SW CRC32 iSCSI SW CRC16 CCITT HW (CAAM) CRC32 iSCSI (初期化、更新、最終処理を個別に呼び出し) HW (CAAM) CRC16 CCITT (CAAM_CRC() を呼び出し中) これは私にとって多くの疑問を抱かせる。 特に4位の成績に見られるこの一貫性のなさは、非常に懸念される。何が原因ですか? このアクセラレータは、ソフトウェアによる実装と比較して、全く処理速度を向上させていないようだ。本当にそうなのでしょうか?それとも私が何か見落としているのでしょうか? よろしくお願いします。 最大 Re: CAAM performaces こんにちは、 @mastupristi さん。 4番目の検査結果については現在も社内で確認中です。新たな情報が入り次第、ご連絡いたします。 他のテストでは、ソフトウェア/ハードウェア別にデータをさらに計算しましたか?コア上で動作するソフトウェアはキャッシュからある程度の恩恵を受けるが、データ量が増えると、その差が顕著になる。 よろしくお願いいたします。 カン Re: CAAM performaces こんにちは、 @mastupristi さん。 内部の後。議論の結果、問題の原因はDCACHEの無効化であることが判明しました。 このプロジェクトではキャッシュのライトスルー("CACHE_MODE_WRITE_THROUGH=1") 設定を使用しており、マクロ("CAAM_OUT_INVALIDATE") も有効になっているため、DCACHE 無効化機能によって機能のパフォーマンスが低下します。これは、主にミドルウェアにおけるデータ整合性の問題を回避するために、SDKのサンプルに実装されています。ERR050396(下記参照)のため、TCMは書き込みには使用できません。 以下は、その関数の測定値です。 この例では「出力」はキャッシュ不可能な領域に配置されているため、その特定の関数における無効化は不要です。 /*! @brief CRC の出力バッファ。*/ uint8_t AT_NONCACHEABLE_SECTION(crc_output[4U]); DCACHE無効化が削除されると、次のようになります。 最高最適化(-O3)を有効にした場合: データアクセス制限とCAAM構成構造の処理を考慮すると、この場合、800MHzでDTCM内のデータを使用してITCMから実行される最適化されたソフトウェア実装は、CAAMよりも高速になる可能性があります。ソフトウェア計算が頻繁に中断されるかどうかは、ペイロードのサイズとアプリケーション全体のコンセプトによって決まると言えるでしょう。 よろしくお願いいたします。 カン
View full article
CAN 在统一引导加载程序中不起作用 您好,   我使用的是 unified_bootloader_demo_V2.1.zip 压缩包。使用我的 S32K144 ECU。   我想调整 ECU 引脚布局的 MCAL。 CAN0 现在映射到 PC2、PC3   这是 CAN 的初始函数:   static void BSP_init(void) { ........   /*CAN init*/ CAN_Init(&can_pal1_instance,&can_pal1_Config0); CAN_InstallEventCallback(&can_pal1_instance,&CAN_ISR_Callback, NULL); CAN_Receive(&can_pal1_instance,RX_MAILBOX_ID,&g_RXCANMsg); CAN_ConfigRxBuff(&can_pal1_instance, RX_MAILBOX_ID,&RXCANMsgConfig, RX_FUN_ID); CAN_SetRxFilter(&can_pal1_instance,RXCANMsgConfig.idType、rx_mailbox_id,rx_id_mask); CAN_ConfigTxBuff(&can_pal1_instance, TX_MAILBOX_ID,&TXCANMsgConfig);   INT_SYS_EnableIRQ(CAN0_ORed_0_15_MB_IRQn);   ......... }     以下 ISR 已映射到闪存中的默认向量表: CAN0_ORed_IRQHandler ;can CAN0_Error_IRQHandler ;can (95) CAN0_Wake_Up_IRQHandler ;can CAN0_ORed_0_15_MB_IRQHandler ;can CAN0_ORed_16_31_MB_IRQHandler ;can   CAN ISR 未被调用。 在工具 EcuBus-Pro 中看不到任何 CAN 框架。 当我在 Ecubus-Pro 中发送诊断请求时,我收到的错误是:" [晚上 7:24:30] [系统] 序列 s32k144_can_uds_bootloader 错误:上层读取超时 "     问题出在哪里?   Re: CAN not working in Unified Bootloader 你好@NJ_NXP、 我可以帮助您在 S32K144 中实现 CAN 通信,但请记住,在社区上共享的统一引导加载程序只是按原样提供的非官方演示,不提供任何保证和支持。目前,我们还没有支持该演示的资源。请联系他们的支持页面。 你在使用评估板,还是这是你的定制设计? 你有示波器或 CAN USB 工具可以用来分析总线吗?您能检查发送的帧是否有效吗? 另外,如果是定制设计,您使用的是哪种 CAN PHY?根据设计,S32K144EVB 使用UJA1169TK。 统一引导加载程序 Demo已经为 S32K144 提供了一个示例项目,为什么不对其进行测试呢? 致以最诚挚的问候, Julián
View full article
MCX-C24xのVREFH範囲 外部 VREFH リファレンス電圧を使用したいのですが、MCX-C24x のデータシートには VREFH の許容電圧範囲が記載されていません。興味深いことに、KL27、MCX-C04x、または MCX-C44x のデータシートでは、VREFH の範囲が 1.13V から VDDA までと宣言されていますが、C24x のデータシートではそれが宣言されていません。(改訂4/2025) C24x も同じケースで、1.17V ~ VDDA の範囲を適用できると想定しても安全でしょうか? よろしくお願いします。 アナログ(ADC、CMP、DAC、オペアンプ) MCX C Re: VREFH range in MCX-C24x こんにちは@Jiri_n ご返信ありがとうございます。社内で確認し、できるだけ早くご連絡いたします。ご不便をおかけして申し訳ございません。 BR アリス Re: VREFH range in MCX-C24x こんにちは@Jiri_n ご辛抱いただきありがとうございます。 社内で確認したところ、MCXC44X の基準電圧範囲を MCXC24X に使用できることがわかりました。   よろしくお願いします。   BR アリス
View full article
DMA 模式下 UART 通信失败(S32k311) 嗨,@nxp团队、 我在S32K311目标硬件的 DMA 模式下使用 UART 通信,但主站和从站之间甚至连一次传输都没有。双方都在使用 512 字节的缓冲区。但是,在微控制器方面,回调被触发并引发了 LPUART_UART_IP_EVENT_ERROR,而且 UARTState 的状态始终显示为超限状态。 我尝试过的波特率从 100 kbps 到 900 kbps 不等。 注:为确保波特率不是问题,我还测试了单次传输和基于周期的传输。然而,系统总是会进入超限状态。 能否请您检查一下我的配置?为了供你参考,我附上了配置屏幕截图以及 UART 模块设置。 为此,我为两个 USRT 通道的 TX 和 RX 创建了 4 个 DMA 通道。       Re: UART communication failed in DMA mode(S32k311) 感谢@Julián_AragónM的回复 事实上,由于版本兼容性问题,我无法在我的系统上加载给出的示例。不过,我会尝试添加 RM 模块并进行测试。 我的 S32 IDE 版本是 3.6.3RTD 版本为 6.0.0. Re: UART communication failed in DMA mode(S32k311) 你好,@jagannath、 我看到您还输入了一个内部案例,我已在该案例中回复了您的问题,但为了以防万一,我也将在此回复: 能否告知您使用的 RTD 和 S32DS 版本? 从图片中可以看出,"Rm" 模块并没有包含在项目中。要使用 DMA,必须添加"Resource Manager" 驱动程序,启用 Dma Mux 支持,并配置相应的 DMA MUX 通道: 您可以参考社区中已有的例程:示例 S32K312 UART 发送& 接收使用 DMA DS3.5 RTD300。 致以最诚挚的问候, Julián Re: UART communication failed in DMA mode(S32k311) @nxp 如果您需要更多细节, 请 告诉我。 Re: UART communication failed in DMA mode(S32k311) 你好,@jagannath、 来自 RTD 3.0.0此后,DMA 支持从 MCAL 层移至 Rm 模块。RM 模块不支持 IP 层。因此,用户应将 RM 模块直接添加到高级层。 查看 S32K3XXRM 的 DMAMUX 映射 excel 文件附件,可以看到 LPUART0 被分配到 DMAMUX0,而 LPUART3 被分配到 DMAMUX1。 DMA 复用源字段已禁用,无法编辑. 我不明白这种说法。从您的图像中,我可以看到第一个 Dma Mux 源容器是可用的,但您将它们配置为 "REQ_DISABLED"。您必须将 LPUART 通道与 DMA MUX 信号源连接成类似这样: 至于我分享的示例,是的,您不能直接导入,因为该项目是在 RTD 3.0.0 中开发的、当您使用 RTD 6.0.0 时。不过,您可以将配置文件和主文件复制到工作区,以测试 UART + DMA。 致以最诚挚的问候, Julián Re: UART communication failed in DMA mode(S32k311) Hii@Julián_AragónM 我已添加 RM 模块,但DMA Mux Source 字段被禁用,无法编辑。这是我的配置与给出的示例配置之间的唯一区别。然而,我得到的结果与之前的错误一样。 我附上了配置示例的截图以及我的配置MEX 文件。 S32 集成开发环境版本:3.6.2 RTD 版本:6.0.0 能否请您在方便时尽早查看一下? Re: UART communication failed in DMA mode(S32k311) Hii@Julián_AragónM S32 集成开发环境版本:3.6.2 RTD 版本:6.0.0 注意: 由于 MCAL 通常在基于 AUTOSAR 的架构中使用,因此我们的项目目前不使用任何 AUTOSAR 模块,因此也不打算包含 MCAL 模块。我们的要求是在不使用 MCAL RM 驱动程序的情况下实现基于 DMA 的通信。请确认是否可以不依赖 MCAL (RM) 运行 DMA 模式? Re: UART communication failed in DMA mode(S32k311) 感谢@Julián_AragónM提供迄今为止的详细信息。 目前,当我向 MCU 发送数据时,会触发信号,但事件始终是 " LP UART_UART_IP_EVENT_ERROR "。正因为如此,我无法退出这个问题。我根据示例和社区帖子尝试了几种方法,但遗憾的是,到目前为止没有一种方法能解决问题。 我在这里附上了我的整个工作区。能否请您帮助审查一下,以确定是否存在任何问题?如果可能的话,希望您也能在自己的系统上试运行一下。 提前感谢您的支持。 Re: UART communication failed in DMA mode(S32k311) 你好,@jagannath、 对不起,我的回复晚了! 关于第一个问题,我在你的项目中看到 UART 缓冲区没有被声明在非缓存区内。为了避免启用 数据缓存 时可能出现的一致性问题,用户应确保用作 TCD 源和目标的缓冲区分配在不可缓存区域,或者尝试使缓存地址失效: #pragma GCC section bss ".mcal_bss_no_cacheable" uint8_t tx_data[15]; uint8_t rx_data[15]; #pragma GCC section bss 关于第二个问题,你能检查中断和处理程序吗?调用 uart 传输函数时,返回的是什么? 致以最诚挚的问候, Julián Re: UART communication failed in DMA mode(S32k311) Hii@Julián_AragónM 感谢您的支持。我们现在的情况要好得多--在添加 RM 模块并修正配置后,DMA 传输已开始工作。不过,似乎仍有一些数据丢失/覆盖问题,如下所述: 1.在第一次(新)传输过程中,前20字节和最后约10字节的数据总是丢失。 主设备每 100 毫秒定期发送 512 字节的数据。 MCU 缓冲区的大小也是 512 字节。 MCU 报告 接收到了 512 字节 ,但 前大约 20 字节(有时还有最后大约 10 字节)缺失,而从 第 21 字节开始的剩余字节 是 正确的。 2.在第二次及其后的传输过程中: 缓冲区内容的片段显示如下: 索引0 至 83→ 包含0xAA(默认值) 索引84 至 116→有效数据 索引117 至 308→0xAA(默认值) 索引308 至 340→有效数据 索引340 至 372→0xAA(默认值) 3.传输 4/5 次后,数据传输完全停止,但不会出现奇偶校验/成帧/超限等错误。 这种模式一直持续,几次传输后,数据传输完全停止。 能否请您帮助确定导致这种行为的原因? 谢谢!         Re: UART communication failed in DMA mode(S32k311) 非常感谢@Julián_AragónM的支持。现在问题已经解决,一切正常。非常感谢你们的帮助。 谢谢
View full article
RDK01DB1563 硬件或 FT232H 模块固件 你好 我可能在批量编程时损坏了编程器,目前无法连接芯片。我需要以下文件:RDK01DB1563 硬件文件或 FT232H 模块固件,以便排除故障。 BR Re: RDK01DB1563 HARDWARE OR FT232H module firmware 你好 有关硬件原理图和电路图,请参阅用户手册 UM11235 - TEA2016DB1514 USB 至 I²C 硬件接口。 本文件包含完整的电路图(见第 3 章)。 关于 FT232H 模块固件,由于该模块使用标准 FTDI 驱动程序软件包,因此不需要或提供任何自定义固件。有关安装 FT232H 驱动程序的详细信息,请参阅 UM11521 - RDK01DB1563 入门,第 4.1 章 安装软件,其中说明了如何自动安装或在需要时手动安装 FT232H 驱动程序。 BRs, Tomas
View full article
RTD Half Duplex SPI Hi @VaneB  As you mentioned before I try to RTD for half duplex SPI. When I send to data with using Lpspi_Ip_SyncTransmitHalfDuplex function how could I get data from slave. Lpspi_Ip_AsyncTransmitHalfDuplex(&SLAVE_EXTERNAL_DEVICE, RxSlaveBuffer, NUMBER_OF_BYTES, LPSPI_IP_HALF_DUPLEX_RECEIVE, NULL_PTR); /* Master transmits data in half-duplex mode by sync method */ Lpspi_Ip_SyncTransmitHalfDuplex(&MASTER_EXTERNAL_DEVICE, TxMasterBuffer, NUMBER_OF_BYTES, LPSPI_IP_HALF_DUPLEX_TRANSMIT, TIMEOUT); after that should I write this function  Lpspi_Ip_AsyncTransmitHalfDuplex(&SLAVE_EXTERNAL_DEVICE, RxSlaveBuffer, NUMBER_OF_BYTES, LPSPI_IP_HALF_DUPLEX_TRANSMIT, NULL_PTR); /* Master transmits data in half-duplex mode by sync method */ Lpspi_Ip_SyncTransmitHalfDuplex(&MASTER_EXTERNAL_DEVICE, TxMasterBuffer, NUMBER_OF_BYTES, LPSPI_IP_HALF_DUPLEX_RECEIVE, TIMEOUT); Re: RTD Half Duplex SPI Hi everybody, can somebody share an example to try tx and rx in half mode using 3-wire with registers? I have the same problem and i can't communicate with a SPI half duplex 3-wire sensor. Regards, DP Re: RTD Half Duplex SPI Hi @danielmartynek  I will keep the discussion on the opened case for not duplicating the thread. I guess you can also see the ticket.  Re: RTD Half Duplex SPI Hi @JosephJ, I see the ticket, a colleague of mine is working on this. As I already mentioned in this thread, there is an option to send one frame of 80bits, instead of 10 8bit frames. That means that you can use the RTD without the continous mode. Or you could send 10 8bit frames and use GPIO as the CS, again with the continuous mode disabled. Regards, Daniel Re: RTD Half Duplex SPI Hi @danielmartynek  I opened a case because community support do not provide us the RTD update that supports the 3wire spi communication at continuous mode. You provided us some details how to the update the SDK to support that feature. But it will be a hard task to accomplish that since sdk is provided by RTD team. Even you think that updating the sdk based on that information will not be an easy task. That's why I opened this case. Can you please get in touch with RTD team once again if they can fix this issue in scheduled plan? https://support.nxp.com/s/case/5002p00002vTPqsAAG/3-wire-spi-driver-with-continuous-mode Re: RTD Half Duplex SPI Hi @maximillion, I don't think the SDK can be easily modified. These are SW limitations, it should work in HW, there are these errata though: ERR011097 ERR011089 https://www.nxp.com/docs/en/errata/S32K148_0N20V.pdf To receive 4 8byte frames in half-duplex continous mode, you need these commands: while(LPSPI1->FSR & LPSPI_FSR_TXCOUNT_MASK){} LPSPI1->TCR = LPSPI_TCR_CPHA_MASK |LPSPI_TCR_TXMSK_MASK |LPSPI_TCR_CONT_MASK |LPSPI_TCR_PRESCALE(2) |LPSPI_TCR_PCS(0) |LPSPI_TCR_FRAMESZ(7); while(LPSPI1->FSR & LPSPI_FSR_TXCOUNT_MASK){} LPSPI1->TCR = LPSPI_TCR_CPHA_MASK |LPSPI_TCR_TXMSK_MASK |LPSPI_TCR_CONT_MASK |LPSPI_TCR_CONTC_MASK |LPSPI_TCR_PRESCALE(2) |LPSPI_TCR_PCS(0) |LPSPI_TCR_FRAMESZ(7); while(LPSPI1->FSR & LPSPI_FSR_TXCOUNT_MASK){} LPSPI1->TCR = LPSPI_TCR_CPHA_MASK |LPSPI_TCR_TXMSK_MASK |LPSPI_TCR_CONT_MASK |LPSPI_TCR_CONTC_MASK |LPSPI_TCR_PRESCALE(2) |LPSPI_TCR_PCS(0) |LPSPI_TCR_FRAMESZ(7); while(LPSPI1->FSR & LPSPI_FSR_TXCOUNT_MASK){} LPSPI1->TCR = LPSPI_TCR_CPHA_MASK |LPSPI_TCR_TXMSK_MASK |LPSPI_TCR_CONT_MASK |LPSPI_TCR_CONTC_MASK |LPSPI_TCR_PRESCALE(2) |LPSPI_TCR_PCS(0) |LPSPI_TCR_FRAMESZ(7); /* terminate the transfer */ while(LPSPI1->FSR & LPSPI_FSR_TXCOUNT_MASK){} LPSPI1->TCR = LPSPI_TCR_CPHA_MASK |LPSPI_TCR_PRESCALE(2) |LPSPI_TCR_PCS(0) |LPSPI_TCR_FRAMESZ(7); And you have to read the RX data in the meantime. To transmit data, change TXMSK for RXMASK. Regards, Daniel Re: RTD Half Duplex SPI @danielmartynek Also, is the limitation you are talking about hardware or software? Re: RTD Half Duplex SPI Hi @danielmartynek  "Functions implemented in SDK for LPSPI (RTM 3.0.0 S32 Design Studio 2.2) do not have "native support" for 3-wire. So can we implement 3-wire SPI in continuous mode by making necessary changes at the driver level for RTM3.0.0? Re: RTD Half Duplex SPI Hi @maximillion, Unfortunately, I have been informed that there is not going to be any patch. It will be just listed as a limitation in the User Manual. I'm not sure what the reasons are. Regards, Daniel Re: RTD Half Duplex SPI Hi @danielmartynek, Can't we use TXMSK CONT function in LPSPI driver? I need this in my project won't a new update or patch come out? Re: RTD Half Duplex SPI Hi @maximillion, The RTD team has found some limitations that do not allow the TXMSK CONT function in the LPSPI driver. They will update the UM with a note mentioning that. Regards, Daniel Re: RTD Half Duplex SPI Hi @maximillion, Yes, it looks like it is a bug in RTD. Have you consider using one 80bit frame instead? BR, Daniel Re: RTD Half Duplex SPI How should I handle this issue? Is this issue related to RTD driver isn't it? Re: RTD Half Duplex SPI Hi @maximillion, I don't see any issue with the 3wire mode, but with the Continues mode. I have created the attached simple test project (Master only). 1. CONT = 0 2. CONT = 1 The issue is clearly in the Continuous mode. Regards, Daniel Re: RTD Half Duplex SPI Hi Actually, this project is valid and I worked on this project. I'm not sure why you couldn't test the project. Anyway, I'm in trouble with the 3-wire SPI. I'm waiting for your answer. Re: RTD Half Duplex SPI Hello @maximillion, I'm sorry for the delay, I couldn't get to the testing. You example had a few issues, like both modules have to have one pin selected for both MOSI/MISO and the pin must be set as Input/Output. Anyway, I think there is a bug in the RTD driver. It has been reported to the RTD development team. Once I have sone new information, I will update the thread. Best regards, Daniel Re: RTD Half Duplex SPI Hello @danielmartynek  In the project I uploaded, LPSPI1 was used as master and LPSPI0 as slave. In my project, S32K148 will be master and it will communicate with TFT display, so you can think of LPSPI0 module as TFT display. I need to configure the display with 3 wire spi. Below I have attached a photo of the SPI communication specified in the datashette. Also I attached my logic analyzer screnshoot. Could you please tell me how to read data from slave correctly from master?     Re: RTD Half Duplex SPI I only have 3 Wire Clock, Chip Select, Data. Your project is not 3-wire. I've written so much that your community always suggests another answer. I have attached the project. I only have to use 3 wires. I need to send and receive at MOSI pin. In the example project, I sent and received data between two SPI modules, but in my own project I cannot read data from the slave because the master does not keep the chip select pin continuous while receiving data. Why chip select did not keep continuos? Below picture master send data (LPSPI0) and slave receive data (LPSPI1) after that receive send data and master receive. Why doesn't the pcs pin keep the pin continuous while the master is receiving data? Please review the project.   Re: RTD Half Duplex SPI Hi @maximillion, A simple test project is in this thread: https://community.nxp.com/t5/S32K/S32K314-SPI-flash-implementation/m-p/1617504#M21457 It sends one 8bit frame to the Slave device and reads 3 frames from the Slave device. Regards, Daniel Re: RTD Half Duplex SPI Actually my question is, how can I read the register from the slave. I am sending data as master and how can I receive data from slave. What function should I use to get the data as master from slave
View full article
TDA8035 behaviour when only VDD(INTF)is present, not powered VDDP I would like to know how the TDA8035 behaves when: VDD(INTF)=3.3V  VDDP= 0V (not powered) It seems that the TDA8035 is reset mode but I'm not sure... Could you confirm? Is this condition permitted for a long period of time ( > severals hours)? What is the VDD(INTF)consumption in this case? Best Regards Best Regards Sylvain Contact Smart Card Reader ICs Re: TDA8035 behaviour when only VDD(INTF)is present, not powered VDDP Hello @sylvainbouriot  When powered on with VDD(INTF) = 3.3V and VDDP = 0V: The TDA8035 will remain in reset state and will not attempt to boot the smart card. This state is allowed to persist for an extended period without damaging the chip or causing abnormal behavior. When VDDP = 0 and the chip is in reset/power-down mode: The typical current for VDD(INTF) is very small, generally in the range of several µA to tens of µA. The current consumed is primarily for digital holding. Re: TDA8035 behaviour when only VDD(INTF)is present, not powered VDDP Thank you, Kaily, for that very precise answer. When the TDA8035 is in active mode, what is the approximate consumption on VDD(INTF) for VDD(INTF) = 3.3 V? Best Regards. Sylvain Re: TDA8035 behaviour when only VDD(INTF)is present, not powered VDDP with VDDP = 3.3V or 5V ...
View full article
[ABB] [SE050C][Nano-package][Zephyr] setting PlatformSCP hello  Customer ABB is using SE050C1 via nRF5340 + Zephyr, he in integrating our nano-package MW. It is needed to communicate in SCP03 I suppose that first step is to compile the nanopackage library accordingly, and I believe there is a unique define involved at that stage which is CONFIG_PLUGANDTRUST_SCP03 Can I ask you how to configure it / define it ? Is it a preprocessor define that need to be passed to CMake ? Also I see that there is another define whici is PLUGANDTRUST_SE05X_AUTH that need to be set to PlatformSCP03 How does this one relate to CONFIG_PLUGANDTRUST_SCP03 ? Thank you, Mehdi Re: [ABB] [SE050C][Nano-package][Zephyr] setting PlatformSCP thank you Michael Would the right compilation flow be like ? step1 - on the one hand, use CMake to build the mw library (with CONFIG_PLUGANDTRUST_SCP03 being defined in the Cmake option) step 2 - compile the Zephyr exemple with CONFIG_PLUGANDTRUST_SCP03=y in the .proj file I understand that only CONFIG_PLUGANDTRUST_SCP3 need to be declared in the proj file, while CONFIG_PLUGANDTRUST_SCP03 is rather a Cmake option is that correct ? Mehdi Re: [ABB] [SE050C][Nano-package][Zephyr] setting PlatformSCP Hello Mehdi, for the defines: CONFIG_PLUGANDTRUST_SCP03 : Enables the SCP03 code/libraries in the build (includes SCP03 source files, crypto dependencies) PLUGANDTRUST_SE05X_AUTH=PlatformSCP03 : Tells the runtime code to actually USE SCP03 authentication when communicating with the SE050 Both must be set for SCP03 to work properly. For zephyr compilation the defines can be set in the zephyr prj.conf file, by default all is off: CONFIG_PLUGANDTRUST_SCP03=n CONFIG_PLUGANDTRUST_ECKEY=n CONFIG_PLUGANDTRUST_ECKEY_SCP03=n CONFIG_PLUGANDTRUST_SM_APDU_MUTEX=n   In this way no cmake config change is necessary.   KInd regards, Michael Re: [ABB] [SE050C][Nano-package][Zephyr] setting PlatformSCP Hello Mehdi,  only thing need to be done for using platform scp is:  in prj.conf file  set this: CONFIG_PLUGANDTRUST_SCP03=y I tested nano package with zephyr: 1.  in prj.conf file inside the example folder (example : ..\workspace\modules\crypto\nxp-plugandtrust\examples\se05x_GetInfo\zephyr\prj.conf) , only set this: CONFIG_PLUGANDTRUST_SCP03=y 2. build example: >west build -b frdm_k64f modules/crypto/nxp-plugandtrust/examples/se05x_GetInfo/zephyr --pristine 3. flash binary : C:\nxp\workspace\build\zephyr\zephyr.bin to k64  and it works. kind regards, Parth
View full article
i.MX8Mimi LPDDR4 ZQ0 および ZQ1 ZQ キャリブレーション リファレンス デザイン こんにちは、 ファイル SPF31399 では、R6 は DNP です。別のファイル SPF47712 も同じで、MT53D512M32D2DS はデュアルダイです。SO、R6 に 240 オームの抵抗器を配置する必要がありますか? どのビジョンが最新ですか? MT53D512M32D2DS は EOL になります。これを MT53E1G32D2FW に交換したいのですが、ハードウェアのどの部分を変更する必要があるか教えていただけますか?それとも、PCB を変更する必要がなく、完全に互換性があるのでしょうか? ありがとう! HW-オープンソース#i.MX8 mini HW-Open-Source Re: i.MX8Mimi LPDDR4 ZQ0 and ZQ1 ZQ calibration reference design こんにちは@Zack8 R6を接続する必要はありません。ZQ キャリブレーション抵抗は 1 つで十分です。 BR
View full article
PN5180 I cannot authenticate with mifare classic Hi, I am writing my own driver to read and write blocks in sectors on a card Mifare Classic, using a Nordic MCU and the PNEV5180B board, I can do the steps in the examples as follows: 1. REQA....ok 2. Anticollision CL1.....ok 3. Select ......ok 4. Authenticate.... error when I send the authentication command I get 0x02 (Timeout waiting for card response (card not present).) but the card is present, I have tried to compare it with the example as proposed here https://community.nxp.com/t5/Other-NXP-Products/pn5180-mifare-authentication-key-timeout/m-p/1202221 but I can't find the problem. Question 1: is there any documentation on how to do the authentication with diagrams or easy to understand examples, similar to the other commands? Question 2: I must authenticate to read the sectors? I have tried to read them without authenticating but it doesn't work either. thanks Re: PN5180 I cannot authenticate with mifare classic Hi,  in docstore the file is not present. Mifare Classic Crypto1 is not implemented in the pn5180 ? With the command 0x0C don't work. With the command 0x09 send don't work (and the system status is b'\x03\x04\x00\x00') With PN532 don't have problem. I have sniff the command but i don't see any difference. I would be very sorry because I was developing a new reader and your chip is fantastic but not reading Mifare Classic seems like a big limitation to me. Re: PN5180 I cannot authenticate with mifare classic I got through NDA,  I couldn't find SW666815. Re: PN5180 I cannot authenticate with mifare classic Hello @cesarP  NDA doc for PN518 is SW666815, if you've had a valid NDA, then you can download from: https://www.docstore.nxp.com/ For doc store account issue, please contact [email protected] for further support. Best Regards, kelly Re: PN5180 I cannot authenticate with mifare classic thank you for your response: I have already sent the NDA and I am supposed to have full access to the documents but I can't find the authentication example you mention, could you tell me where I can find it? Re: PN5180 I cannot authenticate with mifare classic Hello @cesarP  for your question my answers are the following: 1. Yes, you're right. There is an example for how to authenticate MIFARE CLASSIC by PN5180, but this is a secure document, so you need to sign an NDA. In case you need to sign an NDA, please let me know. 2. Read sector 0 could not be authentication, the other sectors all need to be authenticated and then can be read or written. For more the details, please check the dedicated datasheet. Best Regard, kelly
View full article
S32K396-BGA-DC1 以太网连接 正在研究在 S32K396 上使用以太网,并调查连接的选项。 我们购买 S32K396-BGA-DC1 和 S32X-MB 时,假定可以使用 S32X-MB 上的 T1S PHY,但 S32K396-BGA-DC1 默认将 PHY 信号连接到单独的 PHY 连接,而不是 MB 连接器,这恰巧也破坏了许多提供的示例,如 SPI 等。 S32K396-BGA-DC1 板上的捆扎电阻器用于重新布线以改用 MB 连接尚不完全清楚。设计资源下只提供了 gerbers,而且它似乎缺少网络 & 元器件信息,因此不必要地难以浏览电路板设计。还有更容易消化的板设计资源吗? 或者,有哪些 PHY 板可用于 S32K396-BGA-DC1 上的 PHY 连接器? Re: S32K396-BGA-DC1 ethernet connectivity 是的,我指的是 100BASE-T1。 我设法找到了电阻器。只是在没有可搜索元数据的情况下直观地搜索看板时非常耗时。 TJA1103-SDBR 板的可用性有点低。我想,即使我们不使用 MACSEC,TJA1104-SDBR 也同样适用。 Re: S32K396-BGA-DC1 ethernet connectivity 你好,@Henrik-Wires、 需要说明的是,S32X-MB 上没有T1S PHY。有 100BASE-T1 TJA1103。 是的,S32K396 的 EMAC 默认路由至 SABRE 连接器。关于 PCB,没有更多可用文件。不过,通过印刷电路板上的白色标签可以找到捆绑电阻。 或者,https://www.nxp.com/part/TJA1103-SDBR适合 S32K396-BGA-DC1 上的 SABRE 连接器。 TJA1103-SDBR 需要处于 rev-RMII 模式,才能在 TXC 上产生时钟 -> ,在 CONFIG4 上添加跳线 2-3。 顺祝商祺! 帕维尔 Re: S32K396-BGA-DC1 ethernet connectivity 你好,@Henrik-Wires、 是的,TJA1104-SDBR 应与 TJA1103-SDBR 一样有效。 顺祝商祺! 帕维尔 Re: S32K396-BGA-DC1 ethernet connectivity 感谢您提醒我们检查 CONFIG。交付的默认配置与"不同" 。
View full article