lib/sw_apps/zynq_dram_test/src/test01.c
int timer_init()
{
  int base;

  base = 0xf8002000;

  // Set clock_control_1 at 0xf8002000:
  //   b6=0 ex_e
  //   b5=0 selects pclk
  //   b4-1 = 15 predivide by 64k
  //   b0=1 prescale enable
  REG_WRITE(base+0,  1 + (15 << 1));  // 0x1f

  // Set counter_control_1
  //   b6=0 wave_pol
  //   b5=1 wave_en active low
  //   b4=1 restarts counter
  //   b3=0 match mode
  //   b2=0 decr mode
  //   b1=0 overflow mode
  //   b0=0 disable counter
  REG_WRITE(base+0x0c,  (1 << 4) + (1 << 5));  // 0x30
  return 0;
}
/****************************************************************************
 * Function: timer_init
 * Description:  Initialize the ttc1 timer 1 to measure test duration.
 ****************************************************************************/
timer_init
Description:  Initialize the ttc1 timer 1 to measure test duration.
timer_init Description : Initialize the ttc1 timer 1 to measure test duration .
int timer_init()
{
  int base;
  base = 0xf8002000;
  REG_WRITE(base+0,  1 + (15 << 1));  
  REG_WRITE(base+0x0c,  (1 << 4) + (1 << 5));  
  return 0;
}
int timer_init ( ) { int base ; base = 0xf8002000 ; REG_WRITE ( base + 0 , 1 + ( 15 << 1 ) ) ; REG_WRITE ( base + 0x0c , ( 1 << 4 ) + ( 1 << 5 ) ) ; return 0 ; }
Function: timer_init
 Description:  Initialize the ttc1 timer 1 to measure test duration.
Function : timer_init Description : Initialize the ttc1 timer 1 to measure test duration .
// Set clock_control_1 at 0xf8002000: //   b6=0 ex_e //   b5=0 selects pclk //   b4-1 = 15 predivide by 64k //   b0=1 prescale enable // 0x1f // Set counter_control_1 //   b6=0 wave_pol //   b5=1 wave_en active low //   b4=1 restarts counter //   b3=0 match mode //   b2=0 decr mode //   b1=0 overflow mode //   b0=0 disable counter // 0x30