Hello all,
I am using an MPC5777M and the MPC5777M-512DS board.
First of all, I wasn't not able to find MPC5777M-512DS documentation (jumper position and so on). In the MPC5777M EVB User Guide, the daughter card described is the MPC5777M_416DS.
I have downloaded and run the ToggleStationery sample. I is running well, but the frequency of the flashing LED seems to be too slow: 1.5 second instead of 1.
As I wrote, I don't know was is the frequency of the XOSC reference. May be the jumpers are not in the rigth place.
Did someone as an idea?
Alain
Hello all,
I have found the problem.
In the MPC5777M-PinToggleStationery sample, the PLL0 division is wrong.
It is: MC_CGM.AC0_DC0.R = 0x80050000; // PER_CLK : Enable aux clk 0 div by 4 … (75 MHz)
It is not a divide by 4 but by 6 and the result is not 75MHz but 50MHz.
The good one should be : MC_CGM.AC0_DC0.R = 0x80030000; In this case we got a real 75MHz.
By the way, if someone can give me the code to get CLKOUT on the PF[8] or in the PV[0], I will be very happy.
Thanks to all
Alain
Here you go:
// Configure PF[8] as SYSCLK0
// SIUL must be configured after mode transition!
SIUL2.MSCR_IO[88].R = 0x02000000 | 0x01; //PF[8] - ODC_PUSH_PULL and SSS_PF8_SYSCLK0
and:
//Clk Out
MC_CGM.AC6_SC.R = 0x02000000; //Enable PLL0 - clkout0 //MC_CGM_AC6_SC
MC_CGM.AC6_DC0.B.DE = 1; //Enable divider for SYSCLK0
MC_CGM.AC6_DC0.B.DIV = 0x13; //Set divider for SYSCLK0 to 20
Peter
Hi,
Jumper settings are described in chapter 3. Configuration—Motherboard.
http://cache.nxp.com/assets/documents/data/en/user-guides/MPC5777MEVBUG.pdf?fsrch=1&sr=1&pageNum=1
Did you measured your clocks, and LED by scope to be sure?
First, measure CLKOUT pin to get information about system clock used, then calculate LED loop delay from system clock.
Peter
Hello Peter,
Unfortunatelly, Jumpers for the 512DS daughter board are not described in this document (only for 416DS). I was not able to find documents for 512DS.
I don't know how to output CLKOUT.
My clock setting is the folowing:
// Set PLL0 to 300 MHz with 40MHz XOSC reference
// PREDIV = 1, MFD = 15, RFDPHI = 2, RFDPHI1 = 8
PLLDIG.PLL0DV.R = 0x4002100F;
MC_CGM.AC0_DC0.R = 0x80050000; // PER_CLK : Enable aux clk 0 div by 4 … (75 MHz)
PIT_0.TIMER[0].LDVAL.R = 75000-1; // setup timer 0 for 1msec period
With this configuration, the LED GPIO output should change every 1ms. I can see a switch every 1.5 ms.
So, If I assure that my configuration is good, the problem can come from the jumper (I don't have the external OSC enabled) or the external clock don't have the good frequency.
Thanks for your help .
Alain