LPC1768 device mbed-os 6.16 fclose and fopen function time problem

I’m really not sure, to be honest. It sort of feels like your board might be damaged, because this should work (assuming you have the correct baud rate). Maybe try creating a new BufferedSerial on some of the IO pins, attach a USB serial adapter, and see if anything is getting printed?