Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT




Loading

problems with UART

Posted by Pietro on September 21, 2007
Why if I try to do:

xSerialPutChar( xUART2, 'a', mainNO_BLOCK );
xSerialPutChar( xUART2, 'b', mainNO_BLOCK );
xSerialPutChar( xUART2, 'c', mainNO_BLOCK );
xSerialPutChar( xUART2, 'd', mainNO_BLOCK );
xSerialPutChar( xUART2, 'e', mainNO_BLOCK );
xSerialPutChar( xUART2, 'f', mainNO_BLOCK );
xSerialPutChar( xUART2, 'g', mainNO_BLOCK );
xSerialPutChar( xUART2, 'h', mainNO_BLOCK );
xSerialPutChar( xUART2, 'i', mainNO_BLOCK );
xSerialPutChar( xUART2, 'l', mainNO_BLOCK );
xSerialPutChar( xUART2, 'm', mainNO_BLOCK );
xSerialPutChar( xUART2, 'n', mainNO_BLOCK );
xSerialPutChar( xUART2, 'o', mainNO_BLOCK );
xSerialPutChar( xUART2, 'p', mainNO_BLOCK );

in a task running with other tasks, doesn't it work? (It may write on my terminal another char or the right sequence, but truncated or it may even crash... )

Why does

xSerialPutChar( xUART2, 'a', mainNO_BLOCK );
xSerialPutChar( xUART2, 'b', mainNO_BLOCK );
xSerialPutChar( xUART2, 'c', mainNO_BLOCK );
xSerialPutChar( xUART2, 'd', mainNO_BLOCK );

work?


And why if this task is the only one running, with all the xSerialPutChar, does this work well?


Thank you in advance,

Pietro

RE: problems with UART

Posted by sotd on September 21, 2007
Any clues as to which port you are using. Processor? Compiler? Did you write the code yourself, or is this in the download?

RE: problems with UART

Posted by Dave on September 21, 2007
Does it work if you use a block time. You are probably just not sending all the data.

Which port are you using?

RE: problems with UART

Posted by Pietro on September 21, 2007
I'm using PIC18F6527 with MPLAB 7.62, and I write my code.
Can you give me any advices?

Thank you,

Pietro


[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]




Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

FreeRTOS kernel V10 is available for immediate download. Now MIT licensed.


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS