Timer precision on at91rm9200

Lionel TOCZE lionel.tocze at crf.canon.fr
Wed Oct 31 08:43:30 UTC 2007


Hello,

Rochat Joël wrote:
> Hello,
> 
> I'm working now on the rtems timers. I use an at91rm9200 with th csb337 bsp.
> I generate an 1khz timer on a pio pin and i measur with an oscilloscop the
> result of it. And I have a little difference with the expected value .
> 
> I measure 1,0012 ms but I shoud have 1.0 ms. 1 khz is not very high
> frequency, I think it could be more precis.
> 
> I'v modified the bsp.h for my board :
> #define BSP_MAIN_FREQ 20000000      /* 3.6864 MHz */
By modifying this value, you just modify Quartz frequency as you have on 
the board (Here 20 Mhz oscillator)

> #define BSP_SLCK_FREQ   32768      /* 32.768 KHz */
> 
> I know that the bsp for csb337 was configurer with an 184 Mhz mck. My board
> have an 180 Mhz mck. I didn't find where I could modifie it.
> 
If you want to modify mck clock, you have to check if MCK is issued 
either from SCK,PLLA or PLLB clock (see Power Management Controller PMC 
description of at91rm92200).
If it's isuued from PLLA, then you have to adapt register value 
contained in CKGR_PPLAR register. (Divider and multiplier field) . For 
that you can use web tools from Atmel (see 
http://www.atmel.com/dyn/resources/prod_documents/AT91SAM_pll.htm)

Hope it answers this part
Lionel T.
> _______________________________________________
> rtems-users mailing list
> rtems-users at rtems.com
> http://rtems.rtems.org/mailman/listinfo/rtems-users






More information about the users mailing list