SLAU927B June 2024 – November 2024 MSPM0G3507
32-bit algorithm variables can be output in real time from the MCU through the DAC. DAC output is enabled by setting DAC_EN = 1. The DAC in MSPM0 is 12 bit, thus a scaling needs to be applied before output. User has two ways to scale the variable before output.
In the above equation setting the DAC_SCALING_FACTOR to 1 enables user to represent a data of IQ(1.0) to IQ(-1.0) in between 0V and 3.3V. To represent the data exceeding the value 1.0 use higher DAC_SCALING_FACTOR.
For Example: To represent a data from -2.0 to +2.0 , set the DAC_SCALING_FACTOR to 0.5.
For output of any other IQ, user can left shift or right shift the variable to bring the data in a 12-bit range before output. This mode is selected by setting DAC_SCALING_FACTOR to 0.
If variable value is less than a 12-bit value, set DAC_SCALE to positive, the DAC output follows as shown in Equation 12:
If variable value is greater than a 12-bit value, set DAC_SCALE to negative, the DAC output follows as shown in Equation 13:
Variable | Address |
---|---|
A phase current | 0x20200608 |
B phase current | 0x2020060C |
C phase current | 0x20200610 |
A phase current raw ADC value | 0x20200614 |
B phase current raw ADC value | 0x20200618 |
C phase current raw ADC value | 0x2020061C |
A phase voltage | 0x20200678 |
B phase voltage | 0x2020067C |
C phase voltage | 0x20200680 |
A phase voltage raw ADC value | 0x20200684 |
B phase voltage raw ADC value | 0x20200688 |
C phase voltage raw ADC value | 0x2020068C |
D axis current | 0x20200750 |
Q axis current | 0x20200754 |
D axis voltage | 0x20200758 |
Q axis voltage | 0x2020075C |
D axis Filtered BEMF | 0x20200BD4 |
Q axis Filtered BEMF | 0x20200BD8 |
Estimated motor velocity filtered | 0x20200BF4 |
Estimated rotor angle | 0x20200BFC |
Power Feedback | 0x20200930 |
SVM output duty A phase | 0x20200720 |
SVM output duty B phase | 0x20200724 |
SVM output duty C phase | 0x20200728 |