This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: at91Arm7sek running without the pll


On Mon, Feb 25, 2008 at 05:05:38PM +0100, Tobias Nielsen wrote:
> Nope, i have a situation where the the external components to drive
> the PLL is not connected - therefore i have to run without the PLL
> 
> 2008/2/25, Andrew Lunn <andrew@lunn.ch>:
> > On Mon, Feb 25, 2008 at 03:47:26PM +0100, Tobias Nielsen wrote:
> >  > I have been sitting for some time to try to figure out a way to
> >  > completely skip the PLL AND at the same time use the main oscillator
> >  > bypass feature. I can see that the usage of the PLL is more or less
> >  > directly coded in to a macro in the header:
> >  >
> >  > hal/arm/at91/at91sam7s/current/include/hal_platform_setup.h
> >  >
> >  > But if i want to completely bypass that feature and follow the
> >  > instructions in the datasheet that states OSCBYPASS should be set to 1
> >  > and MOSCEN must be set 0 - i have absolutely no idea on how to put
> >  > that functionality in to the system without hacking a lot of code that
> >  > i in principle have no knowledge about...
> >  >
> >  > Do anyone know how to make that bypass?
> >
> >
> > It will be a little bit messy.
> >
> >  Why do you need to turn the PLL off? Can you live with the PLL simply
> >  multiplying by 1 and dividing by 1?

Then i suggest you add CDL control of this. A new option say

CYGBLD_HAL_ARM_AT91_PLL_BYPASS

So that CYGNUM_HAL_ARM_AT91_CLOCK_SPEED is calculated correctly, you
want some requires statements in the CYGBLD_HAL_ARM_AT91_PLL_BYPASS
option. Something like

cdl_option CYGBLD_HAL_ARM_AT91_PLL_BYPASS {
    display  "Bypass the PLL"
    flavor bool
    default_value 0

    requires CYGNUM_HAL_ARM_AT91_PLL_MULTIPLIER == 2
    requires CYGNUM_HAL_ARM_AT91_PLL_DIVIDER == 1

    description "
       The PLL requires external components which not all targets have.
        Enabling this option bypasses the PLL."
}

Then in hal_platform_setup.h add the necassary code inside #ifdefs.

     Andrew

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]