Hello
I'm trying to catch data from the serial ports (p9, p10) and (p13, p14).
I want it interrupt based, But my mbed hangs afther initialisation.
First I've the initialization functions:
void SerialA_Init(int baud)
{
serial_A.baud(baud);
serial_A.attach(&RxA_interrupt);
}
void SerialB_Init(int baud)
{
serial_B.baud(baud);
serial_B.attach(&RxB_interrupt);
}
Then in the callback functions I try to catch the data:
void RxA_interrupt(void)
{
char data = serial_A.getc();
rcvBufferA = rcvBufferA + data;
}
void RxB_interrupt(void)
{
char data = serial_B.getc();
rcvBufferB = rcvBufferB + data;
}
To actually use the data I use another function that uses the rcvBufferA and B.
But the problem is, when booting the MBED, it initializes the serial ports and then the MBED freezes.
I've tried several possible solutions like adding "UART_1_RBR = LPC_UART1->RBR;" But nothing works.
How can I solve this?
Thanks
Robin
Hello
I'm trying to catch data from the serial ports (p9, p10) and (p13, p14). I want it interrupt based, But my mbed hangs afther initialisation.
First I've the initialization functions:
Then in the callback functions I try to catch the data:
To actually use the data I use another function that uses the rcvBufferA and B.
But the problem is, when booting the MBED, it initializes the serial ports and then the MBED freezes. I've tried several possible solutions like adding "UART_1_RBR = LPC_UART1->RBR;" But nothing works.
How can I solve this?
Thanks Robin