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/TMS320F28377D: Supervisor for code execution within a time slot

Part Number: TMS320F28377D


Tool/software: Code Composer Studio

Dear All,

 

My application has a pwm cycle and within the pwm cycle, there is a timer interrupt that creates 5 slots. The pwm interrupt triggers the timer interrupt. After that, the reloaded 3 times to create the 5 slots. En each slot a high priority code is executed (this code needs may need between 50 % and 80 % of the slot time).

 

I need to add supervisor to monitor what is the time necessary for the execution of the code inside each time slot. Additionally, if an overlap occurs to the next cycle, an exception should be triggered.

 

To implement this, it will be good to have some cpu time counter tick, which is not available in the 28337D. All timers are in use. There is other alternative to use a dummy pwm in a up or down count and then adjust some trigger condition.

 

Your comments are welcome about how to implement this supervisor. Or some hints about how to implement an interruptless timetick counter that can be used for this purpose?

 

Best regards,

Oscar

  • Hi Oscar,

    A good option for execution profiling on the F2837x device is to set up the CPU timer. This resource discusses this option: processors.wiki.ti.com/.../Profiling_on_C28x_Targets

    In your post, you mentioned that CPU timer was not available. Can you clarify what you meant by this?

    Regards,
    Elizabeth
  • Dear Elizabeth,

    what I want to say, is that my application runs in an interrupt driven basis. Based on a timer and pwm interrupt I will create some time slot scheme where I can process some code inside the interruption (that will take between 50 % and 80 % of the time slot). Also, the pwm has a synchronization process that will make some variation on the pwm period.

    What I want to do is monitor the code execution time inside a time slot. To do so, If I have some systickcounter (without using interrupts) this will be easy. However, this is not available, as far as I know.

    All timers are being used. So, The only way I may think is to generate a dummy pwm, and then read the pwm counter to calculate the code execution time.

    Perhaps that are other better ways to do this, but I am not seeing them.

    Best regards,

    Oscar
  • Hi Oscar,

    Setting up the CPU timer as described in the resource from my last post is the most similar to Systick counter functionality. But if the CPU timers are in use, then the plan of using another PWM channel to profile execution makes sense. To keep this aspect straight-forward, it is better not to vary the frequency like for the other PWM channel you described.

    Regards,
    Elizabeth