hi
We used mcal to configure uart+idle mode, and the receipt sending and receiving were normal. However, after the program was burned, it was found that hardfault was entered after power-off and waiting for 10 seconds after power-off. UART is suspected to be the cause. The initialization process is as follows.
Please help to analyze and provide the uart initialization process.