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.

TI-RTOS jitter HWI

Other Parts Discussed in Thread: TMS320F28069

Hey everybody,

I'm going through the labs of the TI online workshop about TI-RTOS.

At Lab05 (HWI) I measured the Jitter of the HWI by increasing the cycle time from 500ms to 100us.

Within the HWI only GPIO34 for LED is toggled.

I see the following behaviour:

Typically the Jitter is about +-1us, that would be pretty good for my apllications.

But each ~15s I see an increased jitter (by factor of 5).

Does anybody know the root cause for that? What happens each ~15s?

Looking forward to your responses.

Many thanks in advance.

Jeremias

  • What device and version of TI-RTOS are you using?
  • Hi,

    I'm using ControlStick with TMS320F28069,

    Code Composer Studio Ver. 6.1.3.00033,

    XDCtools Embedded Runtime Content 3.31.3.43,

    tirtos_c2000_2_16_00_08

    Jeremias

  • Jeremias,

    How are you measuring the Hwi jitter?

    You will need to figure out what happens at the 15 second period. I suggest you use LoggerBuf to enable some log events. I would start by enabling Task Switch events, but most likely it will be some Hwi event.

    I also expect you are limited on memory. This means your logger buffer will have only a small window of log event. For example, you might have room for only 100 ms of data. So you will need to figure out a way to detect the latency issue and then either hit a breakpoint or disable logging.

    ~Ramsey

  • Hi Ramsey,

    thanks for your suggestion. It was acutally the Clock_tick() at 1ms using Timer 1 that set the root cause for a higher Jitter on HWI Timer 0 Interrupt each 15s.

    Timer0 has a period of 100us. I was just measuring it via oscilloscope.

    Taking the Clock Module out or by disabling it there was no further increased jitter.

    Hardware priority for C28x cannot be changed directly, right? Nesting is off at default, right?

    I know a software workaround for non-BIOS projects,

    can HWI priorities be set using TI-RTOS (e.g. in the app.cfg file)? Is there a possibility to set hardware interrupt priorites & nesting possibilities (same PIE group & different PIE groups)?

    Many thanks!

    Jeremias

  • Jeremias,

    Good job finding the root cause of the Hwi jitter.

    You are correct, hardware interrupt priority cannot be changed. However, interrupt nesting is *on* by default. The Hwi mask determines which interrupt are allowed to preempt the current interrupt. By default, the current interrupt is always masked (so that it cannot interrupt itself) but all other interrupts are enabled.

    If you have an interrupt which needs to be the highest priority, you can set its mask such that all other interrupts are held off. When this interrupt is serviced, it will not get preempted. If another interrupt is active when this high priority interrupt arrives, then it will preempt the current interrupt and disallow any further preemption.

    Will this provide the functionality you are looking for?

    ~Ramsey

  • Ramsey,

    that's exactly what I was looking for.

    Many thanks for your support. Reading your lines I could remember the online workshop section with that content.

    Everything seems to be clear and convenient. That's great.

    Jeremias