I'm trying to implement PLL1 to set the main clock frequency for the M4 core at most 204MHz.
To set the PLL1 with the PLL1_CTRL register there are no problems. I perform the following instructions:
1) Set AUTOBLOCK
2) Set M and N
3) wait LOCK
4) Set DIRECT
5) wait LOCK
6) clear BYPASS
7) wait LOCK
Each setting is set and the LOCK in PLL1_STAT is always 0.
Unfortunately, when I finally select the CLK_SEL of BASE_M4_CLK at 0x9, the next instruction is no longer executed.
Even if I do this last setting before setting up the PLL1, it does the same problem.
What could be the reason?
解決済! 解決策の投稿を見る。
I must admit that I'm a little bit out of business for this LPC4300 platform, but after a short look into your code I have the follwing recommendations:
Regards,
Bernhard.
A few reasons for this:
Regards,
Bernhard.
Thanks for the reply. I set the PLL as the first operation.
I solved, the problem was that the PLL1 was not enabled, ie bit 0 (PD) was not clear.
However now it works but I have to skip the wait LOCK phases. In fact, the LOCK bit of PLL1_STAT is never set to 1.
I set the PLL1_CTRL register in several steps, but when I check the LOCK it is always 0.
If I skip the LOCK check the process goes on all the same and everything works.
Attached the function I use.
What could be the problem of LOCK bit?
I must admit that I'm a little bit out of business for this LPC4300 platform, but after a short look into your code I have the follwing recommendations:
Regards,
Bernhard.