PIC32 port ticks

Posted by wne on September 8, 2009
I am new to FreeRTOS. I run it in debug mode. I made a break point at lcd.c file line 244, prvLCDPutString( xMessage.pcMessage );. I notice that teh xTickCount increase 500 ticks when the program stop at the break point, but the xMessage.xMinDisplayTime is 200. Could you tell me why? Thanks.

RE: PIC32 port ticks

Posted by MEdwards on September 8, 2009
Having just looked at the code I would say xMinDisplayTime is a hard coded value that is never changed.

RE: PIC32 port ticks

Posted by wne on September 8, 2009
what is hard coded value? The main.c defines:
xLCDMessage xMessage = { ( 200 / portTICK_RATE_MS ), cStringBuffer };
Cause portTICK_TATE_MS is 1, it make sense that xMinDisplayTime is 200.
why the break point stop every 500 ticks?

RE: PIC32 port ticks

Posted by MEdwards on September 8, 2009
Ok now I understand your question.

I would say it was because there are two delays in the task. You are just looking at vTaskDelay() which blocks for the 200 ticks, but there is also a call to xQueueReceive() which blocks for ever. What ever posts to the queue probably does so every 500 ticks. This would be normal for a 'check' task which inspects system status every 300 or 500ms (depending on the demo) then shows a status message or toggles and led.

RE: PIC32 port ticks

Posted by wne on September 9, 2009
I see. Thank you!