FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [June 2008 Threads] I need help with a blocking QueuePosted by Fernando Gatto on June 5, 2008 Hi, I have a task that it blocks waiting for an item to be posted on a queue. The item is posted from an ISR. The first item posted on the queue unblocks the task successfully. The second item also unblock the task but when the task returns to the blocking receive the system get stuck. I don´t see anything strange in the memory, the stacks of the tasks are ok. I tried everything, I removed all the code from the task, I only leaved a led toggle. I need suggestions of what could be the problem.
Thanks
RE: I need help with a blocking QueuePosted by Richard on June 5, 2008 Its a bit tricky to offer suggestions as its quite a high level description of the problem. Can you step into the code when the third item is posted to the queue to see that there is in fact a task blocked on the queue when the item is posted, and that this task is then unblocked during the post?
Regards.
RE: I need help with a blocking QueuePosted by Fernando Gatto on June 5, 2008 Thanks Richard for your support. After the second post on the queue the task gets unblocked but when it returns to the xqueue receive the program get lost. I changed the xqueue receive to another task and the system get blocked on the first post. It seems that some variable of the kernel get corrupted. After the frozen, if you look with the debugger the ram content, it is very similar to the previous state, there isn´t a big ram area corrupted. Now I´m trying to look which one is the corrupted.
Is all the information about a task in the TCB? and Is all the information about a Queue in the xqueue handle? or Is there any other area whith relevant information that could be damaged?
Regards
RE: I need help with a blocking QueuePosted by Dave on June 6, 2008 The other place to check is the stack. Has the stack overflowed? http://www.freertos.org/Stacks-and-stack-overflow-checking.html
RE: I need help with a blocking QueuePosted by Fernando Gatto on June 6, 2008 Thanks Davedoors for your help. I´ve checked the stacks of the stacks and everything looks fine. In order to test I´ve quited everything. I´ve only have three tasks waiting for a byte to be posted on three differents queue each one, and. I have only a timer based interrupt with a little state machine and appart from the rtos timer nothing else is running. If in the interrupt I post a byte in only one queue the corresponding task gets unblocked it toggles a led and the system doesn´t crash. But when i post on two queues is when the problems begins. Depending the combinations the system crash with differents patterns but is always the same, you reset the system and sequence before crash is always the same.
Regards
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|