错误报告多定期app_easy_timer回调bug

12 posts / 0 new
Last post
toughworld
Offline
Last seen:3年4个月前
加入:2015-05-12 09:55
错误报告多定期app_easy_timer回调bug

I have 3 Timer declared by app_easy_time.one is periodic by one second , the second one is called in some occasion, the last one is call evey 30 second at random time.
有了这三个定时器,第二个定时器回调被称为无法正确解剖。我认为它被第一个定期计时器调用。
If i use only the first two timer ,eveything seems ok.

update: some simplified code ilustrting my timer setup,the wrongly triggerd hanler problem was my fault,but another problem occurs.

static void app_watchdog_second_timer_handler() //call every second,
{
second_coun ++;
APP_WATCHDOG_SECOND_TIMER = app_easy_timer(100 , app_watchdog_second_timer_handler); //1000 ms

if(second_count == 10)
{
uint32_t delay = (co_rand_byte() % 20) * 10 + 30 ;
app_send_data_timer = app_easy_timer(延迟,sendsensordatahandler);

}

if(second_count == 30) // a period is 30 second
{
second_coun = 0;
}

}

void sendSensorDataHandler(void) // call once in a period
{
APP_SEND_DATA_TIMER = EASY_TIMER_INVALID_TIMER; //this line address my previous problem ,now timer trigger the correct handler
}

void resetSendData(void) //triggerd in some conditon
{
if( APP_SEND_DATA_TIMER != EASY_TIMER_INVALID_TIMER) //this line address my previous problem ,now timer trigger the correct handler
{
// ----------此处发生另一个问题,此功能组织删除了我的app_watchdog_second_timer,导致运行定时器[app_callbacks [app_timer_max_num],空

app_send_data_timer = app_easy_timer_modify(app_send_data_timer,reset_send_data_time +(co_rand_byte()%20)* 10);
}

}

关键词:
设备:
MT_dialog
Offline
Last seen:2 months 1 week ago
Staff
加入:2015-06-08 11:34
Hi toughworld,

Hi toughworld,

你能给我一些关于你的设置的细节吗?我设置了3个定时器1)60秒,2)30秒和3)递增延迟。所有这些似乎都准时到了。在你的考试中,如果我正确地正确地确定了一个计时器触发了错误的处理程序,这是正确的吗?

Thanks MT_dialog

toughworld
Offline
Last seen:3年4个月前
加入:2015-05-12 09:55
谢谢,我上传了一些

谢谢,我上传了一些简化的代码iLustring我的计时器设置,错误地触发了Hanler问题是我的错,但另一个问题发生了,
顺便说一下,在CSR API中,回调有TimerID参数,用于避免赛车编码子,在易于计时器中,没有这个,是可以的吗?
typedef void( * timer_callback_arg)(timer_id const )
timer_id TimerCreate ( uint32 const time,bool const relative,timer_callback_arg handler )

MT_dialog
Offline
Last seen:2 months 1 week ago
Staff
加入:2015-06-08 11:34
Hi toughworld,

Hi toughworld,

如果我正确地正确地正确地opp_easy_timer_modify();而不是修改您的计时器它删除另一个计时器?您是否能够验证到App_easy_timer_modify的值并检查传递给函数的处理程序的ID。我尝试了app_easy_timer_modify,它不会取消计时器。您可以尝试实现更简单的东西,以便如此:

void testing_timer_handler1(void)
{
testing_timer1 = EASY_TIMER_INVALID_TIMER;
if (testing_timer!=EASY_TIMER_INVALID_TIMER)
{
testing_timer = app_easy_timer_modify(testing_timer, RESET_SEND_DATA_TIME + (co_rand_byte()%20)*10);
}
testing_timer1 = app_easy_timer(60,testing_timer_handler1);
}

void testing_timer_handler(void)
{
if (testing_timer!=EASY_TIMER_INVALID_TIMER)
{
testing_timer = easy_timer_invalid_timer;
ARCH_SET_PXACT_GPIO();
}
}

Thanks MT_dialog

Mahesh
Offline
Last seen:3年3个月前
加入:2016-01-04 14:03
Hi,

Hi,
我在DA14583DEVKT-B板上使用SDK 5.0.3软件。
I have taken the "ble_app_peripheral" (BLE example projects given).

修改以支持两个特征。需要每10毫秒和30毫秒通过分别的特点1和特征2发送数据。

