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.

[C6748] Timer won't come out of reset

I'm using a C6748, and am trying to set up one of the timers in 32 bit unchained mode.  For now, I'm looking directly at the timer registers from the CCS memory window, and am also modifying the values in the memory window.

The trouble I'm having is that I can't bring the 1:2 timer out of reset.  When I write the bit in the mem window, it comes back unchanged.  When I try the equivalent bits for the 3:4 timer, all works as expected.  I've tried all combinations of modes that I can find documented, but no matter what I do, it won't let me change the 1:2 reset bit, while the 3:4 timer all works fine.

The other odd part of the story is that this had been working at one point.  The only thing I changed in the meantime was to change the associated interrupt to use the dispatcher, which didn't make sense, but I undid the change anyways, without success in restoring functionality.

Could the on-chip timer be fried?

Thanks for your help,

Ryan

  • Are you using DSP BIOS?  BIOS uses one of the timers.  

  • Hi Gus,

    Yes, I'm using DSP/BIOS, but I have it set up so DSP/BIOS uses Timer 0, and I am trying to use Timer 1.

  • Ryan,

    Can you post the values of the 0x01C20000 - 0x01C20044 address range when you are expecting the timer to run?

    -Tommy

  • Hi Tommy,

    Note that I'm using timer 1, so unless I'm mistaken the registers start at 0x1C21000.  The problem is that if I write 0xB07 to the TGCR (0x1C21024), the value does not take, and the register still reads 0xB06.  All attempts at turning on bit 0 in the TCGR have failed.  I have had no troubles setting any of the other bits in any of the other registers.  I have also tried setting the bit while on a breakpoint just in case some running task was clearing it, but the bit still refuses to be set.

    0x01C21000 0x4472020C 0x00000003

    0x01C21008 0x00030000 0x00030000

    0x01C21010 0x00000000 0x00000000

    0x01C21018 0x016E3600 0x000000C8

    0x01C21020 0x00400080 0x00000B06

    0x01C21028 0x00000000 0x00000290

    0x01C21030 0x00000000 0x00000000

    0x01C21038 0x00000000 0x00000000

    0x01C21040 0x00000000 0x00020001

    Thanks,

    Ryan

  • Ryan,

    You are correct.  I grabbed the wrong base address.  I believe that your TIMER is stuck in reset because the GPIO functions are enabled for TIM12 in GPINTGPEN.  According the user guide, you cannot use both the GPIO and count functions at the same time:

    User Guide said:

    Normal timer counting modes cannot be used when the GPIO mode is enabled -- TIMnRS in the timer global control register (TGCR) cannot be brought out of reset when GPENn in GPINTGPEN is asserted.

    -Tommy

  • Thanks Tommy.  I thot I already tried that, but I guess not, cuz that did the trick.

  • I also wish to say thanks as the two bits fooled me as well

    It would not be bad it the manual could put more emphasis on the side effect of the GPIO settings

     

    j

  • John Sneeboo said:

    I also wish to say thanks as the two bits fooled me as well

    It would not be bad it the manual could put more emphasis on the side effect of the GPIO settings

    same same and ACK! Spent half a day on that one...