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.

Delay in tiva tm4c123g

Hello guys, I need a precise delay for a manchester encoded, using systick, but I don't know how to do this. Can help me here?

  • Hello Joao

    The SysTick timer works of both the System clock and the Internal oscillator clock. The System clock works at maximum of 80MHz (12.5 ns) and Internal oscillator works at 16MHz (62.5 ns). Now there is a certain delay in processing when using a timer for performing an output task which is due to the overhead encountered by the CPU (Cortex M4) during an interrupt execution. This can be in the range of 10-12 clock cycles of the CPU.

    So to define the precise delay, we would need to the error margin that the Manchester encoded output can sustain. Or in other words what is the time period of the bit being sent?
  • The period is 100Khz.
  • Joao Brum said:
    I need a precise delay

    Would not (some) bound of your required "precision" prove useful - to your remote helpers?

    And - why have you confined the solution (only) to systick?

    Does your "not knowing how" continue after reading both the chapters (Timers & SysTick, w/in MCU manual) and the many code examples - prepared & presented by this vendor?   

    "Self-Help" is so often the fastest & best help!     (and not entirely in evidence, here...)

  • Hello Joao

    So for a 10us pulse a variation of few 100 ns should be OK.
  • But I'm quite sure a SysTick interrupt with 100kHz firing rate is less than o.k. - even if not yet toppling the application.
    Just to mention it ...