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.

TMS320F28027F: Software SCI simulated of GPIO disturbed by motor control codes

Part Number: TMS320F28027F
Other Parts Discussed in Thread: CONTROLSUITE

Hi team,

My customer is designing sensorless motor drives using F28028F. 2x 115200 bps SCI interfaces are needed. I've provided them with example code simulating one software SCI using GPIO and CPU timer. Software SCI works fine alone. But when motor control related codes are added, software SCI is disturbed. Because motor control rated codes have higher interrupt priority and will disturb timer interrupt which controls the baud rate.

This is the output waveform. The first pic is software SCI alone and the second is with motor control codes. Data sent is 0x55.

I think there might be 2 solutions:
(1) Slow down the baud rate.
(2) Adjust timer interrupt to a higher priority according to sw_prioritized_interrupts example in controlSUITE.

I’m afraid that adjusting timer interrupt priority might cause motor control problems. Are these 2 solutions correct and are there any better solutions?

Thanks so much.
Best regards,
Jingyuan

  • How much time will the additional CPU timer ISR take? What is the pwm frequency? And how much time does the motor ISR take? The solution 2 should be a good choice, but you must be aware of motor control ISR overflow, delay and lost that will affect the motor control performance.
  • I've tested the software SCI. On a 90MHz F28069, the additional CPU timer ISR takes ~6us receiving 1 byte and ~9us sending 1 byte. As for the motor control codes, it's done by my customer so I'm not sure yet, but I'll check with them soon. Thanks so much for your reply.