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.

TM4C123GH6PM: clock pulse generation using timers or pwm generator

Part Number: TM4C123GH6PM


Hello,

I know there are many ways to do this, but how can I take advantage of a timer generator, to generate a clock pulse from a gpio pin? It needs to be unblocking, and I also don't want to use an interrupt to switch a value for gpio.

Is there any way I can generate a 32khz to 50khz clock pulse by using a hardwrare peripheral?

Best Regards,

-C.A.

  • Hi Can,

      I think you can setup for periodic timeout with your desired frequency and constantly check for the Timeout Raw Interrupt flag. When the flag is set, you will set or clear the GPIO pin alternatively. You need to make sure there is no other interrupts present as they can disrupt the clock waveform. 

      

  • Hello Charles,

    I have a custom board with precision 20mhz oscillator, and I would like to use the tm4c123 to generate clock pulse for a measurement sensor. While I might add other means of clock pulses to my sensor, for now I only have the 20mhz oscillator, and I must programmatically generate the clock signal for reference.

    Could using PWM generator at 50% duty cycle be more suitable for my problem? Your solution still relies on interrupt, and setting or clearing the gpio.

    Best Regards,

    C.A.