Curious problem arises when I added a second serial instance to my program.
When adding the Second serial instance
Serial device(p9, p10);
The Serial pc stops sending data to the terminal screen listening
on the mbeds serial port.
Comment the Serial device(p9, p10)
and the device.baud(4800);
and compile message start to flow to the terminal screen.
Is this a bug?
BELOW NO MESSAGES in the terminal screen
#include "mbed.h"
Serial pc(USBTX, USBRX); // tx, rx
Serial device(p9, p10); // tx, rx
int main() {
device.baud(4800);
while(1) {
pc.printf("test print %d%d%d\r\n", 1, 2, 3);
}
}
BELOW Messages flow
#include "mbed.h"
Serial pc(USBTX, USBRX); // tx, rx
//Serial device(p9, p10); // tx, rx
int main() {
//device.baud(4800);
while(1) {
pc.printf("test print %d%d%d\r\n", 1, 2, 3);
}
}
Curious problem arises when I added a second serial instance to my program.
When adding the Second serial instance Serial device(p9, p10); The Serial pc stops sending data to the terminal screen listening on the mbeds serial port.
Comment the Serial device(p9, p10) and the device.baud(4800); and compile message start to flow to the terminal screen.
Is this a bug?
BELOW NO MESSAGES in the terminal screen
BELOW Messages flow