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.

TMS320F28388S: T-FORMAT ENCODER

Part Number: TMS320F28388S


Hi, 

Customer has a point to highlight regarding Lori's comments given in email:

The encoder interfaces do require an interrupt from the CLB.  The F28388D has 2 C28x subsystems and each of those has a CLA.  Depending on their requirements, the communication with the encoder can be separated from the ADC conversions and PWM control.   

  • For example: the PWM can trigger the ADC start of conversion.  The ADC end of conversion can start the CLA.  The CLA has a fast response to the end of conversion and can be waiting for the trigger (i.e. no jitter).  The CLA can then update the PWM appropriately.  In parallel the C28x can be processing the communications packet received from the encoder.

Customer has as a target the single core variant, so F28388S. (So single core 1x C28x + 1x CLA + 1x CLB).

The concatenation of events reported by you is interesting, but here below customer try to graphically represent what they want to achieve with a time diagram:

First signal = counter of ePWM1 (symmetrical pwm with two complementary outputs, with dead times not represented in the graph but present)

Second and Third signal = outputs of the two channels A and B of the ePWM1.

Third signal = time correlation of the request customer wants to send in T-format.

 

Currently customer tried the example of the T-format of the Pm-library (with CLB) and implemented the ePWM1 with the above characteristics.

At this time customer would like to understand how to exploit CLA, CLB and the interconnection of events via SOC of peripherals to obtain synchronism between sending the T-format request and PWM.

 

Specifically, customers want to obtain the Delta T in the constant graph, so that the position information that will return to them from the T-format encoder always fixes the position at the same instant related to the PWM. (The T- encoders format physically read the position in the first edge of the position request packet that arrives from the master, therefore customer micro if I am not wrong).

 

I hope this time I have been clear on what customer needs.

Please let me know your thoughts.

  • Antonio Faggio said:

    Currently customer tried the example of the T-format of the Pm-library (with CLB) and implemented the ePWM1 with the above characteristics.

    At this time customer would like to understand how to exploit CLA, CLB and the interconnection of events via SOC of peripherals to obtain synchronism between sending the T-format request and PWM.

    Specifically, customers want to obtain the Delta T in the constant graph, so that the position information that will return to them from the T-format encoder always fixes the position at the same instant related to the PWM. (The T- encoders format physically read the position in the first edge of the position request packet that arrives from the master, therefore customer micro if I am not wrong).

    Antonio,

    To obtain the t-format position information, the C28x needs to issue a command.  If this command is to be sent to the encoder at the same time relative to the PWM, then this can be done in a PWM interrupt on a zero event.  This is configured in the ETSEL register for the PWM module.   

    In this same register, the PWM can be configured to directly start an ADC conversion (SOC) on an event (zero, compare, etc..).  (no need to take an interrupt to start the SOC).  

    If they would like to leverage the CLB, it can directly start a task in response to the ADC end of conversion (EOC).  This task could read the ADC, perform calculations and update the PWM without any dependence on the C28x. 

    Regards

    Lori

  • We would like to avoid ISR routine in order to remove the possibility of ISR nesting that will cause some jitter on related T-format requests.
    So our Idea is to trigger the ADC conversion from the "zero counter-event from the ePWM1", but in order to avoid jitter of some ISR nesting, we want to use CLA task1 at the same  "zero counter-event from the ePWM1" to send the PM_tformat_startOperation(); (this function is from PM library implemented through CLB, it sets HW registers so It's easy to port it into CLA processor).

    If you want to suggest another approach or if this approach is not sensated for our purpose, we are open to change our perspective to solve our issue.

  • Matteo,

    I accidently hit "TI thinks resolved" on your last post.

    Yes, looking at the startOperation() function it is only setting the CLB registers and is something the CLA can do when triggered by the zero event of the PWM.  I don't see any issue with your proposal.  

    Best Regards

    Lori