Author Topic: M5225x starting problem at power on  (Read 12329 times)

Offline fcereja

  • Newbie
  • *
  • Posts: 13
    • View Profile
M5225x starting problem at power on
« on: May 09, 2011, 08:46:54 PM »
Hi All,

I've made a board with a M52258 with an external 48 MHz oscillator. The design works perfect but doesn't start when powering up. After a hardware reset or ressetting with the BDM, it starts normally.

Does anybody have any idea about what can be the reason of that issue? Can it be the external oscillator which didn't start fast enough vs. the processor?

Thank you for any possible help.

Best Regards
Francis

Offline fridgefreezer

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: M5225x starting problem at power on
« Reply #1 on: May 10, 2011, 07:24:24 PM »
Are the CLKMOD pins set correctly & have you initialised the clock registers to use the external oscillator? We made this mistake in the 1st version of our board, in the end we went back & looked at the M52259EVB schematic to spot the differences.

Offline fcereja

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: M5225x starting problem at power on
« Reply #2 on: May 15, 2011, 04:19:07 PM »
Problem has been solved.

We simply add a delay before switching from the internal relaxation oscillator (activated at startup) to the external oscillator.
File M5223X.c  function "mcf52235_init" :
volatile int i;
for(i=0; i<100000; i++) { asm(nop);}