Please pardon my ignorance, this is my first time designing a custom board for a microcontroller.
I've read that the mcf52259 has an 'on-chip 8 MHz oscillator' , does this mean that I am not required to provide an external crystal and my board/chip can fully function with this on-chip oscillator?
Currently I have CLKMOD1 and CLKMOD0 both as '0' and a XTAL as '1' . My understanding after reading the MCF52259 Reference Manual is that this is the configuration to have PLL disabled and have the clock driven by the on-chip oscillator.
I'm currently having problems connecting to my target via a 26-pin BDM interface and do not know if the aforementioned information regarding the oscillator could be any source. Just trying to isolate the problem, thanks for any help/insight!
Solved! Go to Solution.
Thanks for the information!
I have finally gotten the BDM to work and my board is capable of being flashed and programmed.
The solution to my problem was that my XTAL pin was not fully pulled up to '1' and I was not providing power to VDDPLL and VSSPLL.
> does this mean that I am not required to provide an external crystal and
> my board/chip can fully function with this on-chip oscillator?
Only if it doesn't have to connect to anything else that cares about accurate timing. Like UARTs or USB or Ethernet and so on, or havin that micro keep the time. Relaxation oscillators are usually used in systems that have a crystal, but turn that off and change over to the relaxation oscillator when in power-saving modes
The on-chip oscillator isn't very accurate. If you read section "7.7.1.3 Relaxation Oscillator Control Register (ROCR)" you will read that the oscillator is trimmable, but the trim register is read-only and is set at the factory. You can't re-trim it to try and make it more accurate on your board. The spec is for it to be between 7.84 to 8.16MHz.
Other people are running with the Relaxation oscillator run through the PLL, and see to have got it working. Search for "ROCR" in this forum for previous articles.
Unless you know you don't need a crystal and are very cost constrained in your design then you'd be far better off using one. You should certainly add the circuitry so you can start with a crystal, giving yourself the option of doing without it later if you find you can.
Check the BDM documentation to see if it has any clocking restrictions - the minimum CPU clock speed it will work at. You might also want to try running the relaxation oscillator with the PLL in case that improves things.
One of these CPUs running a non-multiplied 8 MHz clock is running at 1980's speed!
Tom
Thanks for the information!
I have finally gotten the BDM to work and my board is capable of being flashed and programmed.
The solution to my problem was that my XTAL pin was not fully pulled up to '1' and I was not providing power to VDDPLL and VSSPLL.