Hello Edward,
Below is reply from our IC Design team:
-----------------------------------------------------------------
1.
I have run a simulation and not seen any issue when switching the system clock from PLL to Fast Clock.
I have just followed the basic programming as mentioned in the Reference Manual, so I am not sure as to why the user is facing issues.
Here are few things I think can ask the user to tell me:
1. 1. What is the value in CCM_CCSR reg. he is writing when he switches the system clock to FIRC?
2. 2. Is he still programming the ACCZ bit, and to what value [set or clear]?
3. 3. What is the value of CCM_CCM_CSCDR3 reg. before the switch of system clock source?
4. 4. What is the value of CCM_CSCMR1 reg. before the switch of system clock source?
5. 5. Is the clock configuration difference between working and non working program only about the setting of bits[2:0] of reg. CCM_CCSR ? if NO, what are the other difference w.r.t. clock configuration?
2.
A small debug program which he can try (with a working program - I see that a case working out of RAM is working fine):
1. Configure CCM_CCOSR reg. to view either PLL3 main clock, or PLL3 PFD4 clock, or PLL2 PFD4 clock, or PLL1 PFD4 clock on the CKO2 pad (the user may want to get a divided clock on these pads instead of direct full frequency clock).
2. Depending on which clock is made observable on CKO2 pad, configure the bits [23:22] of reg. CSCMR1 to:
a. 2'b00 if PLL3 main clock is made observable on CKO2 pad
b. 2'b01 if PLL3 PFD4 clock is made observable on CKO2 pad
c. 2'b10 if PLL2 PFD4 clock is made observable on CKO2 pad
d. 2'b11 if PLL1 PDF4 clock is made observable on CKO2 pad
3. ACCZ bit is cleared.
4. CCM_CSCDR3 bit no 4 is set.
5. Configure the CKO1 pad to make QSPI0 Serial x2 Clock visible.
6. Wait for some time. A time loop, may be.
7. Clear bits [2:0] of CCM_CCSR reg. to 0s.
8. See if the clock is still visible of PAD CKO1.
-----------------------------------------------------------------
I am sorry it is taking more time and effort on both sides to verify this issue than probably expected, but this is quite common while analyzing issues of such nature.
Sincerely, Naoum Gitnik.