Serial Port Operation


When the following code executes, (LP3500 with WA Kit), it parses the serial port for data (i check for a simple message format), and based on a valid message,the code calls a function DO_Command.

The RUB:

What is interesting is, if i remove the printf(“.”) after the serCgetC(), the code does not work. It is almost like the serial task / interrupt is not running?

Please help,

// Set execute
execute = RUN;

// Main loop
while (execute == RUN) {
// [R2] - [read_rtc] - [PG 331]
rtc_time = read_rtc();
// Has time out occured?
if (rtc_time < _rtc_timeout) {
serData232 = serCgetc();
// Is valid data available?
if (serData232 != -1) {
// Is start byte present?
if (serData232 == _MSG_START){
// Read 3 Bytes?
if (serCread(serBuffer232,3,200)== 3) {
// Is atop byte present?
if ((serBuffer232[2] == _MSG_STOP)) {
// Parse well formed message
status = DO_Command(serBuffer232[0], serBuffer232[1]);
else {
// Timeout occured, stop main loop
execute = STOP;


Hi, I’m new with this, but let’s think about this.
First of all, what serCgetc() does is geting a character from de register that contains the data recived from the serial Port C, does’nt it?
If you put any other thing instead from printf (like serData232 = serData232; maybe 2 or 3 times) what happens?? Maybe is a problem of timing.
I’m sure that this information is not usefull, but i’m doing my best. I’m also fighting with the serial Port from a RCM3700 module.