在每个循环操作中,我需要获得1个数据 - I和3数据包的数据-I(即持续时间为30毫秒)。但我收到了1个数据-1和2数据包的数据-II。
"app_easy_timer(APP_PERIPHERAL_CTRL_TIMER_DELAY, DataVal1TimerCbHandler)"" and "app_easy_timer(APP_PERIPHERAL_CTRL_TIMER_DELAY2, DataVal2TimerCbHandler)" are used to trigger the periodic call.

Please help me to resolve the issue.

问候,
Mahesh Chandana.

MT_dialog
Offline
Last seen:2 months 1 week ago
Staff
加入:2015-06-08 11:34
嗨mahesh,

嗨mahesh,

请检查以下帖子http://support.dialog-semiconductor.com/whats-kernel-timer-accuracy.

Thanks MT_dialog

Mahesh
Offline
Last seen:3年3个月前
加入:2016-01-04 14:03
Hi,

Hi,
I am using "ble_app_peripheral" (BLE example projects given) code.
I need following information which will be useful
1.截至目前,我只能达到最低10毫秒。是否有可能增加内核定时器的调度频率(即app_easy_timer())。
2. I wish to use the queue implementation in my application. Please guide me how to create and use the queue.
3. As per my application requirement, I need to send the sensor data to to Kernel (for transmission through BLE), when ever the data is available. whether I can call "ke_msg_send(req)" when ever I have the sensor data. Is any constrains and limitation are there. What is the minimum time required between two successive packet or message to the kernel.

问候,
Mahesh Chandana.

MT_dialog
Offline
Last seen:2 months 1 week ago
Staff
加入:2015-06-08 11:34
嗨mahesh,

嗨mahesh,

1.我不通过调度频率获得你的意思,当代码通过主循环中的RWIP_SCHEDULE()时,所有消息都会安排所有消息。如果这就是你的意思,没有办法增加内核计时器的分辨率。

2. You can find information regarding the RW kernel in the RW-BT-KERNEL-SW-FS.

3.正如上面提到的那样,通过RWIP_SCHEDULE()调度到内核的消息,频繁执行此函数执行的频率取决于该循环,如果系统决定睡眠或不睡眠以及APP_ASYNCH_TRM()的函数函数(app_on_ble_powered)。如果app_on_ble_powered return goto_sleep设备将继续,使相应的睡眠检查并进入睡眠状态,如果返回keep_powered,这将强制调度程序再次运行。

Thanks MT_dialog

Mahesh
Offline
Last seen:3年3个月前
加入:2016-01-04 14:03
Hi,

Hi,
谢谢你的快速回复。
Is it possible to send multiple (i.e. more than one) notification data in single connection interval.

问候,
Mahesh Chandana.

MT_dialog
Offline
Last seen:2 months 1 week ago
Staff
加入:2015-06-08 11:34
嗨mahesh,

嗨mahesh,

Yes its possible, you dont have to do anything special, just send the notifications in the interval you would like and the stack will send more that one packets if more than one notifications are available in the queue. Regarding how many packets can be sent in one connection interval please check the next threadhttp://support.dialog-semiconductor.com/number-packets-connection-event.

Thanks MT_dialog

Mahesh
Offline
Last seen:3年3个月前
加入:2016-01-04 14:03
Hi,

Hi,
when ever I am sending enable Notification (ie. write request (ie. 1 value)from the mobile to the server), it is receivable at the server side (i.e. at user_catch_rest_hndl() ). but when ever I am sending the disable notification (i.e. Write request (i.e. 0 value) from mobile to server), I am not able to receive at server side (i.e. user_catch_rest_hndl() ).

I need indication (at server side) when ever I am receiving disable notification. I am suspecting it is handling in the kernel level itself.
How I can identify the reception of disable notification.

问候,
Mahesh Chandana.

MT_dialog
Offline
Last seen:2 months 1 week ago
Staff
加入:2015-06-08 11:34
嗨mahesh,

嗨mahesh,

When a central writes on a characteristic you get an indication at the application, for example in the ble_app_peripheral project you should be able to catch the CUST1_IDX_ADC_VAL_1_NTF_CFG case in the user_catch_rest_hndl() function, when you get this indication to your application you can check if the value of the parameter has a PRF_CLI_START_NTF or a PRF_CLI_STOP_NTFIND.

Thanks MT_dialog