Multi Source Translation Content

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

Multi Source Translation Content

Discussions

Sort by:
初期プログラミング後に書き換えると、SRK OTP ヒューズ値が 0 から 1 に変化します こんにちはNXPサポート、 私は現在、i.MX6ULLでSRK OTPヒューズのプログラミングに取り組んでいます。 最初は、UUUツールを使用して、.autoに以下のコマンドを追加してヒューズを作成しますスクリプト。 FB: ucmd fuse prog -y 3 0xXXXXXXXX   テスト中に、U-Boot シェルから fuse prog コマンドを使用して、すでにプログラムされた OTP ヒューズ を書き直 してみました。 書き換えを試みた後、ヒューズの値がわずかに変化したことを観察しました—たとえば、0x057a6cf3から0x057a6cf7、0x057a6cffに。 私の最初の分析から、OTPヒューズはビットを0から1に変更することは許可しますが、1から0への変更は許可しないようです。これは、一般的なOTPの動作と一致します(1回限りのプログラム可能:追加のビットを設定するだけで、クリアはしません)。 質問: SRKハッシュを扱っている場合、OTPに書き込まれると変更しないでください。しかし、それは変化しているので、どのようにそれを防ぐのですか? さらに詳細が必要な場合はお知らせください。 ご支援いただきありがとうございます Security
View full article
S32K144 EEPROM的写入数据问题 我参考AN11983对S32K144的EEPROM进行配置,可以正常每隔4个地址比如0x14000000 0x14000004写入数据,但如果不是上述地址,比如在0x14000001 0x14000002 0x14000003等写入数据,就会出现“Can't find a source file at "F:\...\...\Debug_FLASH/../Project_Settings/Startup_Code/startup_S32K144.S"”的警告,请问是我哪里没有配置好,还是有其他原因?
View full article
UART configuration and operation for LPC55S16 Hi, I am using the LPC55S16 evaluation board. In our design, there is a UART that needs to be configured for half-duplex operation. It should normally function in RX mode, but when receiving data, it should switch to TX mode to send a response back. Later, at some point, we need to convert the UART to full-duplex operation. Is this achievable? If so, how can it be done? Regards, Winston Re: UART configuration and operation for LPC55S16 Hi, Follow up question, when  the UART works in half duplex mode, actually I need to set it as one-wire UART - the TX and RX are in the same line. When the UART works in full duplex mode, the TX and RX are separate lines. Is there a solution for this kind of settings? Regards, Winston Re: UART configuration and operation for LPC55S16 HI @yangao  Yes, you can configure the UART on the LPC55S16 for both half-duplex and full-duplex operation. Configure UART initially for receiving (RX) USART_GetDefaultConfig(&config); config.baudRate_Bps = BOARD_DEBUG_UART_BAUDRATE; config.enableTx = false; config.enableRx = true; USART_Init(DEMO_USART, &config, DEMO_USART_CLK_FREQ); Configure UART for full-duplex (TX and RX enabled) USART_GetDefaultConfig(&config); config.baudRate_Bps = BOARD_DEBUG_UART_BAUDRATE; config.enableTx = true; config.enableRx = true; USART_Init(DEMO_USART, &config, DEMO_USART_CLK_FREQ); BR Hang
View full article
SAI 作为 24 位//192kHz 的 I2S 无法在 RT1024 上工作 你好。 我正在尝试以 24 位/192kHz 运行 PCM4104 DAC。 到目前为止,我已经成功修改了“evkmimxrt1024_sai_interrupt_transfer”示例,足以重现音乐。文件为 16bits//48kHz,但是,当“kSAI_WordWidth16bits”更改为“kSAI_WordWidth24bits”时,即使不改变采样频率,48kHz 频率也会降至 42.68kHz。 我已经用示波器测量了 MCLK,并且在两种情况下(48 和 42.68 kHz)均正确生成 我让 system.c以及将 I2S 配置为附件的外部库 知道为什么会发生这种情况吗? 谢谢!! 回复:SAI 作为 I2S 在 24 位//192kHz 下无法在 RT1024 上工作 谢谢!确实,把源文件改成24bits&192kHz采样率的就解决了问题。 回复:SAI 作为 I2S 在 24 位//192kHz 下无法在 RT1024 上工作 你好@DigitalBrain , 我将进行内部询问以获取有关此问题的更多信息,并尽快回复。感谢您的耐心。 BR 哈比卜 回复:SAI 作为 I2S 在 24 位//192kHz 下无法在 RT1024 上工作 此外,MCLK(sourceClockHz)= 28.08MHz 似乎正确,但当谈到 BCLK 时: 位时钟频率=采样率*位宽度*通道数 位时钟频率=192kHz*24位*2=9.216MHz 根据计算应该是9.216MHz,但我在示波器上测量的是7.012MHz。我理解,如果该频率低于期望值,WS 频率也将低于目标值。这是正确的吗?
View full article
Any MCU from NXP can support separated address and data pins for external bus? Hello,  I selected MCX Micro as a location for my question. But this question is not for specific MCU family from NXP. My question is, is there any MCUs from NXP that can support separated address and data pins for external bus? In my understanding, NXP's MCU that support the external bus interface  have multiplexed address/data pins. Regards, Norihiro Michigami AVNET Package and IO|GPIO Re: Any MCU from NXP can support separated address and data pins for external bus? Hello Jun,  Thank you for your comment. I understood your point. BTW, customer may have questions that are not classified to specific MCU like this question.  If there is a forum for general questions, it may be good for customers. Regards, Norihiro Michigami AVNET Re: Any MCU from NXP can support separated address and data pins for external bus? Hi norihiromichiga , Thanks. I was considering MCX because this is MCX space.  Considering other MCUs,  LPC17xx/18xx, LPC40xx integrates EMC module which has saperated data and address external bus. But these LPCs are legacy product which is not recommended for new design. RT1060 RT1170 also support EMC. I would suggest you consider as well. Hope this helps, Jun Zhang Re: Any MCU from NXP can support separated address and data pins for external bus? Hello Jun,  Thank you for your answer. But as I posted in my first post, my quesiton is not limited to MCX series. Does NXP have any series of MCU that can suppor seperated address and data bus of external bus interface? Regards, Norihiro Michigami AVNET Re: Any MCU from NXP can support separated address and data pins for external bus? Hi norihiromichiga, MCX N only supports external memory over FlexSPI interface or SPI  Hope this will help you, Jun Zhang
View full article
メタレイヤー内で cargo をビルドする方法 私はこの例に従って、cargo.bbclassを継承し、簡単なプロジェクトをコンパイルしていました。 https://www.youtube.com/watch?v=aPsMuSU-Btw しかし、私は次のエラーを得ました: ``` メモ: タスクの実行 エラー: my-test-0.1-r0do_compile: ExecutionError('/opt/yocto/imx-6.6.3-1.0.0-build/build_fsl-imx-wayland/tmp/work/armv8a-poky-linux/my-test/0.1/temp/run.do_compile.24257',101、なし、なし) エラー:障害のログファイルが/ opt / yocto / imx-6.6.3-1.0.0-build / build_fsl-imx-wayland / tmp / work / armv8a-poky-linux / my-test / 0.1 / temporary / log.do_compile.24257に保存されています。 ログデータは次のとおりです。 |DEBUG: シェル関数 do_compile を実行しています |注:/opt/yocto/imx-6.6.3-1.0.0-build/build_fsl-imx-wayland/tmp/work/armv8a-poky-linux/my-test/0.1/rust-targets/の錆ターゲットを使用 |注:cargo = /opt/yocto/imx-6.6.3-1.0.0-build/build_fsl-imx-wayland/tmp/work/armv8a-poky-linux/my-test/0.1/recipe-sysroot-native/usr/bin/cargo |注:cargo build -v --frozen --target aarch64-poky-linux-gnu --release --manifest-path=/opt/yocto/imx-6.6.3-1.0.0-build/build_fsl-imx-wayland/tmp/work/armv8a-poky-linux/my-test/0.1/git//Cargo.toml |エラー:ロックファイル/ opt / yoc / imx-6.6.3-1.0.0-build / build_fsl-imx-wayland / tmp / work / armv8a-poky-linux / my-test / 0.1 / git / Cargo.lockを更新する必要がありますが、これを防ぐために--frozenが渡されました |ネットワークにアクセスせずにロックファイルを生成したい場合は、--frozenフラグを削除して、代わりに--offlineを使用してください。 |警告: /opt/yocto/imx-6.6.3-1.0.0-build/build_fsl-imx-wayland/tmp/work/armv8a-poky-linux/my-test/0.1/temp/run.do_compile.24257:185「"cargo"ビルド-v」から101を終了 --frozen --target aarch64-poky-linux-gnu --release --manifest-path=/opt/yocto/imx-6.6.3-1.0.0-build/build_fsl-imx-wayland/tmp/work/armv8a-poky-linux/my-test/0.1/git//Cargo.toml "$@"' |警告:バックトレース(BB生成スクリプト): |#1:oe_cargo_build、/ opt / yocto / imx-6.6.3-1.0.0-build / build_fsl-imx-wayland / tmp / work / armv8a-poky-linux / my-test / 0.1 / temp / run.do_compile.24257、185番線 |#2:cargo_do_compile、/ opt / yocto / imx-6.6.3-1.0.0-build / build_fsl-imx-wayland / tmp / work / armv8a-poky-linux / my-test / 0.1 / temp / run.do_compile.24257、157番線 |#3:do_compile、/ opt / yocto / imx-6.6.3-1.0.0-build / build_fsl-imx-wayland / tmp / work / armv8a-poky-linux / my-test / 0.1 / temp / run.do_compile.24257、152番線 |#4:メイン、/ opt / yocto / imx-6.6.3-1.0.0-build / build_fsl-imx-wayland / tmp / work / armv8a-poky-linux / my-test / 0.1 / temperature / run.do_compile.24257、198番線 エラー:タスク(/opt/yocto/imx-6.6.3-1.0.0-build/sources/meta-my-test/recipes-cargo/install/my-test_0.1.bb:do_compile)終了コード '1' で失敗しました 注: タスクの概要: 5745 個のタスクを試行し、そのうち 5743 個を再実行する必要がなく、1 個が失敗しました。 ``` 私は 'bitbake -f my-test core-image-minimal' を実行しました。BBLAYERSも追加されました。 簡単に言うと、RustプログラムをiMX93EVKにコンパイルしてインストールする方法は? Re:メタレイヤー内でcargoをビルドする方法をコンパイルする方法 よし Re:メタレイヤー内でcargoをビルドする方法をコンパイルする方法 私は愚か者で、より正確には初心者です。私が参照していたリポジトリ(https://gitlab.com/pbarker.dev/rust/print-randCargo.lockファイルがありませんでした。私はそれを私のマシンで手動で実行しました、ファイルをコピーしました、そして出来上がり! リポジトリがダウンロードされたパスは、デフォルトでは「/opt/yocto/imx-6.6.3-1.0.0-build/build_fsl-imx-wayland/tmp/work/armv8a-poky-linux/my-test/0.1/git/」でした。まあ、どうにかしてそれを上書きすることができます。これは問題ではありませんでした。まあ、うまくいけば、将来他の初心者を助けることができます。 編集:いくつかの他の落とし穴: * 私の場合、「IMAGE_INSTALL」は機能しませんでしたが、「CORE_IMAGE_EXTRA_INSTALL」を使用すると、カスタムレイヤーのbbファイルを「bitbake core-image-minimal」ビルドに追加できました。レシピの名前は私が知る限り関係ありません。 * 最初の実行で、クレートのハッシュが欠落していることがわかりました。幸いなことに、修正は印刷されています。'.bb' ファイルの横に '.inc' ファイルがあるものを追加すると、.bb を変更せずにそれを乗り越えるのに十分でしたfile 'cargo bitbake' コマンドが生成されます。 Re:メタレイヤー内でcargoをビルドする方法をコンパイルする方法 CBUK-ダニー CBUK-ダニー 寄稿者 I ところで、元の投稿のこの行は、貨物自体が機能していることを示しています。 ``` エラー:ロックファイル/ opt / yoc / imx-6.6.3-1.0.0-build / build_fsl-imx-wayland / tmp / work / armv8a-poky-linux / my-test / 0.1 / git / Cargo.lockを更新する必要がありますが、これを防ぐために--frozenが渡されました ``` 私が欠けているのは、通常の貨物プロジェクトでデフォルトのYocto動作--frozenを使用する方法がわからないことです。 しかし、これはNXPの範囲外だと思います。それでも、ouの人たちは、スクリプトを持っていることや、このフォーラムの他のいくつかの投稿にすべてコメントしました。だから、試してみる価値があると思ったので、もしあればそのようなヒントをいただければ幸いです。 Re:メタレイヤー内でcargoをビルドする方法をコンパイルする方法 まず、ありがとう。 bbファイルに'DEPENDS += " meta-rust "'を追加すると、次のエラーが発生します。「メタ錆」が「oe-core」に吸収されると思っていたので、本当にnanbieldに必要ですか? ``` キャッシュの読み込み: 100% |########################################################################################################################|Time: 0:00:00依存関係キャッシュから 5451 エントリをロードしました。注:欠落しているタスクキューの依存関係の解決エラー:何も「meta-rust」を提供しません(ただし、 /opt/yocto/imx-6.6.3-1.0.0-build/sources/meta-my-test/recipes-my/company/my-test_0.1.bbそれに依存するか、それ以外の場合はそれを必要とします) エラー: 必要なビルド ターゲット 'my-test' にはビルド可能なプロバイダーがありません。 欠落している、または構築できない依存関係チェーンは: ['my-test', 'meta-rust'] 概要: 2 つの ERROR メッセージがあり、ゼロ以外の終了コードが返されました。 ``` 編集:私はまた、imx-setup-release.sh の「BBLAYERS」の別のエコーとして、およびリポジトリツールのマニフェストに追加しました。ただし、nanbieldはこの手口と互換性がありません。 '''エラー:レイヤーrust-layerは、これらのシリーズのみをサポートするコアレイヤーと互換性がありません:nanbield(レイヤーはmickledore honister hardknott gatesgarth kirkstoneと互換性があります)'''
View full article
S32K344 上的 HSE - 无法进行对称加密 大家好, 目前我正在使用 S32K344 上的 HSE-B 进行工作。我想使用“ HSE_SRV_ID_SYM_CIPHER”服务来执行闪存中的数据的 AES-CTR 加密/解密。当调用相应的 HSE 服务时,我总是收到错误代码“HSE_SRV_RSP_NOT_ALLOWED” 。我已经阅读了 HSE 固件参考手册以便识别问题,但我无法弄清楚。 我附上了以下图片: NVM 密钥属性的定义(包括对称密钥) 相应HSE服务的定义 相应HSE服务的函数调用 希望您能帮助摆脱这个问题。 谢谢!
View full article
S32K312 IIC DMA从机模式最大接收长度只能为8字节 大家好 我正在使用IIC从机的DMA功能,但是IIC一次可以接收的最大长度只有8个字节。无法从缓冲区检索超过 8 个字节的数据。我已经上传了项目,您能帮我找出问题所在吗? 谢谢! 回复:S32K312 IIC DMA从模式最大接收长度只能为8字节 感谢您的帮助。这个例程虽然存在问题,但是可以用来对比我现在项目中的错误。我已经确定了原因 回复:S32K312 IIC DMA从模式最大接收长度只能为8字节 正如你所说:每次传输可以传输的字节数不受限制。 我设置的接收数据长度是18个字节,为什么接收不到超过8个字节的数据?
View full article
imx8 Quad Max 通过读取保险丝来确定 SOM 是否关闭? 有没有办法通过保险丝或其他方式来确定“ahab_close”已被调用? 如果有我可以读取的保险丝,我愿意在 Linux 中执行此操作。 或者,如果关闭状态不可用,我可以设置哪个用户保险丝可读以用作指示器? i.MX 8 系列 | i.MX 8QuadMax (8QM) | 8QuadPlus 回复:imx8 Quad Max 通过读取保险丝确定 SOM 是否关闭? 如果没有可以调用 SCFW 的 Linux 用户空间实用程序,那就没有什么帮助了。对于我们的情况,我有一个解决方法,可以让我们的制造过程能够管理保险丝。 回复:imx8 Quad Max 通过读取保险丝确定 SOM 是否关闭? 如果您使用终端并且有人正在阅读并采取行动,那么响应会很好,因此这不是一个可用的解决方案。 我无法使用 uboot“test”命令中的“ahab_status”向内核发送命令行参数中的状态(结果代码并不总是正确的“$?”) 我不明白为什么 NXP 不能像 imx8m Plus 一样使用可读保险丝来指示状态……有这么多未使用的保险丝。 回复:imx8 Quad Max 通过读取保险丝确定 SOM 是否关闭? 情况是这样的:我们不能允许“未关闭”的 SOM 运行已签名的、用于封闭设备的代码。这是一个重大的安全漏洞。 在 imx8M Plus 上,我们可以读取保险丝来确定这一点并阻止处理器启动,并将其报告为安全问题。 在 Quad Max 上,似乎没有办法通过读取保险丝来确定这一点(我希望我错了),但是 Uboot 报告这一点并没有帮助……如果有一个“用户保险丝”(NXP 将它们称为“客户 OTP 保险丝”),我可以在用户空间读取它,并且可以在我关闭 SOM 的同时由 uboot 烧录,那就可以了。 回复:imx8 Quad Max 通过读取保险丝确定 SOM 是否关闭? 如果有一个可以被 imx-scu-ocotp0 驱动程序读取的“客户保险丝”,那就太好了……
View full article
Build error with pseudo in meta-nxp-desktop layer on IMX8MP I'm experiencing compilation errors when building imx-image-desktop using the meta-nxp-desktop layer. The build consistently fails when compiling pseudo-native with the following error: ports/unix/guts/unlinkat.c: In function 'wrap_unlinkat': pseudo_client.h:14:65: error: '_STAT_VER' undeclared (first use in this function) 14 | #define base_fstatat(dirfd, path, buf, flags) real___fxstatat64(_STAT_VER, dirfd, path, buf, flags) | ^~~~~~~~~ Additionally, there are multiple functions in ports/linux/pseudo_wrappers.c that lack return statements: ports/linux/pseudo_wrappers.c: In function 'pseudo_stat': ports/linux/pseudo_wrappers.c:12:1: warning: control reaches end of non-void function [-Wreturn-type] 12 | } | ^ These errors appear to be related to libc compatibility issues. The pseudo recipe in meta-nxp-desktop currently has COMPATIBLE_HOST:libc-musl = 'null' which suggests it's not compatible with musl libc, but the errors occur even on a glibc system. I've tried several approaches: Adding -D_STAT_VER=1 -D_MKNOD_VER=1 to CFLAGS Creating patches to define these constants in the appropriate files Disabling -Werror flags Setting INHERIT_remove = "pseudo" in local.conf None of these approaches have resolved the issue completely. Has anyone encountered similar issues with the meta-nxp-desktop layer? Is there a known workaround or fix for this pseudo compilation error? System information: Host OS: Ubuntu 22.04 Yocto version: Langdale (4.1) meta-nxp-desktop commit/version: imx-6.1.1-1.0.0_desktop.xml i.MX 8M | i.MX 8M Mini | i.MX 8M Nano Re: Build error with pseudo in meta-nxp-desktop layer on IMX8MP The support for imx-image-desktop was stopped, instead of that, please use Debian and have a reference to NXPDEBIAN  Regards Harvey
View full article
SPI Communication Issue with TC6 SPI Protocol Hello, I am implementing SPI communication between the S32K144 MCU and MAC-PHY (LAN8650). For Control Transaction Write/Read (where the master writes/reads a register value to/from the slave), the process follows the TC6 SPI protocol as shown in the image below: Before stepping forward to actual register read/write to MAC-PHY, I thought of testing it with some dummy data and verify it by probing in at MOSI of S32K144 and SDI of MAC-PHY(LAN8650) chip. With that I could successfully send 16 bit and 32 bit data, but whereas no data transactions happening for 64 bit transfer.  As per above picture inorder to read/ write the slave register it should be 64 bits(Control header + Data) or higher. The working code 32 bits dummy data transfer is as follows :  #include "S32K144.h" /* include peripheral declarations S32K144 */ uint32_t tx_32bits = 0xFD00FD00; //uint32_t tx_32bits_array[2] = {0xFD00, 0X1010}; uint32_t LPSPI0_32bits_read; /* Returned data in to SPI */ void LPSPI0_init_master(void) { PCC->PCCn[PCC_LPSPI0_INDEX] = 0; /* Disable clocks to modify PCS ( default) */ PCC->PCCn[PCC_LPSPI0_INDEX] = 0xC6000000; /* Enable PCS=SPLL_DIV2 (40 MHz func'l clock) */ LPSPI0->CR = 0x00000000; /* Disable module for configuration */ LPSPI0->IER = 0x00000000; /* Interrupts not used */ LPSPI0->DER = 0x00000000; /* DMA not used */ LPSPI0->CFGR0 = 0x00000000; /* Defaults: */ /* RDM0=0: rec'd data to FIFO as normal */ /* CIRFIFO=0; Circular FIFO is disabled */ /* HRSEL, HRPOL, HREN=0: Host request disabled */ LPSPI0->CFGR1 = 0x00000001; /* Configurations: master mode*/ /* PCSCFG=0: PCS[3:2] are enabled */ /* OUTCFG=0: Output data retains last value when CS negated */ /* PINCFG=0: SIN is input, SOUT is output */ /* MATCFG=0: Match disabled */ /* PCSPOL=0: PCS is active low */ /* NOSTALL=0: Stall if Tx FIFO empty or Rx FIFO full */ /* AUTOPCS=0: does not apply for master mode */ /* SAMPLE=0: input data sampled on SCK edge */ /* MASTER=1: Master mode */ LPSPI0->TCR = 0x1100001F; /* Transmit cmd: PCS1, 32 bits, prescale func'l clk by 4, etc*/ /* CPOL=0: SCK inactive state is low */ /* CPHA=0: On the rising edge of SCLK the data is captured, while on the falling edge of SCLK the data will change /* PRESCALE=2: Functional clock divided by 2**2 = 4 */ /* PCS=1: Transfer using PCS1 */ /* LSBF=0: Data is transfered MSB first */ /* BYSW=0: Byte swap disabled */ /* CONT, CONTC=0: Continuous transfer disabled */ /* RXMSK=0: Normal transfer: rx data stored in rx FIFO */ /* TXMSK=0: Normal transfer: data loaded from tx FIFO */ /* WIDTH=0: Single bit transfer */ /* FRAMESZ=31: # bits in frame = 31+1=32 */ LPSPI0->CCR = 0x04090808; /* Clock dividers based on prescaled func'l clk of 100 nsec */ /* SCKPCS=4: SCK to PCS delay = 4+1 = 5 (500 nsec) */ /* PCSSCK=4: PCS to SCK delay = 9+1 = 10 (1 usec) */ /* DBT=8: Delay between Transfers = 8+2 = 10 (1 usec) */ /* SCKDIV=8: SCK divider =8+2 = 10 (1 usec: 1 MHz baud rate) */ LPSPI0->FCR = 0x00000003; /* RXWATER=0: Rx flags set when Rx FIFO >0 */ /* TXWATER=3: Tx flags set when Tx FIFO <= 3 */ LPSPI0->CR = 0x00000009; /* Enable module for operation */ /* DBGEN=1: module enabled in debug mode */ /* DOZEN=0: module enabled in Doze mode */ /* RST=0: Master logic not reset */ /* MEN=1: Module is enabled */ } void LPSPI0_tx_32bits (uint32_t send) { while((LPSPI0->SR & LPSPI_SR_TDF_MASK)>>LPSPI_SR_TDF_SHIFT==0); /* Wait for Tx FIFO available */ LPSPI0->TDR = send; /* Transmit data */ LPSPI0->SR |= LPSPI_SR_TDF_MASK; /* Clear TDF flag */ } uint32_t LPSPI0_rx_32bits (void) { uint32_t recieve = 0; while((LPSPI0->SR & LPSPI_SR_RDF_MASK)>>LPSPI_SR_RDF_SHIFT==0); /* Wait at least one RxFIFO entry */ recieve= LPSPI0->RDR; /* Read received data */ LPSPI0->SR |= LPSPI_SR_RDF_MASK; /* Clear RDF flag */ return recieve; /* Return received data */ } void PORT_init (void) {   //Master:   PCC->PCCn[PCC_PORTB_INDEX] |= PCC_PCCn_CGC_MASK;   PORTB->PCR[2] |= PORT_PCR_MUX(3); /*Port B2: MUX = ALT3, SCK*/   PORTB->PCR[3] |= PORT_PCR_MUX(3); /*Port B3: MUX = ALT3, SIN*/   PORTB->PCR[4] |= PORT_PCR_MUX(3); /*Port B4: MUX = ALT3, SOUT*/   PORTB->PCR[5] |= PORT_PCR_MUX(3); } int main(void) { uint32_t counter = 0; volatile int i; WDOG_disable(); SOSC_init_8MHz(); /* Initialize system oscillator for 8 MHz xtal */ SPLL_init_160MHz(); /* Initialize SPLL to 160 MHz with 8 MHz SOSC */ NormalRUNmode_80MHz(); /* Init clocks: 80 MHz sysclk & core, 40 MHz bus, 20 MHz flash */ LPSPI0_init_master(); PORT_init(); for (;;) { LPSPI0_tx_32bits(tx_32bits); LPSPI0_32bits_read = LPSPI0_rx_32bits(); } return 0; } Note : For 64 bit data transfer, I changed TCR[FRAMESZ]=3F and changed respective data types and values. My questions are: 1. Is S32K144 doesnt support whole 64 bit transfer in one go? [In S32K1xx Series Reference Manual, Rev. 14 at start of page 1623 it means as the maximum frame size is 32 bits?] 2. If it supports only 32 bits, then kindly help me the way that on how to transfer >=64 bits of data. 3. Else if it supports 64 bits, then kindly point me out the changes i have to perform in the above code. Thanks in advance! Re: SPI Communication Issue with TC6 SPI Protocol Hello @Muthappan_Viswanthan  I'm really glad to hear that I was able to help for a change, since I'm usually the one receiving help.   If you have any further questions, feel free to leave a reply 🙂 Re: SPI Communication Issue with TC6 SPI Protocol Thanks for your reply. Rightnow, Iam using older version of S32 DS and doing baremetal programming. But thought of switching to newer version and using RTD, this might helpful for me in that case. Thanks again! Re: SPI Communication Issue with TC6 SPI Protocol Hi, Finally its working and the issue is with header as you stated. Actually, I read like we should set the parity bit to "1'" if we have odd number of 1's between bit 31:1 and thus in my case I didnt set it. After your comment I just deep dive into it and got to know that my understanding is wrong. Thanks for lightning up.! Re: SPI Communication Issue with TC6 SPI Protocol Hello,   I'm responding to your post as I have experience implementing the TC6 protocol using the LAN8651 MAC-PHY chip from Microchip on the S32K314 MCU.   malove_0-1745485549079.png In my case, I used RTD 4.0.0 with S32 Design Studio 3.5, and configured the LPSPI driver as follows.   Based on this LPSPI driver, you should be able to configure a uint8_t tx and rx buffer with 12 elements and perform SPI communication accordingly. ex) uint8_t spiRxBuffer[12], uint8_t spiTxBuffer[12] Re: SPI Communication Issue with TC6 SPI Protocol Hi, a delay in SCK should not be an issue. Check if there are right number of clock periods in words. To say more capture full frame in scope/analyzer. I guess you have wrong parity bit calculated. You wrote "The header seems to be correct, example I used "0x30000c00" for IMASK0." But this time parity bit should be set to have odd number of "1" in header. BR, Petr Re: SPI Communication Issue with TC6 SPI Protocol Thanks for your help so far.  I made the changes to transfer as 3x 32bit words for both read & write. As per the statement from LAN8650 datasheet "When performing control writes, the register data sent over SDI is also echoed back over SDO", I am not getting echoed data as same as what I transmitted during write and read operations. The modified code is as below: void lan8650_write_imask0(uint32_t value) { uint32_   t header = build_ctrl_header(1, 0x00, 0x000C, 0); uint32_t read_tx_header2 = 0; uint32_t read_tx_data2 = 0; CS_LOW(); LPSPI0_tx_32bits(header); // Write header (void)LPSPI0_rx_32bits(); //Read dummy bytes LPSPI0_tx_32bits(value); // Write data read_tx_header2 = LPSPI0_rx_32bits(); // Read Header Echo LPSPI0_tx_32bits(0x00000000); // Write dummy data read_tx_data2 = LPSPI0_rx_32bits(); // Read data Echo CS_HIGH(); } uint32_t lan8650_read_imask0(void) { uint32_t header = build_ctrl_header(0, 0x00, 0x000C, 0); uint32_t rx_header = 0; uint32_t rx_data = 0; CS_LOW(); LPSPI0_tx_32bits(header); // Send header (void)LPSPI0_rx_32bits(); // Dummy data LPSPI0_tx_32bits(0x00000000); // Dummy to clock header rx_header = LPSPI0_rx_32bits(); // Read Header Echo LPSPI0_tx_32bits(0x00000000); // Dummy to clock data rx_data = LPSPI0_rx_32bits(); // Read data CS_HIGH(); return rx_data; } And I measured the SPI lines of LAN8650 with scope and the observations are:  1. CS is LOW for the entire duration of 3x 32bits transfer. 2. SCK not seems to be continuous. After each 32bits transfer SCK is in LOW for some time and then starting back. [Refer below picture channel 2 (green) waveform ] 3. SDI line has the same 32bit header, 32 bit data and 32 bit dummy data which I sent from S32K144 MOSI. 4. SDO echoes "0xC000 0000" during header transmission (Ignored data),  "0xC000 0001" during both data & dummy data transmission which expected to be header & data as per datasheet.   The header seems to be correct, example I used "0x30000c00" for IMASK0. So, whether that delay in SCK between each 32 bits makes an issue? Re: SPI Communication Issue with TC6 SPI Protocol Hi, code looks normal, but I think a protocol looks little bit different. There should be 3 words transferred for single register writing/reading PetrS_0-1744696020470.png PetrS_1-1744696028761.png For both read and write, the Control Header sent to the LAN8650/1 over SDI is always echoed back to the SPI host over SDO. When performing control writes, the register data sent over SDI is also echoed back over SDO. Thus for write you send header, data, dummy words, For read you send header, dummy, dummy words. So try that, measure SPI lines with scope /analyzer to know real frames. Also check header is correct. BR, Petr Re: SPI Communication Issue with TC6 SPI Protocol Hello, I used 2 a) [ set FRAMESZ to 31 for 32bit frame size and control CS manually and fill data registers as per desired number of word transfer.] with some dummy data and it worked. Now, when I tried with my actual task where I need to communicate with LAN8650 chip, I should write/read by sending control header first where the respective address should be present: Muthappan_Viswanthan_0-1744662637917.png For this purpose I used the below code :  #include "S32K144.h" /* include peripheral declarations S32K144 */ #define CS_LOW()    (PTB->PCOR = (1 << 5))  // Clear bit to pull CS low #define CS_HIGH()   (PTB->PSOR = (1 << 5))  // Set bit to pull CS high       //System registers (MMS = 0) const TC6Reg TC6ADR_RESET      = { .mms = 0x00, .addr = 0x003 }; const TC6Reg TC6ADR_CONFIG0    = {.mms = 0x00, 0x0004}; const TC6Reg TC6ADR_STATUS0    = {.mms = 0x00, 0x0008}; const TC6Reg TC6ADR_IMASK0     = {.mms = 0x00, 0x000C}; const TC6Reg TC6ADR_PLCACTL0   = {.mms = 0x04, 0xCA01}; const TC6Reg TC6ADR_PLCACTL1   = {.mms = 0x04, 0xCA02}; const TC6Reg TC6ADR_PLCASTAT   = {.mms = 0x04, 0xCA03}; const TC6Reg TC6ADR_MAC_NCR    = {.mms = 0x01, 0x0000}; const TC6Reg TC6ADR_MAC_NCFGR  = {.mms = 0x01, 0x0001};   uint32_t tx_16bits = 0xFD00FD00; uint32_t tx_32bits_array[2] = {0xFD00, 0X1010}; uint32_t LPSPI0_16bits_read; /* Returned data in to SPI */ uint16_t lan8650_phy_id = 0; uint32_t tx_upper = 0xFD00FD00; uint32_t tx_lower = 0x1010ABCD; uint32_t rx_upper, rx_lower;   // Calculates odd parity for a 32-bit word (excluding bit 0) uint8_t calculate_parity(uint32_t word31to1) {    uint8_t count = 0;    int i;    for (i = 1; i < 32; i++) {        if ((word31to1 >> i) & 0x01) count++;    }    return (count % 2 == 0) ? 0 : 1;  // Return 0 if even (to make odd) }   uint32_t build_ctrl_header(uint8_t wnr, uint8_t mms, uint16_t addr, uint8_t num_regs) {    uint32_t header = 0;    header |= (0U << 31);                 // DNC = 0 (Control)    header |= (0U << 30);                 // HDRB = 0 (Ignored on write)    header |= ((wnr & 0x01) << 29);       // WNR: 1 = write, 0 = read    header |= (0U << 28);                 // AID = 0 (auto-increment)    header |= ((mms & 0x0F) << 24);       // MMS = memory map select    header |= ((addr & 0xFFFF) << 8);     // Register address    header |= ((num_regs & 0x7F) << 1);   // Length (in registers), shifted to [7:1]    uint8_t parity = calculate_parity(header & 0xFFFFFFFE); // Clear bit 0 for parity calc    header |= parity; // Set bit 1 to make parity odd    return header; }     void LPSPI0_init_master(void) { PCC->PCCn[PCC_LPSPI0_INDEX] = 0; /* Disable clocks to modify PCS ( default) */ PCC->PCCn[PCC_LPSPI0_INDEX] = 0xC6000000; /* Enable PCS=SPLL_DIV2 (40 MHz func'l clock) */   LPSPI0->CR = 0x00000000; /* Disable module for configuration */ LPSPI0->IER = 0x00000000; /* Interrupts not used */ LPSPI0->DER = 0x00000000; /* DMA not used */ LPSPI0->CFGR0 = 0x00000000; /* Defaults: */ /* RDM0=0: rec'd data to FIFO as normal */ /* CIRFIFO=0; Circular FIFO is disabled */ /* HRSEL, HRPOL, HREN=0: Host request disabled */ LPSPI0->CFGR1 = 0x00000001; /* Configurations: master mode*/ /* PCSCFG=0: PCS[3:2] are enabled */ /* OUTCFG=0: Output data retains last value when CS negated */ /* PINCFG=0: SIN is input, SOUT is output */ /* MATCFG=0: Match disabled */ /* PCSPOL=0: PCS is active low */ /* NOSTALL=0: Stall if Tx FIFO empty or Rx FIFO full */ /* AUTOPCS=0: does not apply for master mode */ /* SAMPLE=0: input data sampled on SCK edge */ /* MASTER=1: Master mode */ LPSPI0->TCR = 0x1100001F; /* Transmit cmd: PCS3, 16 bits, prescale func'l clk by 4, etc*/ /* CPOL=0: SCK inactive state is low */ /* CPHA=0: On the rising edge of SCLK the data is captured, while on the falling edge of SCLK the data will change /* PRESCALE=2: Functional clock divided by 2**2 = 4 */ /* PCS=3: Transfer using PCS3 */ /* LSBF=0: Data is transfered MSB first */ /* BYSW=0: Byte swap disabled */ /* CONT, CONTC=0: Continuous transfer disabled */ /* RXMSK=0: Normal transfer: rx data stored in rx FIFO */ /* TXMSK=0: Normal transfer: data loaded from tx FIFO */ /* WIDTH=0: Single bit transfer */ /* FRAMESZ=31: # bits in frame = 31+1=32 */ LPSPI0->CCR = 0x04090808; /* Clock dividers based on prescaled func'l clk of 100 nsec */ /* SCKPCS=4: SCK to PCS delay = 4+1 = 5 (500 nsec) */ /* PCSSCK=4: PCS to SCK delay = 9+1 = 10 (1 usec) */ /* DBT=8: Delay between Transfers = 8+2 = 10 (1 usec) */ /* SCKDIV=8: SCK divider =8+2 = 10 (1 usec: 1 MHz baud rate) */ LPSPI0->FCR = 0x00000003; /* RXWATER=0: Rx flags set when Rx FIFO >0 */ /* TXWATER=3: Tx flags set when Tx FIFO <= 3 */ LPSPI0->CR = 0x00000009; /* Enable module for operation */ /* DBGEN=1: module enabled in debug mode */ /* DOZEN=0: module enabled in Doze mode */ /* RST=0: Master logic not reset */ /* MEN=1: Module is enabled */     }     void LPSPI0_tx_32bits (uint32_t send) { while((LPSPI0->SR & LPSPI_SR_TDF_MASK)>>LPSPI_SR_TDF_SHIFT==0); /* Wait for Tx FIFO available */ LPSPI0->TDR = send; /* Transmit data */ LPSPI0->SR |= LPSPI_SR_TDF_MASK; /* Clear TDF flag */ }       uint32_t LPSPI0_rx_32bits (void) { uint32_t recieve = 0;   while((LPSPI0->SR & LPSPI_SR_RDF_MASK)>>LPSPI_SR_RDF_SHIFT==0); /* Wait at least one RxFIFO entry */ recieve= LPSPI0->RDR; /* Read received data */ LPSPI0->SR |= LPSPI_SR_RDF_MASK; /* Clear RDF flag */ return recieve; /* Return received data */ }   void SOSC_init_8MHz(void) {  SCG->SOSCDIV=0x00000101; /* SOSCDIV1 & SOSCDIV2 =1: divide by 1 */  SCG->SOSCCFG=0x00000024; /* Range=2: Medium freq (SOSC between 1MHz-8MHz)*/  /* HGO=0: Config xtal osc for low power */ /* EREFS=1: Input is external XTAL */  while(SCG->SOSCCSR & SCG_SOSCCSR_LK_MASK); /* Ensure SOSCCSR unlocked */  SCG->SOSCCSR=0x00000001; /* LK=0: SOSCCSR can be written */  /* SOSCCMRE=0: OSC CLK monitor IRQ if enabled */ /* SOSCCM=0: OSC CLK monitor disabled */ /* SOSCERCLKEN=0: Sys OSC 3V ERCLK output clk disabled */ /* SOSCLPEN=0: Sys OSC disabled in VLP modes */ /* SOSCSTEN=0: Sys OSC disabled in Stop modes */ /* SOSCEN=1: Enable oscillator */  while(!(SCG->SOSCCSR & SCG_SOSCCSR_SOSCVLD_MASK)); /* Wait for sys OSC clk valid */ } void SPLL_init_160MHz(void) {  while(SCG->SPLLCSR & SCG_SPLLCSR_LK_MASK); /* Ensure SPLLCSR unlocked */  SCG->SPLLCSR = 0x00000000; /* SPLLEN=0: SPLL is disabled (default) */  SCG->SPLLDIV = 0x00000302; /* SPLLDIV1 divide by 2; SPLLDIV2 divide by 4 */  SCG->SPLLCFG = 0x00180000; /* PREDIV=0: Divide SOSC_CLK by 0+1=1 */  /* MULT=24: Multiply sys pll by 4+24=40 */ /* SPLL_CLK = 8MHz / 1 * 40 / 2 = 160 MHz */  while(SCG->SPLLCSR & SCG_SPLLCSR_LK_MASK); /* Ensure SPLLCSR unlocked */  SCG->SPLLCSR = 0x00000001; /* LK=0: SPLLCSR can be written */  /* SPLLCMRE=0: SPLL CLK monitor IRQ if enabled */ /* SPLLCM=0: SPLL CLK monitor disabled */ /* SPLLSTEN=0: SPLL disabled in Stop modes */ /* SPLLEN=1: Enable SPLL */  while(!(SCG->SPLLCSR & SCG_SPLLCSR_SPLLVLD_MASK)); /* Wait for SPLL valid */ } void NormalRUNmode_80MHz (void) { /* Change to normal RUN mode with 8MHz SOSC, 80 MHz PLL*/  SCG->RCCR=SCG_RCCR_SCS(6) /* PLL as clock source*/  |SCG_RCCR_DIVCORE(0b01) /* DIVCORE=1, div. by 2: Core clock = 160/2 MHz = 80 MHz*/  |SCG_RCCR_DIVBUS(0b01) /* DIVBUS=1, div. by 2: bus clock = 40 MHz*/  |SCG_RCCR_DIVSLOW(0b10); /* DIVSLOW=2, div. by 3: SCG slow, flash clock= 26 2/3 MHz*/  while (((SCG->CSR & SCG_CSR_SCS_MASK) >> SCG_CSR_SCS_SHIFT ) != 6) {}  /* Wait for sys clk src=SPLL */ }  /* TXWATER=3: Tx flags set when Tx FIFO <= 3 */     void WDOG_disable (void){  WDOG->CNT=0xD928C520; /*Unlock watchdog*/  WDOG->TOVAL=0x0000FFFF; /*Maximum timeout value*/  WDOG->CS = 0x00002100; /*Disable watchdog*/ } void PORT_init (void) { //Master: PCC->PCCn[PCC_PORTB_INDEX] |= PCC_PCCn_CGC_MASK; PORTB->PCR[2] |= PORT_PCR_MUX(3); /*Port B2: MUX = ALT3, SCK*/ PORTB->PCR[3] |= PORT_PCR_MUX(3); /*Port B3: MUX = ALT3, SIN*/ PORTB->PCR[4] |= PORT_PCR_MUX(3); /*Port B4: MUX = ALT3, SOUT*/ //PORTB->PCR[5] |= PORT_PCR_MUX(3); PORTB->PCR[5] |= PORT_PCR_MUX(1); PTB->PDDR |= (1<<5); PTB->PSOR |= (1<<5);     }   void lan8650_write_reset(void) {    uint32_t header = build_ctrl_header(1, 0x00, 0x0003, 0); // Write to RESET reg    CS_LOW();    LPSPI0_tx_32bits(header); (void)LPSPI0_rx_32bits();     // Write header    LPSPI0_tx_32bits(0x00000001); (void)LPSPI0_rx_32bits(); // Write data    CS_HIGH(); } void lan8650_write_imask0(uint32_t value) {    uint32_t header = build_ctrl_header(1, 0x00, 0x000C, 0);    CS_LOW();    LPSPI0_tx_32bits(header); (void)LPSPI0_rx_32bits();    LPSPI0_tx_32bits(value);  (void)LPSPI0_rx_32bits();    CS_HIGH(); } uint32_t lan8650_read_imask0(void) {    uint32_t header = build_ctrl_header(0, 0x00, 0x000C, 0);    uint32_t data = 0;    CS_LOW();    LPSPI0_tx_32bits(header); (void)LPSPI0_rx_32bits(); // Send header    LPSPI0_tx_32bits(0x00000000);                       // Dummy to clock data    data = LPSPI0_rx_32bits();                          // Get data    CS_HIGH();    return data; }     int main(void) {       uint32_t imask_read_value;     volatile int i;       // Usual system and SPI setup       WDOG_disable();       SOSC_init_8MHz();       SPLL_init_160MHz();       NormalRUNmode_80MHz();       PORT_init();           // Configure SPI pins       LPSPI0_init_master();  // Init LPSPI master       // Small delay before starting (optional)       for ( i = 0; i < 100000; i++); // Optional delay           // Write RESET           lan8650_write_reset();           // Optional delay to allow reset to complete           for ( i = 0; i < 100000; i++);           // Unmask all interrupts           lan8650_write_imask0(0x00000000);           // Read IMASK0 to verify           imask_read_value = lan8650_read_imask0();           // Set breakpoint here to inspect imask_read_value           while (1) { }       return 0;   } Here, I am trying to Write 0x00000000 to IMASK0 register address and trying to readback the same address in order to ensure the value has been written properly. But I got value has 0xC0000001 instead of 0xC0000000. (IMASK0 has 31 to 16 bits as reserved and Read-Only bits thus 0xC000 can be fixed even i try to write it as 0, thus we can neglect that) But the lower 16 bits are R/W and thus it should be 0. Muthappan_Viswanthan_1-1744663056405.png   Muthappan_Viswanthan_4-1744663312231.png For debugging purpose, in the above code I set breakpoint in the last while loop and it successfully hits (above picture) thus seems like write and read happening proper (not 100% sure, my assumption) but the value read is wrong.  I tried all possibilities and still couldn't find where it went wrong. Kindly guide me to solve this issue.  Thanks in advance.     Re: SPI Communication Issue with TC6 SPI Protocol Hi, yes, lpspi allows sending/receiving frame that has size larger that 32 bits. There could be several ways to do that. 1. set FRAMESZ to be multiple of 32, as per your need, how many words have to be transferred (up to 128) 2. set FRAMESZ to 31 for 32bit frame size and a) control CS manually and fill data registers as per desired number of word transfer. You can refer to below code  https://community.nxp.com/t5/S32K/S32K146-LPSPI-with-ADXL314/m-p/1826209/highlight/true#M32845 b) use continuous selection, refer to https://community.nxp.com/t5/S32K/Continuous-Transfer-LPSPI-S32K14x/td-p/1830165 For sure above codes need to be modified for 32bit transfer. Hope it helps. BR, Petr
View full article
FRDM-MCXN947 RTC Hello, I'm working on my data logger with FRDM-MCXN947, and I'm going to use the RTC module available on the board to record the time. I would like to ask, is it necessary to connect an external battery (and if so how), in case the main power supply is not connected via usb-c? Board Design Development Board MCXN Power Re: FRDM-MCXN947 RTC Hi, Thank you so much for your interest in our products and for using our community. Yes, you need an external battery to maintain the count of the time record. You need to connect the battery on VDD_BAT according to the Table 1. Power domain operating requirements section from UG10092 MCXNx4x Hardware Design Guide. Additional documentation: 2.1.1 Power supply configuration section from UM12018 FRDM-MCXN947 Board User Manual. Hope it helps you. Have a nice day!
View full article
调试器的“堆使用情况(FreeRTOS)”选项卡如何工作? 查看 MCUXpresso 屏幕截图,我有一个 125 kB 的 FreeRTOS 堆。标签的图形显示一切正常,但是如果我把数字加起来,标签的列表似乎显示它已经全部用完了。我理解错了吗? 此外,当特定内存块没有像其他内存块一样指定给 FreeRTOS 任务时,“已分配”是什么意思? 回复:调试器的堆使用情况(FreeRTOS)选项卡如何工作? 至于更新 IDE,我可能无法做到这一点,直到项目完成(很快)。 声明的分配解释是有意义的。谢谢您的回复。 回复:调试器的堆使用情况(FreeRTOS)选项卡如何工作? 如果堆仅配置为 125 kB(configTOTAL_HEAP_SIZE),FreeRTOS 动态内存分配器如何提供超过 135 kB 的内存? 重复我的第二个问题:当特定内存块没有像其他内存块一样指定给 FreeRTOS 任务时,“已分配”是什么意思?
View full article
带有 PCA9451 的 I.MX93 的 PMIC_ON_REQ 控制 尊敬的恩智浦社区: 我们想询问 I.MX93 的PMIC_ON_REQ信号的控制机制,因为我们正在使用PCA9451 PMIC和I.MX9322CVX 。以下是我们的具体问题: 上电期间 当我们提供NVCC_BBSM_1P8电压时, PMIC_ON_REQ信号自动变高。该信号连接到 PMIC 以启动上电序列。这个理解正确吗? 掉电期间 我们可以使用软件将PMIC_ON_REQ信号拉低以允许PMIC进入关机过程吗? 如果可以,那么如何实现呢? 我们可以在哪里找到相关流程或文档? 电池电量检测 我们的电池旨在检测 I.MX93 的运行状态。当I.MX93断电时,电池会自动关闭电源。 是否有推荐的引脚来监控此状态(来自 I.MX93 或 PCA9451)? 3.1如果电池还没有断电,但是PMIC已经完成断电过程,此时NVCC_BBSM_1P8仍然由电池供电。PMIC_ON_REQ信号会自动再次拉高吗? 感谢您的支持和澄清。 顺祝商祺!
View full article
如何使用多种语言来检测唤醒词和检测词??? 我知道当我检测启动词和命令时它目前以一种语言检测,但我如何检测两种语言? 例如,我想检测英文的“Hi, NXP”和韩文的“Hi, NXP”。
View full article
PCF8523T 在一段时间后对 I2C 无响应 我们遇到一个问题,PCF8523T 上的 I2C 接口在一段时间后变得无响应(命令后无 ACK)。 为了加速,我们以~800kbps(~10 倍客户速度)的速度运行该设备超过 4 小时,每秒 10 笔交易,并进入这种状态,因此重现它并非易事。 我们知道 PCF8523T 无法处理双启动条件,从数据表中可以看出: “对于此设备,不允许重复启动。因此,必须释放 STOP 在下一次“开始”之前。”我们不会这样做,虽然已经验证过,但可能会出现故障。 我们相信,当这种情况发生时,VCC 和 VBAT 电源都是稳定的。 此设备上是否存在任何已知问题,即 I2C 将停止响应,这与 VBAT/VCC 切换无关? 通过电源循环,VCC 和 VBAT I2C 都可以再次工作,但是有没有什么方法,比如通过多个 SCL 周期重置内部状态机? 回复:PCF8523T 在一段时间后对 I2C 无响应 作为信息,“意外”写入登记册确实是个问题。 作为额外信息,它看起来像<~0.5V,需要同时在 VBAT 和 VDD 上施加电压,才能使上电复位功能起作用,将寄存器设置重置为默认值 回复:PCF8523T 在一段时间后对 I2C 无响应 这似乎是一个软件错误,确切的根本原因正在调查中。 DMA 用于 I2C 数据传输,并且不知何故(有时)跳过了 DMA 传输(和 I2C 数据)开头的一个字节,因此“Control_3”获得了“秒”的值,因此在 32 到 59 之间写入任何秒数都会将 RTC 转换为“直接切换模式”,并且由于 VBAT>VCC,这意味着 I2C 通信丢失。 如果写入的秒数在 0 到 31 之间时发生数据丢失,则是安全的。 我们会保持这个话题开放,直到我们确定这是问题所在,但我们会在几天内确定。 确实很奇怪的错误,但还是感谢您的输入! 回复:PCF8523T 在一段时间后对 I2C 无响应 我们已经更接近问题的核心了。 参考 RTC.PNG 文件中先前发布的原理图。 齐纳二极管 D404(DDZ9690)是 5.6v 齐纳二极管。 D405 在超低电流下的正向电压为~0.2V。 随着时间的推移,VBAT 电压在许多情况下将接近 5.4V,高于 VCC(5V) 我们将 Control_3 寄存器中的 PM[2:0] 设置为 0x0,这给出了 PCF8523T 的电源和电源模式之间切换的“标准模式”。 但有时我们似乎会无意中将 RTC 模式更改为“直接切换模式”,并且当 VBAT>VCC 时,I2C 通信停止工作。 知道什么原因会导致这种故障吗? 回复:PCF8523T 在一段时间后对 I2C 无响应 您好,您能否将地址从 0xD0 更改为 0xA2,并告诉我问题是否仍然存在? 回复:PCF8523T 在一段时间后对 I2C 无响应 附件是示意图。 C407 不是 NXP 推荐的(1µF 而不是 3.3µF),但当电压移除时,斜率远低于 0.7V/ms 在这种情况下,电压永远不会被消除。 RTC 周围的一些组件: ABS07-32.768KHZ-7-T7pF晶体 KW-5R5C334H-R超级电容器 BSS138 N-MOSFET 两条 I2C 线直接连接到 MPC5517EAVLU66 引脚 31:PH1/AN26/EMIOS21/SDA_A 引脚 32:PH0/AN27/EMIOS20/SCL_A 回复:PCF8523T 在一段时间后对 I2C 无响应 您能分享一下您的示意图吗? 回复:PCF8523T 在一段时间后对 I2C 无响应 感谢这份内容丰富的文件。 不幸的是,我们既没有保持低 SDA 信号,也没有保持 SCL 信号。当这种情况发生时,它们都很高。 我们已经尝试过“恢复总线的顺序是发送 9 个时钟脉冲加上 STOP 信号。”的建议 但这并没有帮助。 当查看通信时,它的行为就像 RTC 上的 I2C 完全没有响应。
View full article
如何在 S32K116 上配置多个 UART 外设? 大家好, 背景:S32 DS 3.4 软件和示例 S32K1xx SDK RTM v4.0.3 示例项目 --> lin_slave_s32k116 和 lpuart_echo_s32k116。 我想使用 2 个 UART 外设,LPUART1 用于 LIN 通信,LPUART0 与 arduino uno 协同工作。 在我的应用程序中,每当我从主机发送 lin 信号时,从机 s32k116 EVB 都应该响应并从 LPUART0 发送一些字符串值以便与 arduino 通信。我尝试合并 lin_slave 和 lpuart_echo 这两个示例,但没有成功。 任何建议或帮助都将不胜感激! 提前致谢!! 谢谢与问候, 桑托什   回复:如何在S32K116上配置多个UART外围设备? 你好@danielmartynek , 是的,你是对的! 我改变了一些时钟配置,现在它可以按预期工作了。 谢谢与问候, 桑托什 回复:如何在S32K116上配置多个UART外围设备? 你好@danielmartynek , 非常感谢您的快速回复! 你是对的,跳线 J15 引脚 2 与 gnd 短路。当我进一步按照 j15 的示意图操作时。我注意到 C143 电容器短路,需要更换。 谢谢与问候, 桑托什 回复:如何在S32K116上配置多个UART外围设备? 你好@danielmartynek , 感谢您的回复! 是的,我用万用表测量了MCU的电源,除非我把跳线J15从原位拔掉,否则就不会有电源输入。拔掉跳线J15后,电压显示为5V,D1的红色LED也亮了。 之前一直都好好的,不知道现在怎么不行了。我连MCU开机都没发热。 您知道如何对电路板进行硬件重置吗?或者这是 MCU 的问题吗? 谢谢与问候, 桑托什 回复:如何在S32K116上配置多个UART外围设备? 你好@danielmartynek , 非常感谢您的回复,我会尽快向您更新。 目前,我遇到了一些与主板硬件相关的问题。即使我将跳线 J107 置于 2-3 位置,MCU 也无法通电,但如果我将跳线 J15 从其位置 1-2 移除,它就会打开。您是否知道如何对主板进行硬件重置,或者您对这个问题还有其他建议吗? 问候, 桑托什 回复:如何在S32K116上配置多个UART外围设备? 你好@danielmartynek , 有关于此问题的任何更新吗?或者您是否需要任何其他文件或信息来处理此问题? 如果您有任何需要,请告诉我,我很乐意提供。 我期待您的回复。 此致, 桑托什 回复:如何在S32K116上配置多个UART外围设备? 你好@danielmartynek , 感谢您的回复! 请查看附件中的 zip 文件,其中包含此消息下方项目所需的所有文件。 在我的应用程序中,我想在接收到一些 lin 信号时从不同的外设发送一些 UART 信号,而我在这个项目中遇到的问题是,我看不到任何 LED 对 lin 信号做出响应,也没有从另一个 UART 外设观察到任何消息,例如欢迎消息和逻辑分析仪上对 lin 信号的响应。 当我用不同的项目尝试相同的示例时,它按预期工作。我不确定是否可以在同一个代码中合并两个示例,或者我是否必须使用 freeRTOS 来实现这种方法? 如果我遗漏了什么,请告诉我吗? 我期待您的回复。 谢谢与问候, 桑托什
View full article
MCUXpressoでプロキシと証明書を設定して、アプリケーションコードハブからコードをダウンロードする方法は? 私の質問はタイトルと同じです。 私のPCにはプロキシと証明書があるため、MCUXpressoのApplication Code Hubからプロジェクトをインポートできません。この問題を解決するためにどのように設定できますか? 私はgithubからソースコードを引き出すことができるという考えを持っています https://github.com/nxp-appcodehub/dm-fashion-mnist-recognition-on-mcxn947 その後、このコードを添付の画像としてファイルからインポートします。それがうまくいくかどうかはわかりません。通常、アプリケーション ハブからのプロジェクトには、カメラなどの追加のデバイスが必要になるためです。その時点で確認する追加のデバイスはありません。 この状況についてアドバイスをお願いします。ありがとうございます。 Re:MCUXpressoでプロキシと証明書を設定して、アプリケーションコードハブからコードをダウンロードする方法は? もちろん、ありがとう。わかりました。
View full article
[i.MX 8 MP] 关于使用 ISP 和新传感器的问题 您好。 我正在查看一些移植指南并有几个问题。 使用带有新传感器的 ISP 是否需要相机校准文件(XML)? 用于生成 XML 文件的 ISP 校准工具是免费提供的吗? 我可以在不使用相机校准文件的情况下将 MIPI-CSI 流传递给 ISP 吗? 我不熟悉嵌入式 Linux(yocto)。 谢谢! 回复:[i.MX 8 MP] 关于使用 ISP 和新传感器的问题 你好。@roxanne41watts 谢谢你回答我的问题。 基本上,我明白如果我使用 ISP,我就需要 xml。 首先,我想尝试使用图像传感器接口(ISI)捕获 RAW 图像。 谢谢! 回复:[i.MX 8 MP] 关于使用 ISP 和新传感器的问题 您好!我很乐意解答您的问题。 相机校准文件(XML):是的,相机校准文件(XML)通常需要与新传感器一起使用 ISP(图像信号处理)。该文件包含重要的校准数据,确保 ISP 正确处理图像。 ISP 校准工具:一些 ISP 校准工具是免费提供的。例如,GitHub 上的 Infinite-ISP Tuning Tool 是一款免费的基于控制台的 ISP 调整应用程序。但是,可用性可能因您所使用的特定 ISP 和传感器而异。 MIPI-CSI 流到 ISP:通常不建议在不使用相机校准文件的情况下将 MIPI-CSI 流传递到 ISP,因为校准数据对于准确的图像处理至关重要。然而,某些设置可能允许绕过某些校准步骤,但这不是常见的做法,可能会导致不理想的结果。 嵌入式 Linux (Yocto):Yocto 是一个开源项目,它提供模板、工具和方法来帮助您为嵌入式产品创建基于 Linux 的定制系统。它有点技术性,但有大量资源和社区可以帮助您入门。
View full article
如何在 Linux 中使用帧缓冲区更新 epdc 显示? 我正在使用带有 epdc 显示子卡(IMXEBOOKDC5)的 IMX8ULP EVK。使用 Linux 映像启动后,epdc 显示器无法使用帧缓冲区进行更新。当检查显示器 pmic 的电源使能引脚时,它仍然保持低电平,即使我写入帧缓冲区(与使用 android 映像相比,每当我更新帧缓冲区 fb0 时,此引脚都会变高)。 此外,我比较了 android 和 linux 源代码中的帧缓冲区驱动程序 C 文件(drivers/video/fbdev/mxc/mxc_epdc_v2_fb.c)。我发现 android 中有一个函数(mxc_epdc_update_data)用于从用户空间更新数据。 回复:如何在 Linux 中使用帧缓冲区更新 epdc 显示? 嗨志明, 謝謝您的支持。 回复:如何在 Linux 中使用帧缓冲区更新 epdc 显示? 你好@Namitha_zcs Linux 驱动程序中的 fb 更新函数是mxc_epdc_fb_send_update并在mxc_epdc_fb_ioctl中定义,如果在用户空间使用MXCFB_SEND_UPDATE ,则会调用更新函数。 此致, 志明
View full article