MCF5208(possibly other V2 devices) Clock Module reconfiguration when RCON not asserted during Reset

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MCF5208(possibly other V2 devices) Clock Module reconfiguration when RCON not asserted during Reset

702 Views
DaveSt
Contributor I

Hi

I have a successful design that uses RCON asserted and *RSTOUT gated configuration which works perfectly.  

 

Due to space limitations I am trying to remove the gated configuration devices (resistor, capacitor and '573 TTL device) since we conform to the "default" reset configuration. 

  

With RCON pulled high the 5208 start as expected and executes from our 16 bit flash but runs at the lower speed (as expected from the default reset configuration with RCON high).

 

 

I then try to reconfigure the Clock Module to achieve our required 166/83Mhz (core/bus) speed but cannot achieve this with the setting of the PORD and PFDR registers (see following code), we have a 16MHz crystal reference.

 

 

void config_init(void)  

{

//Enter Limp mode, change clock, back into normal mode and wait for a PLL lock.

MCF_PMM_MISCCR=MCF_PMM_MISCCR_LIMP;

MCF_PLL_PODR=0x36;

MCF_PLL_PFDR=125;

MCF_PMM_MISCCR=0;

while ((MCF_PMM_MISCCR&MCF_PMM_MISCCR_PLL_LOCK)==0);

}

 

Changing the PODR and PFDR registers do have an effect on the operation be not what we expect.

 

All other operation seems perfect and we have used this device with "asserted RCON+gated configuration" and it works correctly.

 

Regards

Dave

Labels (1)
0 Kudos
1 Reply

325 Views
DaveSt
Contributor I

Hi 

 

The problem is resolved!

 

It was due to incorrect register address definitions in MCF5208_PLL.H file originally supplied with the MCF5208EVB.

 

The definition file used addresses

0xFC09000, 0xFC09001, 0xFC09002, 0xFC09003

but should have used

0xFC09000, 0xFC09002, 0xFC09004, 0xFC09006

 

The result was that we never actually wrote correctly to the registers.

 

Hope this might help someone in the future.

 

Regards

Dave

 

0 Kudos