Hi wei_w_he,
You can find out this line caused fault.

Operating peripheral register trigger fault are usually caused by not enabling the peripheral clock.

Best Regards,
Robin
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------