# xSerialPutChar problem

**URL:** <https://forums.freertos.org/t/xserialputchar-problem/1790>\
**Category:** Kernel\
**Created:** [March 6, 2007, 1:10am UTC](https://forums.freertos.org/t/xserialputchar-problem/1790 "2007-03-06T01:10:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [March 6, 2007, 1:10am UTC](https://forums.freertos.org/t/xserialputchar-problem/1790/1 "2007-03-06T01:10:19Z")

</div>

**nobody** wrote on [Tuesday, March 06, 2007](https://sourceforge.net/p/freertos/discussion/382005/thread/4ede2e9f/#7815):

I have a problem with serial communication.

I made a simple task that send ‘A’ once per second (PIC18F4550 with MPLAB C 7.52)

On Window’s Hyperterminal, ‘A’ appears once per 5 seconds.

I suspect queue caused the trouble(I declared serial queue length&nbsp; to 5 )

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #define mainCOMMS\_QUEUE\_LENGTH&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ( 5 )

Please tell me what’s wrong.

Regards

Sohn, Seoul, Korea

static void vTest( void \*pvParameters )  
{  
&nbsp;&nbsp;&nbsp; for( ;; )  
&nbsp;&nbsp;&nbsp; {  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vTaskDelay( 900);  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xSerialPutChar( NULL, ‘A’, 100 );  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vParTestToggleLED(2);  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vTaskDelay( 100);  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vParTestToggleLED(2);

&nbsp;&nbsp;&nbsp; }  
}

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [March 6, 2007, 9:05am UTC](https://forums.freertos.org/t/xserialputchar-problem/1790/2 "2007-03-06T09:05:25Z")

</div>

**nobody** wrote on [Tuesday, March 06, 2007](https://sourceforge.net/p/freertos/discussion/382005/thread/4ede2e9f/#7815/dcf4):

From the code it looks like A should be sent every 1000 ticks, but there is nothing to say what one tick represents.&nbsp; It could be that the tick is running 5 times slower than you think.&nbsp; Most likely the thing that is wrong is the setup of the timer that is generating the tick.

Check the configTICK\_RATE\_HZ and configCPU\_CLOCK\_HZ settings in FreeRTOSConfig.h along with prvSetupTimerInterrupt() in port.c.&nbsp; If these are both right take a look at your initialization code to see how you are setting up the processor clock frequency.

Dave.
