Author Topic: port 52233 to 52236?  (Read 7982 times)

Offline alager

  • Jr. Member
  • **
  • Posts: 92
    • View Profile
port 52233 to 52236?
« on: September 03, 2009, 08:29:51 PM »
Mark,

There are some availability issues with the mcf52233, but we found some mcf52236, which appear to be pin compatible, with the only difference I can find being the 60Mhz vs 50Mhz respectively.  Looking through app_hw_m5223x.h, I see there are #defines for making sure the clocks are correct, but I don't see what needs to be changed in order to use the 50Mhz clock.
Can you provide some guidance?

**reading..reading**

okay, I found these....
Code: [Select]
#define CRYSTAL_FREQ                   25000000                  // 25 MHz oscillator / crystal input
#define PRE_DIVIDER                    5                         // warning: in first silicon this can not be changed!
#define OSCCLK                         (CRYSTAL_FREQ / PRE_DIVIDER)
#define PLL_MUL                        12                        // 60MHz operation

Do I just change the PLL_MUL to 10?  Are there any issues with Ethernet timing that you are aware of, when using this chip?


Thanks,
Aaron

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3234
    • View Profile
    • uTasker
Re: port 52233 to 52236?
« Reply #1 on: September 03, 2009, 08:59:04 PM »
Hi Aaron

I think (but don't know) that the M52236 are M52233 which don't make the 60MHz grade. The reason why this may be the case is that the chip ID, which can be read from CCM_CIR, is the same for both. (I also never did this test since I never actually used an M52236 but it was reported to be the case by someone who does.)

The 25MHz oscillator is important for correct Ethernet operation and not the CPU clock. This means that there are no known issues with running one of the devices at 50MHz rather than 60MHz.

Regards

Mark

Offline alager

  • Jr. Member
  • **
  • Posts: 92
    • View Profile
Re: port 52233 to 52236?
« Reply #2 on: September 03, 2009, 09:55:48 PM »
What about figuring out how much processing power (MIPS or whatever) is left.  By using this other chip there is a 16.7% reduction in clock speed.  Other than running it through its paces, is there a way to tell if the CPU is waiting a lot, thus indicating a speed reduction may have little or no impact?  Or is 60Mhz just enough for the stack with a  little left over for the user application?

I'm going to do some tests with the 52233 and just reduce the clock speed to 50Mhz by setting
#define  PLL_MUL  10
but it would be nice to be able to have a quantifiable number to talk about.

Any ideas?

Thanks,
Aaron

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3234
    • View Profile
    • uTasker
Re: port 52233 to 52236?
« Reply #3 on: September 03, 2009, 10:47:42 PM »
Hi Aaron

I have done projects at 40MHz (mainly due to the fact that this allows the serial interface to accurately general 250k UART speeds). There is no noticeable difference and probably most projects are never using a great deal of real available power.

One interesting test to do is to activate the low power task. Define SUPPORT_LOW_POWER in config.h.
In low_power.c a pin is set when the processor is running and cleared when it is idle.
With an oscilloscope you can monitor the actual time it is doing something and you will find that it is usually only running for a few us every tick interval - maybe 0.04% (the rest sleeping) unless there is other work actually to do. This means that it is difficult to quantify the power because it is not a constant but occurs when all possible events take place at the same time and things should be completed within a certain maximum time - again quite difficult to actually define.

Regards

Mark