Hello PrzemRS
Using printf in an interrupt handler is not such a good practice.
Better is to use a static volatile int variabele (example) as a flag that you increment in the interrupt handler.
You can print the value of this variable from your main routine (while loop) using a loop with a delay in it (usleep). The delay is handy so you do not overload the usb link that transfers the debug output to your console window. (I assume you are using some DE board or the like)
You need to declare the variable as volatile because otherwise the compiler might use register optimizations.
On the other hand, if you only increment the value the primary cause of the interrupt in your handler, the reason of the interrupt is possibly not removed and the interrupt is not acknowledged so you keep ending up in the same interrupt routine. To do this you need to read/write some registers in the UART to tell it that you serviced the interrupt.
You might consider writing an interrupt handler for a button with pio input, then see how it works and then go further to the UART.
Best Regards,
Johi.