How to Serial Interrupt on Nucleo-L476RG

I have tried almost everything
nextion.printf(“hello World”);
nextion.attach(&display_decoading, Serial::RxIrq);
also tried polling serial by sexton.readable()

but nothing seems to work
any help ??

even configuring serial on any other 2 pins also doesn’t work

Only saw this post now. Which pins are you using for serial?

Note that display_decoading will run in an ISR, so printf in there will hard fault with ARMCC. But if you don’t get any data through getc() either, then something is wrong at a lower level.

I am using the default SERIAL_TX and SERIAL_RX.
And getc also doesn’t work at all.

I did also try manually enabling RX int but then it gets stuck in an indefinite Loop.

Good afternoon. Want to forge the link Nucleo and Nextion. I connected the SoftWareSerial library to the program, but the compiler immediately throws an error 18 on line 31 in the SoftWareSerial file.cpp. Why?