This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RTI laucnhxl2-rm46

Other Parts Discussed in Thread: HALCOGEN

Hi,

I am actually working on RTI module , where i need a delay of 10ms, so every 10ms it generates an interrupt and the led toggles.

As per my understanding , for 10ms delay the calculations as follows:

RTICLK = 110M Hz , Counter Freq = 10MHz  --------->frequency set in halcogen. what is the prescalr value here ? should i consider this frequency for calculations  or RTICLK?

for my calculations i have taken 10MHz i.e time period = 1/ 10M = 0.1micorsecs 

for 10ms delay :

counter value = required delay / timer resolution   ---> 10ms / 0.1microsec = 10000

1. Is the calculations and assumptions correct for getting the counter value.?

2. when i give this counter value and check the output in oscilloscope the time period what i am getting is 447ms.Is there something which i am missing while calculating?

3. What is the maximum delay i can get from this timer resolution?3857.RTI - 1.zip

Attaching the entire project for reference.

Please do explain more about Prescale register of RTI MODULE.and how to get counter values for various delay values.


Thanks and Regards,

Shruthi

  • You have the prescale calculated correctly. The crystal on the Launchpad is 16MHz. The PLL settings in your rti.hcg code set the PLL to 220MHz. VCLK=RTI1CLK is 110MHz. Your prescale counter is 10, so the counter 0 clock is 110MHz/(10+1) = 10MHz. In HALCoGen you have the compare 0 period set to 100ms, not 10ms. That generated a compare 0 value of 1000000 instead of 100000. Then you overwrite this value in main with a call to rtiSetPeriod(rtiCOMPARE0,100000). This is giving an RTI interrupt every 10ms. You toggle the LED, so you get 10ms on then 10ms off. Where are you measuring GIOB[1]? It looks good on my setup.

    The compare register is 32 bits which means the maximum compare count is 4,294,967,295.
  • I measure the output at J10(8 pin). I am getting it as 46ms.. not 10ms...