tx39 simulator timer questions

Joel Sherrill joel.sherrill@OARcorp.com
Mon Dec 11 13:27:00 GMT 2000


I hate to crosspost like this but I need to find someone who is
knowledgeable about the TX3904 and/or its simulator in gdb.  

I now have a simple RTEMS board support package (supports hello world)
running on it.  I want to use one of the 3 timers in interval mode 
to generate a clock tick. 

But between an error reading the PDF Toshiba documentation :)
and the simulator, I am confused about the requirements/sequence 
to make the timer do this.  Comments in dv-tx3904tmr.c indicate
that it does not support level triggered interrupts.

So far I have this as initialization:

  ILR3 = 0x00000700;  make timer0 level 7
  CCDR = 0x3;         divide by 16
  CPRA = <clicks>;    value in compare register
  TISR = 0x00;        clear all pending interrupts
  TCR  = 0xC0;        interval mode, internal system clock, enabled
  ITMR = 0x8001;      enable it, make it periodic

I think I may need to also deal with the CConR register.

??? What is the simulated clock speed when --board=jmr3904???
It is hard to know what is a meaningful value for CPRA.

I have tried to enable debug in the simulator (configured
with --enable-sim-debug) to see more of what was happening
but that resulted in gdb 5.0 not building.

Advice on the tx39 and/or the simulator is appreciated.


Joel Sherrill, Ph.D.             Director of Research & Development
joel@OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
Support Available                (256) 722-9985

More information about the Newlib mailing list