How to set by software interrupt of USART in NVIC? - in fact emulate it
You can try using NVIC_SetPendingIRQ() or the software trigger register STIR as in

NVIC-&gt;STIR = USART0_IRQn;


Both methods will trigger the vector handler function via NVIC.