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.

SM470R1B1M-HT: RTI

Part Number: SM470R1B1M-HT
Other Parts Discussed in Thread: TMS470R1B1M

Dear Sir

I have 3 questions:

The first one:

I implemented a real time clock with the RTI module and the clock comes from OSCIN directly. here is my code:

here is interrupt subroutine:

the code works very well, but if I changed line236 to GCR=ZPLL_CLK_DIV_PRE_1

it does not work, in other word, it does not work when fsysclk=fvco. the the  RTICNTR continue to count

the pulses, no CMP1FLAG set when RTICNTR is equal to RTICMP1, please tell me the reason.

The second

the document always said "PLL Specific" and "the device-specific data sheet", where do I get it?

The third

Some registers are not in accordance with iotms470r1b1m.h and tms470r1B1m_bit_definitions.h

such as I can't find GCR_N, GLBCTRL in the head files, I can find GCR olny. is the TI has latest documents

for the this MCU?

  • HI Kejun,

    the code works very well, but if I changed line236 to GCR=ZPLL_CLK_DIV_PRE_1

    Sorry, I'm not familiar with the device to know why it didn't work with ZPLL_CLK_DIV_PRE_1. Does it work with all other ratios except ZPLL_CLK_DIV_PRE_1?

    it does not work, in other word, it does not work when fsysclk=fvco.

    Looing at your code, you seem to use the OSCIN as the clock source for RTI, not PLL. 

    GCR |= RTI_CTRL;

    What is your OSCIN frequency? Please make sure your compare value is not larger than the RTI timeout value. In another word, it the RTI has a timeout value of X, make sure the compare value Y is less than X.  

    Is the LED blinking at the correct frequency for all ratios except ZPLL_CLK_DIV_PRE_1?

    the document always said "PLL Specific" and "the device-specific data sheet", where do I get it?

    According to the datasheet, this device support Enhanced RTI.  There are some RTI features that are device specific. I think that is what it meant to say. The PLL specific values can be found in the PLL user's guide. Bit 14 is a device specific feature that allows you to change the RTICLK clock source (e.g. OSCIN or SYSCLK). 

    such as I can't find GCR_N, GLBCTRL in the head files, I can find GCR olny. is the TI has latest documents

    for the this MCU?

    ,What is GCR_N. I think GLBCTRL is the GCR register. It is a bit confusing. 

    Again, I never work with this device as it is a very old design - more than 20 years old. I'm answering every question by reading the user's guide as best as possible. 

     

  • Hi Charles

    Thank you for your help and patience. what is the RTI timeout value?

    Clark

  • Hi Clark,

      I looked at the RTI diagram and compare interrupt description again, the 21-bit compare value is compared against the 21-bit counter value. Can you read the RTICNTR register and is the counter counting when ZPLL_CLK_DIV_PRE_1 is used. I wonder if the the RTICLK is clocking if ZPLL_CLK_DIV_PRE_1 is used. 

  • Hi Charles

    the content of RTICNTR changed when I stop to run the code everytime,  so I think the RTICLK is clocking when the ZPLL_CLK_DIV_PRE_1 is used.

  • Hi Clark,

      Can you tell if the RTICNTR value ever reach the compare value? 

  • Hi Clark,

      Not sure if you make some progress. Just wanted to let you know that I will be on vacation until middle of next week and will not be able to respond.