Hello,
I have loaded your example and had quick look at the issue. I can see tour Hardfault is escalation of


UNDEFINSTR - Indicates an undefined instruction was executed. This can happen on exception exit if the stack got corrupted.
but the call to Clock_Ip_Init leads to hardfault.
Furthermore: looking at clock_ip_init I can call it successfully.

Your code is crashing at my side on address:

Once I execute it the code is going to userfault - >hardfault because that is unknown instruction.
Do you see the same?
Best regards,
Peter