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.

MSPM0G3507: Pins dedicated forthe connection to A/D-convertor

Part Number: MSPM0G3507

Hi Friends,

For the control of the BLDC-motor with the help of an MCU with 2 (or more) A/D -A/D-converters, it would be useful to have one selected/dedicated pin with the possibility of connection to the selected A/D-convertor.

So we can simultaneously measure the two currents from the 3 currents at the same time point.

Your opinion?

best regards

zbynoB

  • Hi Zbyno,

    No, you can only process 2 phase current sampling in the same time. I believe this is sufficient for BLDC control.

    As you only requires two phase current in one time, the 3rd one can be calculated.

    To switch the sampling two phase (normally we will select the larger duty phase to sample), you can either connect 1 phase to ADC0 and ADC1 both, then dynamically switch one of them to get the ADC result; or use the ADC pin which supports ADC0 and ADC1 both (ADC0.7, or ADC0.8)

  • Hi Sal,

    Yes, you are right, but I want to say something different:

    We have 3 currents A, B, C. The Current A was allocated with A/D_0, current B with A/D_1, and current C has to be allocated to both AD_0 and AD_1 (It was determined by pins).

    Only in this configuration can we process 2-phase current sampling at the same time.

    Best regards

    zbynoB

  • Hi Zbyno,

    Yes, that is correct.

    Normally we just use the smapled two phase current to calculate the third phase current. (IA+IB+IC=0).

    Sampling the three phase current in the same time is not supported.

    B.R.

    Sal

  • Hi Sal

    You are right, but we have to use one of these three currents, two MCU pins yet. And my proposition should solve it only by reprogramming the usage of this pin, so we could spare one pin in the future.

    best regards

    zbynoB

  • Hi Sal,

    You are the expert for applications with MCUs from the Family MSPM0gxx. Can you give me advice about the math library:

    I am looking for the SW, which realizes Gaussian elimination for three unknowns.

    A more detailed description can be found in my article:

    https://www.researchgate.net/publication/396825015_The_simple_Math_correction_of_the_measured_BLDC...

    best regards

    zbynoB

  • Hi ZbynoB,

    You are right, but we have to use one of these three currents, two MCU pins yet. And my proposition should solve it only by reprogramming the usage of this pin, so we could spare one pin in the future.

    This is achievable with MSPM0G3507.

    I am looking for the SW, which realizes Gaussian elimination for three unknowns.

    I think this can be performed in the calibration stage. Normally it will not require to sample the three phase in the same time, as user will inject a constant small current (three times) to calculate the K1, K2, and K3.

    B.R.

    Sal

  • Hi Sal,

    I did not know it. It will be perfect. Thank you very much.

    best regards

    zbynoB

  • Hi Sal,

    Can I ask you for another question?

    I want to generate PWM with MSPM0G35xx at a frequency ranging from 500kHz to 800kHz, with a precision better than 10 bits. I want to use the internal comparators of MSPM, as you see them in the picture

    What strange can I await?

    best regards

    zbynoB

  • Hi zbynoB,

    Sorry for the late response, please raise new thread if has new question (this normally will not be missed by the thread owner).

    with a precision better than 10 bits.

    I don't fully follow the picture you shared. I suppose you are using COMP to turn off the PWM? Or use COMP to simulate the PWM.

    By the way when we talk about PWM, normally the X-bit resolution is not accurate. The resolution depends on its steps, for 80MHz clock, it has 1/80MHz resolution, and it is 1% in 800kHz. 

    B.R.

    Sal

  • Thanks, Sal, for your answer.

    Yes, you are right. And now I want to do it better with (PWM about 350-400kHz, dead time about 12.5ns, resolution better 9-10 bits) with PWM (TIM_A) and dithering with the help of DMA. (I want to drive LMG2100R44).

    2. Second problem: Could I use TIMG as a Hall detector of the shaft's position with only 2 inputs? I didn't find under examples

    best regards

    zbynoB

    P.S. All those should be in the future part of the control of BLDC with axial PCB-stator, which unfortunately will have extremely low inductance of the winding (about 2-3 μH). It will be my personal project with publications on the portal: researchgate.net.

  • Hi zbynoB,

    Yes, you are right. And now I want to do it better with (PWM about 350-400kHz, dead time about 12.5ns, resolution better 9-10 bits) with PWM (TIM_A)

    Just double check, which one you are looking for:

    1. Use COMP to turn off the PWM

    2. Use COMP to simulate the PWM

    Then, we 400kHz PWM output, you have period value (LOAD value) as 80M/400k = 200, which refers to 8-bit (255) resolution.

    m: Could I use TIMG as a Hall detector of the shaft's position with only 2 inputs? I didn't find under examples

    Hall requires 3 inputs.

    You can use TIMG8 wich supports additional input with IDX (also applicable to Hall inputs), check the details in TRM.

    Additionally, more generic method select any TIMG with EVENT which mapping to three GPIOs, then you capture the hall singal in GPIO and get event in timer to couting the hall different sector time. You can find the configurations in hall-sensored trap or foc control example:

    https://dev.ti.com/tirex/explore/node?isTheia=false&node=A__AP.mLXDHX2ISEq9S.WetIA__MSPM0-SDK__a3PaaoK__LATEST&placeholder=true 

    B.R.

    Sal