主题中讨论的其他器件:WMBUS
您好、团队;
使用 SDK:wmbus_cc13x0_ rtos_ 2_ 0_ 0,t1_c1例程、更改为10s 以发送数据一次、 然后调用 wmbus_apl_setclock(); 在初始化期间;
将系统时钟设置为本地时间、并在晚上8:00开始挂起。 晚上11时30分后、将不会发送数据。 到第二天下午、传输尚未开启。 "怎么了? 在哪里需要配置定期发送数据的时间间隔?
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
您好、团队;
使用 SDK:wmbus_cc13x0_ rtos_ 2_ 0_ 0,t1_c1例程、更改为10s 以发送数据一次、 然后调用 wmbus_apl_setclock(); 在初始化期间;
将系统时钟设置为本地时间、并在晚上8:00开始挂起。 晚上11时30分后、将不会发送数据。 到第二天下午、传输尚未开启。 "怎么了? 在哪里需要配置定期发送数据的时间间隔?
以下是例程代码的一部分、仅用于更改发送时间。 此外、已经确定了一个具有相同优先级的任务、
每8S 调用"wmbus_apl_getClock(),并通过串行端口打印。
/*! Init start strucutre for meter device */ s_apl_mtrInitAttr_t gs_meterInitAttr = { { /* Frequency offset for the carrier. */ CUSTOMER_FREQ_OFFSET, /* Device address */ &gs_addr, /* Telegram storage */ gac_telegramStorage, /* Size of the telegram storage */ MAX_PAYLOAD_LEN }, /* Encryption key */ gt_key, /* Collector address. */ &gs_collector, /* Set the device to connected. Only if the device is a meter device. Otherwise this field is ignored. */ true, /* Periodical interval for sending data. Only if the device is a meter device. [s] */ 10U }; /*----------------------------------------------------------------------------*/ static void loc_meterTask(UArg arg0, UArg arg1) { /* Initialises the hal. */ if(wmbus_hal_init() == E_HAL_STATUS_SUCCESS) { /* Initialize the sandman module. */ sf_sandman_init(&loc_stackSleep, &loc_stackWakeUp); /* Initialize APL */ if(E_WMBUS_STATUS_SUCCESS == wmbus_apl_mtr_init(&gs_meterInitAttr)) { /* Set the WMBUS mode. */ wmbus_setMode(WMBUS_MODE_C1); /* Set mode 7 as default mode */ wmbus_apl_mtr_setEncryptionMode(E_WMBUS_ENCRYPTION_MODE_5); while(true) { if(gb_stackActive) { sf_mcu_rtc_run(); /* Run the application layer. In general, the function wmbus_apl_mtr_run must be called as often as possible, since it is responsible to handle all operations of the WMBUS Stack. */ wmbus_apl_mtr_run(); /* Handle event */ wmbus_hal_bsp_handleEvent(); } else { /* It is possible to let the device go to sleep. */ wmbus_hal_mcu_sleep((E_HAL_MCU_SLEEP_MODE_t) ge_sleepMode); } /* if() .. else */ } /* while */ }/* if */ else { /* Stack initialization failed. Add your error handling here. */ while(1); } }/* if */ else { /* HAL initialization failed. Add your error handling here. */ while(1); }/* if() .. else */ }/* loc_meterTask() */
您向我展示的代码位于 app_aplMeterRtos.c 文件中。
你正在使用什么构建配置(将模式强制为 WMBUS_MODE_C1、但是对于你项目中所使用的预定义符号、你什么也不说)。
此外、您对收集器进行了哪些更改、编译配置是什么?
除了这些更改之外、您还创建了另一个任务、但由于不知道您在此任务中正在做什么、我无法知道事情为什么不起作用。
我强烈建议您一次一步更改默认应用程序、并在两者之间进行测试。
首先只更改发送间隔、然后查看内容是否仍在工作。
如果可以,可以尝试更改 wmbus 模式,并且在确认它工作后,可以更改加密模式。
确认所有这一切都正常后、您可以添加另一个任务。
请记住,打印需要时间,因此这可能会改变应用程序的时间。 出于调试目的、您可以尝试切换一些引脚、以确保新任务在运行时正在运行。
Siri.
要设置 仪表器件的周期间隔、可以使用 wmbus_APL_MTR_setInterval (uint32_t l_IntervalSections )。
同步传输间隔的详细信息可在 EN13757-4中找到。
L_IntervalSections 是 以秒为单位的周期性间隔。 时间间隔必须是2秒的倍数。 奇数值将减小一秒。 最大值为86400 (24小时)。 使用0停止同步传输。
Siri.