Mbed os version and GCC compiler version combination

I do not have LPC1768 so I do not know, but is popular target so I believe potential issues would be already reported here or on github.

I see just this

Mbed CLI 1 - Mbed OS 6.4 and older
Mbed CLI 2 - Mbed OS 6.5 and newer

About interrupt in general the Mbed OS 5.12 was game changer because all methods what have potential with manipulation through threads are covered by Mutex and mutex can not be used in ISR - read / write / printf / send / received and os on

Did you firmware updare of your LPC1768? That could be the magic.

BR, Jan