Hi 张华荣,
Please check this information:

Did you meet the IDLE set condition?
You can check it on your receiver wire and your UART2 configuration, just when the IDLE is set, the interrupt can happen.
RXEDGIE is not the IDLE interrupt, it is caused by the RxD Input Active Edge Interrupt.
Please make sure the IDLE set condition is meet on your side, if the condition is meet, the IDLE will be set, and the IDLE interrupt will be happen.
Please also take care these points:
Idle detection is not supported when7816Eis set/enabled and hence this flag is ignored.
NOTE: When RWU is set and WAKE is cleared, an idle line condition sets the IDLE flag if RWUID is set,
else the IDLE flag does not become set.
Wish it helps you!
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------