From Earlier Today.

Setup code: Fixed assignment to be |= instead of = for HFPERCLKEN0 in DAC and TIMER setup.
Looks: Moved some comments above the code.
Untested: Does the __WFI() intrinsic function exist? if not look into inline assembly.
Clarity: Changed some hard coded numbers to equivalent variables.