Hi Iwao Mizota,
Yes, if you like, you can use the timer to wait the PLL1 to lock instead of using the while to wait.
But one point you should take care, the chapter you mentioned, is using the IRC as the BASE_M4_CLK source, and this BASE_M4_CLK also the timer's(Timer0/1/2/3) base clock.
You should make sure when the timer is working, the BASE_M4_CLK is not changed. You should disable the timer before you select the PLL1 as the BASE_M4_CLK source.
Wish it helps you!
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------