Multi Source Translation Content

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Multi Source Translation Content

ディスカッション

ソート順:
KW45 FlexCAN 可以触发接收中断并接收自己发送的消息 我正在调试 KW45 芯片的 FlexCan 驱动程序,发现当未配置接收过滤器掩码时,FlexCan 模块可以触发信号自己的接收中断并接收自己发送的消息。这种行为正常吗?如果是,根本原因是什么?例如,修改 SDK 中的flexcan_interrupt_transfer代码,如附件所示。 uart log : ********* FLEXCAN 中断示例 ********* 报文格式: 信息缓冲区 0 用于 Rx。 信息缓冲区 1 用于 Tx。 中断模式:启用 运行模式:TX 和 RX --> 正常 ********************************************* 请选择本地节点 A 或 B: 注:节点 B 应先启动。 节点:A 按任意键触发单发传输 Rx MB ID:0x321,Rx MB 数据:0x0,时间戳:60127 按任意键触发下一次传输! Rx MB ID:0x321,Rx MB 数据:0x1,时间戳:3624 按任意键触发下一次传输! Rx MB ID:0x321,Rx MB 数据:0x2,时间戳:18344 按任意键触发信号下一次传输! Rx MB ID:0x321,Rx MB 数据:0x3,时间戳:56722 按任意键发送下一个触发信号! Rx MB ID:0x321,Rx MB 数据:0x4,时间戳:55297 按任意键触发下一次传输! Rx MB ID:0x321,Rx MB 数据:0x5,时间戳:53656 按任意键触发下一次传输! Rx MB ID:0x321,Rx MB 数据:0x6,时间戳:30470 按任意键触发下一次传输! Rx MB ID:0x321,Rx MB 数据:0x7,时间戳:22438 按任意键触发下一次传输! Rx MB ID:0x321,Rx MB 数据:0x8,时间戳:1009 按任意键触发下一次传输! Re: The KW45 FlexCAN can trigger a receive interrupt and receive the messages sent by itself 你好,我已经解决了问题,需要设置:   flexcanConfig.disableSelfReception = TRUE;
記事全体を表示
S32N55: RTD API 可禁用流闸门 队员们好 根据 S32N55 参考手册,必须先禁用 Stream Gate 实例,然后才能在 1588 计时器中更改 TMROFF_H/L。 请问目前是否有禁用 RTD 中流门功能的 API? BR, Bridget RTD Re: S32N55: RTD API to disable the Stream Gate 您好, ,我将再次查看用户手册并向您确认。 Re: S32N55: RTD API to disable the Stream Gate 你好@Bridget 根据 S32N_RTD_R21-11_1.8.0_CD07 的用户手册,要启用/禁用流闸门,可以在配置工具(EB Tresos)上进行设置: 设置 EthCtrlConfigEnableStreamGating = FALSE Re: S32N55: RTD API to disable the Stream Gate HiCuong、 在某些情况下,例如在 gPTP 同步期间,可能需要在运行时更新 TMROFF_H/L 的值。根据 S32N55 参考手册,必须先禁用 Stream Gate 实例,然后才能在 1588 计时器中修改 TMROFF_H/L。 在这种情况下,我认为需要一个 API 来禁用/启用流门功能。您提到的 EB 配置似乎无法处理这种情况。 请问 RTD 目前是否有禁用/启用流闸门功能的 API? BR, Bridget
記事全体を表示
S32E288-975EVB 官方 DIO LED 示例失败 您好, ,我正试图将 S32E288-975EVB 与 S32 调试探针配合使用。我已经逐步遵循了基本的用户设置(S32E288-975EVB 入门 | 恩智浦半导体),但它没有按描述运行。Dio_Example_s32E2XX_R52 是恩智浦的官方示例,用于在初始化过程中让 LED 闪烁 10 次...... Siul2 示例运行正常,但据我了解,它也使用低级访问。 到目前为止,我已将问题追溯到 Mcu_SetMode(McuModeSettingConf_0);函数。在调用 void Power_Ip_SetMode(const Power_Ip_ModeConfigType * ModeConfigPtr) 函数时,似乎有时会失败。我还可以注意到,只需注释掉 Mcu_SetMode 就能使 LED 正常闪烁,但一个基本的 LED 闪烁示例在开箱后无法正常工作,这似乎很愚蠢 Mcu_SetMode 函数的作用是什么?我怎样才能让示例使用该函数? 我还尝试浏览 .mex->Peripherals->MCAL->Mcu配置,但无法找到/理解任何重要内容。 Re: S32E288-975EVB official DIO LED example fails 谢谢您的答复。 问题仍然部分存在。我已经上传了我的示例,但我不太明白可能有什么不同,因为我没有更改官方示例的任何内容,跳线也都在默认位置。 我所做的是将所有 BOOT_CFG 引脚 RESET 为零位置。我注意到,我将以下引脚设置为 ON: BOOT_CFG[2] BOOT_CFG[3] BOOT_CFG[6] BOOT_CFG[28] BOOT_CFG[30] 这样做之后,我仍然运行了几次 DataAbort_Handler,但试了几次之后,它又神奇地开始工作了... 这可能是问题所在吗?我怎样才能确保示例现在能够可靠地运行?你能解释一下更改 BOOT_CFG 开关后会发生哪些变化吗? 另一个有趣的是,我安装了两个 RTD 软件包: S32ZE 实时驱动 AUTOSAR R21-11 版本 2.0.1 S32ZE2xx 实时驱动 AUTOSAR R21-11 版本 2.0.1 我相信我使用的是: S32Design Studio 3.6.4   Re: S32E288-975EVB official DIO LED example fails 你好,@HiddenSquid、 感谢您联系我们。关于您的问题,我可以顺利运行 Dio_Example_S32E2XX_R52 示例项目,我只是生成了代码,编译并调试了示例。我的设置如下 S32 设计工作室 3.6.1 S32Z/E Rtd 2.0.1 板的开关和跳线: 如果您仍有问题,可以使用社区的消息功能将您的项目发送给我,以便我检查其中的差异。 如果有帮助,请告诉我 Re: S32E288-975EVB official DIO LED example fails 更新: 一段时间后,我再次尝试运行该示例,但现在在没有任何更改的情况下,它又神奇地失效了(在启动过程中运行到 DataAbort_Handler),因此很可能不是 BOOT_CFG 的问题。 Re: S32E288-975EVB official DIO LED example fails 你好,@HiddenSquid、 感谢您提供的信息。我重复了你在帖子中提到的指南中的步骤,似乎有一些步骤,但是在 S32ZE RTD 2.0.1 中,在我使用旧安装进行测试之前,Dio 示例没有出现问题,现在我创建了一个新的 S32DS 实例并安装了 RTD 软件包,我发现了同样的问题,我需要向 S32DS 团队报告这个问题。目前我只能建议你遵循这些替代安装步骤,最好使用 S32DS 3.6.1,这是 S32ZE RTD 2.0.1 的测试版本: - 如果使用以前的 S32DS 实例,请先卸载所有 S32ZE RTD。 - 像之前一样下载更新网站文件,这里是SW32ZE_RTD_R21-11_2.0.1_D2505_DesignStudio_updatesite.zip。 - 打开 S32DS> 帮助> 安装新软件> 添加> 存档,选择下载的文件并按照安装步骤进行操作: 您可以在左下角看到进度: 系统会多次提示您接受部分安装内容,请全部接受: 完成后,您需要重新启动 S32DS。 现在按照之前的步骤导入示例。 请告诉我这是否改变了行为 谢谢! Re: S32E288-975EVB official DIO LED example fails 你好,@HiddenSquid、 感谢您的耐心等待,我收到了来自内部团队的最新消息,他们分享了以下解决方法: ” 根本原因是 S32 调试探针初始化脚本中 SMU 和 CE 的SRAM 初始化不正确,导致Mcu_SetMode函数启动其内核时出现硬故障。 简单的解决方法是在配置工具中修改 Mcu 模块配置,禁用 SMU 和 CE 内核。具体如下 Mcu → McuModuleConfiguration → McuModeSettingConf → McuPartitionConfiguration → McuPartition0Config、 并将三个已配置的SMU 和 CE 项更改为跳过,如下图中三个红框所示。 “ 我进行了测试,应用这些更改后,它就能正常工作了。 如果您需要更多支持,请告诉我。
記事全体を表示
高级声明式用户界面框架 是否有适用于 i.MX RT 跨界 MCU 的高级声明式用户界面框架?我希望能用 Swift 或 JavaScript 等高级语言编写代码,然后使用类似 SwiftUI 或 React 的东西创建用户界面。 Re: High level declarative UI framework 你好@MatthewRuzzi、 感谢您关注恩智浦 MIMXRT 系列! 恩智浦正式提供 GuiGuider 工具,以 LVGL 作为底层框架,帮助客户快速开发用户界面软件。此外,SDK 还包括 emWin 和 VGLite 的示例项目。虽然目前官方并不支持高级语言的实现,但我建议探索以下方法: 1.https://doc.qt.io/QtForMCUs/qtul-zephyr-mimx1060-evk.html https://www.embeddedartists.com/wp-content/uploads/2023/06/QtMCUs_ProgramDevelopment.pdf 2https://www.nxp.com/design/design-center/training/TIP-CREATE-USER-INTERFACE-QT 3.https://docs.microej.com/en/latest/GettingStarted/gettingStartedIMXRT1170.html 4.https://github.com/lvgl/lv_micropython 5.https://www.swift.org/blog/embedded-swift-examples/ 我希望这些资源能对您的发展有所启发。 致以最诚挚的问候, Gavin Re: High level declarative UI framework 目前是否有任何项目正在开展这方面的工作?我非常希望能够使用 Swift 或 JavaScript 这样的语言。有什么办法能让我今后更有可能这样做吗?我应该在哪些地方提交或投票表决功能请求,或者在哪些地方发布此信息?
記事全体を表示
[Haudi Crypto, Inc.][SE050]Proposal for BIP32 Support in SE050 Hi Experts, The customer is Haudi Crypto, Inc. (Subsidiary of Haudi, Inc.), who is developing a hardware cryptocurrency wallet using the SE050. During development, they identified enhancements that would benefit this use case—specifically, native BIP32 key derivation support. Is it possible to release a custom type for their application? Please kindly refer to the attachment for more details. More backgrounds as shown below: So far their Openloop Wallet is still under development and has not yet been released, and they will be the distributor. For the corporate version, they are in negotiations with several Japanese financial institutions and stablecoin operators. It has been well-received. For the general public version, they plan to first launch it through Japanese crowdfunding, and they are currently preparing for this. They also plan to sell it on Amazon afterwards.  Customer contactor info: Company Name: Haudi Crypto, Inc. (Subsidiary of Haudi, Inc.) Contact Information: Kazunori Asada, CEO Email: [email protected] Thanks in advance for any help! Best Regards, Kan  Re: [Haudi Crypto, Inc.][SE050]Proposal for BIP32 Support in SE050 Thank you for sharing your detailed proposal We have reviewed your Level‑2 request. Based on our current analysis: Some parts of the BIP32 flow can already be executed inside the secure element. For example, EC point multiplication can be performed entirely within SE050, and the resulting point can be stored in an SE object. This allows certain chained operations to be kept inside the secure element boundary. However, other required steps—such as securely chaining HMAC‑SHA512 inside the secure element etc. are not feasible with the current IoT applet command set. We have taken your feedback and submitted it as an official Change Request (CR) for evaluation by our R&D team. However, any change if it happens for the generic product, it could not be in near future.  We will keep you updated as soon as we receive feedback on the CR.  Moreover, for your level 1 limitation you can consider using transient objects . Thank you
記事全体を表示
MCX W71 Knowledge Hub MCX W71 无线微控制器采用 96 MHz Arm® Cortex®-M33 内核,搭配支持 Matter™、Thread®、Zigbee® 和 Bluetooth® 低功耗的多协议无线电子系统。独立的无线电子系统拥有专用内核和内存,可减轻主 CPU 的负担,使其专注于主要应用,并支持固件更新以适配未来的无线标准。MCX W71x 还通过集成的 EdgeLock® 安全飞地核心配置文件提供高级安全性,并将由 NXP 的 EdgeLock 2GO 云服务支持凭证共享。 MCX W71x 系列可作为单芯片解决方案支持工业和物联网设备,也可在托管架构中用作协处理器。   MCX W71 Block DiagramMCX W71 框图 文件 MCX W71 参考手册 MCX W71 数据表 Errata Secure Reference 手册** 认证 评估板 FRDM-MCXW71页面 FRDM-MCXW71 原理图 FRDM-MCXW71设计文件 FRDM-MCXW71 用户手册 FRDM-MCXW71 入门指南 应用笔记 AN14398:如何在 FRDM-MCXW71 上使用 RTC 本应用笔记介绍了如何在 BLE 演示中配置和使用 RTC 外设。 AN14416:在 FRDM-MCXW71 蓝牙低功耗连接协议栈上启用看门狗定时器模块 本应用笔记介绍了在连接协议栈演示中实现 WDOG 定时器的过程。 AN14396:MCX W71 将 OTAP 客户端服务集成到蓝牙低功耗外设设备中 本应用笔记提供了将空中编程客户端服务集成到 BLE 外设设备中的步骤和流程。 AN14391:MCX W71 负载牵引报告 本应用笔记介绍了负载牵引特性的测量方法和相关结果。 AN14394:使用 OTAP 工具为 MCX W71 创建固件更新镜像 本应用笔记提供了通过 OTAP 在 MCX W71 板上创建和升级镜像的步骤。  AN14389:MCXW71 蓝牙低功耗功耗分析 本应用笔记提供了有关 MCXW71 无线微控制器的功耗、硬件设计以及低功耗运行优化的信息。  AN14387:MCXW71 电源管理硬件 本应用笔记介绍了 MCXW71 微控制器中专门用于电源管理的不同模块的使用方法。 AN14399:MCXW71 针对 802.15.4 应用的连接测试本应用笔记介绍了如何使用连接测试工具执行 MCXW71 802.15.4 射频性能测试。 AN14374:用于蓝牙低功耗和 IEEE 802.15.4 应用的 FRDM-MCXW71 射频系统评估报告 本应用笔记提供了 FRDM-MCXW71 板在 BLE(2FSK 调制)和 IEEE 802.15.4(OQPSK 调制)应用中的射频评估测试结果,还介绍了可用于执行测试的设置和工具。  AN14427:MCXW71 在线编程工具 本应用笔记提供了将 MCXW71 微控制器引导至 ISP 模式并建立各种串行连接以与微控制器通信的步骤。 AN14397:量产期间通过串行线调试为应用程序和无线电固件编程 MCXW71 闪存本应用笔记介绍了在量产中通过 SWD 编写、烧录和编程所有必要设置的步骤。 Zigbee 协议 Zigbee 3.0 入门:本应用笔记为开发你自己的 Zigbee 3.0 设备固件提供了最佳起点指导。 Zigbee 3.0 基础设备模板:本应用笔记提供了示例应用程序,以演示采用恩智浦 DK006 Zigbee 3.0 微控制器的 Zigbee 3.0 网络中基础设备的特性和操作。 Zigbee 3.0 设备开发:本应用笔记介绍了如何以基础设备模板终端设备应用程序为起点开发 Zigbee 3.0 开关传感器。本应用笔记中描述的开关传感器基于 Zigbee 照明和占用(ZLO)设备规范中的 Zigbee 设备类型。 Zigbee 3.0 灯泡:本应用笔记为采用 NXP DK006 无线微控制器的 Zigbee 3.0 网络中的灯泡提供了示例应用程序。 Zigbee 3.0 物联网控制桥:本指南提供了允许用户使用图形用户界面(GUI)连接到控制桥的信息,该界面模拟主机来操作 Zigbee 网络。它还描述了用于与控制桥接口的串行协议,以及所有相关命令和响应的有效负载。 Zigbee 3.0 绿色功率设备:本应用笔记为开发你自己的 Zigbee 3.0 设备固件提供了最佳起点指导。 Zigbee 3.0 传感器:本应用笔记为采用恩智浦 DK006 Zigbee 3.0 无线微控制器的 Zigbee 3.0 网络中的传感器提供了示例应用程序。 Zigbee 3.0 控制器和开关:本应用笔记为采用恩智浦 DK006 无线微控制器的 Zigbee 3.0 网络中的控制器和开关提供了示例应用程序。本应用笔记还包括 Zigbee 3.0 网络中典型的 Zigbee 绿色功率 (GP) 能量收集开关的示例。 Zigbee 3.0 集群开发:本应用笔记介绍了如何以基础设备模板路由器设备应用程序为起点开发 Zigbee 3.0 窗帘设备。本应用笔记有两种使用方式: 作为使用最终步骤中创建的功能示例创建窗帘设备的起点。 作为创建 NXP ZCL 实现中未包含的设备和集群(包括制造商特定设备和集群)的指南。 支持 如果你有关于 MCX W71 的问题,请在我们的无线微控制器社区中提出你的问题!此处 有用链接 使用 KW45/KW47/MCXW71/MCXW72 的信号频率分析仪 (SFA) 模块进行时钟测量 - NXP 社区:该社区提供了如何使用信号频率分析仪的步骤 首次正确构建 KW45(汽车)或 K32W1/MCXW71(物联网 / 工业)PCB 的最佳方法 - NXP 社区:在该社区中提供了使用 KW45 或 K32W148 和 MCXW71 构建 PCB 的重要链接,以及所有与无线电性能、低功耗和无线电认证 (CE/FCC/ICC) 相关的内容。 如何在 Kinetis 系列产品上使用 HCI_bb 并进入 DTM 模式:本文分为两部分: 如何将HCI_bb二进制文件烧录到Kinetis产品中。 使用 R&S CMW270 进行射频测量 BLE HCI 应用程序设置发射机/接收机测试命令:本文提供了相关步骤,展示用户如何向设备发送串行命令。 Bluetooth LE HCI 黑盒快速入门指南:本文介绍了一个简单流程,能让用户通过串行命令控制无线电。 培训 MCX W71培训,安全MCU用于Matter、Zigbee、BLE MCX W系列培训 - NXP社区 设备 无线设备:本文提供了有助于项目开发的设备链接。 开发工具 NXP MCUXpresso:MCUXpresso IDE 提供高级编辑、编译和调试功能,此外还有针对微控制器的特定调试功能。支持与所有通用 Arm Cortex-M 的连接。 VSCode: MCUXpresso for Visual Studio Code (VS Code) 为嵌入式开发人员优化了代码编辑和开发体验。 Zephyr RTOs  NXP Application Code Hub:应用代码中心 (ACH) 存储库使工程师能够轻松找到由我们内部专家开发的微控制器软件示例、代码片段、应用软件包和演示。该平台提供了一种快速、简便且一致的方式来查找微控制器应用。 NXP SPSDK:是一个统一、可靠且易于使用的Python SDK库,适用于 NXP MCU 产品组合,为客户快速制作原型到生产部署提供坚实的基础。 NXP SEC工具: MCUXpresso安全配置工具是一款基于 GUI 的应用程序,用于简化在 NCP MCU 设备上生成和配置可启动的可执行文件。 NXP OTAP Tool: 是一款帮助用户对 NXP 开发板执行空中固件更新的应用程序。 ** 获取安全文件需要申请额外访问权限。 FRDM 培训 动手实践培训 协议:802.15.4 协议:BLE -> 连接性 协议:蓝牙 协议:Matter 协议:Thread 协议:Zigbee
記事全体を表示
Failed to load static DPL with 8x DPDMUX Hi Community, Using dynamic creation of DPDMUXs and DPNIs successfully, and generate the DPL by following commands: 8x ls-addni --fs-entries=8 --num-queues=8 -n source /usr/local/dpdk/dpaa2/dynamic_dpl.sh ... 8x restool dpdmux create 8x restool dprc connect dprc.1 --endpoint1= .n.0/1/2 --endpoint2= / /dpni.k> restool dprc generate-dpl dprc.1 > dpl-8-dpdmux.dts Update the static DPL with dpl-8-dpdmux.dtb (generate by dtc tool) for uboot to initiate MC layout. The error shows as blow: [E, mem_mng_get_phys_mem:655] MAJOR mem. manager memory allocation failed [E, mem_mng_get_phys_mem:658] Required size 0x000040000 alignment 0x000000100 exceeds available memory for partition ID 7 [E, init_bman_bp:399, DPDMUX] ID[6] - dpbp_allocate_buffers(), failed to allocate dpbp buffers [E, init_infrastructure:3750, DPDMUX] swlib_init_bman_bp : -12 [E, dpdmux_init:4487, DPDMUX] init_infrastructure : -12 [E, mem_mng_get_phys_mem:655] MAJOR mem. manager memory allocation failed [E, mem_mng_get_phys_mem:658] Required size 0x000040000 alignment 0x000000100 exceeds available memory for partition ID 7 [E, init_bman_bp:399, DPDMUX] ID[7] - dpbp_allocate_buffers(), failed to allocate dpbp buffers [E, init_infrastructure:3750, DPDMUX] swlib_init_bman_bp : -12 [E, dpdmux_init:4487, DPDMUX] init_infrastructure : -12 [E, resman_is_link_permitted:6375, RESMAN] Object wasn't found [E, linkman_probe_cb:205] No common ancestor - Failed to connect dpdmux@6 and dpmac@9 [E, subnode_process:155] Probing module 'connection' return error code -1. Continue dpl processing... [E, resman_is_link_permitted:6375, RESMAN] Object wasn't found [E, linkman_probe_cb:205] No common ancestor - Failed to connect dpdmux@6 and dpni@15 [E, subnode_process:155] Probing module 'connection' return error code -1. Continue dpl processing... [E, resman_is_link_permitted:6375, RESMAN] Object wasn't found [E, linkman_probe_cb:205] No common ancestor - Failed to connect dpdmux@6 and dpni@7 [E, subnode_process:155] Probing module 'connection' return error code -1. Continue dpl processing... [E, resman_is_link_permitted:6375, RESMAN] Object wasn't found [E, linkman_probe_cb:205] No common ancestor - Failed to connect dpdmux@7 and dpmac@10 [E, subnode_process:155] Probing module 'connection' return error code -1. Continue dpl processing... [E, resman_is_link_permitted:6375, RESMAN] Object wasn't found [E, linkman_probe_cb:205] No common ancestor - Failed to connect dpdmux@7 and dpni@16 [E, subnode_process:155] Probing module 'connection' return error code -1. Continue dpl processing... [E, resman_is_link_permitted:6375, RESMAN] Object wasn't found [E, linkman_probe_cb:205] No common ancestor - Failed to connect dpdmux@7 and dpni@8 [E, subnode_process:155] Probing module 'connection' return error code -1. Continue dpl processing... [E, dpl_process:527] Error while parsing 'connections'. Skip processing the rest of DPL. [E, main:198] DPL processing failed; continuing...  Is there any limitation on the static DPL to support same layout as dynamic way? QorIQ LS2 Device Re: Failed to load static DPL with 8x DPDMUX Hi yipingwang, Using '--max-dmat-entries' in dynamic creating layout don't change the final dts by 'restool dprc generate-dpl dprc.1'. So, I just give it a try by adding following elements 'mem-size' and 'max-dmat-entries' in .dts. manually: dpdmux@0 {     compatible = "fsl,dpdmux";     options = "DPDMUX_OPT_CLS_MASK_SUPPORT", "DPDMUX_OPT_AUTO_MAX_FRAME_LEN";     method = "DPDMUX_METHOD_CUSTOM";     manip = "DPDMUX_MANIP_NONE";     num_ifs = <0x2>;     mem-size = <0x100>;  // this is manually added by me     max-dmat-entries = <0x8>; // this is manually added by me }; Unfornately this doesn't fix it, the same error message showing from MC debug. Please also check my dpl as enclosed. Re: Failed to load static DPL with 8x DPDMUX Please try whether the following method is possible. When you create DPDMUX, please specify "--max-dmat-entries=8" to reduce the resource allocation. --max-dmat-entries= max entries in DPDMUX address table. Default is 64. If your problem persists, please share your whole console log to create DPDMUX and generate DPL file. In addition, which processor are you using? Re: Failed to load static DPL with 8x DPDMUX Hi, I've managed to fix this issue by correcting the DPL parameter names.
記事全体を表示
S32K364:使用 EMIOS、BCTU 和 DMA 进行 ADC 转换 您好, 我正在尝试将 EMIOS0 ch 8 配置为触发扫描 ADC3 和 DMA 的 8 个通道的 BCTU,将转换结果移动到名为 ADC_3_RAW [] 的变量中。 转换似乎已经开始: 但该值不会通过 DMA 传输,也不会刷新 我正在使用这个 SDK: 每次使用 ConfigTool 生成代码时,我都需要修改以下代码: #define ADC_SAR_IP_PRESAMPLING_AVAILABLE ((1U)) 至 #define ADC_SAR_IP_PRESAMPLING_AVAILABLE ((0U)) 这正常吗? 项目附在这里。 敬请期待,弗朗切斯科。 Re: S32K364: ADC conversions using EMIOS, BCTU and DMA 你好@francescovico 我检查了你的代码,你的配置和用法都不正确。 1。DMA 的触发信号来源是什么?我没有看到您在配置中配置了"Rm" 模块。 2。既然你在使用 BCTU 来产生 ADC 的触发信号,为什么不使用它提供的 FIFO?这与 DMA 的功能完全一致。 https://community.nxp.com/t5/S32K-Knowledge-Base/RTD400-LLD-K344-Center-Aligned-PWM-Trigger-ADC-BCTU/ta-p/2034211 3.此外,BCTU 驱动程序已经支持 DMA。 https://community.nxp.com/t5/S32K-Knowledge-Base/Example-S32K344-PIT-BTCU-parallel-ADC-FIFO-DMA-DS3-5-RTD300/ta-p/1732444 Re: S32K364: ADC conversions using EMIOS, BCTU and DMA 你好@Senlent、 我同意你的看法,我已经忘记了 Rm 模块,现在它出现了。 我很难理解 S32K364 的配置(只有 ADC3、ADC4、ADC5、ADC6 和 BCTU1),类似的配置使用 S32K324 在我的办公桌上也能正常工作 我想: - 触发信号 BCTU1 使用 EMIOS0 CH 8 扫描 ADC3 频道 - 触发信号 BCTU1 使用 EMIOS0 CH 9 扫描 ADC4 频道 而使用 DMA 会在变量 ADC_X_Raw[] 中产生结果。 我的配置工具设置是 EMIOS: RM: BCTU (红色字段不清楚): ADC: 附上项目。 敬请期待,弗朗切斯科。 Re: S32K364: ADC conversions using EMIOS, BCTU and DMA 你好@francescovico 我很难理解 S32K364 的配置(只有 ADC3、ADC4、ADC5、ADC6 和 BCTU1),类似的配置使用 S32K324 在我的办公桌上也能正常工作 也请分享您在 S32K324 上的项目,我会抽时间帮您检查。 我们的团队目前工作过度繁忙,我需要更多时间来处理您的问题。请耐心等待。 Re: S32K364: ADC conversions using EMIOS, BCTU and DMA 你好@Senlent、 非常感谢您的帮助! 您可以在附件中找到使用 S32K324 的项目(运行正常)。 使用 trgmux 的 PIT 计时器触发信号扫描 ADC0 和 ADC1 通道的 BCTU。 变量ADC_0_Raw[] 和 ADC_1_Raw[] 的DMA 传输转换结果。 敬请期待,弗朗切斯科。 Re: S32K364: ADC conversions using EMIOS, BCTU and DMA 你好@francescovico 我们没有 S32K36x 评估版,因此无法直接测试您的代码。 不过,我也发现了一些问题: 这里,关于 Adc 目标掩码: 对于 ADC0,应将其设置为 0b001。 对于 ADC1,应将其设置为 0b010。 如果你需要同时触发信号 ADC0 和 ADC1,那么你应该将其设置为 0b011,依此类推。 在您的项目中,您使用的是 ADC3 和 ADC4,因此相应值应设置为 0b0100 和 0b1000。 Re: S32K364: ADC conversions using EMIOS, BCTU and DMA 你好@francescovico 此外,"Adc index" 也是错误的。 Re: S32K364: ADC conversions using EMIOS, BCTU and DMA 你好@Senlent、 我已经解决了这个问题。 随函附上使用ADC3、ADC4和ADC5转换27个模拟通道的项目。   问题在于,要初始化 ADC3,必须在实例中使用 0 调用 init 函数:   /* 启动 ADC3*/ Adc_Sar_Ip_Init(0,&AdcHwUnit_0);   在 ConfigTool 中,要初始化 BCTU 以触发信号 ADC3,必须设置 Adc 目标掩码,如下所示: ADC4 和 ADC5 也是如此。 关于 ADC6,ConfigTool 没有生成初始化结构,手动输入该结构后,ADC6 仍然无法工作... 幸运的是,在我的应用中无法使用 ADC6... 敬请期待,弗朗切斯科。 Re: S32K364: ADC conversions using EMIOS, BCTU and DMA 你好@Senlent、 好 感谢您的帮助! 敬请期待,弗朗切斯科。 Re: S32K364: ADC conversions using EMIOS, BCTU and DMA 你好@francescovico 这是完全错误的! 在您之前提供的示例程序"ADC_S32K324.rar" 中、使用 ADC0 和 ADC1,BCTU 的"Adc Target Mask" 分别设置为"1" 和"2" 即0b0 和 0b10,分别对应 ADC0 和 ADC1。 您的初始化代码也对应于 ADC0 和 ADC1。 Adc_Sar_Ip_Init(ADCHWUNIT_0_BOARD_INITPERIPHERALS_INSTANCE,&AdcHwUnit_0_BOARD_InitPeripherals); Adc_Sar_Ip_Init(ADCHWUNIT_1_BOARD_INITPERIPHERALS_INSTANCE,&AdcHwUnit_1_BOARD_InitPeripherals);   adchwunit_0_board_initperipherals_instance = 0; adchwunit_1_board_initperipherals_instance = 1; ” 问题在于,要初始化 ADC3,必须在实例中使用 0 调用 init 函数:   /* 启动 ADC3*/ Adc_Sar_Ip_Init(0,&AdcHwUnit_0);   ” 这完全是错误的,我之前的回答是正确的。 应设置"Adc 目标掩码" = 0b100,即 adc3,然后调用"Adc_Sar_Ip_Init(3,&AdcHwUnit_0);" Re: S32K364: ADC conversions using EMIOS, BCTU and DMA 你好@Senlent、 我同意你的看法,我的解决方案虽然不明确,但很有效。 我提醒你,微控制器是 S32K364,只有下面的红色: 附上两份记录,一份是我的解决方案,一份是您的建议。 我的建议是它可以工作(矢量 ADC_3_Raw[]...ADC_5_Raw[] 的值是正确的)。 根据您的建议,执行将在HardFault_Handler中进行。 敬请期待,弗朗切斯科。 Re: S32K364: ADC conversions using EMIOS, BCTU and DMA 你好@francescovico 你的解决方案是正确的。 这是我的误解;我不知道 S32K36x 采用了不同的架构。
記事全体を表示
MCXW716C 在高温下运行 你好 我使用的是 #mcxw71,根据数据表,其工作温度范围为 -40 °C 至 +125 °C。我对无线电和 CAN PHY 都进行了测试,但无法在大约 85 °C 以上实现稳定运行。微控制器似乎进入保护模式,或以其他方式限制其功能。 我还注意到,在 SDK 应用程序接口中有向 NBU 发送内部温度的函数。 我的问题是:NBU 是否需要温度信息来进行热调节或维持系统正常运行? 一般来说,是否需要任何特定的程序(配置、校准、所需的 API 调用等)来确保 MCXW716C 在最高额定温度下正常运行? 提前感谢您的帮助。 开发板 Re: MCXW716C operation at high temperature 你好,希望你一切都好。 您使用的是 FRDM 板还是自定义板?您进行了哪些测试,观察到的行为是什么? 能否请您分享一下您所指的是哪些 SDK API?您是否正在研究一个具体的示例或应用? 致以最诚挚的问候, Ana Sofia。 Re: MCXW716C operation at high temperature 你好,@sofiaurueta、 我正在使用参考编号为 #MCXW716CMFTAT 的自定义板。我将解释我的测试和配置 我使用 MCXW716CMFTAT 为无线应用设计了 PCB。我已创建了软件,并使用名为"connectivity_test" 的示例程序中的逻辑来使用无线电协议。 我使用的是 SDK SDK_2.X_MCXW716CxxxA 版本 25.09.00。 两个董事会正在一起工作。我已经实施了所有模块。测试时,我使用了热风枪,温度为 80 °C。15 秒后,微控制器停止工作;它似乎被阻塞了,GPIO 被锁定,通信总线停止发送数据,30 秒后,温度下降后,微控制器恢复正常运行。 因此,我研究了监测温度的功能,以了解问题所在。我使用了 SDK 中 fwk_platform_sensors 文件中的 PLATFORM_StartTemperatureMonitor() 函数。 我的目标是知道微控制器堵塞的确切温度,而令人惊讶的是,这解决了问题。现在,我可以在 +120 °C 的温度下进行测试,微控制器工作正常。我甚至尝试删除该功能,以确保问题是否与软件有关,结果问题又出现了。 您能给我更多的解释吗?使用该功能读取温度是否会将数据分发到不同的内核并调整某些参数? Re: MCXW716C operation at high temperature 你好 您能否确认使用 FRDM 板时是否也会出现这种行为?在未作任何修改的情况下运行 connectivity_test 示例时是否会出现问题,调用 PLATFORM_StartTemperatureMonitor 函数后问题是否会改变? Ana Sofia。
記事全体を表示
MIMXRT1180-EVK の EtherCAT デモ こんにちは、 UG10322 UG10322: ICEツールを使用したEtherCATのOOBEガイド | NXP Semiconductorsに記載されているEtherCATデモを試すために、MIMXRT1180-EVK評価ボードを使用しています。 i.MX RT1180 評価キット | NXP Semiconductorsから Ethercat 評価バイナリをダウンロードしました。 私はすべての手順を注意深く実行しました。上記のドキュメントに記載されている構成でバイナリを正常にフラッシュし、ICE ツールを起動できました。 ただし、GUI でネットワーク インターフェースを選択し、Ethercat を有効にしようとすると、「有効にできませんでした」というメッセージが表示されます。インターフェースをスキャンすると、「デバイスが見つかりません」と表示されます 私は Windows ノートPCを使用しており、USB 3-ギガビット イーサネット アダプターを使用して ETH0 と ETH4 にコネクテッドしていますが、それ以外は問題なく動作しています (他の作業にも使用しています)。 この問題を解決するためにご協力いただければ幸いです。 また、この EtherCat Eval バイナリ :goal_nxp_evkmimxrt1180_rtos_flash_boot.bin のソースを教えていただけますか?SDK をチェックしたところ、EtherCat の例がいくつか見つかりましたが、これらの例のいずれかが上記のバイナリに対応しているかどうかはわかりません。 よろしくお願いします。 よろしくお願いします。 PNC Re: EtherCAT demo on MIMXRT1180-EVK こんにちは@pnc お問い合わせいただきありがとうございます UG10332 の最初のリリースですでにいくつかの問題が見つかりました (更新する予定です) 同僚が作成した内部レポートを以下に掲載します。お役に立てれば幸いです。 5 ページのステップ 12 では、RT1180-EVK コンソールは USB_OTG1 ではなく MCU-Link USB である必要があります。また、Note の場合、EEPROM と呼ばれるセクションはないようです。 私の場合、セクション 5.4 のステップ 11 以降では EtherCAT インターフェースのフォント カラーは赤にならず、ステップ 15 以降でのみ赤に変わります。 24 ページの表 1 と表 2 では、表にリストされているマップされたオブジェクトが ICE ツールの実際の表示と一致していません。 私の側では、セクション 5.4 の手順 9 の前に、ホスト PC の IP アドレスを構成する必要があります。そうしないと、内部エラーが報告されます。 さらに問題が発生した場合や、関連する質問がある場合はお知らせください。 ではごきげんよう、 ディエゴ Re: EtherCAT demo on MIMXRT1180-EVK ちなみに、EtherCAST デモには特別なジャンパー設定が必要ですか?上記のドキュメントではこの点については何も言及されていません。 Re: EtherCAT demo on MIMXRT1180-EVK こんにちは、ディエゴ。 ご返信ありがとうございます。しかし、これらの問題はすでに解決済みですので、役に立ちませんでした。 とにかく、私は方針を変えました。つまり、事前にビルドされたイメージを使用する代わりに、AN14155 ユーザーガイド (i.MX RT1180 EtherCAT を BECKOFF TwinCAT3 および SSC ツール Rev. と共に使用) を使用して、SDK から ecat/digital_io の例をビルドして実行しようとしています。1.0) ここでも同じ問題に直面しています。例をビルド、フラッシュ、実行できます (CM33 と CM7 の両方)。digitial_ip.cのメインループにprintfを入れました。実際に実行されていることを確認します。 しかし、AN14155 のセクション 5.1.8 で行き詰まっています。TwinCAT を使用して EtherCAT デバイスのスキャンを実行すると、「I/O デバイスが見つかりません」と表示されます。イーサネット ケーブルを J28 と J32 の両方に接続してみました。 私は次のジャンパー設定を行いました: J63、J73、J72、J65 を 1-2 短絡位置 (デフォルト位置ではない) に移動しました Ecat に他のジャンパー設定や他の HW 設定が必要かどうかはわかりません。これら以外のすべてのジャンパーはデフォルトのポジショニング(箱から出した時の状態)にあります。私が行った他の唯一のジャンパー変更は、Segger プローブ (JP5 を短絡) を使用するためでした。 ちなみに、ICE ツールの実行も試してみました。以前と同じ状況です。 何かご意見があれば教えていただけると幸いです よろしくお願いします。 よろしくお願いします。 PNC Re: EtherCAT demo on MIMXRT1180-EVK EVK ユーザー マニュアル UM12021 を注意深く読み直したところ、ジャンパーを間違えたようです。私が今持っているものは次のとおりです。 J63とJ65:デフォルトで2-3が短絡 J73とJ72: デフォルト以外の1-2ショート ただし、上記の変更を行った後でもまだ動作しません。 また、36 ページのこの行が関連しているかどうかはわかりません。「ECAT 信号と FLEXSPI2 信号間の多重化は、抵抗器の再構成によって実装されます。」デフォルトでは、FLEXSPI2 接続は有効になっています。 これについても何かする必要があるでしょうか?もしSOなら、何ですか? ちなみに、このEVKユーザーマニュアルは本当に読みにくいです。EVK で ECAT を動作させるためにユーザーが行う必要があることを、簡潔かつ明確に 1 か所にまとめておくべきだと思います。散らばった混乱を招く情報の代わりに、シンプルに「EVK で ECAT を有効にするには、これらのジャンパー設定を行ってください...」とだけ書かれています。 Re: EtherCAT demo on MIMXRT1180-EVK こんにちは、ディエゴ。 今朝すべてを再起動すると、デバイスのスキャンが機能し始めました。昨日の夕方にジャンパーに加えた変更が効果を発揮したようです。 しかし、デバイス1をスキャンすると、セクション5.1.9で説明した「ボックス1」が表示されません。SO、スレーブが検出されないようです。Wireshark でも EtherCAT に関連するトラフィックは表示されません。さらにデバッグ中ですが、何かヒントがあれば、ぜひ教えてください。
記事全体を表示
How to change i.MX8MP kernel boot logo and yocto project splashimage to my own custom logo and image Dear NXP Support team, I would like to change all the logo and images that are displayed from the beginning of the U-Boot. When a hdmi monitor is connected to the board, I can see 4 penguins and yocto project image with a progress bar. I would like to change those images to my own custom images. Please guide me how I can make those changes. Please elaborate about the explanation if you can since I'm new to yocto linux imx. Thank you. Re: How to change i.MX8MP kernel boot logo and yocto project splashimage to my own custom logo and i Hi,@Rita_Wan Based on the 8MP_LVDS_patch, I was able to get the display working in U-Boot successfully. But when I added the kernel part, I couldn’t get a seamless transition between U-Boot and the kernel display. The kernel side shows abnormal behavior — the screen flickers — while the display in U-Boot is totally fine. Could you give me some suggestions on this? What could be causing the issue? Re: How to change i.MX8MP kernel boot logo and yocto project splashimage to my own custom logo and i Hi @bych , I found the easy way for you to try: Linux Kernel Logo Use the netpbm tool to convert png images to ppm images. $ pngtopnm linux_logo.png > linux_logo.pnm $ pnmquant 224 linux_logo.pnm > linux_logo_clut224.pnm $ pnmtoplainpnm linux_logo_clut224.pnm > logo_linux_clut224.ppm   Put the converted ppm file into the drivers/video/logo/ directory of the kernel, and replace the logo_linux_clut224.ppm file. Re-compile the kernel, and the logo will be replaced with a new picture. You can try it . Wish you have a nice day Bset Regards Rita Re: How to change i.MX8MP kernel boot logo and yocto project splashimage to my own custom logo and i I have my own custom board that is based on i.MX8M Plus Processor, but the custom board is designed as same as i.MX8M Plus EVK board. I've successfully booted up my board and the display via HDMI looks fine. But I just want change the boot logo (4 penguins) and splash screen (yocto project logo with progress bar) to my own custom logo. You provided the patches but I do not know how to apply those patches to the u-boot or kernel. Please kindly advise how I use and apply those patches. Thank you. Re: How to change i.MX8MP kernel boot logo and yocto project splashimage to my own custom logo and i What is the board in your hand? nxp board, or the board you design yourself, have you make your board boot up and display already? Re: How to change i.MX8MP kernel boot logo and yocto project splashimage to my own custom logo and i Could you kindly advise how I can apply those patches? I've never done applying patches before... Re: How to change i.MX8MP kernel boot logo and yocto project splashimage to my own custom logo and i You can refer to the patches realized in the LVDS for the u-boot and kernel, the methods are the almost the same. i.MX 8MP LVDS seamless display (连续显示) between U-boot and Kernel - NXP Community
記事全体を表示
添加模块后"TM_TS_T40D34M10I0R0" of S32K3xx_SBC_FS23_R21-11_1.0.0_D2402EB 报告错误 专家们好 我的客户正在开发基于 FS23+S32K3 的项目。 他们安装了S32K3xx_SBC_FS23_R21-11_1.0.0_D2402.exe和SW32K3_S32M27x_RTD_R21 -11 _4.0.0_D2311.exe。 但在 EBTresos 中添加模块" TM_TS_T40D34M10I0R0"(C:\NXP\S32K3xx_SBC_FS23_R21-11_1.0.0\eclipse\plugins\TM_TS_T40D34M10I0R0) 会导致错误: Module "TM_TS_T40D34M10I0R0" (defined in plugin "TM_TS_T40D34M10I0R0") defines the schema file "config/TM.xdm" which cannot be found (if the file is signed or crypted, it must be referenced in META-INF\CRYPTOMANIFEST.MF). The manager of a schema of configuration extension "TM_TS_T40D34M10I0R0" of plugin "TM_TS_T40D34M10I0R0" cannot be created 我不知道 TM 在 S32K3xx_SBC_FS23_R21-11_1.0.0_D2402.exe 中做了什么。请介绍一下,并告诉我如何使用。 提前感谢您的帮助! 最诚挚的问候, Robin 以下是客户信息: Contact Name 超 夏 Email (Contact) [email protected] 公司 CHERY AUTOMOBILE CO. AA SW - 外部设备 优先级:中等 Re: After add Module "TM_TS_T40D34M10I0R0" of S32K3xx_SBC_FS23_R21-11_1.0.0_D2402 EB repor 感谢您的解释。我想现在已经很清楚了。 让我来向客户解释一下。 Re: After add Module "TM_TS_T40D34M10I0R0" of S32K3xx_SBC_FS23_R21-11_1.0.0_D2402 EB repor 我同意。否则,关于 Tm 的其他一切现在都清楚了吗? Re: After add Module "TM_TS_T40D34M10I0R0" of S32K3xx_SBC_FS23_R21-11_1.0.0_D2402 EB repor @Ondřej_Vácha 我在想,如果我们没有 TM.xdm,那么就应该将其从 plugin.xml 中排除,以避免混淆,对吗? Re: After add Module "TM_TS_T40D34M10I0R0" of S32K3xx_SBC_FS23_R21-11_1.0.0_D2402 EB repor 您好,TM 驱动程序目前无法插入 EBT,因为它没有任何配置。因此,这不是一个错误。TM 与 CanTrcv 驱动程序共享,以符合 SWS_CanTrcv_00230。没有必要在 EBT 中加入 TM,在版本项目时,只需要将其中包含的文件包含在项目中。 Tm 包含用于时间延迟的 API。 根据共享的截图,您正试图编译 cantrcv_fs23 示例。我也试过,Tm 模块不一定要在那里。 Re: After add Module "TM_TS_T40D34M10I0R0" of S32K3xx_SBC_FS23_R21-11_1.0.0_D2402 EB repor 嗨,拉杜、 以下是客户信息: 联系人姓名 超夏 电子邮件(联系人) [email protected] 公司 CHERY AUTOMOBILE CO. 此致敬礼, Robin Re: After add Module "TM_TS_T40D34M10I0R0" of S32K3xx_SBC_FS23_R21-11_1.0.0_D2402 EB repor 你好,@Robin_Shen, 谁是客户? Re: After add Module "TM_TS_T40D34M10I0R0" of S32K3xx_SBC_FS23_R21-11_1.0.0_D2402 EB repor Hi Cuong、 谢谢您的答复。 由于 FS23 SBC AUTOSAR R21-11 版本 1.0.0 已经是 FS23 的最新版本,所以让我们等待 AA SW-Exter nal 设备的同事来处理吧。 此致敬礼, Robin Re: After add Module "TM_TS_T40D34M10I0R0" of S32K3xx_SBC_FS23_R21-11_1.0.0_D2402 EB repor 嗨 @Robin_Shen 当 " config/tm.xdm " 不包含在 CRYPTOMANIFEST.MF 文件中时,这看起来像 SBC 代码包,软件包中的错误。我检查了一下,在 CRYPTOMANIFEST.MF 中找不到这个文件。 您能否尝试使用另一个更新版本的 SBC,看看问题是否得到了解决。 我将移除标签 " RTD ",因为它与 SBC-AA SW-外部设备有关
記事全体を表示
[RTD600 IP] S32K312-EVB Lpuart 中断回显 这个简单的示例演示了如何在S32K312EVB-Q172和S32K312MINI-EVB上使用LPUART模块配置和处理UART中断。它设置UART回调函数,并以单字节模式启动接收。每接收一个字节,缓冲区都会使用  Lpuart_Uart_Ip_SetRxBuffer() 进行更新;如果检测到换行符( '\n' ),则将设置接收标志以通知主循环。 当发生  LPUART_UART_IP_EVENT_END_TRANSFER  事件时,将通过  Lpuart_Uart_Ip_AsyncReceive() 重新启用接收。 注意:只执行基本的事件处理操作;仅确认其他UART事件,但不会进行处理。 此示例使用 LPUART实例6,通过USB端口(EVB上的J40和MINI EVB上的J9)实现串行通信。 ------------------------------------------------------------------------------ *测试硬件:S32K312EVB-Q172和S32K312MINI-EVB *MCU:S32K312 *IDE:S32DS3.6.2 *RTD版本:6.0.0 *调试器:PE Micro *目标:internal_FLASH  ------------------------------------------------------------------------------ 运行示例: 1. 在PC上为串行设备打开串行终端,并设置以下参数:   波特率为115200 无校验  停止位为1 无流量控制  如果您使用TeraTerm,请确保发送设置配置为 LF(换行) ,以便在按下回车键时正确发送换行符。 2. 构建并运行示例。 测试结果:   NXP 提供的任何支持、信息和技术(“材料”)均按“现状”提供,不附带任何明示或暗示的保证,且 NXP 在适用法律允许的最大范围内,否认与材料相关的所有直接或间接责任和损害。NXP 对任何与应用或产品设计相关的协助不承担任何责任。材料仅可用于与 NXP 产品相关联。NXP 可以不受限制地使用您对材料提供的任何反馈。
記事全体を表示
i.MX RT700 eIQ Neutron NPU 实验室指南 这些实验室指南提供了分步说明,说明如何制作量化的 TensorFlow Lite 模型,并使用 e IQ Neutron SDK 中的中子转换工具将模型转换成在 i.MX RT700 设备上 的 eIQ Neutron NPU 上运行。适用于 i.MX RT700 的 eIQ Neutron NPU 实验指南 文档 重点介绍使用 eIQ Neutron SDK 中的中子转换器工具转换模型,然后将转换后的模型导入 eIQ mcuxPresso SDK 示例。有 VSCode、GCC 和 MCUXpresso IDE 实验室 。 这些实验室旨在在 i.MX RT700 EVK 上运行,但同样的概念也可以应用于 MCX N 主板,类似于 MCX N eIQ Neutron NP U 实验室。您还可以查阅《TFLM 入门指南》,了解如何使用自己的模型和数据进行推理。 此外,请务必查看AN14700 - i.MX RT700 eIQ Neutron NPU Enablement and Performance,其中详细介绍了 i.MX RT700 上的 eIQ Neutron N3-64 NPU。 --- 2026 年 4 月末更新,适用于 MCUXpresso SDK 26.03 和 eIQ Neutron SDK 3.1.0 实践培训
記事全体を表示
便携式射频烹饪应用的设计挑战 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 在设计烹饪设备时,需要充分考虑家庭有线电气系统所需的电力以及维持安全和工作温度所需的性能。NXP 固态射频烹饪团队开发了一种使用固态射频能量的便携式食品加热器具,该加热器具能够依靠电池供电运行。本次会议将讨论通过便携式、便携设备提供能量来加热食物所面临的主要挑战和方法。 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 在设计烹饪设备时,需要充分考虑家庭有线电气系统所需的电力以及维持安全和工作温度所需的性能。NXP 固态射频烹饪团队开发了一种使用固态射频能量的便携式食品加热器具,该加热器具能够依靠电池供电运行。本次会议将讨论通过便携式、便携设备提供能量来加热食物所面临的主要挑战和方法。
記事全体を表示
eIQ Toolkit for MCU - Getting Started Labs The tools previously bundled as part of eIQ Toolkit are now released as standalone packages and eIQ Toolkit will no longer be updated after the eIQ Toolkit v1.17 in Q3 2025. Going forward the tools previously included in eIQ Toolkit can now be found at: eIQ Neutron SDK now contains the latest versions of the Neutron Compiler tool (previously called the Neutron Converter tool before Aug 2026) eIQ Time Series Studio can now be found in a standalone package eIQ Model Creator provides an option for vision based model creation eIQ AI Toolkit will provide model optimization functionality (Coming Soon) Netron provides TFLite model viewing functionality This article will remain up for existing users. --------- eIQ Toolkit enables machine learning development with an intuitive GUI (named eIQ Portal) and development workflow tools, along with command line host tool options as part of the eIQ ML software development environment. Developers can create, optimize, debug and export ML models, as well as import datasets and models, rapidly train and deploy neural network models and ML workloads. The eIQ Portal provides output TensorFlow Lite models that seamlessly feed into eIQ inference engines like TensorFlow Lite and TensorFlow Lite for Microcontrollers. Using a tool called Model Runner, eIQ Toolkit can also generate runtime insights to help optimize neural network architectures on i.MX RT and i.MX devices. These labs go over how to use eIQ Portal. It is recommended to do them in the following order: Data Import Lab Model Runner Lab The labs are written for using a FRDM-MCXN947 and i.MX RT1170-EVK, but other eIQ supported devices can be used as well.  MCX N i.MX RT1050 i.MX RT1060 i.MX RT1064 i.MX RT1160 i.MX RT1170 i.MX RT1180 i.MX RT500 i.MX RT600 For details on the Time Series Studio tool please see the Time Series Studio lab guides. For  i.MX RT
記事全体を表示
Solyball Cooling Ace 专为现代生活而设计 当气温升高时,保持舒适的室内环境成为许多人的首要任务。无论是在家、办公室还是个人工作空间,过高的温度都会影响注意力、放松度和整体舒适度。Solyball 正是为此提供了一个便捷实用的解决方案。Solyball 的设计兼顾便携性、简洁性和现代生活方式,是一款小巧的降温设备,可帮助用户在各种室内环境中营造更舒适的氛围。 Solyball 最显著的特点之一 是其轻巧便携的设计。与笨重难搬或占用大量空间的大型制冷系统不同,Solyball 体积小巧,几乎可以完美融入任何房间。其便携性使用户能够轻松地将其从一个地方搬到另一个地方,从而满足全天候不同需求。无论您是在家办公、在客厅放松,还是准备享受一夜安眠,Solyball 都可以放置在任何您需要额外舒适感的地方。 Solyball 的多功能性 使其成为各种室内环境的理想之选。在卧室里,它有助于在温暖的夜晚营造更舒适的氛围。舒适的睡眠环境对整体健康至关重要,而小巧的降温设备可以提升您的睡眠体验。Solyball 尺寸适中,可轻松放置在床头柜或其他平面上,不会造成空间杂乱。 对于专业人士和远程办公人员来说, Solyball能帮助他们保持舒适的工作空间,从而显著提高工作效率。室内温度过高有时会影响专注力,难以集中精力完成工作。Solyball 提供了一种切实可行的提升工作舒适度的方法,帮助用户在一天中营造更加愉悦的工作环境。其小巧的体积使其可以方便地放置在办公桌或工作台上,而不会占用过多空间。 Solyball的便利性也体现在客厅和家庭共享空间中。这些区域通常是人们聚集的中心场所,他们会在这里看电视、阅读、社交或放松身心。将 Solyball 融入这些空间,用户可以在日常活动中享受更舒适的氛围。其现代外观确保它能与现代家居装饰自然融合。
記事全体を表示
NFC Reader Library Migration to FRDM-MCXN947 Introduction. This document provides a guide on how to use the NFC frontend PN5190 with the FRDM-MCXN947 and using the latest existing version of the NFC Reader Library. The hardware required to follow this guide is: FRDM-MCXN947 development board as host MCU. PNEV5190BP (based on PN5190) as the NFC transceiver Software Setup. MCXN947 SDK version: 26.06.00 NFCReaderLibrary version: 07.16.00 PN5190 FW version: 0x20D MCUxpresso IDE version: 25.6 Hardware connections. The PNEV5190 comes with a Kinetis K82F as a host MCU to drive the PN5190 Since the goal is to drive PN5190 from the MCXN947 via SPI, we need to prepare the PNEV5190 for it: Power up board correctly Enable external SPI pins Disable K82F interface with PN5190 Power up and jumper configuration To power up the board correctly: – Powering it up over USB does not provide enough current. It will be powered with an external power supply of 7.5V over connector J17. Put jumper on following pins: – J9 2-3: External power supply – J8: VBATPWR supplied with VBAT=3.3 V – J12: VBAT supplied with 3.3 V Remove jumpers on following pins: – J22, J23: open SDA signals for K82F – J19: RTS push-button bypass for K82F – J3, J4, J5, J6: pull down jumpers for NFC module signals Set GPIO and SPI voltage to 3.3 V: supplying 3.3 V to VDDIO and the μC supply: – Remove short circuit on R19 – Place short circuit on R20 For any additional configuration, please see PNEV5190B evaluation board quick start guide. Location of the changes mentioned above can be seen in the following image: Routing NFC module communication pins to JP1 To enable the pins on JP1 for communication, we must enable bus switch U10 and disable bus switch U12 in the NFC Host Interface. These switches enable or disable the connections from K82 to PN5190 SPI pins, and expose the SPI interface to an external host. Remove short on R5 to disable communication routing to K82F. Place short on R7 to enable communication routing to JP1 pins. For FRDM-MCXN947 side, no modifications are necessary.  The pins used are available in Header J1 and J2. Which are shown in the following table.   Name MCXN947 PN5190 SCK J2.12 JP1.1 MOSI J2.8 JP1.2 MISO J2.10 JP1.3 SSEL J2.6 JP1.4 IRQ J1.16 JP1.5 RESET J2.2 JP6.1 GND J2.14 JP1.10 SUCCESS J2.17* FAIL J2.15* DWL J2.13* * Pins that need to be configured for library compatibility but are not used and do not need to be connected. Software Changes This section describes the software changes required to run the “NfcrdlibEx1_DiscoveryLoop” example from the NFC Reader Library which consists in a detection loop that displays in a terminal information (like UID, SAK, and Product Type for MIFARE product-based cards) about any tag detected by the PN5190. Please download the NFC Reader Library for PN5190 from NFC Reader Library | NXP Semiconductors. To begin with the migration, we first need to create a project with the FRDM-MCXN947 SDK (v26.06.00), for this purpose download and install the FRDM-MCXN947 SDK from the SDK Builder. Importing NFC Reader Library Click on “File” from upper tab menu and “Import…”. In the Import wizard, select “Existing Projects into Workspace”. In the “Select root directory” search the directory where the downloaded library is located and click on Finish (do not check the “Copy projects into workspace” option). Note: If the K82 SDK is not installed an error message will appear, please click on cancel. Creating base project 1. In the Quick Start panel click on “import SDK example(s)…” in the MCUXpresso IDE. 2. Select “frdmmcxn947” and click on next. 3. Select the SDK example “hello_world_cm33_core0” and click on finish. 4.Now we will add the required drivers for migration, which are SPI and CTIMER drivers. . Click on properties-> SDK Management-> Manage SDK Components. 5. Search in the filter bar “ctimer” and “lpspi” and check their boxes to add them and click on OK. Add the source code Discovery Loop Example From the imported example NfcrdlibEx1_DiscoveryLoop_mcux of the NFC Reader Library, find and copy the following files (included in src folder): NfcrdlibEx1_EmvcoProfile.c, phApp_Helper.c, phApp_Init.c, phApp_PN5190_Init.c; and paste them into the source folder inside the created base project. Additionally, delete the file hello_world .c created by the project.              Additionally, we need to add the file “NfcrdlibEx1_DiscoveryLoop.c” which is the main source file of the project, to do this right-click on the “source” folder of our project and then put the cursor on “New” and select “File”. In the tab that will open, write the name of the file (NfcrdlibEx1_DiscoveryLoop.c) and then, click on “Finish”. Finally, in the created file copy and paste all the code inside the original source file located in the library example. Link the NFC Reader Library elements To make the required software changes, we need to link the DAL, NxpNfcRdLib, phOsal and intfs folders into the base project, to do this: 1. In the Project Explorer, right click on the project and place your cursor on New and click on Folder. 2. In the New Folder tab, click on “Advanced >>” and select “Link to alternate location (Linked Folder)” and on “Browse…”. 3. Browse into the path where the library was extracted, choose the NxpNfcRdLib folder and click on Finish. 4. Do the same procedure for “Platform/DAL”, “Examples/NfcrdlibEx1_DiscoveryLoop/intfs” and “RTOS/phOsal” folders. If you have the folder in the same project explorer, the included folder will not appear, but you can see it when you open the window to add another folder, as shown in the following figure. But if the included folders are not in the Project Explorer, the Project should look like this: Once this is done, we will need to delete the “KinetisSDK” folder located in “DAL > src” to avoid multiple definition issues. Define FRDM-MCXN947 SDK preprocessor symbol We need to do some changes to the compiler preprocessor configuration. 1. Right click on the project in the Project Explorer and click on “Properties… 2. In the properties tab, go to “C/C++ Build > Settings > MCU C Compiler > Preprocessor”. The symbols are related with the FRDM board, but we need to add the following symbols related with the NFC Reader Library: PH_OSAL_NULLOS PHDRIVER_FRDMMCXN947_PN5190_BOARD NXPBUILD_CUSTOMER_HEADER_INCLUDED PHDRIVER_MCXN947_SPI_POLLING Click on the “Add...” button at the top right corner of the “Defined symbols (-D)” menu and enter each symbol mentioned before. These symbols are added so the preprocessor knows which header files to include at build time. PHDRIVER_FRDMMCXN947_PN5190_BOARD will help include the BoardSelection.h header, the file that is going to define addresses for registers and peripherals of MCXN947. PH_OSAL_NULLOS will include headers related to non-OS operation, meaning that the project will work without any operative system (at the end of this guide you will find the steps to add FreeRTOS support). NXPBUILD_CUSTOMER_HEADER_INCLUDED will add headers to add and select the NFC reader and host that will be used in the project. PHDRIVER_MCXN947_SPI_POLLING if is defined the example will perform SPI communication by polling method, and if not, will be perform through non-blocking transfers. 3. Once added, click on “Apply and Close”, "Rebuild Index" and then to “Yes” to save the changes. Modifying the Driver Abstraction Layer (DAL) The added linked folder DAL will contain the important changes to be able to use the MCXN947 as host device since it will contain all the changes regarding SPI, timer and GPIO configurations required by the library to work properly. Board_FRDM_MCXN947_PN5190.h We need to create a header file that will contain important macros used by the library that are related to the host specific SPI, timer and GPIO peripherals, as well as interrupt vectors and priorities, clock sources and addresses. This file is required to be inside the “boards” folder which is inside DAL. Please add the header file as the file created NfcrdlibEx1_DiscoveryLoop.c but replacing .c to .h: The file should be named as shown in the picture above. Inside this file, some important macros related to the SPI peripheral and the important pins to be handled (IRQ, Chip Select, Reset) are defined. Spoiler (Highlight to read) #ifndef DAL_BOARDS_BOARD_FRDM_MCXN947_PN5190_H_ #define DAL_BOARDS_BOARD_FRDM_MCXN947_PN5190_H_ #define GPIO_PORT 0 #define GPIO_PORT1 1 /****************************************************************** * LPSPI clock configuration ******************************************************************/ /*Clock Frequency for SPI Flexcomm 1*/ #define SPI_CLOCK_FREQ (CLOCK_GetLPFlexCommClkFreq(1u)) #define SPI_MASTER_CLOCK_FREQ SPI_CLOCK_FREQ /****************************************************************** * Board Pin/Gpio configurations ******************************************************************/ #define PHDRIVER_PIN_RESET ((GPIO_PORT << 8) | 28) /**< Reset pin, Pin28, PIO0_28 */ #define PHDRIVER_PIN_IRQ ((GPIO_PORT << 8) | 31) /**< IRQ pin, Pin10, PIO0_10 */ /* For 5190 busy is same as IRQ */ #define PHDRIVER_PIN_BUSY ((GPIO_PORT << 8) | 31) /**< IRQ pin, Pin31, PIO0_31 */ #define PHDRIVER_PIN_DWL ((GPIO_PORT << 8) | 19) /**< Download pin, Pin19, PIO0_19*/ /* These pins are used for EMVCo Interoperability test status indication, * not for the generic Reader Library implementation. */ #define PHDRIVER_PIN_SUCCESS ((GPIO_PORT1 << 8) | 0) /**< GPIO, Port 1, Pin0 */ #define PHDRIVER_PIN_FAIL ((GPIO_PORT1 << 8) | 1) /**< GPIO, Port 1, Pin1 */ /****************************************************************** * PIN Pull-Up/Pull-Down configurations. ******************************************************************/ #define PHDRIVER_PIN_RESET_PULL_CFG PH_DRIVER_PULL_UP #define PHDRIVER_PIN_IRQ_PULL_CFG PH_DRIVER_PULL_DOWN #define PHDRIVER_PIN_WKUP_PULL_CFG PH_DRIVER_PULL_UP #define PHDRIVER_PIN_CLK_PULL_CFG PH_DRIVER_PULL_UP #define PHDRIVER_PIN_DWL_PULL_CFG PH_DRIVER_PULL_UP #define PHDRIVER_PIN_NSS_PULL_CFG PH_DRIVER_PULL_UP #define PHDRIVER_PIN_BUSY_PULL_CFG PH_DRIVER_PULL_UP #ifndef DAL_BOARDS_BOARD_FRDM_MCXN947_PN5190_H_ #define DAL_BOARDS_BOARD_FRDM_MCXN947_PN5190_H_ #define GPIO_PORT 0 #define GPIO_PORT1 1 /****************************************************************** * LPSPI clock configuration ******************************************************************/ /*Clock Frequency for SPI Flexcomm 1*/ #define SPI_CLOCK_FREQ (CLOCK_GetLPFlexCommClkFreq(1u)) #define SPI_MASTER_CLOCK_FREQ SPI_CLOCK_FREQ /****************************************************************** * Board Pin/Gpio configurations ******************************************************************/ #define PHDRIVER_PIN_RESET ((GPIO_PORT << 😎 | 28) /**< Reset pin, Pin28, PIO0_28 */ #define PHDRIVER_PIN_IRQ ((GPIO_PORT << 😎 | 31) /**< IRQ pin, Pin10, PIO0_10 */ /* For 5190 busy is same as IRQ */ #define PHDRIVER_PIN_BUSY ((GPIO_PORT << 😎 | 31) /**< IRQ pin, Pin31, PIO0_31 */ #define PHDRIVER_PIN_DWL ((GPIO_PORT << 😎 | 19) /**< Download pin, Pin19, PIO0_19*/ /* These pins are used for EMVCo Interoperability test status indication, * not for the generic Reader Library implementation. */ #define PHDRIVER_PIN_SUCCESS ((GPIO_PORT1 << 😎 | 0) /**< GPIO, Port 1, Pin0 */ #define PHDRIVER_PIN_FAIL ((GPIO_PORT1 << 😎 | 1) /**< GPIO, Port 1, Pin1 */ /****************************************************************** * PIN Pull-Up/Pull-Down configurations. ******************************************************************/ #define PHDRIVER_PIN_RESET_PULL_CFG PH_DRIVER_PULL_UP #define PHDRIVER_PIN_IRQ_PULL_CFG PH_DRIVER_PULL_DOWN #define PHDRIVER_PIN_WKUP_PULL_CFG PH_DRIVER_PULL_UP #define PHDRIVER_PIN_CLK_PULL_CFG PH_DRIVER_PULL_UP #define PHDRIVER_PIN_DWL_PULL_CFG PH_DRIVER_PULL_UP #define PHDRIVER_PIN_NSS_PULL_CFG PH_DRIVER_PULL_UP #define PHDRIVER_PIN_BUSY_PULL_CFG PH_DRIVER_PULL_UP We define the macros as well for the interrupt vector of MCXN947, its priority, handler and trigger type. Spoiler (Highlight to read) /****************************************************************** * IRQ PIN NVIC settings ******************************************************************/ #define EINT_IRQn GPIO00_IRQn /*Adding interrupt vector A of GPIO*/ #define EINT_PRIORITY 7 /*Default interrupt priority for GPIO*/ #define CLIF_IRQHandler GPIO00_IRQHandler /*Interrupt handler for vector A*/ #define PIN_IRQ_TRIGGER_TYPE PH_DRIVER_INTERRUPT_RISINGEDGE /*Rising edge Trigger*/ /****************************************************************** * IRQ PIN NVIC settings ******************************************************************/ #define EINT_IRQn GPIO00_IRQn /*Adding interrupt vector A of GPIO*/ #define EINT_PRIORITY 7 /*Default interrupt priority for GPIO*/ #define CLIF_IRQHandler GPIO00_IRQHandler /*Interrupt handler for vector A*/ #define PIN_IRQ_TRIGGER_TYPE PH_DRIVER_INTERRUPT_RISINGEDGE /*Rising edge Trigger*/ As well as some macros for pin logic levels. Spoiler (Highlight to read) /***************************************************************** * Front End Reset logic level settings ****************************************************************/ #define PH_DRIVER_SET_HIGH 1 /**< Logic High. */ #define PH_DRIVER_SET_LOW 0 /**< Logic Low. */ #define RESET_POWERDOWN_LEVEL PH_DRIVER_SET_LOW #define RESET_POWERUP_LEVEL PH_DRIVER_SET_HIGH /***************************************************************** * Front End Reset logic level settings ****************************************************************/ #define PH_DRIVER_SET_HIGH 1 /**< Logic High. */ #define PH_DRIVER_SET_LOW 0 /**< Logic Low. */ #define RESET_POWERDOWN_LEVEL PH_DRIVER_SET_LOW #define RESET_POWERUP_LEVEL PH_DRIVER_SET_HIGH Finally, we define macros for the base address of CTIMER and SPI peripherals, clock frequencies, interrupt vectors and related pins. Spoiler (Highlight to read) /***************************************************************** * SPI Configuration ****************************************************************/ #define PHDRIVER_MCXN947_SPI_MASTER LPSPI1 #define PHDRIVER_MCXN947_SPI_DATA_RATE 5000000U #define PHDRIVER_MCXN947_SPI_CLK_SRC SPI_MASTER_CLOCK_FREQ #define PHDRIVER_MCXN947_SPI_IRQ LP_FLEXCOMM1_IRQn #define SPI_IRQ_PRIORITY 6 /*SPI interrupt priority*/ #define PHDRIVER_PIN_SSEL 27U/* Chip Select, Pin6, SPI */ #define PHDRIVER_PIN_SCK 25U/* SPI clock, Pin7, SPI */ #define PHDRIVER_PIN_MISO 26U/* MISO, Pin8, SPI */ #define PHDRIVER_PIN_MOSI 24U/* MOSI, Pin9, SPI */ #define PHDRIVER_FC1_SPI_DIV kCLOCK_DivFlexcom1Clk #define PHDRIVER_FC1_SPI_CLK kFRO12M_to_FLEXCOMM1 /*Clock to attach to Flexcomm1*/ /***************************************************************** * Timer Configuration ****************************************************************/ #define PH_DRIVER_SDK_CTIMER CTIMER0 /*CTIMER0 base*/ #define PH_DRIVER_SDK_CTIMER_CLK kCLOCK_DivCtimer0Clk/*CTIMER0 clock*/ #define PH_DRIVER_SDK_CTIMER_NVIC CTIMER0_IRQn /*Interrupt vector*/ #define PH_DRIVER_SDK_CTIMER_PRIORITY 4 #define PH_DRIVER_SDK_CTIMER_CLK_FREQ CLOCK_GetCTimerClkFreq(0U) /*CTIMER0 Clock frequency*/ #endif /* DAL_BOARDS_BOARD_FRDM_MCXN947_PN5190_H_ */ /***************************************************************** * SPI Configuration ****************************************************************/ #define PHDRIVER_MCXN947_SPI_MASTER LPSPI1 #define PHDRIVER_MCXN947_SPI_DATA_RATE 5000000U #define PHDRIVER_MCXN947_SPI_CLK_SRC SPI_MASTER_CLOCK_FREQ #define PHDRIVER_MCXN947_SPI_IRQ LP_FLEXCOMM1_IRQn #define SPI_IRQ_PRIORITY 6 /*SPI interrupt priority*/ #define PHDRIVER_PIN_SSEL 27U/* Chip Select, Pin6, SPI */ #define PHDRIVER_PIN_SCK 25U/* SPI clock, Pin7, SPI */ #define PHDRIVER_PIN_MISO 26U/* MISO, Pin8, SPI */ #define PHDRIVER_PIN_MOSI 24U/* MOSI, Pin9, SPI */ #define PHDRIVER_FC1_SPI_DIV kCLOCK_DivFlexcom1Clk #define PHDRIVER_FC1_SPI_CLK kFRO12M_to_FLEXCOMM1 /*Clock to attach to Flexcomm1*/ /***************************************************************** * Timer Configuration ****************************************************************/ #define PH_DRIVER_SDK_CTIMER CTIMER0 /*CTIMER0 base*/ #define PH_DRIVER_SDK_CTIMER_CLK kCLOCK_DivCtimer0Clk/*CTIMER0 clock*/ #define PH_DRIVER_SDK_CTIMER_NVIC CTIMER0_IRQn /*Interrupt vector*/ #define PH_DRIVER_SDK_CTIMER_PRIORITY 4 #define PH_DRIVER_SDK_CTIMER_CLK_FREQ CLOCK_GetCTimerClkFreq(0U) /*CTIMER0 Clock frequency*/ #endif /* DAL_BOARDS_BOARD_FRDM_MCXN947_PN5190_H_ */ MCXN947 SPI and SDK files Now, inside DAL > src folder we will create a folder named “MCXN947” that will contain 2 source files: phbalReg_Mcxn947Spi.c phDriver_Mcxn947SDK.c Inside these source files we will modify the functions from the source files of other board hosts with the specific configurations of MCXN947 peripheral drivers, such as SPI, timers, GPIOs and interrupt handlers. This is done based on SDK examples such as “ctimer_match_interrupt_example_cm33_core0” and “lpspi_polling_b2b_transfer_master_cm33_core0”. phbalReg_Mcxn947Spi.c: In this file we first need to include the necessary files and include the headers and callbacks to ensure the correct functionality: Spoiler (Highlight to read) #include "phDriver.h" #include #include "BoardSelection.h" #include #include #include #define PHBAL_REG_MCXN947_SPI_ID 0x0FU /**< ID for MCXN947 SPI BAL component */ #define RX_BUFFER_SIZE_MAX 272U /* Receive Buffer size while exchange */ #ifndef PHDRIVER_MCXN947_SPI_POLLING lpspi_master_handle_t g_masterHandle; /* LPSPI user callback */ void LPSPI_MasterUserCallback(LPSPI_Type *base, lpspi_master_handle_t *handle, status_t status, void *userData); #endif static void phbalReg_Mcxn947SpiConfig(void); #ifndef PHDRIVER_MCXN947_SPI_POLLING volatile bool isTransferCompleted = false; void LPSPI_MasterUserCallback(LPSPI_Type *base, lpspi_master_handle_t *handle, status_t status, void *userData) { if (status == kStatus_Success) { __NOP(); } isTransferCompleted = true; } #endif #include "phDriver.h" #include #include "BoardSelection.h" #include #include #include #define PHBAL_REG_MCXN947_SPI_ID 0x0FU /**< ID for MCXN947 SPI BAL component */ #define RX_BUFFER_SIZE_MAX 272U /* Receive Buffer size while exchange */ #ifndef PHDRIVER_MCXN947_SPI_POLLING lpspi_master_handle_t g_masterHandle; /* LPSPI user callback */ void LPSPI_MasterUserCallback(LPSPI_Type *base, lpspi_master_handle_t *handle, status_t status, void *userData); #endif static void phbalReg_Mcxn947SpiConfig(void); #ifndef PHDRIVER_MCXN947_SPI_POLLING volatile bool isTransferCompleted = false; void LPSPI_MasterUserCallback(LPSPI_Type *base, lpspi_master_handle_t *handle, status_t status, void *userData) { if (status == kStatus_Success) { __NOP(); } isTransferCompleted = true; } #endif After, we will define the phbalReg_Init function, which will be used by the library to initialize the SPI peripheral in this case, and it is defined as follows: Spoiler (Highlight to read) phStatus_t phbalReg_Init( void * pDataParams, uint16_t wSizeOfDataParams) { lpspi_master_config_t userConfig; uint32_t srcFreq = 0; if((pDataParams == NULL) || (sizeof(phbalReg_Type_t) != wSizeOfDataParams)) { return (PH_DRIVER_ERROR | PH_COMP_DRIVER); } ((phbalReg_Type_t *)pDataParams)->wId = PH_COMP_DRIVER | PHBAL_REG_MCXN947_SPI_ID; ((phbalReg_Type_t *)pDataParams)->bBalType = PHBAL_REG_TYPE_SPI; /*Initialize Flexcomm1 clock*/ /* attach FRO 12M to FLEXCOMM1 */ CLOCK_SetClkDiv(PHDRIVER_FC1_SPI_DIV, 1u); CLOCK_AttachClk(PHDRIVER_FC1_SPI_CLK); /*Configure SPI pins*/ phbalReg_Mcxn947SpiConfig(); /*SPI configuration*/ LPSPI_MasterGetDefaultConfig(&userConfig); userConfig.baudRate = PHDRIVER_MCXN947_SPI_DATA_RATE; srcFreq = SPI_MASTER_CLOCK_FREQ; userConfig.whichPcs = (lpspi_which_pcs_t)kLPSPI_Pcs0; userConfig.pcsActiveHighOrLow = (lpspi_pcs_polarity_config_t)kLPSPI_PcsActiveLow; userConfig.pcsToSckDelayInNanoSec = 1000000000U / (userConfig.baudRate * 1U); userConfig.lastSckToPcsDelayInNanoSec = 1000000000U / (userConfig.baudRate * 1U); userConfig.betweenTransferDelayInNanoSec = 1000000000U / (userConfig.baudRate * 1U); /*Initialize SPI*/ #ifdef PHDRIVER_MCXN947_SPI_POLLING LPSPI_MasterInit(PHDRIVER_MCXN947_SPI_MASTER, &userConfig, srcFreq); #else LPSPI_MasterInit(PHDRIVER_MCXN947_SPI_MASTER, &userConfig, srcFreq); LPSPI_MasterTransferCreateHandle(PHDRIVER_MCXN947_SPI_MASTER, &g_masterHandle, LPSPI_MasterUserCallback, NULL); #endif return PH_DRIVER_SUCCESS; } phStatus_t phbalReg_Init( void * pDataParams, uint16_t wSizeOfDataParams) { lpspi_master_config_t userConfig; uint32_t srcFreq = 0; if((pDataParams == NULL) || (sizeof(phbalReg_Type_t) != wSizeOfDataParams)) { return (PH_DRIVER_ERROR | PH_COMP_DRIVER); } ((phbalReg_Type_t *)pDataParams)->wId = PH_COMP_DRIVER | PHBAL_REG_MCXN947_SPI_ID; ((phbalReg_Type_t *)pDataParams)->bBalType = PHBAL_REG_TYPE_SPI; /*Initialize Flexcomm1 clock*/ /* attach FRO 12M to FLEXCOMM1 */ CLOCK_SetClkDiv(PHDRIVER_FC1_SPI_DIV, 1u); CLOCK_AttachClk(PHDRIVER_FC1_SPI_CLK); /*Configure SPI pins*/ phbalReg_Mcxn947SpiConfig(); /*SPI configuration*/ LPSPI_MasterGetDefaultConfig(&userConfig); userConfig.baudRate = PHDRIVER_MCXN947_SPI_DATA_RATE; srcFreq = SPI_MASTER_CLOCK_FREQ; userConfig.whichPcs = (lpspi_which_pcs_t)kLPSPI_Pcs0; userConfig.pcsActiveHighOrLow = (lpspi_pcs_polarity_config_t)kLPSPI_PcsActiveLow; userConfig.pcsToSckDelayInNanoSec = 1000000000U / (userConfig.baudRate * 1U); userConfig.lastSckToPcsDelayInNanoSec = 1000000000U / (userConfig.baudRate * 1U); userConfig.betweenTransferDelayInNanoSec = 1000000000U / (userConfig.baudRate * 1U); /*Initialize SPI*/ #ifdef PHDRIVER_MCXN947_SPI_POLLING LPSPI_MasterInit(PHDRIVER_MCXN947_SPI_MASTER, &userConfig, srcFreq); #else LPSPI_MasterInit(PHDRIVER_MCXN947_SPI_MASTER, &userConfig, srcFreq); LPSPI_MasterTransferCreateHandle(PHDRIVER_MCXN947_SPI_MASTER, &g_masterHandle, LPSPI_MasterUserCallback, NULL); #endif return PH_DRIVER_SUCCESS; } We have to define the phbalReg_Exchange function as well, which is used for communicating via SPI with the PN5190. Spoiler (Highlight to read) phStatus_t phbalReg_Exchange( void * pDataParams, uint16_t wOption, uint8_t * pTxBuffer, uint16_t wTxLength, uint16_t wRxBufSize, uint8_t * pRxBuffer, uint16_t * pRxLength ) { phStatus_t status = PH_DRIVER_SUCCESS; uint8_t * pRxBuf; status_t lpspiStatus; lpspi_transfer_t g_masterXfer; uint8_t g_dummyBuffer[RX_BUFFER_SIZE_MAX]; if(pRxBuffer == NULL) { pRxBuf = g_dummyBuffer; } else { pRxBuf = pRxBuffer; } if(pTxBuffer == NULL) { wTxLength = wRxBufSize; g_dummyBuffer[0] = 0xFF; pTxBuffer = g_dummyBuffer; } memset(&g_masterXfer, 0, sizeof(lpspi_transfer_t)); /* Set up the transfer */ g_masterXfer.txData = pTxBuffer; g_masterXfer.rxData = pRxBuf; g_masterXfer.dataSize = wTxLength; g_masterXfer.configFlags = kLPSPI_MasterPcs0 | kLPSPI_MasterPcsContinuous | kLPSPI_MasterByteSwap; /* Start transfer */ #ifdef PHDRIVER_MCXN947_SPI_POLLING lpspiStatus = LPSPI_MasterTransferBlocking(PHDRIVER_MCXN947_SPI_MASTER, &g_masterXfer); #else lpspiStatus = LPSPI_MasterTransferNonBlocking(PHDRIVER_MCXN947_SPI_MASTER, &g_masterHandle, &g_masterXfer); /* Wait transfer complete */ while (!isTransferCompleted) { } #endif if (lpspiStatus != kStatus_Success) { return (PH_DRIVER_FAILURE | PH_COMP_DRIVER); } if (pRxLength != NULL) { *pRxLength = wTxLength; } #ifndef PHDRIVER_MCXN947_SPI_POLLING SDK_DelayAtLeastUs(300U, BOARD_BOOTCLOCKPLL150M_CORE_CLOCK); #endif return status; } phStatus_t phbalReg_Exchange( void * pDataParams, uint16_t wOption, uint8_t * pTxBuffer, uint16_t wTxLength, uint16_t wRxBufSize, uint8_t * pRxBuffer, uint16_t * pRxLength ) { phStatus_t status = PH_DRIVER_SUCCESS; uint8_t * pRxBuf; status_t lpspiStatus; lpspi_transfer_t g_masterXfer; uint8_t g_dummyBuffer[RX_BUFFER_SIZE_MAX]; if(pRxBuffer == NULL) { pRxBuf = g_dummyBuffer; } else { pRxBuf = pRxBuffer; } if(pTxBuffer == NULL) { wTxLength = wRxBufSize; g_dummyBuffer[0] = 0xFF; pTxBuffer = g_dummyBuffer; } memset(&g_masterXfer, 0, sizeof(lpspi_transfer_t)); /* Set up the transfer */ g_masterXfer.txData = pTxBuffer; g_masterXfer.rxData = pRxBuf; g_masterXfer.dataSize = wTxLength; g_masterXfer.configFlags = kLPSPI_MasterPcs0 | kLPSPI_MasterPcsContinuous | kLPSPI_MasterByteSwap; /* Start transfer */ #ifdef PHDRIVER_MCXN947_SPI_POLLING lpspiStatus = LPSPI_MasterTransferBlocking(PHDRIVER_MCXN947_SPI_MASTER, &g_masterXfer); #else lpspiStatus = LPSPI_MasterTransferNonBlocking(PHDRIVER_MCXN947_SPI_MASTER, &g_masterHandle, &g_masterXfer); /* Wait transfer complete */ while (!isTransferCompleted) { } #endif if (lpspiStatus != kStatus_Success) { return (PH_DRIVER_FAILURE | PH_COMP_DRIVER); } if (pRxLength != NULL) { *pRxLength = wTxLength; } #ifndef PHDRIVER_MCXN947_SPI_POLLING SDK_DelayAtLeastUs(300U, BOARD_BOOTCLOCKPLL150M_CORE_CLOCK); #endif return status; } Finally, we will define the phbalReg_Mcxn947SpiConfig function, which is called by phbalReg_Init to configure the SPI pins on the MCXN947: Spoiler (Highlight to read) static void phbalReg_Mcxn947SpiConfig(void) { const port_pin_config_t port0_24_pinB6_config = { kPORT_PullUp, kPORT_LowPullResistor, kPORT_SlowSlewRate, kPORT_PassiveFilterDisable, kPORT_OpenDrainDisable, kPORT_LowDriveStrength, /* Pin is configured as FC1_P0 */ kPORT_MuxAlt2, kPORT_InputBufferEnable, kPORT_InputNormal, kPORT_UnlockRegister}; /* PORT0_24 (pin B6) is configured as SPI_MOSI */ PORT_SetPinConfig(PORT0, 24U, &port0_24_pinB6_config); const port_pin_config_t port0_25_pinA6_config = {kPORT_PullUp, kPORT_LowPullResistor, kPORT_SlowSlewRate, kPORT_PassiveFilterDisable, kPORT_OpenDrainDisable, kPORT_LowDriveStrength, /* Pin is configured as FC1_P1 */ kPORT_MuxAlt2, kPORT_InputBufferEnable, kPORT_InputNormal, kPORT_UnlockRegister}; /* PORT0_25 (pin A6) is configured as SPI_SCK */ PORT_SetPinConfig(PORT0, 25U, &port0_25_pinA6_config); const port_pin_config_t port0_26_pinF10_config = {kPORT_PullUp, kPORT_LowPullResistor, kPORT_SlowSlewRate, kPORT_PassiveFilterDisable, kPORT_OpenDrainDisable, kPORT_LowDriveStrength, /* Pin is configured as FC1_P2 */ kPORT_MuxAlt2, kPORT_InputBufferEnable, kPORT_InputNormal, kPORT_UnlockRegister}; /* PORT0_26 (pin F10) is configured as SPI_MISO */ PORT_SetPinConfig(PORT0, 26U, &port0_26_pinF10_config); const port_pin_config_t port0_27_pinE10_config = {kPORT_PullUp, kPORT_LowPullResistor, kPORT_SlowSlewRate, kPORT_PassiveFilterDisable, kPORT_OpenDrainDisable, kPORT_LowDriveStrength, /* Pin is configured as FC1_P3 */ kPORT_MuxAlt2, kPORT_InputBufferEnable, kPORT_InputNormal, kPORT_UnlockRegister}; /* PORT0_27 (pin E10) is configured as SPI_CS */ PORT_SetPinConfig(PORT0, 27U, &port0_27_pinE10_config); } static void phbalReg_Mcxn947SpiConfig(void) { const port_pin_config_t port0_24_pinB6_config = { kPORT_PullUp, kPORT_LowPullResistor, kPORT_SlowSlewRate, kPORT_PassiveFilterDisable, kPORT_OpenDrainDisable, kPORT_LowDriveStrength, /* Pin is configured as FC1_P0 */ kPORT_MuxAlt2, kPORT_InputBufferEnable, kPORT_InputNormal, kPORT_UnlockRegister}; /* PORT0_24 (pin B6) is configured as SPI_MOSI */ PORT_SetPinConfig(PORT0, 24U, &port0_24_pinB6_config); const port_pin_config_t port0_25_pinA6_config = {kPORT_PullUp, kPORT_LowPullResistor, kPORT_SlowSlewRate, kPORT_PassiveFilterDisable, kPORT_OpenDrainDisable, kPORT_LowDriveStrength, /* Pin is configured as FC1_P1 */ kPORT_MuxAlt2, kPORT_InputBufferEnable, kPORT_InputNormal, kPORT_UnlockRegister}; /* PORT0_25 (pin A6) is configured as SPI_SCK */ PORT_SetPinConfig(PORT0, 25U, &port0_25_pinA6_config); const port_pin_config_t port0_26_pinF10_config = {kPORT_PullUp, kPORT_LowPullResistor, kPORT_SlowSlewRate, kPORT_PassiveFilterDisable, kPORT_OpenDrainDisable, kPORT_LowDriveStrength, /* Pin is configured as FC1_P2 */ kPORT_MuxAlt2, kPORT_InputBufferEnable, kPORT_InputNormal, kPORT_UnlockRegister}; /* PORT0_26 (pin F10) is configured as SPI_MISO */ PORT_SetPinConfig(PORT0, 26U, &port0_26_pinF10_config); const port_pin_config_t port0_27_pinE10_config = {kPORT_PullUp, kPORT_LowPullResistor, kPORT_SlowSlewRate, kPORT_PassiveFilterDisable, kPORT_OpenDrainDisable, kPORT_LowDriveStrength, /* Pin is configured as FC1_P3 */ kPORT_MuxAlt2, kPORT_InputBufferEnable, kPORT_InputNormal, kPORT_UnlockRegister}; /* PORT0_27 (pin E10) is configured as SPI_CS */ PORT_SetPinConfig(PORT0, 27U, &port0_27_pinE10_config); } phDriver_Mcxn947SDK.c: In this file we will have the following definitions and includes that describe relevant characteristics of the ctimer (configuration structures, interrupt handlers and maximum count value), and of the GPIO port: Spoiler (Highlight to read) #include "phDriver.h" #include "BoardSelection.h" #include "fsl_device_registers.h" #include #include /* *********************************************************************************************************** * Internal Definitions * ********************************************************************************************************** */ #define MCXN947_TIMER_MAX_32BIT 0xFFFFFFFFU #define CTIMER_HANDLER CTIMER0_IRQHandler /* *********************************************************************************************************** * * Type Definitions *********************************************************************************************************** */ volatile bool ctimerIsrFlag = false; /* *********************************************************************************************************** * Global and Static Variables * * Match Configuration for CTIMER Channel 0*/ static ctimer_match_config_t matchConfig0; /* Total Size: NNNbytes * ********************************************************************************************************** */ /* Array initializer of GPIO peripheral base pointers */ static const GPIO_Type *pGpiosBaseAddr[] = GPIO_BASE_PTRS; static pphDriver_TimerCallBck_t pCTimerCallBack; static volatile uint8_t dwTimerExp; static const gpio_interrupt_config_t aInterruptTypes[] = {kGPIO_InterruptLogicZero, /* Unused. */ kGPIO_InterruptLogicZero, kGPIO_InterruptLogicOne, kGPIO_InterruptRisingEdge, kGPIO_InterruptFallingEdge, kGPIO_InterruptEitherEdge, }; /* *********************************************************************************************************** * Private Functions Prototypes * ********************************************************************************************************** */ static void phDriver_CTimerIsrCallBack(void); #include "phDriver.h" #include "BoardSelection.h" #include "fsl_device_registers.h" #include #include /* *********************************************************************************************************** * Internal Definitions * ********************************************************************************************************** */ #define MCXN947_TIMER_MAX_32BIT 0xFFFFFFFFU #define CTIMER_HANDLER CTIMER0_IRQHandler /* *********************************************************************************************************** * * Type Definitions *********************************************************************************************************** */ volatile bool ctimerIsrFlag = false; /* *********************************************************************************************************** * Global and Static Variables * * Match Configuration for CTIMER Channel 0*/ static ctimer_match_config_t matchConfig0; /* Total Size: NNNbytes * ********************************************************************************************************** */ /* Array initializer of GPIO peripheral base pointers */ static const GPIO_Type *pGpiosBaseAddr[] = GPIO_BASE_PTRS; static pphDriver_TimerCallBck_t pCTimerCallBack; static volatile uint8_t dwTimerExp; static const gpio_interrupt_config_t aInterruptTypes[] = {kGPIO_InterruptLogicZero, /* Unused. */ kGPIO_InterruptLogicZero, kGPIO_InterruptLogicOne, kGPIO_InterruptRisingEdge, kGPIO_InterruptFallingEdge, kGPIO_InterruptEitherEdge, }; /* *********************************************************************************************************** * Private Functions Prototypes * ********************************************************************************************************** */ static void phDriver_CTimerIsrCallBack(void); We will define the following functions to initialize and stop the timer, and to enable timer interruptions and its callback: Spoiler (Highlight to read) phStatus_t phDriver_TimerStart(phDriver_Timer_Unit_t eTimerUnit, uint32_t dwTimePeriod, pphDriver_TimerCallBck_t pTimerCallBack) { uint64_t qwTimerCnt; uint32_t dwTimerFreq; dwTimerFreq = PH_DRIVER_SDK_CTIMER_CLK_FREQ; qwTimerCnt = dwTimerFreq; qwTimerCnt = (qwTimerCnt / eTimerUnit); qwTimerCnt = (dwTimePeriod * qwTimerCnt); /* 32-bit timers. */ if(qwTimerCnt > (uint64_t)MCXN947_TIMER_MAX_32BIT) { return PH_DRIVER_ERROR | PH_COMP_DRIVER; } if(pTimerCallBack == NULL) /* Timer Start is blocking call. */ { dwTimerExp = 0; pCTimerCallBack = phDriver_CTimerIsrCallBack; } else /* Call the Timer callback. */ { pCTimerCallBack = pTimerCallBack; } /*Configure & start CTIMER*/ /*Ctimer config structure*/ ctimer_config_t config; /*Timer mode, init*/ CTIMER_GetDefaultConfig(&config); CTIMER_Init(PH_DRIVER_SDK_CTIMER, &config); CTIMER_EnableInterrupts(PH_DRIVER_SDK_CTIMER, kCTIMER_Match0InterruptEnable|kCTIMER_Capture0InterruptEnable); /* Configuration match 0 */ matchConfig0.enableCounterReset = true; matchConfig0.enableCounterStop = false; matchConfig0.matchValue = (uint32_t)qwTimerCnt; matchConfig0.outControl = kCTIMER_Output_NoAction; matchConfig0.outPinInitState = false; matchConfig0.enableInterrupt = true; EnableIRQ(PH_DRIVER_SDK_CTIMER_NVIC); NVIC_SetPriority(PH_DRIVER_SDK_CTIMER_NVIC, PH_DRIVER_SDK_CTIMER_PRIORITY); /*Setup Match*/ CTIMER_SetupMatch(PH_DRIVER_SDK_CTIMER, kCTIMER_Match_0, &matchConfig0); /*Start*/ CTIMER_StartTimer(PH_DRIVER_SDK_CTIMER); while (true) { /* Check whether an interrupt occurred */ if (true == ctimerIsrFlag && dwTimerExp) { /* Clear interrupt flag*/ ctimerIsrFlag = false; break; } } return PH_DRIVER_SUCCESS; } phStatus_t phDriver_TimerStart(phDriver_Timer_Unit_t eTimerUnit, uint32_t dwTimePeriod, pphDriver_TimerCallBck_t pTimerCallBack) { uint64_t qwTimerCnt; uint32_t dwTimerFreq; dwTimerFreq = PH_DRIVER_SDK_CTIMER_CLK_FREQ; qwTimerCnt = dwTimerFreq; qwTimerCnt = (qwTimerCnt / eTimerUnit); qwTimerCnt = (dwTimePeriod * qwTimerCnt); /* 32-bit timers. */ if(qwTimerCnt > (uint64_t)MCXN947_TIMER_MAX_32BIT) { return PH_DRIVER_ERROR | PH_COMP_DRIVER; } if(pTimerCallBack == NULL) /* Timer Start is blocking call. */ { dwTimerExp = 0; pCTimerCallBack = phDriver_CTimerIsrCallBack; } else /* Call the Timer callback. */ { pCTimerCallBack = pTimerCallBack; } /*Configure & start CTIMER*/ /*Ctimer config structure*/ ctimer_config_t config; /*Timer mode, init*/ CTIMER_GetDefaultConfig(&config); CTIMER_Init(PH_DRIVER_SDK_CTIMER, &config); CTIMER_EnableInterrupts(PH_DRIVER_SDK_CTIMER, kCTIMER_Match0InterruptEnable|kCTIMER_Capture0InterruptEnable); /* Configuration match 0 */ matchConfig0.enableCounterReset = true; matchConfig0.enableCounterStop = false; matchConfig0.matchValue = (uint32_t)qwTimerCnt; matchConfig0.outControl = kCTIMER_Output_NoAction; matchConfig0.outPinInitState = false; matchConfig0.enableInterrupt = true; EnableIRQ(PH_DRIVER_SDK_CTIMER_NVIC); NVIC_SetPriority(PH_DRIVER_SDK_CTIMER_NVIC, PH_DRIVER_SDK_CTIMER_PRIORITY); /*Setup Match*/ CTIMER_SetupMatch(PH_DRIVER_SDK_CTIMER, kCTIMER_Match_0, &matchConfig0); /*Start*/ CTIMER_StartTimer(PH_DRIVER_SDK_CTIMER); while (true) { /* Check whether an interrupt occurred */ if (true == ctimerIsrFlag && dwTimerExp) { /* Clear interrupt flag*/ ctimerIsrFlag = false; break; } } return PH_DRIVER_SUCCESS; } Spoiler (Highlight to read) phStatus_t phDriver_TimerStop(void) { /*Stop timer & disable interrupts*/ CTIMER_StopTimer(PH_DRIVER_SDK_CTIMER); CTIMER_DisableInterrupts(PH_DRIVER_SDK_CTIMER, kCTIMER_Match0InterruptEnable|kCTIMER_Capture0InterruptEnable); /* Disable at the NVIC */ DisableIRQ(PH_DRIVER_SDK_CTIMER_NVIC); return PH_DRIVER_SUCCESS; } phStatus_t phDriver_TimerStop(void) { /*Stop timer & disable interrupts*/ CTIMER_StopTimer(PH_DRIVER_SDK_CTIMER); CTIMER_DisableInterrupts(PH_DRIVER_SDK_CTIMER, kCTIMER_Match0InterruptEnable|kCTIMER_Capture0InterruptEnable); /* Disable at the NVIC */ DisableIRQ(PH_DRIVER_SDK_CTIMER_NVIC); return PH_DRIVER_SUCCESS; } We will also have definitions for the functions that configure and handle GPIOs of the MCXN947 and enable interruptions. Spoiler (Highlight to read) phStatus_t phDriver_PinConfig(uint32_t dwPinNumber, phDriver_Pin_Func_t ePinFunc, phDriver_Pin_Config_t *pPinConfig) { gpio_pin_config_t sGpioConfig; uint8_t bPinNum; uint8_t bPortGpio; if((ePinFunc == PH_DRIVER_PINFUNC_BIDIR) || (pPinConfig == NULL)) { return PH_DRIVER_ERROR | PH_COMP_DRIVER; } /* Extract the Pin, Gpio, Port details from dwPinNumber */ bPinNum = (uint8_t)(dwPinNumber & 0xFF); bPortGpio = (uint8_t)((dwPinNumber & 0xFF00)>>8); sGpioConfig.pinDirection = (ePinFunc == PH_DRIVER_PINFUNC_OUTPUT) ? kGPIO_DigitalOutput:kGPIO_DigitalInput; sGpioConfig.outputLogic = pPinConfig->bOutputLogic; if(ePinFunc == PH_DRIVER_PINFUNC_INTERRUPT) { gpio_interrupt_config_t intConfig = aInterruptTypes[(uint8_t)pPinConfig->eInterruptConfig]; GPIO_GpioClearInterruptFlags((GPIO_Type *)pGpiosBaseAddr[GPIO_PORT], bPinNum); GPIO_SetPinInterruptConfig((GPIO_Type *)pGpiosBaseAddr[GPIO_PORT], bPinNum, intConfig); EnableIRQ(EINT_IRQn); GPIO_PinInit((GPIO_Type *)pGpiosBaseAddr[GPIO_PORT],bPinNum,&sGpioConfig); } else { GPIO_PinInit((GPIO_Type *)pGpiosBaseAddr[GPIO_PORT],bPinNum,&sGpioConfig); } return PH_DRIVER_SUCCESS; } phStatus_t phDriver_PinConfig(uint32_t dwPinNumber, phDriver_Pin_Func_t ePinFunc, phDriver_Pin_Config_t *pPinConfig) { gpio_pin_config_t sGpioConfig; uint8_t bPinNum; uint8_t bPortGpio; if((ePinFunc == PH_DRIVER_PINFUNC_BIDIR) || (pPinConfig == NULL)) { return PH_DRIVER_ERROR | PH_COMP_DRIVER; } /* Extract the Pin, Gpio, Port details from dwPinNumber */ bPinNum = (uint8_t)(dwPinNumber & 0xFF); bPortGpio = (uint8_t)((dwPinNumber & 0xFF00)>>8); sGpioConfig.pinDirection = (ePinFunc == PH_DRIVER_PINFUNC_OUTPUT) ? kGPIO_DigitalOutput:kGPIO_DigitalInput; sGpioConfig.outputLogic = pPinConfig->bOutputLogic; if(ePinFunc == PH_DRIVER_PINFUNC_INTERRUPT) { gpio_interrupt_config_t intConfig = aInterruptTypes[(uint8_t)pPinConfig->eInterruptConfig]; GPIO_GpioClearInterruptFlags((GPIO_Type *)pGpiosBaseAddr[GPIO_PORT], bPinNum); GPIO_SetPinInterruptConfig((GPIO_Type *)pGpiosBaseAddr[GPIO_PORT], bPinNum, intConfig); EnableIRQ(EINT_IRQn); GPIO_PinInit((GPIO_Type *)pGpiosBaseAddr[GPIO_PORT],bPinNum,&sGpioConfig); } else { GPIO_PinInit((GPIO_Type *)pGpiosBaseAddr[GPIO_PORT],bPinNum,&sGpioConfig); } return PH_DRIVER_SUCCESS; } Spoiler (Highlight to read) uint8_t phDriver_PinRead(uint32_t dwPinNumber, phDriver_Pin_Func_t ePinFunc) { uint8_t bValue; uint32_t intStatus; uint8_t bGpioNum; uint8_t bPinNum; /* Extract the Pin, Gpio details from dwPinNumber */ bPinNum = (uint8_t)(dwPinNumber & 0xFF); bGpioNum = (uint8_t)((dwPinNumber & 0xFF00)>>8); if(ePinFunc == PH_DRIVER_PINFUNC_INTERRUPT) { /*Get value of pin interrupt status*/ intStatus = GPIO_PinGetInterruptFlag((GPIO_Type *)pGpiosBaseAddr[GPIO_PORT], bPinNum); bValue = intStatus ? 1:0; } else { /*Read pin value*/ bValue = (uint8_t)GPIO_PinRead((GPIO_Type *)pGpiosBaseAddr[GPIO_PORT], bPinNum); } return bValue; } uint8_t phDriver_PinRead(uint32_t dwPinNumber, phDriver_Pin_Func_t ePinFunc) { uint8_t bValue; uint32_t intStatus; uint8_t bGpioNum; uint8_t bPinNum; /* Extract the Pin, Gpio details from dwPinNumber */ bPinNum = (uint8_t)(dwPinNumber & 0xFF); bGpioNum = (uint8_t)((dwPinNumber & 0xFF00)>>8); if(ePinFunc == PH_DRIVER_PINFUNC_INTERRUPT) { /*Get value of pin interrupt status*/ intStatus = GPIO_PinGetInterruptFlag((GPIO_Type *)pGpiosBaseAddr[GPIO_PORT], bPinNum); bValue = intStatus ? 1:0; } else { /*Read pin value*/ bValue = (uint8_t)GPIO_PinRead((GPIO_Type *)pGpiosBaseAddr[GPIO_PORT], bPinNum); } return bValue; } Spoiler (Highlight to read) void phDriver_PinWrite(uint32_t dwPinNumber, uint8_t bValue) { uint8_t bGpioNum; uint8_t bPinNum; /* Extract the Pin, Gpio details from dwPinNumber */ bPinNum = (uint8_t)(dwPinNumber & 0xFF); bGpioNum = (uint8_t)((dwPinNumber & 0xFF00)>>8); GPIO_PinWrite((GPIO_Type *)pGpiosBaseAddr[GPIO_PORT], bPinNum, bValue); } void phDriver_PinClearIntStatus(uint32_t dwPinNumber) { uint8_t bGpioNum; uint8_t bPinNum; /* Extract the Pin, Gpio details from dwPinNumber */ bPinNum = (uint8_t)(dwPinNumber & 0xFF); bGpioNum = (uint8_t)((dwPinNumber & 0xFF00)>>8); /*Clear interrupt flag*/ GPIO_GpioClearInterruptFlags((GPIO_Type *)pGpiosBaseAddr[GPIO_PORT], (1U << bPinNum)); } void phDriver_PinWrite(uint32_t dwPinNumber, uint8_t bValue) { uint8_t bGpioNum; uint8_t bPinNum; /* Extract the Pin, Gpio details from dwPinNumber */ bPinNum = (uint8_t)(dwPinNumber & 0xFF); bGpioNum = (uint8_t)((dwPinNumber & 0xFF00)>>8); GPIO_PinWrite((GPIO_Type *)pGpiosBaseAddr[GPIO_PORT], bPinNum, bValue); } void phDriver_PinClearIntStatus(uint32_t dwPinNumber) { uint8_t bGpioNum; uint8_t bPinNum; /* Extract the Pin, Gpio details from dwPinNumber */ bPinNum = (uint8_t)(dwPinNumber & 0xFF); bGpioNum = (uint8_t)((dwPinNumber & 0xFF00)>>8); /*Clear interrupt flag*/ GPIO_GpioClearInterruptFlags((GPIO_Type *)pGpiosBaseAddr[GPIO_PORT], (1U << bPinNum)); } It is also necessary to add functions required for the library to function correctly. Spoiler (Highlight to read) void phDriver_EnterCriticalSection(void) { NVIC_DisableIRQ(EINT_IRQn); } void phDriver_ExitCriticalSection(void) { NVIC_EnableIRQ(EINT_IRQn); } phStatus_t phDriver_IRQPinRead(uint32_t dwPinNumber) { phStatus_t bGpioVal = false; bGpioVal = phDriver_PinRead(dwPinNumber, PH_DRIVER_PINFUNC_INPUT); return bGpioVal; } phStatus_t phDriver_IRQPinPoll(uint32_t dwPinNumber, phDriver_Pin_Func_t ePinFunc, phDriver_Interrupt_Config_t eInterruptType) { uint8_t bGpioState = 0; if ((eInterruptType != PH_DRIVER_INTERRUPT_RISINGEDGE) && (eInterruptType != PH_DRIVER_INTERRUPT_FALLINGEDGE)) { return PH_DRIVER_ERROR | PH_COMP_DRIVER; } if (eInterruptType == PH_DRIVER_INTERRUPT_FALLINGEDGE) { bGpioState = 1; } while(phDriver_PinRead(dwPinNumber, ePinFunc) == bGpioState); return PH_DRIVER_SUCCESS; } void phDriver_EnterCriticalSection(void) { NVIC_DisableIRQ(EINT_IRQn); } void phDriver_ExitCriticalSection(void) { NVIC_EnableIRQ(EINT_IRQn); } phStatus_t phDriver_IRQPinRead(uint32_t dwPinNumber) { phStatus_t bGpioVal = false; bGpioVal = phDriver_PinRead(dwPinNumber, PH_DRIVER_PINFUNC_INPUT); return bGpioVal; } phStatus_t phDriver_IRQPinPoll(uint32_t dwPinNumber, phDriver_Pin_Func_t ePinFunc, phDriver_Interrupt_Config_t eInterruptType) { uint8_t bGpioState = 0; if ((eInterruptType != PH_DRIVER_INTERRUPT_RISINGEDGE) && (eInterruptType != PH_DRIVER_INTERRUPT_FALLINGEDGE)) { return PH_DRIVER_ERROR | PH_COMP_DRIVER; } if (eInterruptType == PH_DRIVER_INTERRUPT_FALLINGEDGE) { bGpioState = 1; } while(phDriver_PinRead(dwPinNumber, ePinFunc) == bGpioState); return PH_DRIVER_SUCCESS; } Finally, here, we will have the definition of the timer interrupt handler and ISR callback. Spoiler (Highlight to read) void CTIMER0_IRQHandler(void) { /* Clear interrupt flag.*/ CTIMER_ClearStatusFlags(PH_DRIVER_SDK_CTIMER, kCTIMER_Match0Flag|kCTIMER_Capture0Flag); /* Single shot timer. Stop it. */ CTIMER_StopTimer(PH_DRIVER_SDK_CTIMER); CTIMER_DisableInterrupts(PH_DRIVER_SDK_CTIMER, kCTIMER_Match0InterruptEnable|kCTIMER_Capture0InterruptEnable); pCTimerCallBack(); ctimerIsrFlag = true; } static void phDriver_CTimerIsrCallBack(void) { dwTimerExp = 1; } void CTIMER0_IRQHandler(void) { /* Clear interrupt flag.*/ CTIMER_ClearStatusFlags(PH_DRIVER_SDK_CTIMER, kCTIMER_Match0Flag|kCTIMER_Capture0Flag); /* Single shot timer. Stop it. */ CTIMER_StopTimer(PH_DRIVER_SDK_CTIMER); CTIMER_DisableInterrupts(PH_DRIVER_SDK_CTIMER, kCTIMER_Match0InterruptEnable|kCTIMER_Capture0InterruptEnable); pCTimerCallBack(); ctimerIsrFlag = true; } static void phDriver_CTimerIsrCallBack(void) { dwTimerExp = 1; } With these additions, we have all the functions needed (based on the FRDM-MCXN947 SDK) by the library to communicate with the PN5190. BoardSelection.h In this header file, which is found at “DAL > cfg” we will add the definition set in the preprocessor settings to use the FRDM-MCXN947 board as host by adding the following lines to the file: Spoiler (Highlight to read) #ifdef PHDRIVER_FRDMMCXN947_PN5190_BOARD # include #endif #ifdef PHDRIVER_FRDMMCXN947_PN5190_BOARD # include #endif ph_NxpBuild_App.h In this header found at “intfs” folder, we will add our board support to use it with the PN5190 by adding the following change: Spoiler (Highlight to read) #if defined(PHDRIVER_LPC1769PN5190_BOARD) \ || defined(PHDRIVER_K82F_PNEV5190B_BOARD)\ || defined(PHDRIVER_FRDMMCXN947_PN5190_BOARD) # define NXPBUILD__PHHAL_HW_PN5190 #endif #if defined(PHDRIVER_LPC1769PN5190_BOARD) \ || defined(PHDRIVER_K82F_PNEV5190B_BOARD)\ || defined(PHDRIVER_FRDMMCXN947_PN5190_BOARD) # define NXPBUILD__PHHAL_HW_PN5190 #endif phApp_Init.h In this header located at “intfs” folder we will add the required include files for the initialization of our board and enable the correct debug interface. Spoiler (Highlight to read) /*Check for MCXN controller based boards*/ #if defined (PHDRIVER_FRDMMCXN947_PN5190_BOARD) #define PHDRIVER_FRDM_MCXN947 #endif #ifdef PHDRIVER_FRDM_MCXN947 #include #include #include #include #include #include #endif Please replace this line. /*Check for MCXN controller based boards*/ #if defined (PHDRIVER_FRDMMCXN947_PN5190_BOARD) #define PHDRIVER_FRDM_MCXN947 #endif #ifdef PHDRIVER_FRDM_MCXN947 #include #include #include #include #include #include #endif Please replace this line. Spoiler (Highlight to read) #if defined(PHDRIVER_KINETIS_K82)|| defined(PHDRIVER_FRDM_MCXN947)   #if defined(PHDRIVER_KINETIS_K82)|| defined(PHDRIVER_FRDM_MCXN947) phApp_Init.c Finally, in this source file we will add the initialization code for the MCXN947 to complement the initialization macros defined in the previous phApp_Init.h file modification. Here we will call functions to initialize clocks and UART pins. Spoiler (Highlight to read) #ifdef PHDRIVER_FRDM_MCXN947 #include "fsl_common.h" #include "pin_mux.h" #include "clock_config.h" #include "board.h" static void phApp_MCXN947_Init(void){ BOARD_InitBootPins(); BOARD_InitBootClocks(); BOARD_InitDebugConsole(); } #endif #ifdef PHDRIVER_FRDM_MCXN947 #include "fsl_common.h" #include "pin_mux.h" #include "clock_config.h" #include "board.h" static void phApp_MCXN947_Init(void){ BOARD_InitBootPins(); BOARD_InitBootClocks(); BOARD_InitDebugConsole(); } #endif Spoiler (Highlight to read) #elif defined(PHDRIVER_FRDM_MCXN947) phApp_MCXN947_Init(); #elif defined(PHDRIVER_FRDM_MCXN947) phApp_MCXN947_Init(); These functions are used to initialize the correspondent clocks of each peripheral such as CTIMER, the input pins multiplexor for selecting GPIO functionality and FLEXCOMM for SPI. In here we also set the GPIO functionality for pins P0_31 and P0_28 (IRQ and RESET), as well as UART3 for printing the tag information on the serial port connected to the computer. Additionally, we need to set the NVIC priority to ensure that interrupts can occur. Add the NVIC_SetPriority() function to phApp_Configure_IRQ(). Spoiler (Highlight to read) #ifdef PH_PLATFORM_HAS_ICFRONTEND #if !(defined(PH_OSAL_LINUX) && defined(NXPBUILD__PHHAL_HW_PN5190)) phDriver_Pin_Config_t pinCfg; NVIC_SetPriority(EINT_IRQn, EINT_PRIORITY); pinCfg.bOutputLogic = PH_DRIVER_SET_LOW; pinCfg.bPullSelect = PHDRIVER_PIN_IRQ_PULL_CFG; pinCfg.eInterruptConfig = PIN_IRQ_TRIGGER_TYPE; phDriver_PinConfig(PHDRIVER_PIN_IRQ, PH_DRIVER_PINFUNC_INTERRUPT, &pinCfg); #endif #ifdef PH_PLATFORM_HAS_ICFRONTEND #if !(defined(PH_OSAL_LINUX) && defined(NXPBUILD__PHHAL_HW_PN5190)) phDriver_Pin_Config_t pinCfg; NVIC_SetPriority(EINT_IRQn, EINT_PRIORITY); pinCfg.bOutputLogic = PH_DRIVER_SET_LOW; pinCfg.bPullSelect = PHDRIVER_PIN_IRQ_PULL_CFG; pinCfg.eInterruptConfig = PIN_IRQ_TRIGGER_TYPE; phDriver_PinConfig(PHDRIVER_PIN_IRQ, PH_DRIVER_PINFUNC_INTERRUPT, &pinCfg); #endif pin_mux.c Inside the function “BOARD_InitBootPins()” which is defined in board -> pin_mux.c file, the following initializations need to be added: Spoiler (Highlight to read) void BOARD_InitBootPins(void) { /* Use FRO HF clock for some of the Ctimers */ CLOCK_SetClkDiv(kCLOCK_DivCtimer0Clk, 1u); CLOCK_AttachClk(kFRO_HF_to_CTIMER0); CLOCK_EnableClock(kCLOCK_Gpio0); CLOCK_EnableClock(kCLOCK_Gpio1); BOARD_InitPins(); } void BOARD_InitBootPins(void) { /* Use FRO HF clock for some of the Ctimers */ CLOCK_SetClkDiv(kCLOCK_DivCtimer0Clk, 1u); CLOCK_AttachClk(kFRO_HF_to_CTIMER0); CLOCK_EnableClock(kCLOCK_Gpio0); CLOCK_EnableClock(kCLOCK_Gpio1); BOARD_InitPins(); } Additionally, within the “BOARD_InitPins()” function available in the same file, we will replace the initializations of the GPIO and UART pins. Spoiler (Highlight to read) void BOARD_InitPins(void) { /* Enables the clock for PORT0 controller: Enables clock */ CLOCK_EnableClock(kCLOCK_Port0); /* Enables the clock for PORT1: Enables clock */ CLOCK_EnableClock(kCLOCK_Port1); const port_pin_config_t port0_19_config = {/* Internal pull-up/down resistor is disabled */ kPORT_PullDisable, /* Low internal pull resistor value is selected. */ kPORT_LowPullResistor, /* Fast slew rate is configured */ kPORT_FastSlewRate, /* Passive input filter is disabled */ kPORT_PassiveFilterDisable, /* Open drain output is disabled */ kPORT_OpenDrainDisable, /* Low drive strength is configured */ kPORT_LowDriveStrength, /* Pin is configured as PIO0_10 */ kPORT_MuxAlt0, /* Digital input enabled */ kPORT_InputBufferEnable, /* Digital input is not inverted */ kPORT_InputNormal, /* Pin Control Register fields [15:0] are not locked */ kPORT_UnlockRegister}; /* PORT0_10 (pin B12) is configured as PIO0_10 */ PORT_SetPinConfig(PORT0, 19U, &port0_19_config); const port_pin_config_t port1_0_config = { kPORT_PullDisable, kPORT_LowPullResistor, kPORT_FastSlewRate, kPORT_PassiveFilterDisable, kPORT_OpenDrainDisable, kPORT_LowDriveStrength, /* Pin is configured as PIO0_10 */ kPORT_MuxAlt0, kPORT_InputBufferEnable, kPORT_InputNormal, kPORT_UnlockRegister}; /* PORT0_10 (pin B12) is configured as PIO0_10 */ PORT_SetPinConfig(PORT1, 0U, &port1_0_config); const port_pin_config_t port1_1_config = { kPORT_PullDisable, kPORT_LowPullResistor, kPORT_FastSlewRate, kPORT_PassiveFilterDisable, kPORT_OpenDrainDisable, kPORT_LowDriveStrength, /* Pin is configured as PIO0_10 */ kPORT_MuxAlt0, kPORT_InputBufferEnable, kPORT_InputNormal, kPORT_UnlockRegister}; /* PORT0_10 (pin B12) is configured as PIO0_10 */ PORT_SetPinConfig(PORT1, 1U, &port1_1_config); const port_pin_config_t port0_31_pinB12_config = { kPORT_PullDown, kPORT_LowPullResistor, kPORT_FastSlewRate, kPORT_PassiveFilterDisable, kPORT_OpenDrainDisable, kPORT_LowDriveStrength, /* Pin is configured as PIO0_10 */ kPORT_MuxAlt0, kPORT_InputBufferEnable, kPORT_InputNormal, kPORT_UnlockRegister}; /* PORT0_10 (pin B12) is configured as PIO0_10 */ PORT_SetPinConfig(PORT0, 31U, &port0_31_pinB12_config); const port_pin_config_t port0_28_config = { kPORT_PullDisable, kPORT_LowPullResistor, kPORT_FastSlewRate, kPORT_PassiveFilterDisable, kPORT_OpenDrainDisable, kPORT_LowDriveStrength, /* Pin is configured as PIO0_6 */ kPORT_MuxAlt0, kPORT_InputBufferEnable, kPORT_InputNormal, kPORT_UnlockRegister}; /* PORT0_6 (pin C14) is configured as PIO0_6 */ PORT_SetPinConfig(PORT0, 28U, &port0_28_config); const port_pin_config_t port0_2_pinB16_config = { .pullSelect = kPORT_PullDisable, .pullValueSelect = kPORT_LowPullResistor, .slewRate = kPORT_FastSlewRate, .passiveFilterEnable = kPORT_PassiveFilterDisable, .openDrainEnable = kPORT_OpenDrainDisable, .driveStrength = kPORT_HighDriveStrength, /* Pin is configured as SWO */ .mux = kPORT_MuxAlt1, .inputBuffer = kPORT_InputBufferEnable, .invertInput = kPORT_InputNormal, .lockRegister = kPORT_UnlockRegister}; /* PORT0_2 (pin B16) is configured as SWO */ PORT_SetPinConfig(PORT0, 2U, &port0_2_pinB16_config); const port_pin_config_t port1_8_pinA1_config = { .pullSelect = kPORT_PullUp, .pullValueSelect = kPORT_LowPullResistor, .slewRate = kPORT_FastSlewRate, .passiveFilterEnable = kPORT_PassiveFilterDisable, .openDrainEnable = kPORT_OpenDrainDisable, .driveStrength = kPORT_LowDriveStrength, /* Pin is configured as FC4_P0 */ .mux = kPORT_MuxAlt2, .inputBuffer = kPORT_InputBufferEnable, .invertInput = kPORT_InputNormal, .lockRegister = kPORT_UnlockRegister}; /* PORT1_8 (pin A1) is configured as FC4_P0 */ PORT_SetPinConfig(PORT1, 8U, &port1_8_pinA1_config); const port_pin_config_t port1_9_pinB1_config = { .pullSelect = kPORT_PullDisable, .pullValueSelect = kPORT_LowPullResistor, .slewRate = kPORT_FastSlewRate, .passiveFilterEnable = kPORT_PassiveFilterDisable, .openDrainEnable = kPORT_OpenDrainDisable, .driveStrength = kPORT_LowDriveStrength, /* Pin is configured as FC4_P1 */ .mux = kPORT_MuxAlt2, .inputBuffer = kPORT_InputBufferEnable, .invertInput = kPORT_InputNormal, .lockRegister = kPORT_UnlockRegister}; /* PORT1_9 (pin B1) is configured as FC4_P1 */ PORT_SetPinConfig(PORT1, 9U, &port1_9_pinB1_config); } void BOARD_InitPins(void) { /* Enables the clock for PORT0 controller: Enables clock */ CLOCK_EnableClock(kCLOCK_Port0); /* Enables the clock for PORT1: Enables clock */ CLOCK_EnableClock(kCLOCK_Port1); const port_pin_config_t port0_19_config = {/* Internal pull-up/down resistor is disabled */ kPORT_PullDisable, /* Low internal pull resistor value is selected. */ kPORT_LowPullResistor, /* Fast slew rate is configured */ kPORT_FastSlewRate, /* Passive input filter is disabled */ kPORT_PassiveFilterDisable, /* Open drain output is disabled */ kPORT_OpenDrainDisable, /* Low drive strength is configured */ kPORT_LowDriveStrength, /* Pin is configured as PIO0_10 */ kPORT_MuxAlt0, /* Digital input enabled */ kPORT_InputBufferEnable, /* Digital input is not inverted */ kPORT_InputNormal, /* Pin Control Register fields [15:0] are not locked */ kPORT_UnlockRegister}; /* PORT0_10 (pin B12) is configured as PIO0_10 */ PORT_SetPinConfig(PORT0, 19U, &port0_19_config); const port_pin_config_t port1_0_config = { kPORT_PullDisable, kPORT_LowPullResistor, kPORT_FastSlewRate, kPORT_PassiveFilterDisable, kPORT_OpenDrainDisable, kPORT_LowDriveStrength, /* Pin is configured as PIO0_10 */ kPORT_MuxAlt0, kPORT_InputBufferEnable, kPORT_InputNormal, kPORT_UnlockRegister}; /* PORT0_10 (pin B12) is configured as PIO0_10 */ PORT_SetPinConfig(PORT1, 0U, &port1_0_config); const port_pin_config_t port1_1_config = { kPORT_PullDisable, kPORT_LowPullResistor, kPORT_FastSlewRate, kPORT_PassiveFilterDisable, kPORT_OpenDrainDisable, kPORT_LowDriveStrength, /* Pin is configured as PIO0_10 */ kPORT_MuxAlt0, kPORT_InputBufferEnable, kPORT_InputNormal, kPORT_UnlockRegister}; /* PORT0_10 (pin B12) is configured as PIO0_10 */ PORT_SetPinConfig(PORT1, 1U, &port1_1_config); const port_pin_config_t port0_31_pinB12_config = { kPORT_PullDown, kPORT_LowPullResistor, kPORT_FastSlewRate, kPORT_PassiveFilterDisable, kPORT_OpenDrainDisable, kPORT_LowDriveStrength, /* Pin is configured as PIO0_10 */ kPORT_MuxAlt0, kPORT_InputBufferEnable, kPORT_InputNormal, kPORT_UnlockRegister}; /* PORT0_10 (pin B12) is configured as PIO0_10 */ PORT_SetPinConfig(PORT0, 31U, &port0_31_pinB12_config); const port_pin_config_t port0_28_config = { kPORT_PullDisable, kPORT_LowPullResistor, kPORT_FastSlewRate, kPORT_PassiveFilterDisable, kPORT_OpenDrainDisable, kPORT_LowDriveStrength, /* Pin is configured as PIO0_6 */ kPORT_MuxAlt0, kPORT_InputBufferEnable, kPORT_InputNormal, kPORT_UnlockRegister}; /* PORT0_6 (pin C14) is configured as PIO0_6 */ PORT_SetPinConfig(PORT0, 28U, &port0_28_config); const port_pin_config_t port0_2_pinB16_config = { .pullSelect = kPORT_PullDisable, .pullValueSelect = kPORT_LowPullResistor, .slewRate = kPORT_FastSlewRate, .passiveFilterEnable = kPORT_PassiveFilterDisable, .openDrainEnable = kPORT_OpenDrainDisable, .driveStrength = kPORT_HighDriveStrength, /* Pin is configured as SWO */ .mux = kPORT_MuxAlt1, .inputBuffer = kPORT_InputBufferEnable, .invertInput = kPORT_InputNormal, .lockRegister = kPORT_UnlockRegister}; /* PORT0_2 (pin B16) is configured as SWO */ PORT_SetPinConfig(PORT0, 2U, &port0_2_pinB16_config); const port_pin_config_t port1_8_pinA1_config = { .pullSelect = kPORT_PullUp, .pullValueSelect = kPORT_LowPullResistor, .slewRate = kPORT_FastSlewRate, .passiveFilterEnable = kPORT_PassiveFilterDisable, .openDrainEnable = kPORT_OpenDrainDisable, .driveStrength = kPORT_LowDriveStrength, /* Pin is configured as FC4_P0 */ .mux = kPORT_MuxAlt2, .inputBuffer = kPORT_InputBufferEnable, .invertInput = kPORT_InputNormal, .lockRegister = kPORT_UnlockRegister}; /* PORT1_8 (pin A1) is configured as FC4_P0 */ PORT_SetPinConfig(PORT1, 8U, &port1_8_pinA1_config); const port_pin_config_t port1_9_pinB1_config = { .pullSelect = kPORT_PullDisable, .pullValueSelect = kPORT_LowPullResistor, .slewRate = kPORT_FastSlewRate, .passiveFilterEnable = kPORT_PassiveFilterDisable, .openDrainEnable = kPORT_OpenDrainDisable, .driveStrength = kPORT_LowDriveStrength, /* Pin is configured as FC4_P1 */ .mux = kPORT_MuxAlt2, .inputBuffer = kPORT_InputBufferEnable, .invertInput = kPORT_InputNormal, .lockRegister = kPORT_UnlockRegister}; /* PORT1_9 (pin B1) is configured as FC4_P1 */ PORT_SetPinConfig(PORT1, 9U, &port1_9_pinB1_config); } At the same time, add the following includes to the file: Spoiler (Highlight to read) #include "fsl_common.h" #include "fsl_port.h" #include "board.h" #include "clock_config.h" #include "pin_mux.h" #include "fsl_common.h" #include "fsl_port.h" #include "board.h" #include "clock_config.h" #include "pin_mux.h" Adding include paths Since we are including header files into the project, we must specify which directories to search in order to find the required files. To do this: 1. Open project properties (right-click on project > Properties). 2.Click on the drop menu “C/C++ Build”, then “Settings”. 3.Click on “Includes” option. 4.Click on the “Add..” button at the top right corner of the “Include paths (-l)” menu. 5. Click on “Workspace…” 6. Add the following highlighted directories from FRDM-MCXN project: 7. Accept the changes and click on “Apply and Close”. Add “root folder” to source location 1.Open project properties. 2. Click on the drop menu “C/C++ General”, then “Paths and Symbols”. 3. Click on the “Source Location” tab. 4.Click on “Add Folder…” and add the “ ”. Delete phOsal files We must delete from the path “phOsal > src > NullOs > portable” the files: “phOsal_Port_CM3.c”,“phOsal_Port_PN76xx.c” and “phOsal_Port_PN74xxxx.c”. This has the purpose of avoiding any multiple definition errors when compiling the final project. Add _DSB and _ISB support As final modification step, please include in NxpNfcRdLib->comps->phhalHw->src->PN5190-> phhalHw_Pn5190_Int.c the  “cmsis_gcc.h” to support of _DSB and _ISB functions. Testing Final Project Without OS After making all the previous changes and modifications, the migration is now complete, and we can proceed to compile and flash the example to MCXN947. Please “clean” the project before building by right clicking on the project as follows: To run the project, we will need a serial terminal like Tera Term with the following settings: - 115200 baud rate. - 8 data bits. - No parity. - One stop bit, - No flow control. Once the program is flashed and the serial terminal configured, we can reset the board and power the PNEV5190BP. You should see an output similar to the following: Now if any NFC tag is close to the PNEV5190BP’s antenna, you should see the information displayed as shown in the image below: Adding FreeRTOS support This section presents the steps to follow to add FreeRTOS support to the current project with the possibility of easily choosing either to have OS support or not. 1. Open the “Manage SDK Components” in properties->SDK Management. 2. Search the FreeRTOS kernel component (NXP integration layer), heap 4 and add it to your project. Note: If this option does not appear, you will have to download the SDK with the FreeRTOS stack included. Adding porting-specific files to FreeRTOS folder We need to set the core-specific files which define core register addresses and the assembly instructions that integrate the FreeRTOS kernel functions. The core integrating the MCXN947 IC is the Cortex M33 with Trust Zone, therefore, the folder that we will use to add the port files will be from the folder “ARM_CM33_NTZ” as explained below: 1. Import the SDK example called “freertos_hello_cm33_core0”: 2. Inside this example, you will see the folder “GCC” from the path freertos>freertoskernel>portable>GCC, please copy and paste this folder into the same path of the project. Adding port-specific created folder to include path. Now we need to tell the compiler where to find the port-specific files we just added to the project, to accomplish this: 1. Open the project properties (right-click on project > Properties) and click on “C/C++ General” and on “Paths and symbols”. 2. Here we will click on “Add…” and then “Workspace”. In the new tab we will search the last folder of the path we created (freertos/freertoskernel/portable/GCC/ARM_CM33_NTZ/non-secure), select it and click on “OK” 3. Repeat this step in project > Properties > “C/C++ Build” >Settings >“Includes”. Changing OS preprocessor macro Finally, we just need to tell the compiler that we want to run the example with FreeRTOS, to do this: 1. Open the project properties (right-click on project > Properties) and click on “C/C++ Build”, then on “Settings” and on “Preprocessor”. 2. Now find the previous macro named “PH_OSAL_NULLOS”, double click on it and change it to “PH_OSAL_FREERTOS” 3. Click on “Apply and Close” and click on “Rebuild Index”. 4. To avoid multiple definition issues when we change between NULLOS and FREERTOS, we will discard the SysTickHandler for FREERTOS side located in port.c when the NULLOS macro is defined, as shown the following image: Spoiler (Highlight to read) #ifndef PH_OSAL_NULLOS void SysTick_Handler( void ) /* PRIVILEGED_FUNCTION */ { uint32_t ulPreviousMask; ulPreviousMask = portSET_INTERRUPT_MASK_FROM_ISR(); traceISR_ENTER(); { /* Increment the RTOS tick. */ if( xTaskIncrementTick() != pdFALSE ) { traceISR_EXIT_TO_SCHEDULER(); /* Pend a context switch. */ portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT; } else { traceISR_EXIT(); } } portCLEAR_INTERRUPT_MASK_FROM_ISR( ulPreviousMask ); } #endif #ifndef PH_OSAL_NULLOS void SysTick_Handler( void ) /* PRIVILEGED_FUNCTION */ { uint32_t ulPreviousMask; ulPreviousMask = portSET_INTERRUPT_MASK_FROM_ISR(); traceISR_ENTER(); { /* Increment the RTOS tick. */ if( xTaskIncrementTick() != pdFALSE ) { traceISR_EXIT_TO_SCHEDULER(); /* Pend a context switch. */ portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT; } else { traceISR_EXIT(); } } portCLEAR_INTERRUPT_MASK_FROM_ISR( ulPreviousMask ); } #endif 5. Finally, copy and paste the FreeRTOSConfig_Gen.h, FreeRTOSConfig.h and freertos_tasks_c_additions.h files from the freertos_hello example as shown the following image: Now you are able to build and debug following the chapter Testing Final Project Without OS but now with FreeRTOS. NFC Reader Library
記事全体を表示
Kinara ARA-SDK 许可 恩智浦团队(以及所有熟悉 Ara-2 / Kinara 工具的人员)你们好、 我想了解为 Ara-2 (Kinara) 计算模块编译模型的正确许可/访问路径,尤其是现在 Kinara 已被恩智浦收购,而且恩智浦的公开资料描述了 SDK 与恩智浦软件生态系统的集成。 我的设置/目标 硬件Geniatech Ara-2 计算模块 SDK:Geniatech 提供的 Kinara Ara-2 SDK r1.3 使用情况:个人、非商业(研究/学习/测试) 模型目标:Qwen/Qwen2.5-7B-Instruct (GPTQ Int4) 目前有效的方法 我可以完成模式 1 流程,将模型转换为 ONNX。 我的结局是 model.onnx(小图形文件) 同一目录下的 model.onnx.data(大型外部张量数据/权重)。 什么失败了 模式 2(生成可部署 .dvm 的编译阶段)因 SDK 版本工具中的许可证签出/验证错误而失败。 据我所知,这将阻止生成 .dvm即使 ONNX 导出成功。 我的困惑 我没有 Kinara 许可证密钥。 Geniatech 的文档指出,必须通过 Kinara 获取 SDK 许可证密钥。 Kinara客户支持门户网站似乎拒绝使用常见的个人电子邮件功能域(例如gmail.com)进行注册,所以我无法在那里提交申请。 我为什么要在这里提问(恩智浦/Kinara 集成混淆) ,恩智浦的公开资料显示,Kinara 的 SDK 和模型工具正在集成到恩智浦的生态系统(包括 eIQ)中,Ara-2 现在作为恩智浦的产品提供,并提供相关的 "Ara 软件开发包 "下载。 然而,在实践中,这一点并不明确: 开发人员应在其中获取用于编译的许可证密钥,以及 现在是否支持 "Ara SDK / eIQ 集成 "路径。 问题 编译 ONNX → .dvm 是否需要许可证密钥使用 Ara-2 SDK 工具链(r1.3 / ARA-SDK),甚至用于个人/非商业用途? 如果是,个人/业余爱好者用户获得评估/开发者访问权限(尤其是在没有公司电子邮件域的情况下)的官方流程是什么? 有了现有的恩智浦账户,Ara-2 用户应该从哪里获取: “官方” Ara SDK 二进制文件/工具链(编译器),和/或 编译所需的许可机制? 如果编译需要许可证密钥,而许可证密钥又不容易获得,那么是否有任何预编译的 .dvm模型软件包(例如,用于 Qwen 7B/Qwen2.5恩智浦/Kinara/合作伙伴提供给 Ara-2 用户运行的 7B)? 如果恩智浦/Kinara 的相关人员能说明计划的路径(恩智浦门户网站与传统 Kinara 门户网站的对比,以及现在如何处理许可问题),那将大有帮助。 Re: Kinara ARA-SDK Licensing 我也有同样的问题!我拿到了设备,驱动程序。但没有 SDK,我猜也没有许可证(如果需要的话)。该设备只是静默地坐在我的联想 ThinkCentre Ultra neo 电脑里什么也没做。联想从未将其整合到 Windows 11 作为 NPU。我想至少用它来运行一些模型或进行学习。现在,它已经成为我电脑中一块完全闲置的硅片。我想,如果有更多的人开始使用这项技术,将有助于技术的普及。 Re: Kinara ARA-SDK Licensing @kratafila在我通过 Geniatech 获得 Linux SDK 软件包之前,我的硅片基本上也是闲置的。老实说,它仍然是未使用的硅,因为我无法让模型编译和运行。 值得一提的是,Geniatech(我的 Kinara Ara-2 M.2 模块的供应商)与我分享了这些 SDK/runtime 下载。它们以 Linux 为重点,我不确定它们是否适用于你的 ThinkCentre 中的 Ara-2 硬件(或者在 Windows 11 上提供帮助,里面有 Windows 二进制文件,但我在 Linux 软件方面取得了更大的成功),但是如果你能在 Linux 下测试/确认你的设备能正常运行,它们可能仍然有用: 1) 驱动程序/运行时间 + .dvm 示例型号(Geniatech"客户就绪" 捆绑): hxxps://mega[.]nz/file/nJcF0K5a#W-Ote-fp59hXoq4T0GGsaQmwGTRphWz0JATowyWjQpg 2) " 模型编译 " 文件夹 Geniatech 最初寄给我(注意:仅此一项就不包括编译器二进制文件): hxxps://mega[.]nz/file/KoclFQrJ#ifNOX7w2Y1qgLM6rnm7xPnUprwZZqhuRvelFG5p0MJQ 3) Geniatech 随后提供的完整 Ara-2 SDK 压缩包(此压缩包应包含实际的工具链/编译器,例如dvrun): hxxps: //文件 [.] geniatech [.] com/down-eng/bsp/kinara_sdk_20251120 [.] tar [.] bz2 如果你尝试了上述任何一种方法并取得了进展(即使只是安装了SDK并看到设备被识别),请在这里发回去,这不仅是为了我们,也是因为多个社区似乎对于 " 官方 " 的工作路径、SDK/许可的实际来源以及如何编译和运行其他模型存在更广泛的困惑。
記事全体を表示
S32DS FOR ARM cannot be downloaded. S32DS software download is rejected, want to know the specific reasons and ways to deal with, I am a personal user without a company, the development board is the network to buy learning to use. The web page prompts the following: Our records indicate that you have previously requested an Evaluation version for this product. If you would like to purchase the full product please visit us at NXP or contact your sales representative . Note If you would like to extend your evaluation period please open a If you would like to extend your evaluation period please open a Service Request . Disabled creation of service requests Since we are unable to associate your email address with a company, you are not eligible to create a new service request on the Service Request Portal page. Please use your company email address to log in to the NXP website and submit a service request or submit your question via the NXP Technical Forum.   Re: S32DS FOR ARM 无法下载 Hi,  which version of S32DS do you like to download? 
記事全体を表示