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.

TMS320F28379D: Cannot modify the value of the DACHVALS register

Part Number: TMS320F28379D


Dear team:

One of my customers uses the f28379d and an incremental sine cosine encoder (no reset signal) to control the motor. The motor runs normally at high speed, but it has the following problems at low speed:

In the project, he needs to use the Cmpss7Regs.DACHVALS.bit.DACVAL register to generate a reference voltage as the negative input of the comparator. Compare the sine and cosine signal with the reference voltage, and output 1 when the signal is higher than the reference voltage, and output 0 when the signal is lower than the reference voltage. In this way, the qep module can be used to count and generate position signals.

The default value of Cmpss7Regs.DACHVALS.bit.DACVAL is 2048, but he needs to set this value to 2252 to correspond to the midpoint of the sine signal:

But once he changes this value to another value (not 2048), the motor will not rotate and the current will increase until the limit value.

That is: once the negative input of the comparator is changed, the QEP module will not count correctly and the motor will not rotate.

Want to know why this phenomenon occurs?

Best regards

  • The default value of Cmpss7Regs.DACHVALS.bit.DACVAL is 2048

    I assume that you are referring to the default software value in the application?  The hardware default reset value is 0.

    Want to know why this phenomenon occurs?

    I recommend reading back the DACHVALA value to see if the DACHVALS value is being activated. It would also be very informative to enable the CTRIPOUTH path to a GPIO pin so that the comparator output can be observed directly in relationship to the comparator input.