m5213 Clock mode

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

m5213 Clock mode

2,846 Views
mjbcswitzerland
Specialist V
Hi All
 
I am wondering about the difference between starting the M5213 (and similar) Coldfire processors with an external 8 MHz crystal and CLKMOD0/1 = 10 and 11.
With '10' the crystal is selected with PLL disabled and with '11' the crystal is selected with PLL enabled.
 
When PLL is selected is it correct that it will multiply the crystal frequency by x6 (8 x 6 = 48MHz). I figure out x6 due to default register setting.
 
Does the chip then automatically wait until the PLL has locked to this frequncy before continuing with the reset sequence?
 
Does and one know the details and know when the PLL enable option would not be advisable?
 
Regards
 
Mark Butcher
www.mjbc.ch
 
Labels (1)
0 Kudos
2 Replies

295 Views
DavidS
NXP Employee
NXP Employee
Hi Mark,
We tend to poll the PLL to wait for it to lock before progressing on.
Enclosed is sample clock.c code we use with the MCF5213 PLL when we change settings and re-enable it.
Regards,  DavidS
0 Kudos

295 Views
mjbcswitzerland
Specialist V

Hi David

You misunderstood the question a bit. I am not changing the settings in the code but changing the hardware config settings and reseting the board.

I have received a M5213EVB and did some tests:

1. I loaded a program which runs from FLASH. It sets the PLL to 80MHz as soon as the program starts.

2. When I configure the jumpers on the board with CLOCKMOD1/0 = '11' or with '01', the board starts. I am assuming that with '01' (PLL disabled) the code is running with the crystal frequency (8MHz) until the code programs the PLL to 80MHz.
With '11' I am assuming that the PLL is automically enabled with x8 - possibly the reset circuitry (boot program in chip?) waits until the PLL has locked byfore allowing the user coded to start (?). In this case the code is running at 64MHz until it programs the PLL to 80MHz.

3. I do have a difference when using BDM. When I set '11' everything is normal. When I set '01' my P+E BDM can't communicate with the board.

Can you confirm my reasoning and shed light on the BDM problam (which I didn't know about when I posted the first time).

Regards

Mark
www.mjbc.ch

0 Kudos