I also fought with the PLL setup (though I had no example sources).
Did you go step by step ?
How does the cpu come out of reset ? Mine comes in DRUN mode.
My steps:
- enable OSCX
- enable PLL1
- enable PLL0
- set SYSCLK to 4
All in the ME_DRUN_MC register.
All one after the other.
Then I program the PLL.
Then I switch to DRUN mode (yes from DRUN mode)
Now PLLs are locked.
But: I currently have no way to check if the PLL is working correct.