Yunqing Kou <yunqing.kou@...>
I have a question for work queue usage, below is my sample code, I don’t know where the problem is, anyone can help me? thanks.
struct k_work work;
struct k_work_q work_q;
#define MY_STACK_SIZE 512
#define MY_PRIORITY -2
k_work_queue_start(&pon_ploam_wq.work_q, my_stack_area, K_THREAD_STACK_SIZEOF(my_stack_area), MY_PRIORITY, NULL);
pon_ploam_wq.data = plm_int;
ret = k_work_submit(&pon_ploam_wq.work);
//ret = k_work_submit_to_queue(&pon_ploam_wq.work_q, &pon_ploam_wq.work);
void aal_plm_wq_proc(struct k_work *q_work)
ca_status_t ret = CA_E_OK;
pon_wq_t *wq = CONTAINER_OF(q_work, pon_wq_t, work);
ca_printf("%s: data %d \r\n",__func__, wq->data);
1. If use k_work_submit, only two or three interrupts can be put into system work queue and aal_plm_wq_proc can be called. But the interrupts are generated continuously.
2. If use k_work_submit_to_queue, interrupts can be put into the defined work queue continuously, but aal_plm_wq_proc is never called.
my zephyr version:
Zephyr version: 2.7.0
发件人: Yunqing Kou
Glad to join this group. Thanks.
发件人: Group Notification <devel+owner@...>
Welcome to the devel@... group at Zephyr Project. Please take a moment to review this message.
To learn more about the devel@... group, please visit https://lists.zephyrproject.org/g/devel
To start sending messages to members of this group, simply send email to devel@...
If you do not wish to belong to devel@..., you may unsubscribe by sending an email to devel+unsubscribe@...
To see and modify all of your groups, go to https://lists.zephyrproject.org
The Zephyr-devel@... Moderator
|1 - 1 of 1|