Multi Source Translation Content

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

Multi Source Translation Content

Discussions

Sort by:
S32K(ST05 板)上未收到 CAN FD 远程帧响应 说明: 你好、 我正在研究 CAN FD 设置,我使用 ST05 板作为一个节点,将 PeakCan 用作另一个节点。 我从 ST05 发送一个远程帧。 在 PeakCAN 上,我可以在 PeakView 中看到这个远程帧。 然后,我从 PeakCAN 手动发送一个数据帧(具有相同的 ID)作为响应。 问题: ST05 板未收到数据帧响应。 注意: 我使用的是一个信息缓冲器。缓冲区首先用于传输远程帧,然后在发送后自动切换到RX 模式。 远程帧传输正常,但接收不到响应数据帧。 问题 在发送远程帧和接收相应数据帧时使用同一个信息缓冲区是否有任何限制? 我是否需要配置单独的 RX 报文缓冲区,以便在发送远程帧后接收数据帧? 还是我遗漏了 FlexCAN 中的某些配置? 提前感谢! Re: CAN FD Remote Frame Response Not Received on S32K (ST05 board) 您好, 在 CAN FD 中,完全不支持远程帧 - 远程请求替换 (RRS) 始终占主导地位 (0)。当配置 TX MB 发送 CAN FD 帧时,RTR 必须为 0,因此不会切换到 RX MB。 对于经典 CAN 帧,RTR 是有效的,切换到 RX MB 将对 FlexCAN 起作用。 BR, Petr
View full article
Is there any way to control (modify/enable) clock on Linux? Hi Sir, Is there any way to control (modify/enable) clock on Linux? Re: Is there any way to control (modify/enable) clock on Linux?  Hello, @Jeff-CF-Huang Thanks for the feedback From the BSP perspective, seems no such functions in Linux, sorry for your inconvenience. Best Regards Chenyin Re: Is there any way to control (modify/enable) clock on Linux? We want to configure the clock dynamically in the Linux kernel, including enabling, disabling, and changing the rate. Re: Is there any way to control (modify/enable) clock on Linux? Hello, @Jeff-CF-Huang Thanks for the feedback For what we are able to see, the clocks seem to be enabled under ATF(From BSP view). We are not seeing anything under Linux to modify/enable clocks.   Best Regards Chenyin Re: Is there any way to control (modify/enable) clock on Linux? I can get the clk summary at /sys/kernel/debug/clk. enable prepare protect duty hardware clock count count count rate accuracy phase cycle enable ------------------------------------------------------------------------------------------------------- pcf85063-clkout 0 0 0 0 0 0 50000 Y llce_per 0 0 0 80000000 0 0 50000 Y llce_sys 0 0 0 198309214 0 0 50000 Y But, I can't find a file node to enable/disable the clock. For example: I want to enable the clk of qspi_flash1x & qspi_flash2x. Re: Is there any way to control (modify/enable) clock on Linux? Hello, @Jeff-CF-Huang Thanks for the questions。 Sorry that I am not quite catching you, would you please help to clarify the questions? Which clock you were referring to? Best Regards Chenyin
View full article
Ethernet Interface Not Detected on S32G499ARDB3 After Flashing BSP42 Image Hello all,  I am encountering an issue with the Ethernet interface on the S32G499ARDB3 board after building and flashing the BSP42 image. Below are the details of the problem: Hardware Setup: Board: S32G499ARDB3 Physical Connection: The board is connected to a router via an Ethernet cable, and the Ethernet LED on the board is illuminated. Issue Description: The eth0 link is not being detected. There is no interfaces file in /etc/network directory. The network is unreachable, and no IP address is assigned to the board. Steps Taken: Built and flashed the BSP42 image successfully. Verified the physical Ethernet connection (cable and router). Checked for the presence of the eth0 interface using command ifconfig , and found the eth0 but not assigned ip Questions: Are there any additional configurations required to enable the Ethernet interface after or before flashing the BSP42 image? Is there a specific procedure to generate or configure the /etc/network/interface file for the S32G499ARDB3 board? Are there any known issues or workarounds Ethernet connectivity on this board? Thanks in advance, and any help will be appreciated Re: Ethernet Interface Not Detected on S32G499ARDB3 After Flashing BSP42 Image Hi @MohamedAbdelslam, Please refer to the Linux BSP 42.0 User Manual for S32G3 platforms at chapter 7 I recommend you read the sections: 7.1 Prerequisites 7.2 Ethernet Hardware Support on S32G3 7.3.3 Linux Ethernet support  7.3.4 Build by Auto Linux BSP Let me know if you have any questions about the content.
View full article
MM9Z1J638擦除EEPROM问题 问候亲爱的专家,我正在尝试使用自制编程器调试 MM9Z1J638 MCU,我查看了数据表并成功读取了设备 ID EEprom 和 PFlash,但是当我尝试擦除 eeprom 时它什么也没做,我正在使用命令 0x12(命令) 0x10(adr 高) 0x0000(地址中+低) 我也尝试了 0x1210(cmd+adrHigh)0x0000 和许多其他选项...正如我在执行此操作之前所看到的,我需要清除 CCIF 寄存器,但我在数据表中找到任何信息,如何使用 bdm 命令来执行此操作,我应该使用什么命令来清除 FSTAT 寄存器以及它位于何处,另外我想知道 FCLKDIV 寄存器的地址是什么 另外我想知道我是否应该将像 0x09 这样的命令作为 2 个字(如 0x0910 0x0000)发送,或者我应该像 0x09 0x10 0x0000 那样执行 我确实需要一些关于此命令(0x09 0x11 0x12 等)的解释提示(启动前需要清除错误的命令)) 提前感谢! 小型发动机司机 回复:MM9Z1J638擦除EEPROM问题 我自己做的是调试接口+自制发送命令的SW 无论如何,在您的帮助下我已经知道该怎么做了,非常感谢! 回复:MM9Z1J638擦除EEPROM问题 抱歉,我在创建主题时选择了错误的目录,据我了解,我应该在操作之前写入 FCLKDIV 寄存器并擦除错误,但 FSTAT 寄存器在启动之前是 0x80...所以我该怎么办?我需要直接写入 FCCOB 寄存器吗?还是我可以使用数据表中显示的命令?例如,我想擦除整个 eeprom 以重新编程它,那么我到底该怎么做呢?在向 FCLKDIV 发送 0x00 后,FCLKDIV 设置为 fclkdiv=80,FSTAT=80,因此这意味着 mcu 是空闲的并且没有存储错误,下一步是什么?我只需要发送 0x12 和地址?但它对我来说不起作用,我正在做这样的擦除命令 发送 2 个单词 0x1210(命令 + adr_high) 0x0000(adr_med + adr_low) 我错过了什么? 谢谢回复
View full article
S32K3 Module_CLK 我在手册中看到CAN这个模块的时钟来源是只有AIPS_PLAT_CLK,但是在S32DS配置工具中却可以选择AIPS_PLAT_CLK以及SOSC和FIRC,,我想知道是我在使用参考手册时看的章节错了吗?同样的问题还有例如LSPI在手册中时钟来源是有AIPS_PLAT_CLK和AIPS_SLOW_CLK,但是在配置工具中只能选择AIPS_SLOW_CLK。 Re: S32K3 Module_CLK 我想知道CAN_PE_CLOCK的时钟源是从哪里看到有“AIPS_PLAT_CLK”,“FXOSC_CLK”和“FIRC”三个选择的,因为我没有在参考手册中看到相关的描述(有漏看的可能)。如果你知道出处的话能告诉我吗?感谢! Re: S32K3 Module_CLK Hi@Embedded_novice 1.你可以看到FlexCAN模块的时钟有两个,在你提供的截图中已经可以看到了,分别是"CAN_CHI_CLK"和"CAN_PE_CLOCK", 其中“CAN_CHI_CLK”的时钟默认是“AIPS_PLAT_CLK”,不需要配置,你需要配置的是“CAN_PE_CLOCK”,其可以有“AIPS_PLAT_CLK”,“FXOSC_CLK”和“FIRC”三个选择。 2.LPSPI在S32K3中,不同的LPSPI的实例是不一样的,LPSPI0是属于高性能的,其外设时钟是“AIPS_PLAT_CLK”,对于其它的LPSPIx,如SPI1或者SPI2是普通的,其时钟源是“AIPS_SLOW_CLK”。
View full article
imx8mボード用エミュレータの構築と使用方法 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> こんにちは、 私はimx8m mini EVKとAndriod 9.0 AOSPバージョンを使用しています。 imx8 EVK ボード用の AOSP を正常にダウンロードしてビルドすることができ、正常に動作しています。 imx8mm evk の AOSP をビルドするには、以下のコマンドを使用しました。 $ ソースビルド/envsetup.sh $ ランチ evk_8mm-userdebug $ make 2>&1 | ビルドログ.txtを保存する しかし、開発やテストの作業にはエミュレーターを使用したいと考えています。 エミュレータコマンドを実行すると - $ エミュレータ エミュレータは開きますが、起動も動作もまったくしません。 いくつかのブログやAOSPのドキュメントでは、ランチaosp_x86_64-engで動作すると記載されています。 しかし、私はimx8 mini EVKボードでエミュレーターを使用したいと考えています。つまり - ランチ evk_8mm-userdebug imx8MMビルドでエミュレータを使用する方法を教えてください。例:-> lunch evk_8mm-userdebug それを実行するために必要なすべての変更と設定は何ですか。 ありがとう、よろしく。 マニーシュ Android i.MX 8ファミリ | i.MX 8QuadMax (8QM) | 8QuadPlus i.MX 8M | i.MX 8M ミニ | i.MX 8M ナノ i.MX6_すべて i.MX6DL i.MX6Dual i.MX6S i.MX6SL i.MX6SoloX i.MX6UL i.MX7Dual i.MX7Solo i.MX7ULP i.MX RT Linux Re: How to build and use emulator for imx8m board このガイドは、i.MX8M ボード専用のエミュレータをビルディングする人にとって非常に役立ちます。ステップバイステップの指示により、環境を簡単にセットアップし、エミュレータをスムーズに実行できるようになります。自分のデバイスで試してみて、パフォーマンスがどの程度優れているか確認するのが楽しみです。共有していただきありがとうございます! Re: How to build and use emulator for imx8m board こんにちは、 最新の Android を imx8 にどのように移植したのですか? 私は Android システム開発を始めたばかりですが、何かアドバイスをいただけませんか? 私はAOSPをダウンロードしてビルドし、エミュレータで実行しましたが、次のステップはまだ決めていません。アドバイスをいただければ幸いです。 お時間をいただきありがとうございます よろしくお願いいたします。 Re: How to build and use emulator for imx8m board <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> こんにちは、 申し訳ございませんが、エミュレーションとaosp_x86_64-engデバイスは弊社のBSPではサポートされておりません。ご不便をおかけして申し訳ございません。 ただし、変更を加えた ASOP コードは、次の git からダウンロードCAN。 repo init -u https://android.googlesource.com/platform/manifest -b android-9.0.0_r35 # このブランチは、最新の Android バージョンで使用されるリビジョンです。 リポジトリ同期 よろしくお願いいたします。 ディエゴ。 Re: How to build and use emulator for imx8m board <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> こんにちは、 上記の質問に関して何か提案はありますか? ありがとうございます マニーシュ Re: How to build and use emulator for imx8m board <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> こんにちは、 上記の投稿で述べたように、imx8ミニボードのすべてのAOSPソースコードをコンパイルすることができました。 imx8m Mini EVK ボードでテストできました。 しかし、Ubuntu Linux でエミュレータを起動しようとすると、エミュレータ ウィンドウは表示されますが、永久にブラックアウトしたままになります。 コマンドは次のとおりです - $ エミュレータ   Android エミュレータで imx8 mini AOSP とその Android フレームワークを起動することは可能ですか? 可能であれば、その手順は何ですか?または、エミュレーションを行う別の方法はありますか? 注記 - いくつかのブログやAOSPのドキュメントでは、ランチaosp_x86_64-engで動作すると記載されています。 しかし、AOSPをダウンロードして、ランチのaosp_x86_64-engコマンドからビルドしようとすると、次のようなエラーが発生します。 /bin/bash: -c: 行 0: `echo -e "\033[1mvendor/nxp-opensource/fsl_imx_demo/イーサネット/Android.mk:\033[31merror:\033[0m\033[1m" イーサネット: LOCAL_SDK_VERSION (system_current) と LOCAL_PRIVATE_PLATFORM_APIS (current) の両方を指定していますが、どちらか一方だけを指定する必要があります "\033[0m" >&2' build/make/core/sdk_check.mk:34: エラー: 完了。 14:57:53 ckati が失敗しました: 終了ステータス 1 imx8用のNXP WebサイトからAOSPをダウンロードしてビルドするために私が実行した手順 - $リポジトリ初期化 -u https://source.codeaurora.org/external/imx/imx-manifest.git -b imx-android-pie -m imx-p9.0.0_2.0.0-ga.xml $リポジトリ同期 $ ソースビルド/envsetup.sh $ ランチ evk_8mm-userdebug $ make 2>&1 | ビルドログ.txtを保存する さて、私の質問は -> 1. 上記のコマンドで生成されたこの AOSP ビルドでエミュレータを使用するにはどうすればよいですか? 2. ダウンロードした AOSP ソース コードを lunch aosp_x86_64-eng 用にビルドするにはどうすればよいですか? 3. NXP から変更を加えずに Android Pie の生の AOSP ソース コードをどこからダウンロードできますか? ありがとうございます マニーシュ
View full article
sja1110 中的动态配置 你好、 我想动态配置 l2 查找表,如何配置? 不使用 ECT 工具,如何配置 l2 查找表? 有例子吗? 此致敬礼 阿特金森 Re: Dynamic configuration in sja1110 您好 @PavelL "在您的代码中,条目[3]中缺少移位值,条目[3]、条目[4]和条目[5]中缺少或错放了括号。" 我已经实现了与 python 代码相同的功能,抱歉,我不确定在哪里缺少了括号和移位值。请您提供对齐的代码,这样可能会更清楚,抱歉漏掉了括号和移位 。如果您能提供准确的 entry[3]、entry[4]、entry[5],会更有帮助,也更清楚。 Re: Dynamic configuration in sja1110 你好@Atkinson、 在您的代码中,输入条目[3]中缺少移位值,输入条目[3]、输入条目[4]和输入条目[5]中缺少或错位了括号。 为了验证您的 L2 查找配置,您可以考虑将条目设置为静态条目,而不是动态条目,这有助于区分问题是出在条目格式上,还是出在动态更新机制上。 另外,请注意,Python 脚本中的"漂亮表格" 仅用于格式化命令窗口中的输出,并不影响功能或寄存器配置。 顺祝商祺! 帕维尔 Re: Dynamic configuration in sja1110 你好@PavelL int WriteL2LookupEntry(int cs) { const uint32_t DESTPORTS = 0x004; const uint32_t INDEX = 2; const uint64_t MACADDR = 0x112233445566; const uint64_t MACADDR_MASK = 0xffffffffffffffff; const uint32_t VLANID = 0; const uint32_t VLANID_MASK = 0x0; const uint32_t IOTAG = 0; const uint32_t IOTAG_MASK = 0; const uint32_t SRCPORT = 0x6; const uint32_t SRCPORT_MASK = 0xF; const uint32_t ENFPORT = 0; const uint32_t RETAG = 0; const uint32_t MIRROR = 0; const uint32_t TAKETS = 0; const uint32_t MIRR_VLAN = 0xFFF; const uint32_t TRAPTOHOST = 0; const uint32_t CBSIDIN = 0x3F; const uint32_t CBENONDA = 0; const uint32_t VLIDX = 0xFFF; const uint32_t SA_POLICE = 0; const uint32_t DA_POLICE = 0; uint32_t L2_OFFSET = 0x23; uint32_t L2CTRL_OFFSET = 0x29; 常量 uint32_t SWREG_BASE = 0x00000000; const uint32_t VALID = 1U; const uint32_t RDWRSET = 1U; const uint32_t VALIDENT = 1U; const uint32_t HOSTCMD = 3U; const uint32_t MGMTROUTE = 0U; const uint32_t LOCKED = 1U; const uint32_t ERROR = 0U; uint32_t L2_ADDRESS = SWREG_BASE + L2_OFFSET; uint32_t L2_ADDRESS_CTL = SWREG_BASE + L2CTRL_OFFSET; uint32_t l2Entry[ADDRESS_RANGE] = {0}; l2Entry[0] = (((INDEX& 0x03ff)<< (1% 32))+ ((ENFPORT& 1)<< (11% 32)) + ((DESTPORTS& 0x7FF)<< (12% 32))+ ((SRCPORT& 0xF)<< (23% 32)) + ((MACADDR& 0x1F)<< (27% 32))); l2Entry[1] = (((MACADDR>> 5)& 0xFFFFFFFF)); l2Entry[2] = ((((MACADDR>> 37)& 0x7FF)<< (64% 32))+ ((VLANID& 0xFFF)<< (75% 32)) + ((IOTAG& 1)<< (87% 32))+ ((MACADDR_MASK& 0xFF)<< (88% 32))); l2Entry[3] = (((MACADDR_MASK>> 😎 & 0xFFFFFFFF)); l2Entry[4] = (((MACADDR_MASK>> 40)& 0xFF<< (128% 32))+ ((VLANID_MASK& 0xfff)<< (136% 32)) + ((IOTAG_MASK& 1)<< (148% 32))+ ((SRCPORT_MASK& 0xF)<< (149% 32)) + ((RETAG& 0x1)<< (153% 32))+ ((MIRROR& 0x1)<< (154% 32)) + ((TAKETS& 0x1)<< (155% 32))+ ((MIRR_VLAN& 0xF)<< (156% 32))); l2Entry[5] = (((MIRR_VLAN>> 4)& 0xFF<< (160% 32))+ ((TRAPTOHOST& 0x1)<< (168% 32)) + ((CBSIDIN& 0x3F)<< (169% 32))+ ((CBENONDA& 0x1)<< (175% 32)) + ((VLIDX& 0xFFF)<< (177% 32))+ ((SA_POLICE& 0x1)<< (189% 32)) + ((DA_POLICE& 0x1)<< (190% 32))); uint32_t status = 0; do { Std_ReturnType ret = spi_read_reg(L2_ADDRESS_CTL,&status); if (ret != E_OK) { return -1; } } while ((status>> VALID_BIT_SHIFT)& 1U); for (int i = 0; i< ADDRESS_RANGE; i++) { Std_ReturnType ret = spi_write_reg(L2_ADDRESS + i, l2Entry[i]); if (ret != E_OK) { return -2; } uint32_t readBack = 0; ret = spi_read_reg(L2_ADDRESS + i,&readBack); if (ret != E_OK || readBack != l2Entry[i]) { return -3; } } uint32_t controlL2Entry = 0; controlL2Entry = ((VALID<< 31) + (RDWRSET<< 30) + (ERROR<< 29) + (LOCKED<< 28) + (VALIDENT<< 27) + (MGMTROUTE<< 26) + (HOSTCMD<< 23)); Std_ReturnType ret = spi_write_reg(L2_ADDRESS_CTL, controlL2Entry); if (ret != E_OK) { return -4; } do { ret = spi_read_reg(L2_ADDRESS_CTL,&status); if (ret != E_OK) { return -5; } } while ((status>> VALID_BIT_SHIFT)& 1U); return 0; } 我改变了与 Python 脚本类似的实现方式。如果发现任何错误,请将修改内容发送给我 Python 脚本 # 写入控制 平台.spi_write(L2_ADDRESS_CTL, 控制 L2Entry, cs) 表 = prettytable.PrettyTable( ("索引", "DESTPORTS", "MACADDR", "VLANID", "ENFPORT", "IOTAG")) 条目 =( str(INDEX), '{0:11b}'.格式(DESTPORTS), mac_to_str(MACADDR), str(VLANID), str(ENFPORT), str(IOTAG)) 桌.添加行(条目) 打印(表格.get_string())       " 写完之后,尝试发送一个符合条目的 mac/VLAN/Port 标准的帧,然后观察该帧是否根据 DESTPORTS 字段进行转发 " 正如你提到的那样, 我正在尝试用这种方式发送但看不到这种反射 我看不到我的参赛 作品是否得到反映? 还有其他需要设置的东西吗? 在 Python 脚本中,在将 controll2entry 的寄存器值写入 L2_ADDRESS_CTL 之后 , 有几行代码可以在 " prettytable " 中添加一个条目,我们是否 也需要 这样做? Re: Dynamic configuration in sja1110 你好@Atkinson、 在条目[3]、条目[4]和条目[5]中存在缺失的移位值和不完整的表达式。这可能导致寄存器值不正确。我建议将你的逻辑与 Python 引用脚本进行比较,后者正确构造了 L2 条目。 写入后,尝试发送一个符合该条目 MAC/VLAN/ 端口条件的帧,并观察它是否根据 DESTPORTS 字段转发。 顺祝商祺! 帕维尔 Re: Dynamic configuration in sja1110 你好@PavelL int WriteL2LookupEntry(int cs) { const uint32_t DESTPORTS = 0x002; const uint32_t INDEX = 8; const uint64_t MACADDR = 0x661122334455; const uint64_t MACADDR_MASK = 0xffffffffffffffff; const uint32_t VLANID = 0; const uint32_t VLANID_MASK = 0xffffff; const uint32_t IOTAG = 0; const uint32_t IOTAG_MASK = 0; const uint32_t SRCPORT = 0x5; const uint32_t SRCPORT_MASK = 0xF; const uint32_t ENFPORT = 0; const uint32_t RETAG = 0; const uint32_t MIRROR = 0; const uint32_t TAKETS = 0; const uint32_t MIRR_VLAN = 0xFFF; const uint32_t TRAPTOHOST = 0; const uint32_t CBSIDIN = 0x3F; const uint32_t CBENONDA = 0; const uint32_t VLIDX = 0xFFF; const uint32_t SA_POLICE = 0; const uint32_t DA_POLICE = 0; uint32_t L2_OFFSET = 0x23; uint32_t L2CTRL_OFFSET = 0x29; 常量 uint32_t SWREG_BASE = 0x00000000; const uint32_t VALID = 1U; const uint32_t RDWRSET = 1U; const uint32_t VALIDENT = 1U; const uint32_t HOSTCMD = 3U; const uint32_t MGMTROUTE = 0U; const uint32_t LOCKED = 1U; const uint32_t ERROR = 0U; uint32_t L2_ADDRESS = SWREG_BASE + L2_OFFSET; uint32_t L2_ADDRESS_CTL = SWREG_BASE + L2CTRL_OFFSET; uint32_t l2Entry[ADDRESS_RANGE] = {0}; l2Entry[0] = ((INDEX& 0x03FF)<< 1) | ((ENFPORT& 0x1)<< 11) | ((DESTPORTS& 0x7FF)<< 12) | ((SRCPORT& 0xF)<< 23) | ((uint32_t)(MACADDR& 0x1F)<< 27); l2Entry[1] = (uint32_t)((MACADDR>> 5)& 0xFFFFFFFF); l2Entry[2] = (uint32_t)(((MACADDR>> 37)& 0x7FF)<< 0) | ((VLANID& 0xFFF)<< 11) | ((IOTAG& 0x1)< < 23) | ((uint32_t)(MACADDR_MASK& 0xFF)<< 24); l2Entry[3] = (uint32_t)((MACADDR_MASK)>> 😎 & 0xFFFFFFFF); l2Entry[4] = ((uint32_t)((MACADDR_MASK>> 40)& 0xFF)<< 0) | ((VLANID_MASK& 0xFFF)<< 😎 | ((IOTAG_MASK& 0x1)<< 20) | ((SRCPORT_MASK& 0xF)<< 21) | ((RETAG& 0x1)<< 25) | ((MIRROR& 0x1)<< 26) | ((TAKETS& 0x1)<< 27) | ((MIRR_VLAN& 0xF)<< 28); l2Entry[5] = (((MIRR_VLAN>> 4)& 0xFF)<< 0) | ((TRAPTOHOST& 0x1))<< 😎 | ((CBSIDIN& 0x3F)<< 9) | ((CBENONDA& 0x1)<< 15) | ((VLIDX& 0xFFF)<< 17) | ((SA_POLICE& 0x1)<< 29) | ((DA_POLICE& 0x1)<< 30); uint32_t status = 0; do { Std_ReturnType ret = spi_read_reg(L2_ADDRESS_CTL,&status); if (ret != E_OK) { return -1; } } while ((status>> VALID_BIT_SHIFT)& 1U); for (int i = 0; i< ADDRESS_RANGE; i++) { Std_ReturnType ret = spi_write_reg(L2_ADDRESS + i, l2Entry[i]); if (ret != E_OK) { return -2; } uint32_t readBack = 0; ret = spi_read_reg(L2_ADDRESS + i,&readBack); if (ret != E_OK || readBack != l2Entry[i]) { return -3; } } uint32_t controlL2Entry = 0; controlL2Entry |= (VALID<< VALID_BIT_SHIFT); controlL2Entry |= (RDWRSET<< RDWRSET_BIT_SHIFT); controlL2Entry |= (ERROR<< ERROR_BIT_SHIFT); controlL2Entry |= (LOCKED<< LOCKED_BIT_SHIFT); controlL2Entry |= (VALIDENT<< VALIDENT_BIT_SHIFT); controlL2Entry |= (MGMTROUTE<< MGMTROUTE_BIT_SHIFT); controlL2Entry |= (HOSTCMD<< HOSTCMD_BIT_SHIFT); Std_ReturnType ret = spi_write_reg(L2_ADDRESS_CTL, controlL2Entry); if (ret != E_OK) { return -4; } do { ret = spi_read_reg(L2_ADDRESS_CTL,&status); if (ret != E_OK) { return -5; } } while ((status>> VALID_BIT_SHIFT)& 1U); return 0; } 这是我修改后的代码实现 ,你能否验证一下这个实现是否会带来动态入口。因此,我试着回读寄存器的值来调试寄存器是否被写入,我可以看到寄存器被写入了值,但我不确定是否创建了enrty? 此外,L2 查找表的动态条目也没有得到反映? ,那么我如何验证 L2 查找表是否已创建? Re: Dynamic configuration in sja1110 你好@Atkinson、 1.位移语法 (<< ,>> ) 您代码中的一些位移运算符似乎被替换成了 HTML 实体,如<< 和>>。这种情况通常发生在将代码复制到网络平台时。总之,请直接在代码中进行检查。 #define L2_CTRL_VALID_BIT (1U<< 31) 应为: #define L2_CTRL_VALID_BIT (1U<< 31) 2.条目问题 在 CreateL2Entry() 函数中,尤其是在条目[3]、条目[4]和条目[5]中,存在一些语法错误和缺失的移位值。这可能导致寄存器写入不完整或无效。 例如 ((TRAPTOHOST &0x1) << | 我建议将您的实现与 Python 参考脚本进行比较,后者正确构造了 L2 条目的所有六个 32 位单词。 顺祝商祺! 帕维尔 Re: Dynamic configuration in sja1110 Hi@PavelL 3.)I have changed the Register address to #define L2_ENTRY0_ADDR 0x00000023 but still I am not able to identify the table which I am trying to add getting reflected when I transmit the message "If I understand correctly, you're referring to the L2 Lookup Table described in Table 1182 of UM11107. 该表每个条目由六个 32 位寄存器组成。您可以在 Python 脚本的调试输出中看到这种结构。" 因此,我遇到了这样一个问题:我试图将数据写入需要在 L2 查找表中创建动态条目的地址,但却没有创建动态条目。 #define L2_ENTRY0_ADDR 0x00000023 #define L2_ENTRY1_ADDR 0x00000024 #define L2_ENTRY2_ADDR 0x00000025 #defineL2_ENTRY3_ADDR 0x00000026 #define L2_ENTRY4_ADDR 0x00000027 #define L2_ENTRY5_ADDR 0x00000028 #define L2_CTRL_ADDR 0x00000029 #define L2_CTRL_VALID_BIT (1U<< 31) #define L2_CTRL_WR_RDB_BIT (1U<< 30) #define L2_CTRL_VALIDENTRY_BIT(1U<< 28) #define L2_CTRL_HOSTCMD_SHIFT 23 #define L2_CTRL_HOSTCMD_WRITE (0b011U<< L2_CTRL_HOSTCMD_SHIFT) Std_ReturnType CreateL2Entry(uint32_t entry[6]) { uint16_t INDEX = 11; uint64_t MACADDR = 0x661122334455; uint64_t MACADDR_MASK = 0xFFFFFFFFFFFF; uint16_t VLANID = 3; uint16_t VLANID_MASK = 0xFFFFF; uint8_t IOTAG = 0; uint8_t IOTAG_MASK = 0; uint8_t SRCPORT = 5; uint8_t SRCPORT_MASK = 0xF; uint8_t DESTPORTS = 0x02; uint8_t ENFPORT = 1; uint8_t RETAG = 0; uint8_t MIRROR = 0; uint8_t TAKETS = 0; uint16_t MIRR_VLAN = 0xFFF; uint8_t TRAPTOHOST = 0; uint8_t CBSIDIN = 0x3F; uint8_t CBENONDA = 0; uint16_t VLIDX = 0xFFF; uint8_t SA_POLICE = 0; uint8_t DA_POLICE = 0; entry[0] = ((INDEX& 0x03FF)<< 1) | ((ENFPORT& 0x1)<< 11)| ((DESTPORTS& 0x7FF)<< 12)| ((SRCPORT& 0xF)<< 23)| ((MACADDR& 0x1F)<< 27); entry[1] = (uint32_t)((MACADDR>> 5)& 0xFFFFFFFF); entry[2] = (((MACADDR>> 37)& 0x7FF)<< 0)| ((VLANID& 0xFFF)<< 11)| ((IOTAG& 0x1)<< 23)| ((MACADDR_MASK& 0xFF)<< 24); entry[3] = (uint32_t)((MACADDR_MASK)>> 😎 & 0xFFFFFFFF); entry[4] = (((MACADDR_MASK>> 40)& 0xFF)<< 0)| ((VLANID_MASK& 0xFFF)<< 😎 | ((IOTAG_MASK& 0x1)<< 20)| ((SRCPORT_MASK& 0xF)<< 21)| ((RETAG& 0x1)<< 25)| ((MIRROR& 0x1)<< 26)| ((TAKETS& 0x1)<< 27)| ((MIRR_VLAN& 0xF)<< 28); entry[5] = (((MIRR_VLAN>> 4)& 0xFF)<< 0)| ((TRAPTOHOST& 0x1)<< 😎 | ((CBSIDIN& 0x3F)<< 9)| ((CBENONDA& 0x1)<< 15)| ((VLIDX& 0xFFF)<< 17)| ((SA_POLICE& 0x1)<< 29)| ((DA_POLICE& 0x1)<< 30); return E_OK; } Std_ReturnType WriteL2LookupEntry(uint8_t swt) { if (swt> 0) return E_NOT_OK; Std_ReturnType ret; uint32_t ctrlReg = 0; uint32_t entry[6]; // 第 1 步:创建条目 ret = CreateL2Entry(entry); if (ret != E_OK) return ret; // 第 2 步:等待 VALID 位清零 do { ret = spi_read_reg(L2_CTRL_ADDR,&ctrlReg); if (ret != E_OK) return ret; } while (ctrlReg& L2_CTRL_VALID_BIT); // 第 3 步:将条目数据写入寄存器 ret = spi_write_reg(L2_ENTRY0_ADDR, entry[0]); if (ret != E_OK) return ret; ret = spi_write_reg(L2_ENTRY1_ADDR, entry[1]); if (ret != E_OK) return ret; ret = spi_write_reg(L2_ENTRY2_ADDR, entry[2]); if (ret != E_OK) return ret; ret = spi_write_reg(L2_ENTRY3_ADDR, entry[3]); if (ret != E_OK) return ret; ret = spi_write_reg(L2_ENTRY4_ADDR, entry[4]); if (ret != E_OK) 返回 ret; ret = spi_write_reg(L2_ENTRY5_ADDR, entry[5]); if (ret != E_OK) 返回 ret; //步骤 4:设置控制寄存器以触发信号写入 uint32_t ctrlValue = (1U<< 31) | (1U<< 30) | (1U<< 28) | (1U<< 27) | (3U<< 23); ret = spi_write_reg(L2_CTRL_ADDR, ctrlValue); if (ret != E_OK) return ret; do { ret = spi_read_reg(L2_CTRL_ADDR,&ctrlReg); if (ret != E_OK) return ret; } while (ctrlReg& L2_CTRL_VALID_BIT); return E_OK; } 你能否检查一次,是否存在任何问题,因为它没有为 L2 查找表创建动态条目? Re: Dynamic configuration in sja1110 你好@Atkinson、 1。是的,主机工具最初是为 SJA1110-EVM 板开发的。我个人使用这些带有调试打印的脚本来验证我对寄存器访问的理解。虽然您不能在 S32G-VNP-RDB2 平台上直接运行它们,但由于 S32G 通过 SPI 访问 SJA1110,因此可以调整底层逻辑。 2.如果您正在为 S32G 平台寻找 SPI 读/写实现方案,您有两个主要选择: 请参阅 S32G RTD 4.0.0 代码包中提供的 SPI 示例。 或者,我建议在恩智浦S32G社区论坛上发布一个专用的问题,S32G支持团队可以在该论坛上进一步为您提供帮助。我主要关注汽车以太网主题,与特定平台驱动程序的重叠有限。 3.如果我没理解错的话,你指的是 UM11107 表 1182 中描述的 L2 查找表。该表每个条目由 6 个 32 位寄存器组成。您可以从 Python 脚本的调试输出中看到这种结构。 顺祝商祺! 帕维尔 Re: Dynamic configuration in sja1110 你好@PavelL 我有一些问题 1.)l2_write_lookup_table.py 的这份 Debug 打印件取自 SJA1110 EVM 板的实现不是来自 S32G-VNP RDB 板吗?而且我们无法直接在 S32G-VNP-RDB32 板中实现 l2_write_lookup_table.py 2.) 你能向我提供用于与上述代码集成的 SPI_read 和 SPI_Write 的代码吗? 因为在 S32G 中通过 SPI_Read 和 SPI_write 执行写入操作时,无法看到动态条目被添加。 Std_ReturnType spi_read_reg(uint32_t regAddress, uint32_t* regValue) { Std_ReturnType ret; uint32_t TxChBuf[65] = {0}; uint32_t RxChBuf[65] = {0}; uint16_t regCount = 1; Siul2_Dio_Ip_WritePin(SPI_MCU_ES1_CS_AP_PORT, SPI_MCU_ES1_CS_AP_PIN, 0U); ret = getSpiAPCommand(false, regAddress, regCount, TxChBuf, regValue); if (ret != E_OK) { Siul2_Dio_Ip_WritePin(SPI_MCU_ES1_CS_AP_PORT, SPI_MCU_ES1_CS_AP_PIN, 1U); return ret; } ret=Spi_SetupEB(5u, (uint8_t*)TxChBuf, (uint8_t*)RxChBuf, 8u); if (ret == E_OK) { ret=Spi_SyncTransmit(SpiConf_SpiSequence_SpiSequence_sja); if (ret == E_OK) { *regValue = RxChBuf[1]; } } Siul2_Dio_Ip_WritePin(SPI_MCU_ES1_CS_AP_PORT, SPI_MCU_ES1_CS_AP_PIN, 1U); return ret; } Std_ReturnType spi_write_reg(uint32_t regAddress, uint32_t regValue) { Std_ReturnType ret; uint32_t TxChBuf[65] = {0}; uint32_t RxChBuf[65] = {0}; uint16_t regCount = 1; uint32_t regValArray[1] = { regValue }; // 将芯片选择拉低 Siul2_Dio_Ip_WritePin(SPI_MCU_ES1_CS_AP_PORT,SPI_MCU_ES1_CS_AP_PIN,0U); ret = getSpiAPCommand(true, regAddress, regCount, TxChBuf, regValArray); if (ret != E_OK) { Siul2_Dio_Ip_WritePin(SPI_MCU_ES1_CS_AP_PORT, SPI_MCU_ES1_CS_AP_PIN, 1U); return ret; } ret=Spi_SetupEB(5u, (uint8_t*)TxChBuf, (uint8_t*)RxChBuf, 8u); if (ret == E_OK) { ret=Spi_SyncTransmit(SpiConf_SpiSequence_SpiSequence_sja); } Siul2_Dio_Ip_WritePin(SPI_MCU_ES1_CS_AP_PORT, SPI_MCU_ES1_CS_AP_PIN, 1U); return ret; } Correct me if I am wrong !! 3.)I have changed Register address to#define L2_ENTRY0_ADDR 0x00000023 but still I am not able to identify which I am trying to add table getting reflected when I transmit the message Re: Dynamic configuration in sja1110 你好@Atkinson、 你的代码看起来不错。但是,如果您想通过 SPI 访问动态表,则入口地址不含 FF,并右移 2。 因此,#define L2_ENTRY0_ADDR0xFF00008c应该是 #define L2_ENTRY0_ADDR0x00000023 但这取决于你的例程spi_write_reg 的实际作用。 以下是 write_l2_lookup_table.py 的输出结果,包括我的调试打印(tx/rx 指的是通过示波器或逻辑分析仪在 SPI 线路上看到的数据): DBG spi_tx:['0x02000290', '0xAABBCCDD'] DBG spi_rx:['0x02000290', '0x00000000'] DBG spi_read 0x0029 -> 0x00000000 DBG spi_write 0x0023< - 0x37FFFA00 DBG spi_tx:['0x80000230', '0x37FFFA00'] DBG spi_write 0x0024< - 0x119A22AB DBG spi_tx:['0x80000240', '0x119A22AB'] DBG spi_write 0x0025< - 0xFF807089 DBG spi_tx:['0x80000250', '0xFF807089'] DBG spi_write 0x0026< - 0xFFFFFFFF DBG spi_tx:['0x80000260', '0xFFFFFFFF'] DBG spi_write 0x0027< - 0xF1FFFFFF DBG spi_tx:['0x80000270', '0xF1FFFFFF'] DBG spi_write 0x0028< - 0x1FFE7EFF DBG spi_tx:['0x80000280', '0x1FFE7EFF'] DBG spi_write 0x0029 - 0xD9800000 DBG spi_tx:['0x80000290', '0xD9800000'] +-------+-------------+-------------------+--------+---------+-------+ | INDEX | DESTPORTS | MACADDR | VLANID | ENFPORT | IOTAG | +-------+-------------+-------------------+--------+---------+-------+ | 256 | 11111111111 | 11:22:33:44:55:66 | 14 | 1 | 1 | +-------+-------------+-------------------+--------+---------+-------+ 已写入 L2 查找表项 (SW1) 关于 FAE 申请,FAE 不在我的升级路径中。贵公司已指派 FAE,因此您可以直接联系 FAE。 顺祝商祺! 帕维尔 Re: Dynamic configuration in sja1110 你好@PavelL #define L2_ENTRY0_ADDR 0xFF00008c #define L2_ENTRY1_ADDR 0xFF000090 #define L2_ENTRY2_ADDR 0xFF000094 #define L2_ENTRY3_ADDR 0xFF000098 #define L2_ENTRY4_ADDR0xFF00009C #define L2_ENTRY5_ADDR 0xFF0000A0 #define L2_CTRL_ADDR 0xFF0000A4 Std_ReturnType CreateL2Entry(uint32_t entry[6]) { uint16_t INDEX = 11; uint64_t MACADDR = 0x661122334455; uint64_t MACADDR_MASK = 0xFFFFFFFFFFFF; uint16_t VLANID = 3; uint16_t VLANID_MASK = 0xFFFFF; uint8_t IOTAG = 0; uint8_t IOTAG_MASK = 0; uint8_t SRCPORT = 5; uint8_t SRCPORT_MASK = 0xF; uint8_t DESTPORTS = 0x02; uint8_t ENFPORT = 1; uint8_t RETAG = 0; uint8_t MIRROR = 0; uint8_t TAKETS = 0; uint16_t MIRR_VLAN = 0xFFF; uint8_t TRAPTOHOST = 0; uint8_t CBSIDIN = 0x3F; uint8_t CBENONDA = 0; uint16_t VLIDX = 0xFFF; uint8_t SA_POLICE = 0; uint8_t DA_POLICE = 0; entry[0] = ((INDEX& 0x03FF)<< 1) | ((ENFPORT& 0x1)<< 11)| ((DESTPORTS& 0x7FF)<< 12)| ((SRCPORT& 0xF)<< 23)| ((MACADDR& 0x1F)<< 27); entry[1] = (uint32_t)((MACADDR>> 5)& 0xFFFFFFFF); entry[2] = (((MACADDR>> 37)& 0x7FF)<< 0)| ((VLANID& 0xFFF)<< 11)| ((IOTAG& 0x1)<< 23)| ((MACADDR_MASK& 0xFF)<< 24); entry[3] = (uint32_t)((MACADDR_MASK)>> 😎 & 0xFFFFFFFF); entry[4] = (((MACADDR_MASK>> 40)& 0xFF)<< 0)| ((VLANID_MASK& 0xFFF)<< 😎 | ((IOTAG_MASK& 0x1)<< 20)| ((SRCPORT_MASK& 0xF)<< 21)| ((RETAG& 0x1)<< 25)| ((MIRROR& 0x1)<< 26)| ((TAKETS& 0x1)<< 27)| ((MIRR_VLAN& 0xF)<< 28); entry[5] = (((MIRR_VLAN>> 4)& 0xFF)<< 0)| ((TRAPTOHOST& 0x1)<< 😎 | ((CBSIDIN& 0x3F)<< 9)| ((CBENONDA& 0x1)<< 15)| ((VLIDX& 0xFFF)<< 17)| ((SA_POLICE& 0x1)<< 29)| ((DA_POLICE& 0x1)<< 30); return E_OK; } Std_ReturnType WriteL2LookupEntry(uint8_t swt) { if (swt> 0) return E_NOT_OK; Std_ReturnType ret; uint32_t ctrlReg = 0; uint32_t entry[6]; ret = CreateL2Entry(entry); if (ret != E_OK) return ret; do { ret = spi_read_reg(L2_CTRL_ADDR,&ctrlReg); if (ret != E_OK) return ret; } while (ctrlReg& (1U<< 31)); ret = spi_write_reg(L2_ENTRY0_ADDR, entry[0]); if (ret != E_OK) return ret; ret = spi_write_reg(L2_ENTRY1_ADDR, entry[1]); if (ret != E_OK) return ret; ret = spi_write_reg(L2_ENTRY2_ADDR, entry[2]); if (ret != E_OK) return ret; ret = spi_write_reg(L2_ENTRY3_ADDR, entry[3]); if (ret != E_OK) return ret; ret = spi_write_reg(L2_ENTRY4_ADDR, entry[4]); if (ret != E_OK) 返回 ret; ret = spi_write_reg(L2_ENTRY5_ADDR, entry[5]); if (ret != E_OK) 返回 ret; uint32_t ctrlValue = (1U<< 31) | (1U<< 30) | (1U<< 28) | (1U<< 27) | (3U<< 23); ret = spi_write_reg(L2_CTRL_ADDR, ctrlValue); if (ret != E_OK) return ret; do { ret = spi_read_reg(L2_CTRL_ADDR,&ctrlReg); if (ret != E_OK) return ret; } while (ctrlReg& (1U<< 31)); return E_OK; } 这是目前创建动态条目的实现方法,你能否与 FAE 相互验证一下这种实现方法是否正确 !! 还需要做其他修改吗? Re: Dynamic configuration in sja1110 你好@Atkinson、 您的问题的答案与您的应用程序用例有关。 您可以在任何地方创建动态条目,也可以在 S32G 或 SJA1110 中创建: 以任何支持的方式将条目传输到 S32G,并通过 SPI 或以太网将其写入 SJA1110 或者,通过以太网将条目传输到 SJA1110 并使用内部 AHB 访问 或者,向 SJA1110 发送自定义触发信号(GPIO、以太网帧等),在那里创建一个动态条目并通过 AHB 访问写入该条目 或 .... 或 .... 这里有如何向 SJA1110 的开关芯写入动态入口的示例: 通过 SPI - python 脚本 write_l2_lookup_table.py 通过 AHB - ECT 服务器源代码 问候、 帕维尔 Re: Dynamic configuration in sja1110 你好@PavelL 1.) 2.)If via SJA1110 switch whether reading and write the register by SPI need to be performed and where this implementation need to be carried in between SWITCH_DRV? 3.)where we can create our Dynamic entry so that it will get append in switch More Explanation would be great help!! Re: Dynamic configuration in sja1110 你好@Atkinson、 很抱歉,由于我目前工作繁忙,回复迟了。 我知道这乍看起来可能并不简单,但实际上这个概念非常简单。 最终的寄存器地址取决于访问方法--是通过 AHB 在内部访问 M7 内核,还是通过 SPI_AP 接口从外部访问。基本地址因接入点而异。 寄存器地址使用 UM11107 表 2 中提供的基地址计算。例如,对于交换机子系统,SPI_AP 访问的基地址为0x00000000 ,AHB 访问的基地址为0xFF000000 。 在这种情况下,通过 AHB 访问寄存器0x8C (DYN_BE_LKP_ENTRY0)时,寄存器会变成0xFF00008C 。 现在,可能会让人感到困惑的地方来了:SDK 驱动程序定义了以下内容: #define SJA1110_L2_ART_LE_ADDR(0x3fc00023) /**< l2ArtLockedEntry 寄存器的地址 *   SWITCH_DRV_Write 例程将地址左移 2 位 (<< 2),用于内部 (AHB) 访问。对于 SPI 传输(级联开关设置中使用),不应用移位。因此,0x3fc00023 << 2 的结果是0xFF00008C。   我希望通过上面的解释,现在有感知了。   顺祝商祺! 帕维尔 Re: Dynamic configuration in sja1110 你好 @PavelL 你 能不能给我读写 地址名称访问RESET描述 8Ch DYN_BE_LKP_ ENTRY0 R/W 0h (fffffFeh) 8ch 之前的完整地址会是什么基址? 比如它会有 0x3fc0008c 所以在这个动态入口表中我们会有完整的地址你能不能给我 8Ch DYN_BE_LKP_ ENTRY0 R/W 0h (fffffFEH) 90h DYN_BE_LKP_ ENTRY1 R/W 0h 94h DYN_BE_LKP_ ENTRY2 R/W 0h 98h DYN_BE_LKP_ R/W 0h 9 8h DYN_BE_LKP_ ENTRY3 R/W 0h 9Ch DYN_BE_LKP_ ENTRY4 R/W 0h a0h a0h dyn_BE_LKP_ ENTRY5 R/W 0h a4H DYN_BE_LKP_ A4H DYN_BE_LKP_CTRL R/W 0h (ff800000h) Re: Dynamic configuration in sja1110 你好@Atkinson、 我不知道有任何支持文件——这是常识,与设备无关。我向 Copilot 咨询了这个问题,应该可以修改 sja11xx_ftdi4232.py 以使用 DSPI5 而不是 FTDI。 顺祝商祺! 帕维尔 Re: Dynamic configuration in sja1110 你好 @PavelL 要在 S32G-VNP-RDB2 或 RDB3 板上使用这个脚本,需要修改 FTDI 层才能在 S32G 处理器上通过 DSPI5 进行通信。 有什么证明文件吗? Re: Dynamic configuration in sja1110 你好@Atkinson、 问题 1:" 那么,既然 Linux 电路板支持包已预安装在 SD 卡上... 它会自动启用动态配置吗?" A1:不,电路板支持包包含 DSA 驱动程序,该驱动程序支持动态配置,但它不会在所有用例中自动启用。 问题 2:"通过动态使用 write_l2_lookup.py(python evm 主机工具)配置 L2 查找条目,该过程是否保持不变?对于 S32G-VNP-RDB 板,它将更改 " A2:创建和上传动态条目的大致流程保持不变,如 UM11107 和 AN12925 中所述。 但是,write_l2_lookup_table.py 脚本使用 FTDI 驱动程序通过 USB 访问 SJA1110-EVM。 要在 S32G-VNP-RDB2 或 RDB3 板上使用此脚本,需要修改 FTDI 层,以便在 S32G 处理器上通过 DSPI5 进行通信。 问题 3:" 是否有可能连接笔记本电脑 & S32G-VNP_RDB32 板创建动态条目?" A3:是的,这是可能的。您可以自由开发运行在 Linux 上的定制软件,通过 SPI 或以太网处理自己的协议,配置动态条目。 问题 4:"还有一件事,SJA1110_SDK_1.0.2 是否是实施 RTM1.0.0 所需的主要内容?" 答 4: 不是,建议使用最新版本的 SJA1110 SDK 1.0.2,以保证兼容性和稳定性。 如需进一步支持,请联系您的 FAE 或通过https://support.nxp.com/s/?language=en_US 提交报告。 感谢您的理解。 顺祝商祺! 帕维尔 Re: Dynamic configuration in sja1110 你好@PavelL 因此,如果 SD 卡插入 S32G-VNP-RDB 板,Linux 电路板支持包会预先安装在 SD 卡上。那么SD卡中存在的电路板支持包是否会自动启用动态配置 通过动态使用 write_l2_lookup.py(python evm 主机工具)配置 L2 查找条目时,进程是否保持不变?对于 S32G-VNP-RDB 板来说,情况将会发生变化 如果流程保持不变我们如何连接笔记本电脑 & rdb32Board 在通过笔记本电脑和 SJA1110 EVM 板连接时它将使用 USB 接口进行连接,这将有助于对其进行配置动态输入那么对于 S32G-VNP-RDB32 板来说,接口会是什么样子? 是否有可能连接笔记本电脑 & S32G-VNP_RDB32 板创建动态条目? 还有,SJA1110_SDK_1.0.2 是否是实施 RTM1.0.0 所需的主要内容? Re: Dynamic configuration in sja1110 你好@Atkinson、 Linux 电路板支持包已经预装在 S32G-VNP-RDB3 板附带的 SD 卡上,因此在这方面无需采取任何其他措施。 我假设你已经成功启动了板(如果你在之前的消息中已经提到了这一点,很抱歉)。 电路板支持包 包含 SJA1110 DSA 驱动程序,该驱动程序提供了一系列有用的功能,包括支持动态 L2 查询表配置。 DSA 驱动程序默认已启用。 随着这个案例演变成一个多功能域话题,我已经联系了你的FAE,讨论我们应该如何进一步发展。 顺祝商祺! 帕维尔 Re: Dynamic configuration in sja1110 你好 @PavelL 我目前正在尝试在 S32G-VNP-RDB32 中实现它 — SJA1110 Switch 目前,我自己没有任何固件需要使用 哪个 Linux 电路板支持包可能需要完成全部更改 Re: Dynamic configuration in sja1110 你好@Atkinson、 如果你打算在 S32G-VNP-RDB3 板上这样做,情况就会发生重大变化。你会在板上运行 Linux 电路板支持包,还是打算使用自己的固件? 顺祝商祺! 帕维尔 Re: Dynamic configuration in sja1110 你好 @PavelL 3.SPI_HAP(主机访问协议) 主机工具中的 write_l2_lookup_table.py 脚本演示了如何通过 SPI 动态配置 L2 表。任何外部 MCU 或主机处理器都可以使用这种方法。如有需要,也可将该脚本中的逻辑移植到内部 M7 内核上直接运行。 我希望通过 write_l2_lookup_table.py 配置一个条目 通过我们在 write_l2_lookup_table.py 文件中编写的配置将如何移至 RDB32 板 , 从笔记本电脑到 RDB32 板 需要做 什么接口? 我们可以通过什么通信机制将二级查询条目传递给设备(RDB32 板) 你 能给我一个程序或者我可以在哪里找到实施程序 Re: Dynamic configuration in sja1110 你好@Atkinson、 是的,你说得对,系统启动时,静态配置会自动从外部闪存加载。 让我来详细说明一下动态配置的概念。 动态配置的任务可分为两个部分: 组装有效条目 - 参见 UM11107,第 5.6 章"动态配置" 将此条目写入交换机 - 参见 AN12925,第 5.1.3.2 章"写入 L2 查找表条目" 有三种接口可用于此目的: AHB - 通过内部 M7 内核。SDK 支持可用,ECT 服务器源代码可作为起点。 SPI_HAP - 主机处理器组装一个有效条目并将其写入交换机。这就是 write_l2_lookup_table.py 的作用。 以太网 - 主机处理器发送用户定义的信息(UDP、TCP 等),由内部 M7 内核处理。M7 对报文进行解码,生成一个有效条目,并将其写入交换机--因此我们实际上又回到了第一点。这就是电痉挛疗法的内部工作原理。 顺祝商祺! 帕维尔 Re: Dynamic configuration in sja1110 Hi@PavelL 3. SPI_HAP(主机访问协议) 主机工具中的 write_l2_lookup_table.py 脚本演示了如何通过 SPI 动态配置 L2 表。任何外部 MCU 或主机处理器都可以使用这种方法。如有需要,也可将该脚本中的逻辑移植到内部 M7 内核上直接运行。 我希望通过 write_l2_lookup_table.py 配置一个条目 通过我们在 write_l2_lookup_table.py 文件中编写的配置将如何移至 RDB32 板,从笔记本电脑到 RDB32板 需要做 什么接口? 我们可以通过什么通信机制将二级查询条目传递给设备(RDB32 板)你 能给我一个程序或者我可以在哪里找到实施程序 Re: Dynamic configuration in sja1110 您好@PavelL 正如您所提到的,我想动态地配置 switch_core 配置 当系统启动时,我们在外设中配置的静态配置会被加载 我正在寻找一种方法来配置表项,这些表项是在静态中配置的,需要通过动态来配置。 在这两种情况下,通常有三种方法可以动态更新交换机配置: 来自 M7 内核 通过 SPI_HAP 从主机处理器发送 从主机处理器通过以太网 ,所以你是说这些是动态更新系统的唯一途径? 如果这些都是唯一可能的方法,那么按照我提供的代码进行配置是可行还是不可行? ,这里提到的三个过程与 ECT& write_l2_lookup_table.py 是否相同? Re: Dynamic configuration in sja1110 你好@Atkinson、 能否请您说明使用动态 L2 查找表的用例? 就我个人而言,我会考虑在两种典型情况下使用动态条目: 当你想在多台设备上维护通用的交换机配置,然后 " 对每台交换机进行个性化设置 " 时,会在开机后对每台交换机进行动态设置。 当您需要根据特定应用要求在运行时修改交换机配置时。 在这两种情况下,通常有三种方法可以动态更新交换机配置: 来自 M7 内核 通过 SPI_HAP 从主机处理器发送 通过以太网从主机处理器 您的用例属于这些类别之一,还是您的目标有所不同? 顺祝商祺! 帕维尔 Re: Dynamic configuration in sja1110 您好@PavelL 正如您所提到的,我尝试加入代码 您能否确认我需要在哪里放置代码,这将有助于我们创建条目 您在之前的信息中提到有两种方法可以通过使用 ECT(以太网配置工具)和 SPI_HAP 所以这些工具和文件需要在运行时进行处理,对吗? 我分享的代码是我试图在不使用这些工具的情况下实现的 我想创建一个动态 L2 查找条目,这样做可以吗? Atkinson Regards Re: Dynamic configuration in sja1110 你好@Atkinson、 很抱歉由于公共假期而延迟回复。 感谢您分享代码。我快速浏览了一下,乍一看似乎与 AN12925 第 5.1.3.2 章中概述的原则一致写入 L2 查找表项。我还注意到,sja1110.h 中的 #define 语句似乎被重复使用了,这是标准做法。 但请注意,深入的自定义代码审查超出了我们免费在线支持的范围。此外,调用此函数的时间和上下文高度特定应用,可能会因您的系统架构和要求而异。 顺祝商祺! 帕维尔 Re: Dynamic configuration in sja1110 你好@PavelL static status_t wait_for_valid_clear(uint8_t swt) { status_t status; uint32_t ctrl = 0; do { status = SWITCH_DRV_Read(swt, 1, DYN_BE_LKP_CTRL,&ctrl); if (status != STATUS_SUCCESS) return status; } while (ctrl& DYN_BE_LKP_CTRL_VALID_MASK); if (ctrl& DYN_BE_LKP_CTRL_ERROR_MASK) return STATUS_ERROR; return STATUS_SUCCESS; } status_t SJA1110_AddL2LookupEntry_Dynamic(uint8_t swt) { status_t status; // MAC = 66:11:22:33:44:55 uint8_t mac[6] = {0x66, 0x11, 0x22, 0x33, 0x44, 0x55}; uint64_t mac64 = ((uint64_t)mac[0]<< 40)| ((uint64_t)mac[1]<< 32)| ((uint64_t)mac[2]<< 24)| ((uint64_t)mac[3]<< 16)| ((uint64_t)mac[4] )<< 😎 | (uint64_t)mac[5]; // 准备 L2 查找条目字段 uint32_t entry[WORD_COUNT] = {0}; 条目 [0] = ((5 & 0xF) << 24) | (1 << 11); // SrcPort, DestPorts 1 & 2 条目 [1] = (uint32_t)(mac64 & 0xFFFFFFFF); 条目 [2] = (uint32_t)((mac64 >> 32) & 0xFFFF); 条目 [2] |= (3 << 16); // VLAN ID = 3 条目 [3] = 0; // 可选的掩码 条目 [4] = 0; 条目 [5] = (8 << 4) | (1 << 10); // CB_SID_IN = 8, CB_ON_DA = 1 // 等待直到前一个操作完成 status = wait_for_valid_clear(swt); if (status != STATUS_SUCCESS) return status; // 将 L2 输入数据写入寄存器 status = SWITCH_DRV_Write(swt,WORD_COUNT,DYN_BE_LKP_ENTRY0,entry); if (status != STATUS_SUCCESS) return status; // 构造控制寄存器值 uint32_t ctrl = DYN_BE_LKP_CTRL_VALID_MASK | DYN_BE_LKP_CTRL_RDWRSET_MASK | (HOSTCMD_WRITE<< DYN_BE_LKP_CTRL_HOSTCMD_SHIFT); //触发信号写入 状态 = switch_drv_Write (swt, 1, DYN_BE_LKP_CTRL, & ctrl); if (status! = STATUS_SUCCESS) 返回状态; // 等待操作完成 return wait_for_valid_clear(swt); } 这段代码是否可用于生成动态条目? 如果这段代码正确,需要在何处调用该函数? Atkinson Regards Re: Dynamic configuration in sja1110 你好@PavelL #include #include // 根据 SoC 映射定义寄存器地址 #define DYN_BE_LKP_ENTRY0 0x000 // 替换为实际地址 #define DYN_BE_LKP_ENTRY1 0x004 #defineDYN_BE_LKP_ENTRY2 0x008 #define DYN_BE_LKP_ENTRY3 0x00C #define DYN_BE_LKP_ENTRY4 0x010 #define DYN_BE_LKP_ENTRY5 0x014 #define DYN_BE_LKP_CTRL 0x018 void insert_l2_unicast_entry(void) { // === INPUTS === uint64_t mac = 0x021122334455ULL; // MAC 地址 uint16_t vlan_id = 3; uint8_t dest_port = 3; // 端口 3 uint16_t dest_ports_mask = (1<< dest_port); uint16_t index = 5; // === 第 1 步:等待上一步操作完成 === while (read_register(DYN_BE_LKP_CTRL)& ETHSW_DYN_BE_LKP_CTRL_bValid_MASK); // === 第 2 步:准备输入字段 === uint32_t mac_lo = (uint32_t)(mac& 0xFFFFFFFF); // 低 32 位 uint32_t mac_hi = (uint32_t)((mac>> 32)& 0xFFFF); // 高 16 位 uint32_t entry0 = ethsw_dyn_be_be_lkp_entry0_uventry_30__0_ (0x00000000);uint32_t entry1 = ethsw_dyn_be_lkp_entry1_uventry_62__31_ (mac_lo);uint32_t entry2 = ethsw_dyn_BE_BE_LKP_ENTRY1_UVENTRY_62__31_ (mac_lo);uint32_t entry2 = ethsw_dyn_BE_BE_LK_LKp_entry2_uventry_94__63_ (mac_hi); uint32_t entry3 = ethsw_dyn_be_lkp_entry3_uventry_126__95_ (((vlan_id & 0xFFF) < < 16) | (dest_ports_mask & 0xFFF));uint32_t entry4 = ethfff sw_dyn_be_lkp_entry4_uventry_158__127_ (0x00000000);// 可选标志/保留的 uint32_t 条目5 = ethsw_dyn_be_lkp_entry5_uventry_190__159_(索引); // === 第 3 步:将条目写入 DYN 寄存器 === write_register(DYN_BE_LKP_ENTRY0, entry0); write_register(DYN_BE_LKP_ENTRY1, entry1); write_register(DYN_BE_LKP_ENTRY2, entry2); write_register(DYN_BE_LKP_ENTRY3, entry3); write_register(DYN_BE_LKP_ENTRY4, entry4); write_register(DYN_BE_LKP_ENTRY5, entry5); //=== 步骤 4:通过控制寄存器触发写入 === uint32_t ctrl_val = 0; ctrl_val |= ethsw_dyn_be_ctrl_bvalid (1); ctrl_val |= ethsw_dyn_be_be_ctrl_bw rdb (1);//写入操作 ctrl_val |= ethsw_dyn_be_be_be__lkp_ctrl_uvHostCommand (0b011);//主机写入 ctrl_val |= ethsw_dyn_be_lkp_ctrl_bvalident ry (1);//有效输入 write_register(DYN_BE_LKP_CTRL, ctrl_val); // === 第 5 步:等待操作完成 === while (read_register(DYN_BE_LKP_CTRL)& ETHSW_DYN_BE_LKP_CTRL_bValid_MASK); // === 第 6 步:检查错误 === uint32_t status = read_register(DYN_BE_LKP_CTRL); if (status& ETHSW_DYN_BE_LKP_CTRL_bError_MASK) { // 处理错误 // 你可以根据需要打印或记录 } } 我是否可以插入这段代码,将数据动态写入 L2 查找表 我应该在哪里插入这段代码进行测试? 期待您的回复 Atkinson Re: Dynamic configuration in sja1110 你好@PavelL 在通过 SPI_HAP 进行配置的方法中 在哪里可以找到 write_l2_lookup_table.py? 如何通过 SPI_HAP 进行通信?设备启动后的时间以前 在静态配置期间,我们已经通过每个索引配置了每个数据? 那么,如果最初配置的是静态数据,是否就可以连接? 您能分享一下 write_l2_lookup_table.py 吗? 当从哪里(需要连接哪个端口才能传递数据)运行这个脚本时,脚本将轮询数据? Atkinson Re: Dynamic configuration in sja1110 你好@Atkinson、 动态配置的方法取决于您的使用情况--可以由内部 M7 内核执行,也可以通过 SPI 从外部执行。下面是一份可能的解决方案清单: 1.ECT(以太网控制工具) 通过外部以太网(UDP)帧进行动态配置。M7 核心上运行的内部固件接收配置并将其应用到交换机核心。 2.修改后的 ECT ECT 源代码可进行调整,以接受任何以太网帧格式(不仅仅是 UDP)。这样就可以集成到定制协议或系统中。内部逻辑保持不变--M7 内核执行实际的寄存器更新。 3.SPI_HAP(主机访问协议) 主机工具中的 write_l2_lookup_table.py 脚本演示了如何通过 SPI 动态配置 L2 表。任何外部 MCU 或主处理器都可以使用这种方法。如果需要,该脚本中的逻辑也可以移植到 M7 内核上直接运行。 上述所有方法都遵循 AN12925 第 5.1.3.2 节所述的相同原则。寄存器级别的流程是相同的,包括轮询控制寄存器、写入条目寄存器以及通过控制寄存器触发信号更新。 顺祝商祺! 帕维尔
View full article
pca9450b pmic_on_req 由 imx8 nano ultralite 保持 LOW 我有一块使用由 PCA9450B 提供动力的全新 imx8 nano ultralite 的定制板 PMIC_ON_REQ 通过外部 10K 上拉直接连接到 MCU。我注意到,OMIC_ON_REQ 信号被保持在低电平(0V),即使使用 10k 上拉也是如此。这导致 PMIC 卡在 SNVS 电源模式(只有 1V8 和 0V8 导轨通电)并且无法进入运行。 iMX8 的数据表显示,PMIC_ON_REQ 默认引脚功能为"snvsmix.PMIC_ON_REQ" ,输入/输出状态为"开漏,输出高电平,带 PU" 。所以我很困惑,为什么这个信号会被压低。 如果我切断连接 MCU 的迹线,当我通电时,上拉正确地使 PMIC_ON_REQ 信号在 PMIC 上为高电平(1.8V),PMIC 进入运行模式,所有轨正确通电。 我想知道是什么原因导致 imx8 在外部上拉的情况下仍将信号保持为低电平,特别是考虑到数据表中对微控制器引脚的描述。 谢谢! i.MX 8M | i.MX 8M Mini | i.MX 8M Nano PMIC Re: pca9450b pmic_on_req held LOW by imx8 nano ultralite 将 ONOFF 调到 1V8 而不是 0V8 就解决了问题! 这是设计中的一个错误。 非常感谢! Re: pca9450b pmic_on_req held LOW by imx8 nano ultralite 您好, 是的,实际上 bootROM 可能是未钳位 PMIC_ON_REQ 的原因,它会等待 SNVS 电源,然后延迟一段时间,还取决于处理器控制输入。 请审查: 1.将 ONOFF 拉至 LDO1(1V8 而不是 0V8)。 2.PMIC 向处理器输出时钟源。 3.处理器振荡器时钟有效。 4.SNVS 供应有效。 此致 Re: pca9450b pmic_on_req held LOW by imx8 nano ultralite 下面是相关的原理图。原理图与 PCA4950 应用说明中的原理图一致。PMIC_ON_REQ 没有上拉。POR_B 具有外部上拉功能。 数据手册中没有提到 PMIC_ON_REQ 的上拉电阻。您能告诉我数据表中哪一页说不要在该信号上安装上拉电阻器吗?还是你的意思是应用笔记,哪里有参考示意图? 我在网上发现了其他笔记,研究表明,一种有效的设计是将外部上拉至 PMIC_ON_REQ 信号(将其永久设置为高电平),如果我不想让 MCU 能够控制 PMIC 的电源模式,则永久将 PMIC_STBY_REQ 调至低电平。 我的电路图在 POR_B 上有一个外部上拉电阻。我不在实验室,所以我面前没有板,但我觉得 POR_B 信号没问题,因为当我在 PMIC_ON_REQ 信号上连接外部上拉电阻时,PMIC 进入运行状态(所有轨道都正确启动),固件开发人员能够通过 JTAG 连接到 imx8 并读回目标数据。固件开发人员还可以将固件闪存到 eMMC 中。 因此,我的问题仍然是 iMX8 PMIC_ON_REQ 引脚将信号保持在低电平(即使使用外部上拉)。当我切断通往 iMX8 的线路时,增加的外部上拉将信号拉高,PMIC 进入运行状态。 iMX8 的 ROM 中是否有什么东西会导致这种情况?我对这种行为感到困惑,因为 imx8 数据手册上说 PMIC_ON_REQ 引脚的默认功能和状态是开漏输出,设置为高电平状态。 Re: pca9450b pmic_on_req held LOW by imx8 nano ultralite 您好, 根据 PCA9450B 数据手册,不需要上拉,能否去掉上拉? 能否提供相关的示意图? POR_B 在您的板中的状态如何? HDG 表示处理器使用它来断言 PMIC_ON_REQ,并需要上拉。 此致 Re: pca9450b pmic_on_req held LOW by imx8 nano ultralite 是的,我看过 HDG。它不包括我的问题。如果我切断到 iMX8 上 PMIC_ON_REQ 引脚的走线,RESET 或开机顺序就没有问题了。切断走线后,PMIC 上电顺序有效,RESET 被版本,我们能够将 JTAG 连接到板并回读板目标信息。 出于某种原因,iMX8 PMIC_ON_REQ 引脚将该信号保持在低水平,而 HDG 中出现的板中没有提及这个特殊信号。 还有其他想法吗? Re: pca9450b pmic_on_req held LOW by imx8 nano ultralite 您好, 感谢您对恩智浦半导体产品的关注, 你读过第 4 章避免 IMX8MNHDG 的板启动问题了吗?可能存在 RESET 原因,使该行处于钳位状态。 此致
View full article
S32K312 休眠唤醒 背景信息我目前正在使用S32k312进行休眠唤醒的功能开发,我有以下问题请请教咨询一下; 1、我使用的是Normal Wakeup而非Fast Standby,请问在Normal唤醒模式下可以实现唤醒源在StandbyRam的存储吗,我目前无法从WISR寄存器中读到有效唤醒源; 2、我通过示波器观察发现K3在休眠状态下收到唤醒源后是先走复位然后才进入的Icu中断,我想知道唤醒到底是先复位再进Icu中断还是先进Icu中断再复位; 3、我在休眠后只触发一次电平沿边中断唤醒,唤醒后从WISR寄存器中的值来看我所有配置了Icu唤醒功能的中断都触发了一次,因此我怀疑是否存在AB两种唤醒源,通过A方式唤醒MCU后WISR会同时记录AB两个唤醒事件,麻烦帮我解答一下; Re: S32K312 休眠唤醒 Hi@Gaulle 自己去排查,可能是的程序根本就没有成功进入standby模式,亦或者你的唤醒源一直存在 Re: S32K312 休眠唤醒 对的,如你所说,我的程序也是这样设计的,同样的唤醒源,例如我是CAN唤醒,如果我只发一次唤醒报文,那么我的程序会唤醒然后又休眠,而我发两三帧唤醒报文的时候,软件就能识别到有效唤醒源且维持唤醒,这是为什么呢,谢谢 Re: S32K312 休眠唤醒 Hi@Gaulle 不正确,除非你的程序在唤醒后又进入了休眠,不存在几次唤醒的问题 Re: S32K312 休眠唤醒 1、我的软件内部如果检测到有效唤醒源会进行一个唤醒状态的维持,在这种情况下,我在MCU休眠后如果只触发一次唤醒事件,MCU只会唤醒然后很快再次休眠下去,愿意是未识别到有效唤醒源,而在休眠后如果触发二到三次MCU就可以识别到有效唤醒源且维持唤醒,因此我认为在K3平台上只触发一次唤醒事件只能唤醒且复位MCU,如果没有第二三次唤醒事件,则MCU在复位起来后会立马又休眠下去,请问我的结论正确吗?谢谢 Re: S32K312 休眠唤醒 Hi@Gaulle Q.请问在Normal唤醒模式下可以实现唤醒源在StandbyRam的存储吗 可以,外部唤醒源唤醒后读取WISR,再将其存储在StandbyRam中没有问题 Q.我通过示波器观察发现K3在休眠状态下收到唤醒源后是先走复位然后才进入的Icu中断,我想知道唤醒到底是先复位再进Icu中断还是先进Icu中断再复位; 唤醒的中断标志位在唤醒后依然存在,如果当前使能了中断,那么会在唤醒后进入唤醒中断处理。 Since the wakeup flag register is retained after waking up, the wakeup ISR can be entered once the NVIC->ISER of Wakeup Unit is enabled by code. All the 64 wakeup sources share one interrupt vector. Q.唤醒后从WISR寄存器中的值来看我所有配置了Icu唤醒功能的中断都触发了一次 所有的64个唤醒源共用一个中断向量,ICU唤醒功能的中断都触发了一次是可能的,但是相应的唤醒WISR是独立的,所有你自己去排查是否响应的唤醒口是否触发了唤醒操作。 Read the WKPU->WISR & WKPU->WISR_64 (Wakeup/Interrupt Status Flag Register). They are cleared by writing 1.
View full article
imx6ull increase cpu frequency to 792MHz Hi, I built a Debian based OS with the current environment: Linux 6.6.58-rt45-0 - Mainline u-boot 2024.07 - Mainline I have a custom HW which has an imx6ull microprocessor.  I based the device tree on imx6ul-14x14-evk.dtsi (uboot and kernel). My custom device tree inherits from "imx6ull.dtsi" I would like to know if I can use 792MHz or 900MHz for CPU freq. I've seen those frequencies are available on Device Tree definition: &cpu0 {        clock-frequency = <900000000>;        operating-points = <                /* kHz  uV */                900000  1275000                792000  1225000                528000  1175000                396000  1025000                198000  950000        >;        fsl,soc-operating-points = <                /* KHz  uV */                900000  1250000                792000  1175000                528000  1175000                396000  1175000                198000  1175000        >; }; However, in my file system I do not have them available: root@imx6ull:~# cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq 528000 root@imx6ull:~# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies   198000 396000 528000 Does it possible? Does it limited by HW, voltage or current input?  I've seen other questions in the forum related to it but I did not find a clear answer: How to set imx6UL CPU to 528MHz in U-boot  About changing the internal LDOs voltage in i.MX6DQ.  How to set CPU frequency on u-boot?  Thanks, Javier Re: imx6ull increase cpu frequency to 792MHz Hi, Thank you both four replies. Now I understand where the limitation comes from. The partnumber is MCIMX6Y2CVM05AB, therefore it is nothing to do here. I've checked the fuses and results match with @lapohab described. Regarding the software changes... I agree with @lapohab . By default all frequencies are available in the Device Tree, therefore, if it is supported by the soc, those frequencies must appear in user space and it would be possible to change the CPU frequency in running time. There is no need to hardcode only one frequency in the Device Tree. Thanks for the support Re: imx6ull increase cpu frequency to 792MHz It has been clearly described in the last post. This cannot be burned by yourself. It is burned during production testing. I attach it again. It says "Burned by tester program, forindicating IC core speed (Hotburn may not be used)." Industrial part and Consumer part have different life times. This is in i.MX 6ULL ​​Product Usage Lifetime Estimates (AN5337). If you force a higher frequency in the software than its grade defined, the life time will inevitably be shortened. According to your idea, everyone should buy a cheaper Consumer part and burn it into an industrial part by themselves. It will save lots of money including my running projects. According to your idea, another case is just burn fuse of industrial part, it can run at 900M without life time impact. Why NXP does not have 900M industrial part? Why are there still different parts of different grades for sale? Remove the other frequencies? Have you ever tried it? Just looking at the code, it doesn't work. You can only modify the following code, but I think it is only for testing purpose. As I said before, If you force a higher frequency in the software, the life time will inevitably be shortened. if (of_machine_is_compatible("fsl,imx6ull")) { #if 0 if (val < OCOTP_CFG3_6ULL_SPEED_792MHZ) imx6x_disable_freq_in_opp(dev, 792000000); if (val != OCOTP_CFG3_6ULL_SPEED_900MHZ) imx6x_disable_freq_in_opp(dev, 900000000); #endif } Re: imx6ull increase cpu frequency to 792MHz Hi, My idea was to remove the other frequencies before blowing the highlighted fuse. You could try to only add the 792MHz node in DTS, if not, you should modify the fuses if your part number matches the 08 code. Regards, Re: imx6ull increase cpu frequency to 792MHz All frequencies are already in the device tree. The code will determine the chip type based on different fuses and then modify the DTB in real-time. https://github.com/nxp-imx/linux-imx/blob/lf-6.6.3-1.0.0/drivers/cpufreq/imx6q-cpufreq.c #define OCOTP_CFG3_6UL_SPEED_696MHZ 0x2 #define OCOTP_CFG3_6ULL_SPEED_792MHZ 0x2 #define OCOTP_CFG3_6ULL_SPEED_900MHZ 0x3 static int imx6ul_opp_check_speed_grading(struct device *dev) { u32 val; int ret = 0; if (of_property_present(dev->of_node, "nvmem-cells")) { ret = nvmem_cell_read_u32(dev, "speed_grade", &val); if (ret) return ret; } else { struct device_node *np; void __iomem *base; np = of_find_compatible_node(NULL, NULL, "fsl,imx6ul-ocotp"); if (!np) np = of_find_compatible_node(NULL, NULL, "fsl,imx6ull-ocotp"); if (!np) return -ENOENT; base = of_iomap(np, 0); of_node_put(np); if (!base) { dev_err(dev, "failed to map ocotp\n"); return -EFAULT; } val = readl_relaxed(base + OCOTP_CFG3); iounmap(base); } /* * Speed GRADING[1:0] defines the max speed of ARM: * 2b'00: Reserved; * 2b'01: 528000000Hz; * 2b'10: 696000000Hz on i.MX6UL, 792000000Hz on i.MX6ULL; * 2b'11: 900000000Hz on i.MX6ULL only; * We need to set the max speed of ARM according to fuse map. */ val >>= OCOTP_CFG3_SPEED_SHIFT; val &= 0x3; if (of_machine_is_compatible("fsl,imx6ul")) if (val != OCOTP_CFG3_6UL_SPEED_696MHZ) imx6x_disable_freq_in_opp(dev, 696000000); if (of_machine_is_compatible("fsl,imx6ull")) { if (val < OCOTP_CFG3_6ULL_SPEED_792MHZ) imx6x_disable_freq_in_opp(dev, 792000000); if (val != OCOTP_CFG3_6ULL_SPEED_900MHZ) imx6x_disable_freq_in_opp(dev, 900000000); } return ret; } Re: imx6ull increase cpu frequency to 792MHz Hi Josheph, I have already available that operating point in my device tree, it is defined in imx6ull.dtsi, and by default is set to 900000000Hz. I decompiled the Device Tree in my running system and I can see the same configuration: cpus { #address-cells = <0x01>; #size-cells = <0x00>; cpu@0 { compatible = "arm,cortex-a7"; clocks = <0x01 0x5d 0x01 0x1a 0x01 0x26 0x01 0xdb 0x01 0x38 0x01 0x39 0x01 0x19>; nvmem-cells = <0x04>; device_type = "cpu"; soc-supply = <0x03>; arm-supply = <0x02>; clock-names = "arm\0pll2_bus\0pll2_pfd2_396m\0secondary_sel\0step\0pll1_sw\0pll1_sys"; fsl,soc-operating-points = <0xdbba0 0x1312d0 0xc15c0 0x11edd8 0x80e80 0x11edd8 0x60ae0 0x11edd8 0x30570 0x11edd8>; phandle = <0x37>; reg = <0x00>; clock-frequency = <0x35a4e900>; // 900000000 Hz operating-points = <0xdbba0 0x137478 0xc15c0 0x12b128 0x80e80 0x11edd8 0x60ae0 0xfa3e8 0x30570 0xe7ef0>; //900000 - 1275000 ... clock-latency = <0xee6c>; #cooling-cells = <0x02>; nvmem-cell-names = "speed_grade"; }; }; However, I do not have available 792MHz nor 900MHz from user space. And the system is running at 528MHz. I have exactly the same configuration in u-boot. What you mean with "modify the dts file" Which dts file? Do you mean leave only 900MHz frequency in DTS? Thanks, Javier Re: imx6ull increase cpu frequency to 792MHz Hi, Thank you for your interest in NXP Semiconductor products, If you want to run the i.MX6ULL at exact 900MHz, then for that you need to modify the dts file. operating-points = <       /* kHz  uV */       900000  1275000 Regards
View full article
Questions about the LPC51U68 USB Hi I want to use a software a approach to simulate the condition where USB VBus detects a connection, and modify it using the framework of the exmaple code 'dev_cdc_vcom_lite_bm'. The environment I'm working with is the LPC51U68 EVK. In the LPC51U68 Product data sheet, on page 85, there's a section that says:  'Remark: When a self-powered circuit is used without connecting VBUS, configure the USB_VBUS pin for GPIO (PIO1_6 or PIO1_11) and provide software that can detect the host presence through some other mechanism before enabling USB_CONNECT and the SoftConnect feature. Enabling the SoftConnect without host presence leads to USB compliance failure. ' Does this mean that other methods can be used to replace VBus detection of the host? For example, using a software flag to directly drive USB enumeration? I noticed in UM11071 that when both DCON (bit 16) and VBUSDEBOUNCED (bit 28) in DEVCMDSTAT are 1, the devices status changes to 'connected'. So, the code should include a condition that checks these two bits to ensure USB Initial or Run succeeds, leading to normal enumeration, right? Can you tell me the key word to focus on? LPC51Uxx USB Re: Questions about the LPC51U68 USB Hi @Harry_Zhang, Thank you for your response. Your method is feasible. However, I later noticed a pull-down resistor R75 near P1_6. Therefore, I performed an inverted operation on P1_6 and left JP10 open circuit, allowing the LPC51U68 to interpret 0 as 1. Re: Questions about the LPC51U68 USB Hi @hermus  On the LPC51U68 EVK, JP10 connects the USB VBUS signal to P1_6, which is the dedicated USB0_VBUS pin. When JP10 is shorted, the MCU can detect VBUS, set the VBUSDEBOUNCED bit, and proceed with USB enumeration. If JP10 is open, the MCU cannot detect VBUS, meaning the VBUSDEBOUNCED bit never gets set. Consequently, the internal pull-up on D+ will never be activated, causing enumeration failure. If you want to bypass the VBUS detection mechanism by simulating it in software. Since you’ve already tried configuring P1_6 as GPIO, you could manually set the VBUSDEBOUNCED bit using the DEVCMDSTAT register. However, the VBUSDEBOUNCED bit is read-only, meaning it’s not directly writable by software. you can try: Powering the Device Externally: Provide a constant VBUS signal through hardware to keep P1_6 high. Jumping Directly to Enumeration: Skip the VBUS check and directly set the DCON bit after USB initialization. For example, after calling USBD_API->hw->Init() and configuring endpoints, immediately call: USBD_API->hw->Connect(g_hUsb, 1); BR Harry Re: Questions about the LPC51U68 USB Hardware: OM40005 (LPC51U68 EVK) Software:     SDK Version: 2.15.00     Maifest Version: 3.14.0 In the example code under usb_examples > rom_dev_cdc_bm, I noticed the line USBD_API->hw->Connect(g_hUsb, 1) which seems to align with the SoftConnect functionality. To verify whether the Connect function works, I performed open-circuit and short-circuit tests on JP10 of the LPC51U68 EVK. When JP10 is shorted, enumeration works normally, but when it’s open, enumeration fails. Regardless of whether I configure P1_6 as USB0_VBUS or GPIO, after opening JP10 and monitoring D+ with a Logic Analyzer, I found that during operation, there’s no period where D+ goes high, meaning enumeration fails. What confuses me is that in UM11071, Chapter 22.4.3 SoftConnect, it states: 'The softConnect signal is implemented internally. An external pull-up resistor between USB_DP and VDD is not necessary. Software can control the pull-up by setting the DCON bit in the DEVCMDSTAT register. If the DCON bit is set to 1, the USB_DP line is pulled up to VDD through an internal 1.5 KOhm pull-up resistor.' So why does the pull-up only work when JP10 is shorted and P1_6 is set to USB0_VBUS? Additionally, the description in Section 22.4.3 seems inconsistent with the description of the DCON bit in Table 348 of the DEVCMDSTAT register. The DCON bit is described as: 'The connect bit must be set by SW to indicate that the device must signal a connect. The pull-up resistor on USB0_DP will be enabled when this bit is set and the VBUSDEBOUNCED bit is one.' It appears that the VBUSDEBOUNCED bit must also be set to 1, and since VBUSDEBOUNCED is tied to the VBus detection pin. Does this mean VBus detection is required for D+ to be pulled up? I’d like to ask: If I don’t connect JP10, what methods can I use in the LPC51U68 example code to ensure normal USB operation? Or is it absolutely necessary to short JP10 for VBus detection to enable USB to perform subsequent actions properly?
View full article
禁用串行下载器回退(i.MXRT 1060) 我感兴趣的是是否有办法禁用串行下载器模式回退。换句话说,除非将 BootMode 设置为 1,否则如果内部启动模式失败,我希望设备基本上不执行任何操作。 从阅读 RM,特别是从查看高级引导代码流程图来看,这似乎不太可能。首先,我根据 i.MXRT 1060 RM 第 9.3.2 章中的图 9-1 和第 9.11 章中的图 9-19 得出结论,它们似乎表明,当一切都失败时,所有启动模式都会回到串行下载器模式。然而,由于对此还很陌生,我可能错过了一些东西。 如果您需要任何详细说明或进一步的细节,请告诉我。 谢谢! i.MXRT 106x
View full article
S32K144 PORT Hi:     I want to configure the PORTB pins of S32K144 in EB project, but I find that some of the PCR values of the pins are wrong after configuration, such as PORTB0-14, is there anything special about these pins? My MCU package is LQFP_100, thank you for your help! 回复: S32K144 PORT Hi @Embedded_novice  Section 3.6 (Driver usage and configuration tips) of the User Manual for S32K1_S32M24X PORT Driver provides a formula to obtain the PortPinPcr value. For easy reference, I am adding it to my response, but you can find the document for example C:\NXP\SW32K1_S32M24x_RTD_4.4_R21-11_2.0.0\eclipse\plugins\Port_TS_T40D2M20I0R0\doc. The value of actual PortPin Pcr is identified by the formula: PortPinPcr = PinId + PortId∗32. Where PortId is the numeric identifier of the port. For example, the PortPinPcr value of PTC7 will be 7 + (2∗32) = 71. B.R. VaneB 回复: S32K144 PORT I see. It's my understanding. I think PORTA has 18 pins, so the PCR of PORTB_0 should be 19, but in fact, the PCR value is calculated according to the maximum 32 per PORT group, PORTA occupies 0-32, PORTB_0 should start from 33. However, when I checked the section on the number of PORT pins in the RM manual, there seemed to be no clear mark indicating that I should calculate according to the absence of 32 pins in the PORT group. Could you tell me where in the manual to get this information?
View full article
Reset led toggling while deploying the project from mbdt Hello NXP team, We are working in dio configuration using mbdt with S32K344 EVB Rev B1. while deploying the code using matlab we are able to see the functionality working but after some time like 3 to 5 sec the board reset LED starts blinking continuously. Unable to find the solution. Can anyone give me some solutions! Attached the project folder with this, kindly do some needful. Thanks & Regards Esakki MBDT @VaneB @Irina_Costachescu @Robin_Shen @Ganapathi_NASH_INDIA @Kavin_raj_mbd  Re: Reset led toggling while deploying the project from mbdt Hi, @Vijay98, Thank you for your interest into Model-Based Design Toolbox for S32K3. It looks like your evaluation board enters into a sequential reset state. Please review the following thread  S32K3X4EVB-T172 with MBD which addresses the same issue. Let us know if your problem persists. Best regards, Dragos Re: Reset led toggling while deploying the project from mbdt Hi esakki, I am also facing the same issue... In s32k344 evb rev A it's working fine but in s32k344 evb rev B1 after flashing for 5 to 10 sec it's working fine after that reset led starts blinking continuously  If you find any solution kindly let me know... then any one resolved this issue let us know Thanks & Regards  KR MBDT S32K3X4EVB-T172  @VaneB @Irina_Costachescu @Robin_Shen 
View full article
S32K144: Is there a way to use FlexIO pin for PWM generation in Simulink Currently trying to figure out how to use a FlexIO pin for PWM generation in Simulink. I don't see any blocks in Simulink for using a FlexIO pin for PWM generation, only for I2C, SPI and UART. Any help would be greatly appreciated.  Re: S32K144: Is there a way to use FlexIO pin for PWM generation in Simulink Thank you for the information Re: S32K144: Is there a way to use FlexIO pin for PWM generation in Simulink Hello @mirali , Unfortunately, in MBDT for S32K1xx, for the FlexIO we do not provide PWM generation blocks. However, such support can be achieved by using custom code in a similar approach described by this article: https://community.nxp.com/t5/NXP-Model-Based-Design-Tools/How-to-use-your-own-C-code-in-our-Toolbox-Battery-Management/ta-p/1119004 I am not sure if the S32K1 SDK, the abstraction layer on which the MBDT for S32K1 generates the hardware access peripherals code has such support for the PWM generation, so in this case you can directly control and achieve such functionality by writing to registers using a similar approach mentioned in the article above. Regards, Marius
View full article
MIFARE Development Hey there, I´m relativly new in RFID/NFC an got some questions. We´ve got a new costumer. They have already an excisting custom Board which is powered by an ST Frontend. For there current purpose they use Mifare Ultralight. Now they want to get access to several other Tags, e.g: Mifare® Classic®, Ultralight®, Ultralight C®, Plus®, DESFire® EV1, EV2, EV3, ICODE 2, ICODE SLI. I would choose the CLCR663 PLus - IC for the new development. I have watched the Mifare Academy videos, but still don´t know how to solve following problems: 1. Create Application on 3rd party Tags: In my understanding, the Tag owner has to create a new App to the e.g DESfire EV3 Tag. When connecting to the Product, the Product searches for this specific App through AID. But in case of EV3 Tag, the App is secured by an App-Key. Because the Tag owner doesn´t want me to know the Master-Key and i don´t want the owner to know my App-Key. And without the Master-Key, I´m not able to create a new App by my own, when the customer presents the Tag to my Product, or? - Who generates the Key for the App? - Is there a 'Best Practice' in those cases? 2. AES-128 key: If i want to use AES-128 encryption both sides need the same key. If there is a 3rd party Tag, i don´t know the key. Same questions like 1. - Who generates the Key? - Do i have to write the key to the Tag, when I´m able to get access to my App? - Is there a 'Best Practice' in those cases? Best regards Oliver Contact Smart Card Reader ICs Re: MIFARE Development Ok. Thank you. Re: MIFARE Development The detail information is in the full version of datasheet. The datasheet is NDA required and can be downloaded under "Secure" file.  
View full article
S32K3 Lin从模式问题 尊敬的S32K3团队: 我希望你一切安好。 我目前在尝试使用 S32K311 上的 LIN-LPUART 进行通信时遇到问题,希望请求您的帮助。下面,我概述了我遇到的问题,非常感谢您提供的任何解决方案或指导。 1.在主模式下,当以响应 rx 格式传输 LIN 数据时,Canoe 检测到“同步分隔符长度不正确”错误。 1.1.尽管如此,Canoe 还是发送了响应,但 LIN IRQ 处理程序检测到帧错误,从而阻止传输正确的响应。 2.我需要一个从属模式的示例。(RTD版本:SW32K3_RTD_R21-11_3.0.0_P07) 2.1.在从属模式下初始化并运行程序后,我观察到当从 Canoe 发送消息时,LIN 总线的波形与 LPUART-RX 引脚匹配。但是,没有发生中断,并且没有触发 IRQ 处理程序。 我真诚希望得到有关这些问题的指导或解决方案。 非常感谢您付出的时间和帮助。 顺祝商祺!
View full article
AN12214モーター制御ソフトウェアをMcuXpressoにインポートする RT1060のソースコードをAN12214にインポートしようとしています。 AN12214SW.exeを実行してソースコードを抽出し、File->Import、既存のプロジェクトをワークスペースに使用しました。ネストされたプロジェクトの検索とプロジェクトをワークスペースにコピーするを選択しました。 RT1060にはAN12214SWとpmsm_ref_solを選択しました。 AN12214SWは問題なくインポートできます。 pmsm_ref_solはそうではありません。ファイルのディレクトリ構造は正しくインポートされますが、すべてのファイルに小さな黄色の!アイコン。ディレクトリにコピーされたファイルはありません。空白のディレクトリに同じ名前のファイルを置いても、McuXpressoはそれを見ることを拒否します。ディレクトリに別の名前のファイルを配置すると、プロジェクトエクスプローラーに表示され、McuXpressoから開くことができます。 McuXpressoにプロジェクトを正しくインポートさせるにはどうすればよいですか? 私はMCUXpresso IDE v24.9 [ビルド25]を実行しており、SDK_2.x_EVK-MIMXRT1060インストール Re:AN12214モーター制御ソフトウェアをMcuXpressoにインポートする 解決策を見つけました。「プロジェクトをワークスペースにコピーする」を選択しない場合、ビルドできます。
View full article
OTPミラーレジスタマップ 件名: PF5020 OTPミラーレジスタマップドキュメントのリクエスト こんにちは、 現在、PF5020 PMIC と NXP コントローラ間の通信に取り組んでいます。PF5020 データシートを確認したところ、OTP 構成に関連するレジスタ アドレスやピン レベルの説明など、OTP ミラー レジスタ マップに関する詳細情報は見つかりませんでした。 必要な出力電圧は1.1V、1.8Vです3.3V この情報は別の文書で入手できるかどうか教えていただけますか?これは、システム内の OTP 関連の設定を正しく解釈して構成するために不可欠です。 ご指導や、共有していただける関連ドキュメントがあれば、ぜひお知らせください。 お手数ですが、よろしくお願いいたします。 シヴァニ Re: OTP mirror register map こんにちは、 PF5020 データシートのセクション 16.1 には、次の内容を含む完全な OTP ミラー レジスタ マップが記載されています。 - アドレスを登録する - 次のような構成フィールド: 降圧出力電圧用のOTP_VSWx LDO出力電圧用のOTP_VLDOx 電源投入シーケンス用のOTP_SWx_SEQ パワーダウングループ化用のOTP_SWx_PDGRP 電流制限設定用のOTP_SWxILIM UV/OVしきい値用のOTP_SWxUV_THとOTP_SWxOV_TH VDDOTP ピンは、デバイスが次から構成をロードするかどうかを決定します。 - OTPヒューズ(VDDOTP = GNDの場合) - ハードワイヤードデフォルト(VDDOTP = V1P5Dの場合) TBBEN ピンは Try-Before-Buy (TBB) モードを有効にし、ヒューズ プログラミングをコミットする前に OTP 設定を一時的に構成およびテストできるようにします。 お客様による本番環境での OTP プログラミングは許可されていないことに注意してください。これを実行できるのは、NXP または認定パートナー (少量) のみです。開発中は、KITPF502xSKTEVM を CAN 使用できます。 PF5020 を 1.1V、1.8V、3.3V に設定するには、次のようにします。 - OTP_VSWxまたはOTP_VSWND1を1.1Vおよび1.8Vの適切な値に設定します - 電流要件に応じて、OTP_VLDO1 または OTP_VSWND1 を 3.3V に設定します。 これらの値は OTP ミラー レジスタでプログラム可能であり、コミITする前に TBB モードでテストできます。 BRs、トーマス
View full article
FXLS93333/FXLS93230AESR2 - PSI5通信 NXP技術チームの皆様 慣性センサの使用方法を理解するためにあなたのサポートが必要です。 自動車用エアバッグ アプリケーションに、NXP の 2 軸/1 軸慣性センサ FXLS93333/FXLS93230AESR2 を使用しようとしています。マスターは PSI5 通信を介してスレーブ センサと通信しています。私たちのアプリケーションに関して、次のような質問があります。 1 - アプリケーションマニュアル AN12776 のセクション 7 には次の内容が記載されています。NXP から部品を注文する場合、入手したセンサが COMTYPE レジスタを 0x01 に設定して追加プログラムされていることを確認する必要があるということですか?ただし、NXP の部品番号はセンサ部品ごとに固有であり、PSI5、SPI、I2C などの複数の通信をサポートします。アプリケーションノートを正しく読んでいますか?もしSOなら、必要な部品をご注文する方法/ご注文の場合の手順。 PSI5 通信の部品番号は以下のように固有です。 2- Mouser/Digikey から入手可能なセンサ (事前プログラミングなし) を使用して、デフォルトの設定/構成で PSI5 接続を介してマスターアプリケーションに直接接続できますか。 3 - PSI5通信センサのボーレート/データバイト長/モードなどのデフォルト設定は何ですか? 4- 必要に応じて、Mouser/Digikeyから購入した新しいセンサをプログラムできるEVBはありますか(UM11559 SEN-GEN6-SKT EVBなど) よろしくお願いいたします。 よろしくお願いします。 シャルマ Re: FXLS93333/FXLS93230AESR2 - PSI5 communication 親愛なるトーマスへ NXLS96xx 部品用の FFVT プログラミング ツールとユーザー マニュアルを受け取りました。また、多くのシリコンサプライヤーで在庫切れとなっている SEN-GEN6-SKT HW ボードの入手可能性について、さまざまなサプライヤーに問い合わせています。 First Field Verification Tool は、デバイス レジスタ構成のさまざまな組み合わせを NXLS96xxx (レジスタ マップ RAM 領域) に複数回ダウンロードし、適切に動作するかどうかの実験をサポートします。その後、デバイス レジスタ構成を OTP に永続的にプッシュしたいと考えました。 よろしくお願いします。 シャルマ Re: FXLS93333/FXLS93230AESR2 - PSI5 communication 親愛なるトーマスへ 親切なご助力にSO感謝いたします。NXLS96xxx用のプログラミングツールを入手するための標準サポートチケットを作成します。また、プログラミングマニュアル/ドキュメントを共有していただけますか? よろしくお願いします。 シャルマ Re: FXLS93333/FXLS93230AESR2 - PSI5 communication シャルマ様 ご質問への回答は下記をご覧ください。 1.部品番号を FXLS9xxxx から NXLS96 に更新する必要があります。交換部品番号が記載された下記の更新された表を参照してください。詳細は、こちらCAN: https://www.nxp.com/products/NXLS96 NXLS96xxx 部品番号は、NXP によって PSI5 が有効になっています。これらの部品番号のいずれかを注文すると、PSI5 プログラミング モードを使用して部品をプログラムできます。必ず NXLS96xxx 部品番号を注文してください。 2. センサは以下の設定に基づいてデータを送信します。これは評価には便利ですが、メモリがロックされず、セーフティメカニズムが無効になるため、アプリケーションでプログラミングせずに使用することはお勧めしません。 3.データシートによると、デフォルトの構成の詳細は次のとおりです (ビットは OTP でプログラムされていないため、SOユーザーがプログラムできることに注意してください)。 • 8 usビット時間(125 kbps)、通常応答電流 • セルフテストを8回繰り返し • 時間スロットに対するデータレイテンシ • チャネル0が有効 • 16ビットデータ、CRC、タイムスロット開始 = 47 us (PSI5-P16C) • 400 Hz、4極 • 最大範囲:高g = 700 g、中g = 233 g • オフセットキャンセルが有効 • チャネル1が有効 • 16ビットデータ、CRC、タイムスロット開始 = 244 us (PSI5-P16C) • 400 Hz、4極 • 最大範囲:高g = 700 g、中g = 233 g • オフセットキャンセルが有効 4. はい、プログラミング用のツールをCAN提供します。そのための標準サポート チケットを作成してください。ツールのCANご注文を担当できる同僚は現在不在ですが、7 月 21 日の月曜日には復帰する予定です。 BRs、トーマス
View full article