Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
9 years, 4 months ago.
Hangs when the baud rate is given in bear protocol library (communication.cpp file)
Hello, I would like to use the bear protocol for communication.cpp file but when i give serialCom->baud(baudRate); in the file it hanges up and never come out . so when i delete it program run fine but i am unable to see the data from serial.putc(packet). and serial.getc(packet) throws an error as error time out. Could you please suggest me any soultion for this error. In the below code i quotedit. Thank you.
COMMUNICATION::COMMUNICATION(PinName tx, PinName rx, uint32_t baudRate, uint16_t tx_buff, uint16_t rx_buff )
{
#ifdef _DEBUG
    pc = new Serial(USBTX, USBRX);
    pc->baud(115200);
    pc->printf("\033[2J");
#endif
    serialCom = new iSerial(tx, rx,NULL,tx_buff,rx_buff);
serialCom->baud(baudRate);
    
}
Quote:
serialCom->baud(baudRate);
Question relating to:
 
                
            