Hello, I am using STMicroelectronics, ST10F269 evaluation board that works on Keil environment. I am trying establish communication between the board and the PC through RS232 serial interface. I am able to transmit a byte from board to PC and and receive a byte from PC to the board. But I am unable to receive a frame from PC to the board that has 1 start bit, 8 data bits and 1 stop bit. My application wants to receive a frame from the display device and process the commands and sends back a frame from board to the display. Receiving side is like a state machine, till it receives a valid frame, it will be in the while loop, keep checking for incoming characters. Once it receives a valid frame it sends an acknowldegement frame back to display. So the problem is when display sends a frame, board is able to receive only one byte, not the full frame. So could you please give me solution for this. Thanks & Regards, Naina
GetChar() returns false if there are no characters available, so ReceiveFrame() will return after one character unless the entire frame has already been received by the serial ISR before ReceiveFrame() is called. Do you really need to use interrupt driven serial comms? The code you have posted looks as though it is intended to loop polling the receive buffer - that rather negates any benefit of using interrupts. Stefan