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.

CCS/EK-TM4C123GXL: TM4C123GXL

Part Number: EK-TM4C123GXL

Tool/software: Code Composer Studio

I want to transmit bits at about 100kHz. I am using GPIOPinWrite to switch on and off the pin according to the bits I need to transmit. But even though I am transmitting the same, the bit pattern on the DSO doesn't stabilize (doesn't trigger properly). All the pin write is happening inside a timer interrupt. Even if send a I bit pattern of 0's and 1's sometimes arbitrarily there comes two 1's or two 0's, and this is the reason it doesn't stabilise properly.

The clock is set at 50MHz. 

I am using PORT B, Pin 3 for the transmission. Is this a problem with TivaC, or with the coding in Code composer studio.s

As of now I am not able to get a stable wave even at 30-40kHz.

Any help will be appreciated. 

  • My guess is that it is most likely your code that is at fault. Do you have any other interrupts beside the one timer interrupt that might cause you to miss the timer interrupt? Are you executing a lot of code within your interrupt routine that might cause you to miss an interrupt?
  • Vendor's Bob just beat my response.

    Is yours not a perfect demonstration of what OFTEN occurs when "KISS" is bypassed?    

    KISS teaches:

    • insure that you can properly toggle 1 or multiple GPIO bits
    • insure that your DSO syncs properly to the toggled GPIO
    • then - and only then - create & verify Timer code.    It is possible to employ the Timer's output pin to drive an Led (w/limiting resistor) to confirm your Timer set-up.
    • ONLY after the GPIO & Timer code has been verified - should you attempt to have them "Work in concert."    (together)

    Everything at once - predictably - leads to delay, frustration...  (i.e. WHICH of the MANY Parts is flawed/broken?    Where do you begin to test?)

  • Yes, I also have a gpio interrupt, but it is at another pin. Is that a possible cause? I will try to remove it and confirm tomorrow. Thanks for the idea.