Multi Source Translation Content

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

Multi Source Translation Content

ディスカッション

ソート順:
关于 MPU s32k144 的问题 我有一个关于 MPU 的问题。在有关 MPU 的 S32K144 演示中,按下按钮后另一个指示灯将亮起,然后端口 0 的错误寄存器将捕获错误信息。我的问题是为什么端口 2 的错误寄存器也会捕获这些信息。我访问的地址不是 FLASH 地址吗?为什么 SRAM_L 的这个端口会出现这种错误? Re: A Question about MPU s32k144 是的,这是 MPU 演示中的预期行为。按下按钮会触发信号访问违规,该违规记录在错误寄存器中,并由第二个 LED 指示。 Re: A Question about MPU s32k144 /* * 版权所有 2020 NXP * 保留所有权利。 * * 恩智浦机密。本软件由恩智浦所有或控制,只能 * 严格按照适用的许可条款使用。通过明确 * 接受此类条款,或通过下载、安装、激活和/或以其他方式 * 使用本软件,即表示您已阅读并同意 * 遵守此类许可条款,并受其约束。如果您不同意接受 * 适用许可条款的约束,则不得保留、安装、 * 激活或以其他方式使用本软件。本软件明确授予 * 第 2.3 节中的生产使用许可。 */ /* ################################################################### ** Filename : main.c ** Project : mpu_memory_protection_s32k144 ** Processor : s32k144 ** Abstract : ** Main module. ** This module contains user's application code. ** Settings : ** Contents : ** No public methods ** ** ###################################################################*/ /*! ** @file main.c ** @brief ** 主要模块。 ** 该模块包含用户的应用程序代码。 */ /*! ** @addtogroup main_module main 模块文档 ** @{ */ /* MODULE main */ /* 包括必要的配置文件。*/ #include"sdk_project_config.h" volatile int exit_code = 0; /* 用户包括 */ /* 本示例默认情况下与 EVB 一起工作。要将其与其他板一起使用, 请注释以下行 */ #define EVB #ifdef EVB #define ON 0U /* LED ON */ #define OFF 1U /* LED OFF */ #define LED_GPIO PTD /* LED GPIO 类型 */ #define LED_RED 15U /* 引脚 PTD15 - DEV- KIT 上的 LED RGB */ #define LED_GREEN 16U /* 引脚 PTD16 - DEV-KIT 上的 LED RGB */ #define SW_GPIO PTC /* SW GPIO 类型 */KIT */ #define LED_GREEN 16U /* 引脚 PTD16 - DEV-KIT 上的 LED RGB */ #define SW_GPIO PTC /* SW GPIO 类型 */ #define SW 12U /* 引脚 PTC12 - DEV- 上的 SW2_BTN0 */ #else define LED_GREEN 16U /* 引脚 PTD16 - DEV-KIT 上的 LED RGBKIT */ #else #define ON 0U /* LED ON */ #define OFF 1U /* LED OFF */ #define LED_GPIO PTC /* LED GPIO 类型 */ #define LED_RED 0U /* 引脚 PTC0 - 主板上的 LED0 */ #define SW 12U /* 引脚 PTC12 - DEV- 上的 SW2_BTN0主板上的 LED0 */ #define LED_GREEN 1U /* 针 PTC1 - 主板上的 LED1 */ #define SW_GPIO PTC /* SW GPIO 类型 */ #define SW 12U /* 针 PTC12 - 主板上的 SW2_BTN0 */ #endif /* 闪存中受保护的地址 */ #define ADDRESS_PROTECT 0x0007FF04U /*! \brief 项目的主函数。 \启动初始化顺序如下: * - 启动 asm 例程 * - main() */ /* 预期错误 */ mpu_access_err_info_t expectedError = { .master= FEATURE_MPU_MASTER_CORE, /* Error Core master */ .attributes= MPU_DATA_ACCESS_IN_SUPERVISOR_MODE, /* 监督模式下的错误数据访问 */ .accessType= MPU_ERR_TYPE_READ, /* 读访问出错 */ .accessCtr= 0xA000U, /* 错误发生在区域 0 和区域 2 */ .addr= ADDRESS_PROTECT, /* 错误地址 */ #if FEATURE_MPU_HAS_PROCESS_IDENTIFIER .processorIdentification= 0U /* 错误处理器标识符 */ #endif }; /*! * @brief 错误比较器 * * @Param [输入] error1 错误访问。 *@Param[in] error2 错误访问。 * @return Status * - true : 错误相同。 * - 错误:错误是不同的。 */ bool ErrorCompare(mpu_access_err_info_t error1, mpu_access_err_info_t error2) { bool status = false; 如果 ((error1.master == error2.master) && (error1.attributes == error2.attributes) && (error1.accessType == error2.accessType) && (error1.accessCtr == error2.accessCtr) && (error1.addr == error2.addr)) { status = true; #if FEATURE_MPU_HAS_PROCESS_IDENTIFIER if(error1.processorIdentification)!= error2.processorIdentification) { status = false; } #endif } return status; } /* HardFault 处理程序 */ void HardFault_Handler(void) { /* 启用区域 3 以授予 Core 读取权限 */ MPU_DRV_EnableRegion(MPU_INST, 3U, true); } /*! \brief 项目的主要功能。 \启动初始化序列如下: * - 启动 asm 例程 * - main() */ int main(void) { /* 在此写入本地变量定义 */ bool status = false; uint32_t switchStatus = 0; status_t returnCode = STATUS_ERROR; volatile uint32_t test = 0U; mpu_access_err_info_t reportedError; /* Arm 禁用调试异常和监测控制寄存器 */ *(uint32_t *)0xE000EDFC = 0x1000000; /* 初始化时钟模块 */ CLOCK_SYS_Init(g_clockManConfigsArr, CLOCK_MANAGER_CONFIG_CNT, g_clockManCallbacksArr, CLOCK_MANAGER_CALLBACK_CNT); CLOCK_SYS_UpdateConfiguration(0U, CLOCK_MANAGER_POLICY_AGREEMENT); /* 初始化 LED 和按钮配置 */ PINS_DRV_Init(NUM_OF_CONFIGURED_PINS0,g_pin_mux_InitConfigArr0); /* LED 关闭 */ PINS_DRV_WritePin(LED_GPIO,LED_RED,OFF); PINS_DRV_WritePin(LED_GPIO,LED_GREEN,OFF); /* 检查按钮的初始状态 */ switchStatus = PINS_DRV_ReadPins(SW_GPIO)& (1U<< SW); /* 初始化 MPU 模块 */ returnCode = MPU_DRV_Init(MPU_INST,MPU_NUM_OF_REGION_CFG0,MPU_Cfg0); /* 检查初始化 */ if (returnCode == STATUS_SUCCESS) { /* 打开 LED_GREEN */ PINS_DRV_WritePin(LED_GPIO, LED_GREEN, ON); } /* 无限循环 */ for(;;) { /* 检查按钮 */ if (switchStatus != (PINS_DRV_ReadPins(SW_GPIO)& (1U<< SW))) { /* 禁用区域 3 以忽略 Core 读取权限 */ MPU_DRV_EnableRegion(MPU_INST, 3U, false); } /* 读取闪存中受 MPU 保护的地址 */ test = *((uint32_t *)ADDRESS_PROTECT); /* 转为 void 以避免"设置但未使用的警告" */ (void)test; /* 获取从端口 0 的错误访问详情 */ status = MPU_DRV_GetDetailErrorAccessInfo(MPU_INST,FEATURE_MPU_SLAVE_FLASH_BOOTROM,&reportedError); /* 检查错误状态 */ if (status) { /* 与预期错误比较 */ status = ErrorCompare(reportedError, expectedError); /* 如果为 true */ if (status) { /* 打开 LED_RED,关闭 LED_GREEN */ PINS_DRV_WritePin(LED_GPIO, LED_RED, ON); PINS_DRV_WritePin(LED_GPIO, LED_GREEN, OFF); break; } } } for(;;) { if(exit_code != 0) { break; } } return exit_code; } /* END MAIN */ /*! ** @} */ 这是 S32K144 官方示例中的程序。上面的屏幕截图显示了寄存器,EAR0 和 EAR3 都捕获了这个错误 Re: A Question about MPU s32k144 您能具体说明所用的示例代码并澄清一下问题吗?谢谢
記事全体を表示
imx8mp uart3/uart4はWIFIに接続した後、データの受信を停止します こんにちは、 デバイスのペリフェラルは下図の通りです。デバイスの電源を入れると、自動的にWi-Fiに接続し、モジュールA/Bとの通信を確立します。しかし、しばらく実行すると、QtアプリケーションプログラムはUART3/4経由でモジュールA/Bからデータを受信できなくなります。ただし、モジュールA/Bへのデータの送信はCANです。Wi-Fi接続は正常に動作しています。この問題が発生した場合、Qtアプリケーションを強制終了して再起動すると、通信が回復します。カーネルバージョンは5.10.9です。この原因は何でしょうか?また、どのようにトラブルシューティングして問題を解決すればよいでしょうか?よろしくお願いいたします。 [59040.102671]RTW: rtw_get_sta_tx_stat() はサポートされていません [59043.023763]RTW: rtw_get_sta_tx_stat() はサポートされていません [59046.024329]RTW: rtw_get_sta_tx_stat() はサポートされていません [59047.866380]------------[ここでカット]------------ [59047.871251]警告: CPU: 0 PID: 80234 at /ホーム/Linuxpc/Linux_opt/imx8mp_yocto/rtl8852BS/os_dep/Linux/sdio_ops_Linux.c:580 rtw_sdio_raw_read+0x1c4/0x2cc [8852bs] [59047.885678] リンクされているモジュール: iio_trig_hrtimer 8852bs(O) imx8_media_dev(C) cfg80211 st_accel_i2c st_sensors_i2c st_accel st_sensors ltr501 industrialio_triggered_buffer kfifo_buf ti_dac082s085 ch9434 ilitek_i2c snd_soc_tas5720 accel_gpio_irq cdc_ether usbnet ch343 [59047.909176]CPU: 0 PID: 80234 通信: kworker/0:1 汚染: G WC O 5.10.9-1.0.0+gc78c36e29 #1 [59047.918479]ハードウェア名: MYIR i.MX8MP BASE ファルコンモード (DT) [59047.924229]ワークキュー: イベント情報 sdio_irq_work [59047.928413]pstate: 40000005 (nZcv daif -PAN -UAO -TCO BTYPE=--) [59047.934655]pc : rtw_sdio_raw_read+0x1c4/0x2cc [8852bs] [59047.940096]lr : rtw_sdio_raw_read+0x1bc/0x2cc [8852bs] [59047.945319]sp : ffff80002adbbb50 [59047.948631]x29: ffff80002adbbb50 x28: 0000000000000000 [59047.953943]x27: 0000000000000000 x26: 0000000000000000 [59047.959254]x25: ffff0000c9d60000 x24: 0000000000000000 [59047.964566]x23: ffff0000c8782000 x22: 0000000000001f00 [59047.969877]x21: ffff0000c096dc00 x20: ffff0000c9d60000 [59047.975188]x19: 0000000000000400 x18: 0000000000000000 [59047.980499]x17: 0000000000000000 x16: 0000000000000000 [59047.985810]x15: 00000112000b9e70 x14: 0000000000000000 [59047.991121]x13: 0000000000000000 x12: 0000000000000000 [59047.996435]x11: 0000000000000000 x10: 0000000000000000 [59048.001745]x9 : 00000000000000000 x8 : 00000000000000080 [59048.007056]x7 : 0000000000000007f x6 : 0000000000000003d [59048.012369]x5 : ffff0000ff13f000 x4 : 00000000000005f00 [59048.017681]x3 : 0000000000005f80 x2 : 0000000000000000 [59048.022992]x1 : 0000000000002300 x0 : 00000000ffffffac [59048.028305]通話履歴: [59048.030985]rtw_sdio_raw_read+0x1c4/0x2cc [8852bs] [59048.036085]sdio_io+0x198/0x31c [8852bs] [59048.038236]tas5720 2-006c: FAULTレジスタの読み取りに失敗しました: -110 [59048.040311]rtw_sdio_read_cmd53+0x18/0x24 [8852bs] [59048.051150]rtw_hal_mac_sdio_rx+0x70/0xe8 [8852bs] [59048.056366]rtw_hal_sdio_rx+0x14/0x20 [8852bs] [59048.061275]phl_recv_rxfifo_sdio+0x64/0x98 [8852bs] [59048.066459]rtw_phl_interrupt_handler+0x58/0x198 [8852bs] [59048.072161]sd_sync_int_hdl+0x40/0x5c [8852bs] [59048.076694]プロセス_sdio_pending_irqs+0x60/0x1b0 [59048.081397]sdio_irq_work+0x4c/0x80 [59048.084972]プロセス_one_work+0x1cc/0x350 [59048.088981]ワーカースレッド+0x13c/0x470 [59048.092728]kスレッド+0x154/0x160 [59048.095955]ret_from_fork+0x10/0x30 [59048.099529]---[ トレース終了 1b34001a5e7a0146 ]--- [59048.104821]rtl8852bs mmc0:0001:1: rtw_sdio_raw_read: sdio読み取り失敗 (-84) [59048.112561]rtl8852bs mmc0:0001:1: RTW_SDIO: READ 使用 CMD53 [59048.119384]rtl8852bs mmc0:0001:1: RTW_SDIO: 0x01f00から1024バイト読み取り [59048.126811]RTW_SDIO: 読み取り 00000000: 13 02 20 80 52 00 06 10 4d 9c d9 be 04 00 20 00 [59048.135777]RTW_SDIO: 読み取り 00000010: 16 00 a6 06 02 00 00 10 28 f5 2b 99 16 14 06 00 [59048.144064]RTW: エラー sdio_io: 読み取り失敗! エラー(-2) アドレス=0x01f00 1024 バイト、再試行=0,0 [59048.153312]RTW: 警告 sdio_io: 再試行読み取りアドレス=0x01f00 1024 バイト、再試行=1,1 [59048.188477]RTW: sdio_io: 再試行読み取りOK! addr=0x01f00 1024バイト、再試行=1,1 [59048.195471]RTW: データ: [59048.197953]到着時刻: F5 01 20 80 62 00 06 10 00 9E D9 BE 04 00 20 00 [59048.205125]RTW: 06 00 A7 06 02 00 00 10 28 F5 2B 99 16 14 06 00 [59048.212286]到着時刻: 08 42 00 00 01 00 5E 7F FF FA 84 65 69 89 34 80 [59048.219903]RTW: 54 F2 9F 73 92 28 70 6A 0A 2A C6 60 0E 00 00 00 [59048.226884]RTW: AA AA 03 00 00 00 08 00 45 00 01 BD B9 A7 40 00 [59048.234619]RTW: 04 11 FE 1F AC 1F 21 4F EF FF FF FA 69 AF 07 6C [59048.241581]RTW: 01 A9 8D A4 4E 4F 54 49 46 59 20 2A 20 48 54 54 [59048.249276]RTW: 50 2F 31 2E 31 0D 0A 48 4F 53 54 3A 20 32 33 39 [59048.256437]RTW: 2E 32 35 35 2E 32 35 35 2E 32 35 30 3A 31 39 30 [59048.264191]到着時刻: 30 0D 0A 43 41 43 48 45 2D 43 4F 4E 54 52 4F 4C [59048.271272]RTW: 3A 20 6D 61 78 2D 61 67 65 3D 36 36 0D 0A 4C 4F [59048.279033]RTW: 43 41 54 49 4F 4E 3A 20 68 74 74 70 3A 2F 2F 31 [59048.286293]RTW: 37 32 2E 33 31 2E 33 33 2E 37 39 3A 34 39 31 35 [59048.293366]RTW: 32 2F 64 65 73 63 72 69 70 74 69 6F 6E 2E 78 6D [59048.300946]RTW: 6C 0D 0A 4F 50 54 3A 20 22 68 74 74 70 3A 2F 2F [59048.308553]RTW: 73 63 68 65 6D 61 73 2E 75 70 6E 70 2E 6F 72 67 [59048.315681]往復: 2F 75 70 6E 70 2F 31 2F 30 2F 22 3B 20 6E 73 3D [59048.322743]RTW: 30 31 0D 0A 30 31 2D 4E 4C 53 3A 20 30 34 34 30 [59048.330318]往復: 31 34 62 30 2D 31 64 64 32 2D 31 31 62 32 2D 39 [59048.337345]到着予定時刻: 39 31 62 2D 66 35 31 33 37 36 31 32 61 36 66 33 [59048.344868]RTW: 0D 0A 4E 54 3A 20 75 72 6E 3A 6D 69 2D 63 6F 6D [59048.351895]RTW: 3A 73 65 72 76 69 63 65 3A 52 43 6F 6E 74 72 6F [59048.359480]RTW: 6C 6C 65 72 3A 31 0D 0A 4E 54 53 3A 20 73 73 64 [59048.366605]RTW: 70 3A 61 6C 69 76 65 0D 0A 53 45 52 56 45 52 3A [59048.373766]到着時間: 20 4C 69 6E 75 78 2F 34 2E 39 2E 31 31 33 20 48 [59048.380785]RTW: 54 54 50 2F 31 2E 30 0D 0A 58 2D 55 73 65 72 2D [59048.388333]RTW: 41 67 65 6E 74 3A 20 72 65 64 73 6F 6E 69 63 0D [59048.395367]RTW: 0A 55 53 4E 3A 20 75 75 69 64 3A 37 35 39 36 34 [59048.403003]到着予定時刻: 38 61 35 2D 36 30 33 64 2D 34 33 39 66 2D 61 61 [59048.410107]RTW: 62 31 2D 34 63 61 35 66 37 62 33 62 65 38 63 3A [59048.417850]RTW: 3A 75 72 6E 3A 6D 69 2D 63 6F 6D 3A 73 65 72 76 [59048.424847]RTW: 69 63 65 3A 52 43 6F 6E 74 72 6F 6C 6C 65 72 3A [59048.432460]RTW: 31 0D 0A 0D 0A 75 1B 2D 33 69 FF 92 1E 6D 7E 43 [59048.439480]RTW: 5B 41 AF DA 59 00 01 00 C0 00 80 01 62 00 06 00 [59048.447042]到着時刻: 00 00 00 00 01 00 20 00 01 00 F5 31 1F 00 01 00 [59048.454573]到着時刻: 03 00 00 00 00 00 00 00 8B 43 D9 12 08 00 00 00 [59048.461738]到着時刻: 00 00 00 00 29 12 B5 01 F9 0A 44 00 58 06 65 00 [59048.468786]RTW: 68 0C 12 00 00 00 00 00 00 00 2E 00 A6 0F E8 03 [59048.476332]RTW: 54 2A 93 08 00 00 00 00 00 00 00 00 00 00 00 00 [59048.483442]到着時刻: 00 00 00 00 00 00 EF 10 00 00 00 00 1F 2A 8E 5F [59048.491079]到着時間: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [59048.498224]到着: 00 00 00 00 00 00 00 00 02 00 00 00 AA 3E 02 00 [59048.505903]RTW: 8C 09 00 82 82 83 00 00 01 84 2A 34 35 08 90 00 [59048.513069]到着時刻: 2A 78 6D 09 05 FE FF FF 00 00 00 00 00 25 C0 5F [59048.520627]到着時刻: 00 00 00 00 00 00 00 00 49 D5 07 00 00 00 00 00 [59048.527746]RTW: 38 B1 DF AE DF 00 FC E7 D4 F7 F9 F3 E4 F7 F7 BA [59048.535373]到着時刻: 32 A0 A0 A0 A0 01 00 00 00 00 00 00 00 00 00 00 [59048.542504]到着時間: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [59048.550149]到着時間: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [59048.558420]到着時間: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [59048.565434]到着時間: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [59048.573175]到着時間: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [59048.580164]到着時間: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [59048.587831]到着時間: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [59048.594861]到着時間: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [59048.602530]到着時間: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [59048.609619]到着時間: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [59048.616821]到着時間: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [59048.624497]到着時間: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [59048.631565]到着時間: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [59048.638669]到着時間: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [59048.645707]到着時間: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [59048.652872]到着時間: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [59048.659914]到着時間: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [59049.048296]RTW: rtw_get_sta_tx_stat() はサポートされていません [59052.025201]RTW: rtw_get_sta_tx_stat() はサポートされていません [59055.097082]RTW: rtw_get_sta_tx_stat() はサポートされていません [59058.024508]RTW: rtw_get_sta_tx_stat() はサポートされていません [59061.025913]RTW: rtw_get_sta_tx_stat() はサポートされていません [59064.046703]RTW: rtw_get_sta_tx_stat() はサポートされていません [59067.027795]RTW: rtw_get_sta_tx_stat() はサポートされていません [59070.100002]RTW: rtw_get_sta_tx_stat() はサポートされていません [59073.025578]RTW: rtw_get_sta_tx_stat() はサポートされていません [59076.027871]RTW: rtw_get_sta_tx_stat() はサポートされていません [59079.046137]RTW: rtw_get_sta_tx_stat() はサポートされていません [59082.024076]RTW: rtw_get_sta_tx_stat() はサポートされていません [59085.101821]RTW: rtw_get_sta_tx_stat() はサポートされていません [59088.026437]RTW: rtw_get_sta_tx_stat() はサポートされていません [59091.024759]RTW: rtw_get_sta_tx_stat() はサポートされていません [59094.046384]RTW: rtw_get_sta_tx_stat() はサポートされていません [59097.024395]RTW: rtw_get_sta_tx_stat() はサポートされていません [59100.099472]RTW: rtw_get_sta_tx_stat() はサポートされていません [59103.025388]RTW: rtw_get_sta_tx_stat() はサポートされていません [59106.025607]RTW: rtw_get_sta_tx_stat() はサポートされていません [59109.050832]RTW: rtw_get_sta_tx_stat() はサポートされていません [59112.025324]RTW: rtw_get_sta_tx_stat() はサポートされていません [59115.100097]RTW: rtw_get_sta_tx_stat() はサポートされていません [59118.028286]RTW: rtw_get_sta_tx_stat() はサポートされていません [59121.026007]RTW: rtw_get_sta_tx_stat() はサポートされていません [59124.048823]RTW: rtw_get_sta_tx_stat() はサポートされていません [59127.024156]RTW: rtw_get_sta_tx_stat() はサポートされていません [59130.101220]RTW: rtw_get_sta_tx_stat() はサポートされていません [59133.027155]RTW: rtw_get_sta_tx_stat() はサポートされていません [59136.024104]RTW: rtw_get_sta_tx_stat() はサポートされていません [59139.046445]RTW: rtw_get_sta_tx_stat() はサポートされていません [59142.023902]RTW: rtw_get_sta_tx_stat() はサポートされていません [59145.097767]RTW: rtw_get_sta_tx_stat() はサポートされていません [59148.024225]RTW: rtw_get_sta_tx_stat() はサポートされていません [59151.024542]RTW: rtw_get_sta_tx_stat() はサポートされていません [59154.046677]RTW: rtw_get_sta_tx_stat() はサポートされていません [59157.024188]RTW: rtw_get_sta_tx_stat() はサポートされていません [59160.100230]RTW: rtw_get_sta_tx_stat() はサポートされていません i.MX 8ファミリ | i.MX 8QuadMax (8QM) | 8QuadPlus i.MX 8M | i.MX 8M ミニ | i.MX 8M ナノ Re: imx8mp uart3/uart4 stop receive data after connect WIFI こんにちは@Manuel_Salas 以下は 1 つの UART コードですが、原因ではない可能性があります。WIFI を切断した後は発生しなかったためです。 シリアルポート情報 spInfo{"/dev/ttymxc3", 115200, QSerialPort::DataBits::Data8、 QSerialPort::Parity::NoParity、 QSerialPort::StopBits::OneStop}; m_transceiver = std::make_shared(spInfo); connect(m_serialPtr.get(), &QSerialPort::readyRead,this, &Transceiver::SlotRcvData, Qt::QueuedConnection);// データを取得 void トランシーバ::SlotRcvData() { // 受信收逻辑 QByteArray バッファ = m_serialPtr->readAll(); if (!buffer.isEmpty()) { for(const auto func : m_recvNoticeFuncs) { if (関数) { func(std::move(buffer)); //回调通知上層、上層データ帧受信} } } if ((DEBUG_PRINT_READ == 1 && m_serialPtr->portName() == DEBUG_PORT) || m_recvPrintFlag.load()) { QString printStr = QString("Len(%1) ").arg(buffer.count()); printStr += buffer.toHex(''); qDebug(uart) << QString(" %1-[% 2 受信] <<= %3").arg(QDateTime::currentDateTime().toMSecsSinceEpoch()).arg(m_serialPtr->portName()).arg(printStr); } } Re: imx8mp uart3/uart4 stop receive data after connect WIFI こんにちは、 可能であれば、シリアル通信を処理するコードを共有してください。(UART3とUART4のシリアル通信に関して) よろしくお願いいたします。 サラス。 Re: imx8mp uart3/uart4 stop receive data after connect WIFI こんにちは@Manuel_Salas さらに、QT アプリケーションでテストを実行すると、通信の中断を検出した後にシリアル ポートを再初期化すると、通信を復元できます。 Re: imx8mp uart3/uart4 stop receive data after connect WIFI こんにちは@Manuel_Salas UART3の場合: 3033_01E0 (IOMUXC_SW_MUX_CTL_PAD_ECSPI1_SCLK) 3033_01E4 (IOMUXC_SW_MUX_CTL_PAD_ECSPI1_MOSI) ./memtool-32 0x303301E0 2 構成は正しいようです。QT アプリケーションでフォーカスするにはどうすればよいでしょうか? アドレス0x303301E0から始まる0x2カウントの読み取り 0x303301E0: 00000001 00000001 UART4の場合: 3033_0238 (IOMUXC_SW_MUX_CTL_PAD_UART4_RXD) 3033_023C (IOMUXC_SW_MUX_CTL_PAD_UART4_TXD) ./memtool-32 0x30330238 2 アドレス0x30330238から始まる0x2カウントを読み取ります 0x30330238: 00000000 00000000 Re: imx8mp uart3/uart4 stop receive data after connect WIFI こんにちは、 以下のレジスタ(IOMUX)を参照します。 UART3の場合: 3033_01E0 (IOMUXC_SW_MUX_CTL_PAD_ECSPI1_SCLK) 3033_01E4 (IOMUXC_SW_MUX_CTL_PAD_ECSPI1_MOSI) UART4の場合: 3033_0238 (IOMUXC_SW_MUX_CTL_PAD_UART4_RXD) 3033_023C (IOMUXC_SW_MUX_CTL_PAD_UART4_TXD) この状況でそれらが変化する可能性は非常に低いですが、念のため確認したいのです。 問題が発生している間にそれらが正しい場合は、QT アプリケーションに焦点を当てる必要があります。 よろしくお願いいたします。 サラス。 Re: imx8mp uart3/uart4 stop receive data after connect WIFI こんにちは@Manuel_Salas 問題が発生したときに、スコープとロジック アナライザーを使用して UART3/4 TX/RX をキャプチャしました。信号とデータ解析は正しく、異常は検出されませんでした。 どの pinmux レジスターを CAN 読み取りますか?UART3/4 TX および RX ですか? それとも他の IO ですか? root@myd-jx8mp:/work/nfs/unit_tests# ./memtool-32 0x30330440 1 E アドレス0x30330440から始まる0x1カウントの読み取り 0x30330440: 00000140 root@myd-jx8mp:/work/nfs/unit_tests# ./memtool-32 0x30330444 1 E アドレス0x30330444から始まる0x1カウントを読み取ります 0x30330444: 00000140 root@myd-jx8mp:/work/nfs/unit_tests# ./memtool-32 0x30330498 1 E アドレス0x30330498から始まる0x1カウントの読み取り 0x30330498: 00000140 root@myd-jx8mp:/work/nfs/unit_tests# ./memtool-32 0x3033049C 1 E アドレス0x3033049Cから始まる0x1カウントの読み取り 0x3033049C: 00000140 root@myd-jx8mp:/work/nfs/unit_tests# cat /proc/tty/ドライバ/IMX-uart シリアル情報:1.0ドライバリビジョン: 0: uart:IMX mmio:0x30860000 irq:32 tx:49174 rx:4241 DSR|CD 1: uart:IMX mmio:0x30890000 irq:34 tx:227698 rx:78 RTS|DTR|DSR|CD 2: uart:IMX mmio:0x30880000 irq:33 tx:579 rx:417229256 brk:12 oe:287947352 RTS|DTR|DSR|CD 3: uart:IMX mmio:0x30A60000 irq:40 tx:279 rx:90046331 oe:62148529 RTS|DTR|DSR|CD Re: imx8mp uart3/uart4 stop receive data after connect WIFI こんにちは@dreamxjtu ファイルを共有していただきありがとうございます。 デバイス ツリーの不一致は見つかりませんでした。すべて正常に見えます。 この問題が発生した場合、スコープまたはロジック アナライザーを使用して UART 信号をキャプチャできますか? また、この問題が発生する場合は、memtool を使用して pinmux レジスタを読み取ってみてください。 よろしくお願いいたします。 サラス。 Re: imx8mp uart3/uart4 stop receive data after connect WIFI ファイルをご覧ください。ありがとうございます imx8mp-pinfunc.h、myd-jx8mp.dtsi、myd-jx8mp.dtsi、myd-jx8mp-atk-10.dts Re: imx8mp uart3/uart4 stop receive data after connect WIFI こんにちは、 添付のデバイスツリーは現在問題のあるデバイスのもので、LF5.10.9であることが確認されています。 Re: imx8mp uart3/uart4 stop receive data after connect WIFI こんにちは@dreamxjtu お元気でお過ごしのことと思います。 デバイスツリーを共有していただけますか? LF_5.10.9 (カーネル バージョン) を使用していることを確認します。 よろしくお願いいたします。 サラス。
記事全体を表示
在 i.MX 8QuadMax 上使用私钥,同时保持私钥不可导出(不透明)? 您好, iMX8QM 是否支持使用 CAAM 的非对称密钥,同时保持私钥不可导出? 有了对称密钥,我就可以把它持久地存储在一个黑色 blob 中,作为黑钥匙导入系统,然后用 dm-crypt 来使用它。所有这一切,内核或用户空间都无法访问密钥的明文版本。 我希望能做类似的事情,但使用非对称私钥,并使用该密钥进行解密/签名。 这可能吗,有人可以推荐我参考应用笔记或类似的吗? i.MX 8 系列 | i.MX 8QuadMax (8QM) | 8QuadPlus 安全 Re: Use private key on an i.MX 8QuadMax while keeping it non-exportable (opaque)? 您好, 在内部网络安全团队确认后,仅限 PKCS #11 + OPTEE。 此致 哈维 Re: Use private key on an i.MX 8QuadMax while keeping it non-exportable (opaque)? 嗨, ,我忘了说,如果可能的话,我们希望不必使用 OPTEE。 Regard, Christian Re: Use private key on an i.MX 8QuadMax while keeping it non-exportable (opaque)? 您好, 你正在使用哪个版本的电路板支持包? 您可以使用 OPTEE + PKCS#11。 此致 哈维
記事全体を表示
FXTH8715116T1 请告诉我哪些汽车品牌使用 FXTH8715116T1 芯片,该芯片在车辆中扮演什么角色,以及它如何与外围元器件相互作用。你能帮我解决这个问题吗?谢谢。   音频(PDM | I2S | SAI) Re: FXTH8715116T1 你好,兮兮、 我不能透露具体的原始设备制造商。FXTH8715116T1 是我们 FXTH8715 系列的一部分,专为需要高压范围(高达 1500 kPa)的车辆(例如卡车和重型平台)中的直接 TPMS 应用而设计。 它是一个集成的 TPMS 传感器模块,安装在每个车轮/轮胎内(通常在气门杆或带状模块中),测量压力/温度/运动,管理电源并定期将数据传输到汽车的 TPMS ECU,然后向驾驶员显示警告或状态。 在车轮模块内部,它与电池、集成传感器和射频/射频天线相连接。在车辆方面,它与低频启动器通信以发出命令,传感器的射频帧(315/434 MHz)由 TPMS 接收器或 BCM 接收,后者验证 ID、解码压力/温度/加速度/电池数据并更新车辆显示屏/警告。 BRs, Tomas
記事全体を表示
アクティベーションコードを取得できない S32DSをダウンロードしようとしましたが、確認コードなどを受け取ることができません。5回くらい試しました。どうすれば解決できますか? アクティベーション |インストール |ライセンス |インストーラーのダウンロード 日時:アクティベーションコードを取得できません ご回答ありがとうございます!よい一日を。 日時:アクティベーションコードを取得できません ご回答ありがとうございます。初めてダウンロードしようとしているだけですが、バージョン3.5をダウンロードしようとしましたが、まだキーがありません。
記事全体を表示
T2080rdb 该文档解释了 RCW 与 SERDES 的关系 回复:T2080rdb 该文档解释了 RCW 与 SERDES 的关系 请参阅“19.1.1.1.1SerDes 协议(SerDes 1 和 SerDes 2)”在附件 T2080RM.pdf 中
記事全体を表示
初期プログラミング後に書き換えると、SRK OTP ヒューズ値が 0 から 1 に変化します こんにちはNXPサポート、 私は現在、i.MX6ULLでSRK OTPヒューズのプログラミングに取り組んでいます。 最初は、UUUツールを使用して、.autoに以下のコマンドを追加してヒューズを作成しますスクリプト。 FB: ucmd fuse prog -y 3 0xXXXXXXXX   テスト中に、U-Boot シェルから fuse prog コマンドを使用して、すでにプログラムされた OTP ヒューズ を書き直 してみました。 書き換えを試みた後、ヒューズの値がわずかに変化したことを観察しました—たとえば、0x057a6cf3から0x057a6cf7、0x057a6cffに。 私の最初の分析から、OTPヒューズはビットを0から1に変更することは許可しますが、1から0への変更は許可しないようです。これは、一般的なOTPの動作と一致します(1回限りのプログラム可能:追加のビットを設定するだけで、クリアはしません)。 質問: SRKハッシュを扱っている場合、OTPに書き込まれると変更しないでください。しかし、それは変化しているので、どのようにそれを防ぐのですか? さらに詳細が必要な場合はお知らせください。 ご支援いただきありがとうございます Security
記事全体を表示
S32K144 EEPROM的写入数据问题 我参考AN11983对S32K144的EEPROM进行配置,可以正常每隔4个地址比如0x14000000 0x14000004写入数据,但如果不是上述地址,比如在0x14000001 0x14000002 0x14000003等写入数据,就会出现“Can't find a source file at "F:\...\...\Debug_FLASH/../Project_Settings/Startup_Code/startup_S32K144.S"”的警告,请问是我哪里没有配置好,还是有其他原因?
記事全体を表示
Clarification on Zigbee Protocol Support and Linux Driver for IW612 I'm currently working with the NXP MAYA-W271-00B (IW612)  , and I wanted to confirm whether it supports the Zigbee protocol in addition to Wi-Fi and Bluetooth. If Zigbee is supported, could anyone point me to the appropriate resources or provide guidance on where I might find the Linux driver or any necessary integration details? Any help or direction would be greatly appreciated! Thanks in advance! OS LINUX Protocol: Zigbee Re: Clarification on Zigbee Protocol Support and Linux Driver for IW612 Hi, @Abhilasha  As my previous comments,  To get the latest IW612's Wi-Fi driver, you can download it through below link: https://github.com/nxp-imx/mwifiex/tree/lf-6.6.36_2.1.0 To get the latest IW612's FW, you can download it through below link: https://github.com/nxp-imx/imx-firmware/tree/lf-6.6.36_2.1.0/nxp/FwImage_IW612_SD The 802.15.4 subsystem is only supported on IW612 evaluation board (EVB) with i.MX 8M Mini(8MMINILPD4-EVK@2020) host platform. Are you using our I.MX8MMini as your host platform? If yes, please refer to below guide: Section 7 7 Bring-up of 802.15.4 and Section 8 Bring-up of ZigBee on i.MX 8M Mini. Getting Started with NXP-based Wireless Modules on i.MX 8M Quad EVK Running Linux OS - User manual If no, I worry Zigbee is not supported on your other host platform currently. We also have below user manual as a guidance for customers to download and build our Wi-Fi drivers: How to Download and Build NXP Wi-Fi Drivers - User manual (restricted) About device tree, I think you can refer to our I.MX8MMini's device tree to configure yours according to your SDIO interface hardware connections: https://github.com/nxp-imx/linux-imx/blob/lf-6.6.y/arch/arm64/boot/dts/freescale/imx8mm-evk-usd-wifi.dts Hope it can help you somehow. Have a nice day~ Best regards, Christine. Re: Clarification on Zigbee Protocol Support and Linux Driver for IW612 I've found clarity on the IW612 Bluetooth driver in the Linux kernel, specifically at this link: btnxpuart.c.https://github.com/torvalds/linux/blob/v6.12-rc2/drivers/bluetooth/btnxpuart.c However, I still haven't located information regarding the Wi-Fi and Zigbee drivers for the IW612. Additionally, I would appreciate any insights on device tree support for these functionalities. If anyone can point me in the right direction, I would greatly appreciate it! Thank you! Re: Clarification on Zigbee Protocol Support and Linux Driver for IW612 Hi, @Abhilasha  The driver link I shared to you yesterday should include drivers which supports Zigbee. But I checked the information in our user manual, it mentioned that: 8 Bring-up of ZigBee on i.MX 8M Mini This section shows how to bring up ZigBee on i.MX 8M Mini EVK platform. Note: The 802.15.4 subsystem is only supported on IW612 evaluation board (EVB) with i.MX 8M Mini(8MMINILPD4-EVK@2020) host platform. This section describes the steps to bring up the 802.15.4 interface of NXP-based IW612 module on i.MX 8M Mini platform, and for Zigbee-only mode. Zigbee dual-pan mode is not supported. So, please make sure whether you are using our I.Mx8M Mini (8MMINILPD4-EVK@2020) host platform. If not, I worry, it might not support. Sorry for the inconvenience to you. Best regards, Christine. Re: Clarification on Zigbee Protocol Support and Linux Driver for IW612 Can you provide me the link for driver that supports zigbee protocol ? Re: Clarification on Zigbee Protocol Support and Linux Driver for IW612 Hi, @Abhilasha  It needs secure files access to get download permission. You can download the driver and FW through my given links, which doesn't need secure files access. Best regards, Christine. Re: Clarification on Zigbee Protocol Support and Linux Driver for IW612 trying to download  https://www.nxp.com/webapp/sps/download/license.jsp?colCode=IW612-6623-IMX8-18993-P10-MM6X18437-P21&appType=file1&DOWNLOAD_ID=null  unable to dowload this !! Re: Clarification on Zigbee Protocol Support and Linux Driver for IW612 Hi, @Abhilasha  Thanks for creating case to us. For IW612, yes, except Bluetooth and Wi-Fi, it also supported Zigbee which is based on 802.15.4. To use IW612's Zigbee based on Linux, you can refer to below guide:  Getting Started with NXP-based Wireless Modules on i.MX 8M Quad EVK Running Linux OS - User manual  To get the latest IW612's driver, you can download it through below link: https://github.com/nxp-imx/mwifiex/tree/lf-6.6.36_2.1.0 To get the latest IW612's FW, you can download it through below link: https://github.com/nxp-imx/imx-firmware/tree/lf-6.6.36_2.1.0/nxp/FwImage_IW612_SD Please do not hesitate to mark my answer as a solution, if it really does help for you. For other topic's queries or questions, please feel free to create new case to us. Have a nice day~ Best regards, Christine.
記事全体を表示
UART configuration and operation for LPC55S16 Hi, I am using the LPC55S16 evaluation board. In our design, there is a UART that needs to be configured for half-duplex operation. It should normally function in RX mode, but when receiving data, it should switch to TX mode to send a response back. Later, at some point, we need to convert the UART to full-duplex operation. Is this achievable? If so, how can it be done? Regards, Winston Re: UART configuration and operation for LPC55S16 Hi, Follow up question, when  the UART works in half duplex mode, actually I need to set it as one-wire UART - the TX and RX are in the same line. When the UART works in full duplex mode, the TX and RX are separate lines. Is there a solution for this kind of settings? Regards, Winston Re: UART configuration and operation for LPC55S16 HI @yangao  Yes, you can configure the UART on the LPC55S16 for both half-duplex and full-duplex operation. Configure UART initially for receiving (RX) USART_GetDefaultConfig(&config); config.baudRate_Bps = BOARD_DEBUG_UART_BAUDRATE; config.enableTx = false; config.enableRx = true; USART_Init(DEMO_USART, &config, DEMO_USART_CLK_FREQ); Configure UART for full-duplex (TX and RX enabled) USART_GetDefaultConfig(&config); config.baudRate_Bps = BOARD_DEBUG_UART_BAUDRATE; config.enableTx = true; config.enableRx = true; USART_Init(DEMO_USART, &config, DEMO_USART_CLK_FREQ); BR Hang
記事全体を表示
SAI 作为 24 位//192kHz 的 I2S 无法在 RT1024 上工作 你好。 我正在尝试以 24 位/192kHz 运行 PCM4104 DAC。 到目前为止,我已经成功修改了“evkmimxrt1024_sai_interrupt_transfer”示例,足以重现音乐。文件为 16bits//48kHz,但是,当“kSAI_WordWidth16bits”更改为“kSAI_WordWidth24bits”时,即使不改变采样频率,48kHz 频率也会降至 42.68kHz。 我已经用示波器测量了 MCLK,并且在两种情况下(48 和 42.68 kHz)均正确生成 我让 system.c以及将 I2S 配置为附件的外部库 知道为什么会发生这种情况吗? 谢谢!! 回复:SAI 作为 I2S 在 24 位//192kHz 下无法在 RT1024 上工作 谢谢!确实,把源文件改成24bits&192kHz采样率的就解决了问题。 回复:SAI 作为 I2S 在 24 位//192kHz 下无法在 RT1024 上工作 你好@DigitalBrain , 我将进行内部询问以获取有关此问题的更多信息,并尽快回复。感谢您的耐心。 BR 哈比卜 回复:SAI 作为 I2S 在 24 位//192kHz 下无法在 RT1024 上工作 此外,MCLK(sourceClockHz)= 28.08MHz 似乎正确,但当谈到 BCLK 时: 位时钟频率=采样率*位宽度*通道数 位时钟频率=192kHz*24位*2=9.216MHz 根据计算应该是9.216MHz,但我在示波器上测量的是7.012MHz。我理解,如果该频率低于期望值,WS 频率也将低于目标值。这是正确的吗?
記事全体を表示
Any MCU from NXP can support separated address and data pins for external bus? Hello,  I selected MCX Micro as a location for my question. But this question is not for specific MCU family from NXP. My question is, is there any MCUs from NXP that can support separated address and data pins for external bus? In my understanding, NXP's MCU that support the external bus interface  have multiplexed address/data pins. Regards, Norihiro Michigami AVNET Package and IO|GPIO Re: Any MCU from NXP can support separated address and data pins for external bus? Hello Jun,  Thank you for your comment. I understood your point. BTW, customer may have questions that are not classified to specific MCU like this question.  If there is a forum for general questions, it may be good for customers. Regards, Norihiro Michigami AVNET Re: Any MCU from NXP can support separated address and data pins for external bus? Hi norihiromichiga , Thanks. I was considering MCX because this is MCX space.  Considering other MCUs,  LPC17xx/18xx, LPC40xx integrates EMC module which has saperated data and address external bus. But these LPCs are legacy product which is not recommended for new design. RT1060 RT1170 also support EMC. I would suggest you consider as well. Hope this helps, Jun Zhang Re: Any MCU from NXP can support separated address and data pins for external bus? Hello Jun,  Thank you for your answer. But as I posted in my first post, my quesiton is not limited to MCX series. Does NXP have any series of MCU that can suppor seperated address and data bus of external bus interface? Regards, Norihiro Michigami AVNET Re: Any MCU from NXP can support separated address and data pins for external bus? Hi norihiromichiga, MCX N only supports external memory over FlexSPI interface or SPI  Hope this will help you, Jun Zhang
記事全体を表示
メタレイヤー内で cargo をビルドする方法 私はこの例に従って、cargo.bbclassを継承し、簡単なプロジェクトをコンパイルしていました。 https://www.youtube.com/watch?v=aPsMuSU-Btw しかし、私は次のエラーを得ました: ``` メモ: タスクの実行 エラー: my-test-0.1-r0do_compile: ExecutionError('/opt/yocto/imx-6.6.3-1.0.0-build/build_fsl-imx-wayland/tmp/work/armv8a-poky-linux/my-test/0.1/temp/run.do_compile.24257',101、なし、なし) エラー:障害のログファイルが/ opt / yocto / imx-6.6.3-1.0.0-build / build_fsl-imx-wayland / tmp / work / armv8a-poky-linux / my-test / 0.1 / temporary / log.do_compile.24257に保存されています。 ログデータは次のとおりです。 |DEBUG: シェル関数 do_compile を実行しています |注:/opt/yocto/imx-6.6.3-1.0.0-build/build_fsl-imx-wayland/tmp/work/armv8a-poky-linux/my-test/0.1/rust-targets/の錆ターゲットを使用 |注:cargo = /opt/yocto/imx-6.6.3-1.0.0-build/build_fsl-imx-wayland/tmp/work/armv8a-poky-linux/my-test/0.1/recipe-sysroot-native/usr/bin/cargo |注:cargo build -v --frozen --target aarch64-poky-linux-gnu --release --manifest-path=/opt/yocto/imx-6.6.3-1.0.0-build/build_fsl-imx-wayland/tmp/work/armv8a-poky-linux/my-test/0.1/git//Cargo.toml |エラー:ロックファイル/ opt / yoc / imx-6.6.3-1.0.0-build / build_fsl-imx-wayland / tmp / work / armv8a-poky-linux / my-test / 0.1 / git / Cargo.lockを更新する必要がありますが、これを防ぐために--frozenが渡されました |ネットワークにアクセスせずにロックファイルを生成したい場合は、--frozenフラグを削除して、代わりに--offlineを使用してください。 |警告: /opt/yocto/imx-6.6.3-1.0.0-build/build_fsl-imx-wayland/tmp/work/armv8a-poky-linux/my-test/0.1/temp/run.do_compile.24257:185「"cargo"ビルド-v」から101を終了 --frozen --target aarch64-poky-linux-gnu --release --manifest-path=/opt/yocto/imx-6.6.3-1.0.0-build/build_fsl-imx-wayland/tmp/work/armv8a-poky-linux/my-test/0.1/git//Cargo.toml "$@"' |警告:バックトレース(BB生成スクリプト): |#1:oe_cargo_build、/ opt / yocto / imx-6.6.3-1.0.0-build / build_fsl-imx-wayland / tmp / work / armv8a-poky-linux / my-test / 0.1 / temp / run.do_compile.24257、185番線 |#2:cargo_do_compile、/ opt / yocto / imx-6.6.3-1.0.0-build / build_fsl-imx-wayland / tmp / work / armv8a-poky-linux / my-test / 0.1 / temp / run.do_compile.24257、157番線 |#3:do_compile、/ opt / yocto / imx-6.6.3-1.0.0-build / build_fsl-imx-wayland / tmp / work / armv8a-poky-linux / my-test / 0.1 / temp / run.do_compile.24257、152番線 |#4:メイン、/ opt / yocto / imx-6.6.3-1.0.0-build / build_fsl-imx-wayland / tmp / work / armv8a-poky-linux / my-test / 0.1 / temperature / run.do_compile.24257、198番線 エラー:タスク(/opt/yocto/imx-6.6.3-1.0.0-build/sources/meta-my-test/recipes-cargo/install/my-test_0.1.bb:do_compile)終了コード '1' で失敗しました 注: タスクの概要: 5745 個のタスクを試行し、そのうち 5743 個を再実行する必要がなく、1 個が失敗しました。 ``` 私は 'bitbake -f my-test core-image-minimal' を実行しました。BBLAYERSも追加されました。 簡単に言うと、RustプログラムをiMX93EVKにコンパイルしてインストールする方法は? Re:メタレイヤー内でcargoをビルドする方法をコンパイルする方法 よし Re:メタレイヤー内でcargoをビルドする方法をコンパイルする方法 私は愚か者で、より正確には初心者です。私が参照していたリポジトリ(https://gitlab.com/pbarker.dev/rust/print-randCargo.lockファイルがありませんでした。私はそれを私のマシンで手動で実行しました、ファイルをコピーしました、そして出来上がり! リポジトリがダウンロードされたパスは、デフォルトでは「/opt/yocto/imx-6.6.3-1.0.0-build/build_fsl-imx-wayland/tmp/work/armv8a-poky-linux/my-test/0.1/git/」でした。まあ、どうにかしてそれを上書きすることができます。これは問題ではありませんでした。まあ、うまくいけば、将来他の初心者を助けることができます。 編集:いくつかの他の落とし穴: * 私の場合、「IMAGE_INSTALL」は機能しませんでしたが、「CORE_IMAGE_EXTRA_INSTALL」を使用すると、カスタムレイヤーのbbファイルを「bitbake core-image-minimal」ビルドに追加できました。レシピの名前は私が知る限り関係ありません。 * 最初の実行で、クレートのハッシュが欠落していることがわかりました。幸いなことに、修正は印刷されています。'.bb' ファイルの横に '.inc' ファイルがあるものを追加すると、.bb を変更せずにそれを乗り越えるのに十分でしたfile 'cargo bitbake' コマンドが生成されます。 Re:メタレイヤー内でcargoをビルドする方法をコンパイルする方法 CBUK-ダニー CBUK-ダニー 寄稿者 I ところで、元の投稿のこの行は、貨物自体が機能していることを示しています。 ``` エラー:ロックファイル/ opt / yoc / imx-6.6.3-1.0.0-build / build_fsl-imx-wayland / tmp / work / armv8a-poky-linux / my-test / 0.1 / git / Cargo.lockを更新する必要がありますが、これを防ぐために--frozenが渡されました ``` 私が欠けているのは、通常の貨物プロジェクトでデフォルトのYocto動作--frozenを使用する方法がわからないことです。 しかし、これはNXPの範囲外だと思います。それでも、ouの人たちは、スクリプトを持っていることや、このフォーラムの他のいくつかの投稿にすべてコメントしました。だから、試してみる価値があると思ったので、もしあればそのようなヒントをいただければ幸いです。 Re:メタレイヤー内でcargoをビルドする方法をコンパイルする方法 まず、ありがとう。 bbファイルに'DEPENDS += " meta-rust "'を追加すると、次のエラーが発生します。「メタ錆」が「oe-core」に吸収されると思っていたので、本当にnanbieldに必要ですか? ``` キャッシュの読み込み: 100% |########################################################################################################################|Time: 0:00:00依存関係キャッシュから 5451 エントリをロードしました。注:欠落しているタスクキューの依存関係の解決エラー:何も「meta-rust」を提供しません(ただし、 /opt/yocto/imx-6.6.3-1.0.0-build/sources/meta-my-test/recipes-my/company/my-test_0.1.bbそれに依存するか、それ以外の場合はそれを必要とします) エラー: 必要なビルド ターゲット 'my-test' にはビルド可能なプロバイダーがありません。 欠落している、または構築できない依存関係チェーンは: ['my-test', 'meta-rust'] 概要: 2 つの ERROR メッセージがあり、ゼロ以外の終了コードが返されました。 ``` 編集:私はまた、imx-setup-release.sh の「BBLAYERS」の別のエコーとして、およびリポジトリツールのマニフェストに追加しました。ただし、nanbieldはこの手口と互換性がありません。 '''エラー:レイヤーrust-layerは、これらのシリーズのみをサポートするコアレイヤーと互換性がありません:nanbield(レイヤーはmickledore honister hardknott gatesgarth kirkstoneと互換性があります)'''
記事全体を表示
S32K344 上的 HSE - 无法进行对称加密 大家好, 目前我正在使用 S32K344 上的 HSE-B 进行工作。我想使用“ HSE_SRV_ID_SYM_CIPHER”服务来执行闪存中的数据的 AES-CTR 加密/解密。当调用相应的 HSE 服务时,我总是收到错误代码“HSE_SRV_RSP_NOT_ALLOWED” 。我已经阅读了 HSE 固件参考手册以便识别问题,但我无法弄清楚。 我附上了以下图片: NVM 密钥属性的定义(包括对称密钥) 相应HSE服务的定义 相应HSE服务的函数调用 希望您能帮助摆脱这个问题。 谢谢!
記事全体を表示
S32K146-Q144EVBVEVB的上电复位 你好@danielmartynek 我正在运行代码来使LED闪烁。我想验证它的启动延迟。 实际上,当我们正常重置 MCU 时,跳转到应用程序需要多长时间。 实际上我达到了 4.22ms,为了供您参考,我附上了逻辑分析仪图像。 我希望你能解答我的疑惑。 还有一个疑问@danielmartynek 您能解答我关于 S32K1xx 数据表第页的一个疑问吗?43 Flash 时序规格(程序部分执行时间)(1KB flash)为 5ms。 那么当微控制器通电时,是否需要 5ms 才能进入应用程序? 为了供您参考,我从数据表中截取了快照。我希望您能检查一下 Flash 时序规范图像。 我希望很快收到你的回复 BR 尼贝什 回复:S32K146-Q144EVBVEVB的上电复位 你好@danielmartynek J104 2-3(默认) 复位信号直接发送到 MCU,使用 重置S32K146。 J107 2-3(默认) 由 USB micro 供电的 S32K146 连接器。 J10 2-3(默认) VDD电压连接到5 V 我的连接是这样的@danielmartynek 如果我的 VDD 是 5V,我应该将哪个引脚用作 VDD? 我已附上图片供您参考 回复:S32K146-Q144EVBVEVB的上电复位 谢谢@danielmartynek 我会尽快检查并向您通报有关情况。 BR 尼贝什 回复:S32K146-Q144EVBVEVB的上电复位 你好@danielmartynek 非常感谢 Daniel 的回复。 丹尼尔,有没有什么方法或计算可以证明理论? 如果您能帮助我证明理论,那对我来说会更有帮助。 我希望很快收到您的回复! 谢谢 回复:S32K146-Q144EVBVEVB的上电复位 你好@danielmartynek 我在 POR 之后实现了 4.2 毫秒。 我这边的问题出在哪里? 如果您有任何我必须运行的代码,您可以推荐我吗?
記事全体を表示
MCXN236 eFuse/OTP 信息? 哪个有关 MCXN236 的文档包含有关 OTP 位的大小、使用和寻址的信息? 谢谢! 安全(Edgelock | 安全启动 | OTP) 回复:MCXN236 eFuse/OTP 信息? 谢谢,Celeste!有关访问 MCXN236 安全手册的非常有用的信息。处理保密协议就像玩游戏一样 斜坡游戏 - 不断克服障碍!了解这一点的关键在于通过营销。也许对非保密协议人员来说,总结一下会有帮助吗?感谢指导! 回复:MCXN236 eFuse/OTP 信息? 很高兴知道,谢谢你,马雷克。 回复:MCXN236 eFuse/OTP 信息? 谢谢,塞莱斯特。
記事全体を表示
S32K312 IIC DMA从机模式最大接收长度只能为8字节 大家好 我正在使用IIC从机的DMA功能,但是IIC一次可以接收的最大长度只有8个字节。无法从缓冲区检索超过 8 个字节的数据。我已经上传了项目,您能帮我找出问题所在吗? 谢谢! 回复:S32K312 IIC DMA从模式最大接收长度只能为8字节 感谢您的帮助。这个例程虽然存在问题,但是可以用来对比我现在项目中的错误。我已经确定了原因 回复:S32K312 IIC DMA从模式最大接收长度只能为8字节 正如你所说:每次传输可以传输的字节数不受限制。 我设置的接收数据长度是18个字节,为什么接收不到超过8个字节的数据?
記事全体を表示
imx8 Quad Max 通过读取保险丝来确定 SOM 是否关闭? 有没有办法通过保险丝或其他方式来确定“ahab_close”已被调用? 如果有我可以读取的保险丝,我愿意在 Linux 中执行此操作。 或者,如果关闭状态不可用,我可以设置哪个用户保险丝可读以用作指示器? i.MX 8 系列 | i.MX 8QuadMax (8QM) | 8QuadPlus 回复:imx8 Quad Max 通过读取保险丝确定 SOM 是否关闭? 如果没有可以调用 SCFW 的 Linux 用户空间实用程序,那就没有什么帮助了。对于我们的情况,我有一个解决方法,可以让我们的制造过程能够管理保险丝。 回复:imx8 Quad Max 通过读取保险丝确定 SOM 是否关闭? 如果您使用终端并且有人正在阅读并采取行动,那么响应会很好,因此这不是一个可用的解决方案。 我无法使用 uboot“test”命令中的“ahab_status”向内核发送命令行参数中的状态(结果代码并不总是正确的“$?”) 我不明白为什么 NXP 不能像 imx8m Plus 一样使用可读保险丝来指示状态……有这么多未使用的保险丝。 回复:imx8 Quad Max 通过读取保险丝确定 SOM 是否关闭? 情况是这样的:我们不能允许“未关闭”的 SOM 运行已签名的、用于封闭设备的代码。这是一个重大的安全漏洞。 在 imx8M Plus 上,我们可以读取保险丝来确定这一点并阻止处理器启动,并将其报告为安全问题。 在 Quad Max 上,似乎没有办法通过读取保险丝来确定这一点(我希望我错了),但是 Uboot 报告这一点并没有帮助……如果有一个“用户保险丝”(NXP 将它们称为“客户 OTP 保险丝”),我可以在用户空间读取它,并且可以在我关闭 SOM 的同时由 uboot 烧录,那就可以了。 回复:imx8 Quad Max 通过读取保险丝确定 SOM 是否关闭? 如果有一个可以被 imx-scu-ocotp0 驱动程序读取的“客户保险丝”,那就太好了……
記事全体を表示
SPI Communication Issue with TC6 SPI Protocol Hello, I am implementing SPI communication between the S32K144 MCU and MAC-PHY (LAN8650). For Control Transaction Write/Read (where the master writes/reads a register value to/from the slave), the process follows the TC6 SPI protocol as shown in the image below: Before stepping forward to actual register read/write to MAC-PHY, I thought of testing it with some dummy data and verify it by probing in at MOSI of S32K144 and SDI of MAC-PHY(LAN8650) chip. With that I could successfully send 16 bit and 32 bit data, but whereas no data transactions happening for 64 bit transfer.  As per above picture inorder to read/ write the slave register it should be 64 bits(Control header + Data) or higher. The working code 32 bits dummy data transfer is as follows :  #include "S32K144.h" /* include peripheral declarations S32K144 */ uint32_t tx_32bits = 0xFD00FD00; //uint32_t tx_32bits_array[2] = {0xFD00, 0X1010}; uint32_t LPSPI0_32bits_read; /* Returned data in to SPI */ void LPSPI0_init_master(void) { PCC->PCCn[PCC_LPSPI0_INDEX] = 0; /* Disable clocks to modify PCS ( default) */ PCC->PCCn[PCC_LPSPI0_INDEX] = 0xC6000000; /* Enable PCS=SPLL_DIV2 (40 MHz func'l clock) */ LPSPI0->CR = 0x00000000; /* Disable module for configuration */ LPSPI0->IER = 0x00000000; /* Interrupts not used */ LPSPI0->DER = 0x00000000; /* DMA not used */ LPSPI0->CFGR0 = 0x00000000; /* Defaults: */ /* RDM0=0: rec'd data to FIFO as normal */ /* CIRFIFO=0; Circular FIFO is disabled */ /* HRSEL, HRPOL, HREN=0: Host request disabled */ LPSPI0->CFGR1 = 0x00000001; /* Configurations: master mode*/ /* PCSCFG=0: PCS[3:2] are enabled */ /* OUTCFG=0: Output data retains last value when CS negated */ /* PINCFG=0: SIN is input, SOUT is output */ /* MATCFG=0: Match disabled */ /* PCSPOL=0: PCS is active low */ /* NOSTALL=0: Stall if Tx FIFO empty or Rx FIFO full */ /* AUTOPCS=0: does not apply for master mode */ /* SAMPLE=0: input data sampled on SCK edge */ /* MASTER=1: Master mode */ LPSPI0->TCR = 0x1100001F; /* Transmit cmd: PCS1, 32 bits, prescale func'l clk by 4, etc*/ /* CPOL=0: SCK inactive state is low */ /* CPHA=0: On the rising edge of SCLK the data is captured, while on the falling edge of SCLK the data will change /* PRESCALE=2: Functional clock divided by 2**2 = 4 */ /* PCS=1: Transfer using PCS1 */ /* LSBF=0: Data is transfered MSB first */ /* BYSW=0: Byte swap disabled */ /* CONT, CONTC=0: Continuous transfer disabled */ /* RXMSK=0: Normal transfer: rx data stored in rx FIFO */ /* TXMSK=0: Normal transfer: data loaded from tx FIFO */ /* WIDTH=0: Single bit transfer */ /* FRAMESZ=31: # bits in frame = 31+1=32 */ LPSPI0->CCR = 0x04090808; /* Clock dividers based on prescaled func'l clk of 100 nsec */ /* SCKPCS=4: SCK to PCS delay = 4+1 = 5 (500 nsec) */ /* PCSSCK=4: PCS to SCK delay = 9+1 = 10 (1 usec) */ /* DBT=8: Delay between Transfers = 8+2 = 10 (1 usec) */ /* SCKDIV=8: SCK divider =8+2 = 10 (1 usec: 1 MHz baud rate) */ LPSPI0->FCR = 0x00000003; /* RXWATER=0: Rx flags set when Rx FIFO >0 */ /* TXWATER=3: Tx flags set when Tx FIFO <= 3 */ LPSPI0->CR = 0x00000009; /* Enable module for operation */ /* DBGEN=1: module enabled in debug mode */ /* DOZEN=0: module enabled in Doze mode */ /* RST=0: Master logic not reset */ /* MEN=1: Module is enabled */ } void LPSPI0_tx_32bits (uint32_t send) { while((LPSPI0->SR & LPSPI_SR_TDF_MASK)>>LPSPI_SR_TDF_SHIFT==0); /* Wait for Tx FIFO available */ LPSPI0->TDR = send; /* Transmit data */ LPSPI0->SR |= LPSPI_SR_TDF_MASK; /* Clear TDF flag */ } uint32_t LPSPI0_rx_32bits (void) { uint32_t recieve = 0; while((LPSPI0->SR & LPSPI_SR_RDF_MASK)>>LPSPI_SR_RDF_SHIFT==0); /* Wait at least one RxFIFO entry */ recieve= LPSPI0->RDR; /* Read received data */ LPSPI0->SR |= LPSPI_SR_RDF_MASK; /* Clear RDF flag */ return recieve; /* Return received data */ } void PORT_init (void) {   //Master:   PCC->PCCn[PCC_PORTB_INDEX] |= PCC_PCCn_CGC_MASK;   PORTB->PCR[2] |= PORT_PCR_MUX(3); /*Port B2: MUX = ALT3, SCK*/   PORTB->PCR[3] |= PORT_PCR_MUX(3); /*Port B3: MUX = ALT3, SIN*/   PORTB->PCR[4] |= PORT_PCR_MUX(3); /*Port B4: MUX = ALT3, SOUT*/   PORTB->PCR[5] |= PORT_PCR_MUX(3); } int main(void) { uint32_t counter = 0; volatile int i; WDOG_disable(); SOSC_init_8MHz(); /* Initialize system oscillator for 8 MHz xtal */ SPLL_init_160MHz(); /* Initialize SPLL to 160 MHz with 8 MHz SOSC */ NormalRUNmode_80MHz(); /* Init clocks: 80 MHz sysclk & core, 40 MHz bus, 20 MHz flash */ LPSPI0_init_master(); PORT_init(); for (;;) { LPSPI0_tx_32bits(tx_32bits); LPSPI0_32bits_read = LPSPI0_rx_32bits(); } return 0; } Note : For 64 bit data transfer, I changed TCR[FRAMESZ]=3F and changed respective data types and values. My questions are: 1. Is S32K144 doesnt support whole 64 bit transfer in one go? [In S32K1xx Series Reference Manual, Rev. 14 at start of page 1623 it means as the maximum frame size is 32 bits?] 2. If it supports only 32 bits, then kindly help me the way that on how to transfer >=64 bits of data. 3. Else if it supports 64 bits, then kindly point me out the changes i have to perform in the above code. Thanks in advance! Re: SPI Communication Issue with TC6 SPI Protocol Hello @Muthappan_Viswanthan  I'm really glad to hear that I was able to help for a change, since I'm usually the one receiving help.   If you have any further questions, feel free to leave a reply 🙂 Re: SPI Communication Issue with TC6 SPI Protocol Thanks for your reply. Rightnow, Iam using older version of S32 DS and doing baremetal programming. But thought of switching to newer version and using RTD, this might helpful for me in that case. Thanks again! Re: SPI Communication Issue with TC6 SPI Protocol Hi, Finally its working and the issue is with header as you stated. Actually, I read like we should set the parity bit to "1'" if we have odd number of 1's between bit 31:1 and thus in my case I didnt set it. After your comment I just deep dive into it and got to know that my understanding is wrong. Thanks for lightning up.! Re: SPI Communication Issue with TC6 SPI Protocol Hello,   I'm responding to your post as I have experience implementing the TC6 protocol using the LAN8651 MAC-PHY chip from Microchip on the S32K314 MCU.   In my case, I used RTD 4.0.0 with S32 Design Studio 3.5, and configured the LPSPI driver as follows.   Based on this LPSPI driver, you should be able to configure a uint8_t tx and rx buffer with 12 elements and perform SPI communication accordingly. ex) uint8_t spiRxBuffer[12], uint8_t spiTxBuffer[12] Re: SPI Communication Issue with TC6 SPI Protocol Hi, a delay in SCK should not be an issue. Check if there are right number of clock periods in words. To say more capture full frame in scope/analyzer. I guess you have wrong parity bit calculated. You wrote "The header seems to be correct, example I used "0x30000c00" for IMASK0." But this time parity bit should be set to have odd number of "1" in header. BR, Petr Re: SPI Communication Issue with TC6 SPI Protocol Thanks for your help so far.  I made the changes to transfer as 3x 32bit words for both read & write. As per the statement from LAN8650 datasheet "When performing control writes, the register data sent over SDI is also echoed back over SDO", I am not getting echoed data as same as what I transmitted during write and read operations. The modified code is as below: void lan8650_write_imask0(uint32_t value) { uint32_   t header = build_ctrl_header(1, 0x00, 0x000C, 0); uint32_t read_tx_header2 = 0; uint32_t read_tx_data2 = 0; CS_LOW(); LPSPI0_tx_32bits(header); // Write header (void)LPSPI0_rx_32bits(); //Read dummy bytes LPSPI0_tx_32bits(value); // Write data read_tx_header2 = LPSPI0_rx_32bits(); // Read Header Echo LPSPI0_tx_32bits(0x00000000); // Write dummy data read_tx_data2 = LPSPI0_rx_32bits(); // Read data Echo CS_HIGH(); } uint32_t lan8650_read_imask0(void) { uint32_t header = build_ctrl_header(0, 0x00, 0x000C, 0); uint32_t rx_header = 0; uint32_t rx_data = 0; CS_LOW(); LPSPI0_tx_32bits(header); // Send header (void)LPSPI0_rx_32bits(); // Dummy data LPSPI0_tx_32bits(0x00000000); // Dummy to clock header rx_header = LPSPI0_rx_32bits(); // Read Header Echo LPSPI0_tx_32bits(0x00000000); // Dummy to clock data rx_data = LPSPI0_rx_32bits(); // Read data CS_HIGH(); return rx_data; } And I measured the SPI lines of LAN8650 with scope and the observations are:  1. CS is LOW for the entire duration of 3x 32bits transfer. 2. SCK not seems to be continuous. After each 32bits transfer SCK is in LOW for some time and then starting back. [Refer below picture channel 2 (green) waveform ] 3. SDI line has the same 32bit header, 32 bit data and 32 bit dummy data which I sent from S32K144 MOSI. 4. SDO echoes "0xC000 0000" during header transmission (Ignored data),  "0xC000 0001" during both data & dummy data transmission which expected to be header & data as per datasheet.   The header seems to be correct, example I used "0x30000c00" for IMASK0. So, whether that delay in SCK between each 32 bits makes an issue? Re: SPI Communication Issue with TC6 SPI Protocol Hi, code looks normal, but I think a protocol looks little bit different. There should be 3 words transferred for single register writing/reading For both read and write, the Control Header sent to the LAN8650/1 over SDI is always echoed back to the SPI host over SDO. When performing control writes, the register data sent over SDI is also echoed back over SDO. Thus for write you send header, data, dummy words, For read you send header, dummy, dummy words. So try that, measure SPI lines with scope /analyzer to know real frames. Also check header is correct. BR, Petr Re: SPI Communication Issue with TC6 SPI Protocol Hello, I used 2 a) [ set FRAMESZ to 31 for 32bit frame size and control CS manually and fill data registers as per desired number of word transfer.] with some dummy data and it worked. Now, when I tried with my actual task where I need to communicate with LAN8650 chip, I should write/read by sending control header first where the respective address should be present: For this purpose I used the below code :  #include "S32K144.h" /* include peripheral declarations S32K144 */ #define CS_LOW()    (PTB->PCOR = (1 << 5))  // Clear bit to pull CS low #define CS_HIGH()   (PTB->PSOR = (1 << 5))  // Set bit to pull CS high       //System registers (MMS = 0) const TC6Reg TC6ADR_RESET      = { .mms = 0x00, .addr = 0x003 }; const TC6Reg TC6ADR_CONFIG0    = {.mms = 0x00, 0x0004}; const TC6Reg TC6ADR_STATUS0    = {.mms = 0x00, 0x0008}; const TC6Reg TC6ADR_IMASK0     = {.mms = 0x00, 0x000C}; const TC6Reg TC6ADR_PLCACTL0   = {.mms = 0x04, 0xCA01}; const TC6Reg TC6ADR_PLCACTL1   = {.mms = 0x04, 0xCA02}; const TC6Reg TC6ADR_PLCASTAT   = {.mms = 0x04, 0xCA03}; const TC6Reg TC6ADR_MAC_NCR    = {.mms = 0x01, 0x0000}; const TC6Reg TC6ADR_MAC_NCFGR  = {.mms = 0x01, 0x0001};   uint32_t tx_16bits = 0xFD00FD00; uint32_t tx_32bits_array[2] = {0xFD00, 0X1010}; uint32_t LPSPI0_16bits_read; /* Returned data in to SPI */ uint16_t lan8650_phy_id = 0; uint32_t tx_upper = 0xFD00FD00; uint32_t tx_lower = 0x1010ABCD; uint32_t rx_upper, rx_lower;   // Calculates odd parity for a 32-bit word (excluding bit 0) uint8_t calculate_parity(uint32_t word31to1) {    uint8_t count = 0;    int i;    for (i = 1; i < 32; i++) {        if ((word31to1 >> i) & 0x01) count++;    }    return (count % 2 == 0) ? 0 : 1;  // Return 0 if even (to make odd) }   uint32_t build_ctrl_header(uint8_t wnr, uint8_t mms, uint16_t addr, uint8_t num_regs) {    uint32_t header = 0;    header |= (0U << 31);                 // DNC = 0 (Control)    header |= (0U << 30);                 // HDRB = 0 (Ignored on write)    header |= ((wnr & 0x01) << 29);       // WNR: 1 = write, 0 = read    header |= (0U << 28);                 // AID = 0 (auto-increment)    header |= ((mms & 0x0F) << 24);       // MMS = memory map select    header |= ((addr & 0xFFFF) << 8);     // Register address    header |= ((num_regs & 0x7F) << 1);   // Length (in registers), shifted to [7:1]    uint8_t parity = calculate_parity(header & 0xFFFFFFFE); // Clear bit 0 for parity calc    header |= parity; // Set bit 1 to make parity odd    return header; }     void LPSPI0_init_master(void) { PCC->PCCn[PCC_LPSPI0_INDEX] = 0; /* Disable clocks to modify PCS ( default) */ PCC->PCCn[PCC_LPSPI0_INDEX] = 0xC6000000; /* Enable PCS=SPLL_DIV2 (40 MHz func'l clock) */   LPSPI0->CR = 0x00000000; /* Disable module for configuration */ LPSPI0->IER = 0x00000000; /* Interrupts not used */ LPSPI0->DER = 0x00000000; /* DMA not used */ LPSPI0->CFGR0 = 0x00000000; /* Defaults: */ /* RDM0=0: rec'd data to FIFO as normal */ /* CIRFIFO=0; Circular FIFO is disabled */ /* HRSEL, HRPOL, HREN=0: Host request disabled */ LPSPI0->CFGR1 = 0x00000001; /* Configurations: master mode*/ /* PCSCFG=0: PCS[3:2] are enabled */ /* OUTCFG=0: Output data retains last value when CS negated */ /* PINCFG=0: SIN is input, SOUT is output */ /* MATCFG=0: Match disabled */ /* PCSPOL=0: PCS is active low */ /* NOSTALL=0: Stall if Tx FIFO empty or Rx FIFO full */ /* AUTOPCS=0: does not apply for master mode */ /* SAMPLE=0: input data sampled on SCK edge */ /* MASTER=1: Master mode */ LPSPI0->TCR = 0x1100001F; /* Transmit cmd: PCS3, 16 bits, prescale func'l clk by 4, etc*/ /* CPOL=0: SCK inactive state is low */ /* CPHA=0: On the rising edge of SCLK the data is captured, while on the falling edge of SCLK the data will change /* PRESCALE=2: Functional clock divided by 2**2 = 4 */ /* PCS=3: Transfer using PCS3 */ /* LSBF=0: Data is transfered MSB first */ /* BYSW=0: Byte swap disabled */ /* CONT, CONTC=0: Continuous transfer disabled */ /* RXMSK=0: Normal transfer: rx data stored in rx FIFO */ /* TXMSK=0: Normal transfer: data loaded from tx FIFO */ /* WIDTH=0: Single bit transfer */ /* FRAMESZ=31: # bits in frame = 31+1=32 */ LPSPI0->CCR = 0x04090808; /* Clock dividers based on prescaled func'l clk of 100 nsec */ /* SCKPCS=4: SCK to PCS delay = 4+1 = 5 (500 nsec) */ /* PCSSCK=4: PCS to SCK delay = 9+1 = 10 (1 usec) */ /* DBT=8: Delay between Transfers = 8+2 = 10 (1 usec) */ /* SCKDIV=8: SCK divider =8+2 = 10 (1 usec: 1 MHz baud rate) */ LPSPI0->FCR = 0x00000003; /* RXWATER=0: Rx flags set when Rx FIFO >0 */ /* TXWATER=3: Tx flags set when Tx FIFO <= 3 */ LPSPI0->CR = 0x00000009; /* Enable module for operation */ /* DBGEN=1: module enabled in debug mode */ /* DOZEN=0: module enabled in Doze mode */ /* RST=0: Master logic not reset */ /* MEN=1: Module is enabled */     }     void LPSPI0_tx_32bits (uint32_t send) { while((LPSPI0->SR & LPSPI_SR_TDF_MASK)>>LPSPI_SR_TDF_SHIFT==0); /* Wait for Tx FIFO available */ LPSPI0->TDR = send; /* Transmit data */ LPSPI0->SR |= LPSPI_SR_TDF_MASK; /* Clear TDF flag */ }       uint32_t LPSPI0_rx_32bits (void) { uint32_t recieve = 0;   while((LPSPI0->SR & LPSPI_SR_RDF_MASK)>>LPSPI_SR_RDF_SHIFT==0); /* Wait at least one RxFIFO entry */ recieve= LPSPI0->RDR; /* Read received data */ LPSPI0->SR |= LPSPI_SR_RDF_MASK; /* Clear RDF flag */ return recieve; /* Return received data */ }   void SOSC_init_8MHz(void) {  SCG->SOSCDIV=0x00000101; /* SOSCDIV1 & SOSCDIV2 =1: divide by 1 */  SCG->SOSCCFG=0x00000024; /* Range=2: Medium freq (SOSC between 1MHz-8MHz)*/  /* HGO=0: Config xtal osc for low power */ /* EREFS=1: Input is external XTAL */  while(SCG->SOSCCSR & SCG_SOSCCSR_LK_MASK); /* Ensure SOSCCSR unlocked */  SCG->SOSCCSR=0x00000001; /* LK=0: SOSCCSR can be written */  /* SOSCCMRE=0: OSC CLK monitor IRQ if enabled */ /* SOSCCM=0: OSC CLK monitor disabled */ /* SOSCERCLKEN=0: Sys OSC 3V ERCLK output clk disabled */ /* SOSCLPEN=0: Sys OSC disabled in VLP modes */ /* SOSCSTEN=0: Sys OSC disabled in Stop modes */ /* SOSCEN=1: Enable oscillator */  while(!(SCG->SOSCCSR & SCG_SOSCCSR_SOSCVLD_MASK)); /* Wait for sys OSC clk valid */ } void SPLL_init_160MHz(void) {  while(SCG->SPLLCSR & SCG_SPLLCSR_LK_MASK); /* Ensure SPLLCSR unlocked */  SCG->SPLLCSR = 0x00000000; /* SPLLEN=0: SPLL is disabled (default) */  SCG->SPLLDIV = 0x00000302; /* SPLLDIV1 divide by 2; SPLLDIV2 divide by 4 */  SCG->SPLLCFG = 0x00180000; /* PREDIV=0: Divide SOSC_CLK by 0+1=1 */  /* MULT=24: Multiply sys pll by 4+24=40 */ /* SPLL_CLK = 8MHz / 1 * 40 / 2 = 160 MHz */  while(SCG->SPLLCSR & SCG_SPLLCSR_LK_MASK); /* Ensure SPLLCSR unlocked */  SCG->SPLLCSR = 0x00000001; /* LK=0: SPLLCSR can be written */  /* SPLLCMRE=0: SPLL CLK monitor IRQ if enabled */ /* SPLLCM=0: SPLL CLK monitor disabled */ /* SPLLSTEN=0: SPLL disabled in Stop modes */ /* SPLLEN=1: Enable SPLL */  while(!(SCG->SPLLCSR & SCG_SPLLCSR_SPLLVLD_MASK)); /* Wait for SPLL valid */ } void NormalRUNmode_80MHz (void) { /* Change to normal RUN mode with 8MHz SOSC, 80 MHz PLL*/  SCG->RCCR=SCG_RCCR_SCS(6) /* PLL as clock source*/  |SCG_RCCR_DIVCORE(0b01) /* DIVCORE=1, div. by 2: Core clock = 160/2 MHz = 80 MHz*/  |SCG_RCCR_DIVBUS(0b01) /* DIVBUS=1, div. by 2: bus clock = 40 MHz*/  |SCG_RCCR_DIVSLOW(0b10); /* DIVSLOW=2, div. by 3: SCG slow, flash clock= 26 2/3 MHz*/  while (((SCG->CSR & SCG_CSR_SCS_MASK) >> SCG_CSR_SCS_SHIFT ) != 6) {}  /* Wait for sys clk src=SPLL */ }  /* TXWATER=3: Tx flags set when Tx FIFO <= 3 */     void WDOG_disable (void){  WDOG->CNT=0xD928C520; /*Unlock watchdog*/  WDOG->TOVAL=0x0000FFFF; /*Maximum timeout value*/  WDOG->CS = 0x00002100; /*Disable watchdog*/ } void PORT_init (void) { //Master: PCC->PCCn[PCC_PORTB_INDEX] |= PCC_PCCn_CGC_MASK; PORTB->PCR[2] |= PORT_PCR_MUX(3); /*Port B2: MUX = ALT3, SCK*/ PORTB->PCR[3] |= PORT_PCR_MUX(3); /*Port B3: MUX = ALT3, SIN*/ PORTB->PCR[4] |= PORT_PCR_MUX(3); /*Port B4: MUX = ALT3, SOUT*/ //PORTB->PCR[5] |= PORT_PCR_MUX(3); PORTB->PCR[5] |= PORT_PCR_MUX(1); PTB->PDDR |= (1<<5); PTB->PSOR |= (1<<5);     }   void lan8650_write_reset(void) {    uint32_t header = build_ctrl_header(1, 0x00, 0x0003, 0); // Write to RESET reg    CS_LOW();    LPSPI0_tx_32bits(header); (void)LPSPI0_rx_32bits();     // Write header    LPSPI0_tx_32bits(0x00000001); (void)LPSPI0_rx_32bits(); // Write data    CS_HIGH(); } void lan8650_write_imask0(uint32_t value) {    uint32_t header = build_ctrl_header(1, 0x00, 0x000C, 0);    CS_LOW();    LPSPI0_tx_32bits(header); (void)LPSPI0_rx_32bits();    LPSPI0_tx_32bits(value);  (void)LPSPI0_rx_32bits();    CS_HIGH(); } uint32_t lan8650_read_imask0(void) {    uint32_t header = build_ctrl_header(0, 0x00, 0x000C, 0);    uint32_t data = 0;    CS_LOW();    LPSPI0_tx_32bits(header); (void)LPSPI0_rx_32bits(); // Send header    LPSPI0_tx_32bits(0x00000000);                       // Dummy to clock data    data = LPSPI0_rx_32bits();                          // Get data    CS_HIGH();    return data; }     int main(void) {       uint32_t imask_read_value;     volatile int i;       // Usual system and SPI setup       WDOG_disable();       SOSC_init_8MHz();       SPLL_init_160MHz();       NormalRUNmode_80MHz();       PORT_init();           // Configure SPI pins       LPSPI0_init_master();  // Init LPSPI master       // Small delay before starting (optional)       for ( i = 0; i < 100000; i++); // Optional delay           // Write RESET           lan8650_write_reset();           // Optional delay to allow reset to complete           for ( i = 0; i < 100000; i++);           // Unmask all interrupts           lan8650_write_imask0(0x00000000);           // Read IMASK0 to verify           imask_read_value = lan8650_read_imask0();           // Set breakpoint here to inspect imask_read_value           while (1) { }       return 0;   } Here, I am trying to Write 0x00000000 to IMASK0 register address and trying to readback the same address in order to ensure the value has been written properly. But I got value has 0xC0000001 instead of 0xC0000000. (IMASK0 has 31 to 16 bits as reserved and Read-Only bits thus 0xC000 can be fixed even i try to write it as 0, thus we can neglect that) But the lower 16 bits are R/W and thus it should be 0.   For debugging purpose, in the above code I set breakpoint in the last while loop and it successfully hits (above picture) thus seems like write and read happening proper (not 100% sure, my assumption) but the value read is wrong.  I tried all possibilities and still couldn't find where it went wrong. Kindly guide me to solve this issue.  Thanks in advance.     Re: SPI Communication Issue with TC6 SPI Protocol Hi, yes, lpspi allows sending/receiving frame that has size larger that 32 bits. There could be several ways to do that. 1. set FRAMESZ to be multiple of 32, as per your need, how many words have to be transferred (up to 128) 2. set FRAMESZ to 31 for 32bit frame size and a) control CS manually and fill data registers as per desired number of word transfer. You can refer to below code  https://community.nxp.com/t5/S32K/S32K146-LPSPI-with-ADXL314/m-p/1826209/highlight/true#M32845 b) use continuous selection, refer to https://community.nxp.com/t5/S32K/Continuous-Transfer-LPSPI-S32K14x/td-p/1830165 For sure above codes need to be modified for 32bit transfer. Hope it helps. BR, Petr
記事全体を表示
FRDM-MCXN947 RTC Hello, I'm working on my data logger with FRDM-MCXN947, and I'm going to use the RTC module available on the board to record the time. I would like to ask, is it necessary to connect an external battery (and if so how), in case the main power supply is not connected via usb-c? Board Design Development Board MCXN Power Re: FRDM-MCXN947 RTC Hi, Thank you so much for your interest in our products and for using our community. Yes, you need an external battery to maintain the count of the time record. You need to connect the battery on VDD_BAT according to the Table 1. Power domain operating requirements section from UG10092 MCXNx4x Hardware Design Guide. Additional documentation: 2.1.1 Power supply configuration section from UM12018 FRDM-MCXN947 Board User Manual. Hope it helps you. Have a nice day!
記事全体を表示