Project

General

Profile

DMTimer running slowly for StarterWare

Added by Anonymous over 11 years ago

Hi,

We are running the MityArm board under TI's StarterWare (we stop the u-boot process from loading the linux kernel) and are having issues
running the DMTimer code. The timer ISR is firing correctly but it is not frequent enough. The clock source on the timer is set to the CLK_M_OSC
and the initial count is set to 0xFF00 0000. So with an up count of 0x00FF FFFF and a clock rate of 24Mhz, the isr should fire approx. every .7
seconds (it seems to fire every 3-5 seconds.) This code work correctly on the BeagleBone which uses the same frequency oscillator for the main
clock input.
Is there a source code tree for Linux on the MityArm where I could look at the clocking setup to see why there is a difference between the
MityArm and the BealeBone?

Thanks,
John Conover


Replies (11)

RE: DMTimer running slowly for StarterWare - Added by Michael Williamson over 11 years ago

The source tree for the dev kit is available on a local git tree, see this page for details. There should be a link to the git server there.

The hardware clocking should be the same as the AM335x EVM (and I think the BeagleBone). I'm wondering if there may be some PLL / init code not getting run?

-Mike

RE: DMTimer running slowly for StarterWare - Added by Anonymous over 11 years ago

Hi Mike,

I'm hoping to find the PLL/init code in the Linux kernel. Can I ask you once I have the kernel tree,
is there a way to know which specific files apply to the MityARM? Is there some clue in the makefiles or
makerules that would allow me to narrow which files are specific to the board?

Thanks,
John Conover

RE: DMTimer running slowly for StarterWare - Added by Anonymous over 11 years ago

Mike,
I have compared the BeagleBoard boot settings compared to where u-boot leaves you when the kernel is about to load. I found a difference in the 3359's CM_DIV_M5_DPLL_CORE Register (offset = 84h). The BeagleBone boot shows bit 9 HSDIVIDER CLKOUT2 status as 0, Clock output is enabled. When I look at the MityARM that bit is a 1, Clock output is gated. Could you tell me where in the git tree files I would find the PLL clocking logic?

Thanks,
John Conover

RE: DMTimer running slowly for StarterWare - Added by Anonymous over 11 years ago

It appears that u-boot is setting the Prescaler enable bit (bit 5) of DMTimer2 timer control register (TLCR, offset 0x38, 0x48040038.) Why would the MityARM uboot set this bit? i.e. what is it being used for?

Thanks,
John C.

RE: DMTimer running slowly for StarterWare - Added by Michael Williamson over 11 years ago

Hi John,

A large chunk of the u-Boot code was derived from TI's u-Boot from their EVM PSP version 4.06.00.03.

I'm looking at the code, and I'm not seeing any access to bit 5 of the TCLR_REG for timer 2. The timer does get enabled (and I don't know why, off hand, without doing some more digging), but I can't see any writes to that register. It looks like this was cloned from the TI EVM board code. It may be that that timer could be used for some polling functions (u-Boot is polled for it's I/O, I believe).

-Mike

RE: DMTimer running slowly for StarterWare - Added by Anonymous over 11 years ago

Hey Mike,

The reason I was looking at u-boot was that the reset value of that register is zero and StarterWare does not use that bit. If you guys have a list of u-boot file that you modified I'd be happy to look through them as I still find it difficult to locate which files in u-boot are used for the processor.

Thanks,
John C.

RE: DMTimer running slowly for StarterWare - Added by Michael Williamson over 11 years ago

Pretty much, the only files in u-Boot that we've authored are in the board/cl directory of the u-Boot tree on our git server (there is change history there too that might make it clear what we fooled with). There are really only a couple of files under there....

-Mike

RE: DMTimer running slowly for StarterWare - Added by Tim Iskander over 11 years ago

John
The vast majority of changes made for the cl 3359 board are in the board/cl/mityarm335x
(I'm going by memory, so i hope i got it straight).
There are only a couple of files there. Som.c sets up the main processor.. pll.c sets up the clocks anf mux.c does the pinmuxing.

RE: DMTimer running slowly for StarterWare - Added by Anonymous over 11 years ago

Ok,
This will sound dumb, but where in the git tree is the board directory?
Thanks...

RE: DMTimer running slowly for StarterWare - Added by Tim Iskander over 11 years ago

John
The board directory is right at the top level of the git tree
Here's a link to the mityarm directory in gitweb..
http://support.criticallink.com/gitweb/?p=u-boot-mityarm-335x.git;a=tree;f=board/cl/mityarm335x;hb=HEAD

cheers
/Tim

RE: DMTimer running slowly for StarterWare - Added by Anonymous over 11 years ago

Thanks,

I missed the u-boot connection as my impression was that u-boot did as little as 
possible leaving the rest to the kernel.

John C.

    (1-11/11)
    Go to top
    Add picture from clipboard (Maximum size: 1 GB)