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.

BOOSTXL-DRV8320S: I can't read the ISEN pin properly.

Part Number: BOOSTXL-DRV8320S
Other Parts Discussed in Thread: MSP430F5529, DRV832X, , MSP-EXP430F5529, DRV8320


I am controlling the DRV8320S motor driver with the MCP430F5529LP development board through the code, but I cannot read the correct current from the ISEN pin.

I looked at the current reading side of the DRV832X_MSP430F5529_Trapezoidal_Sensored_BLDC example, as far as I understand, you are reading over phase A. Why did you do it like this?

ADC settings I use.

void ADC12_init(void)

    ADC12_A_configureMemoryParam CH0_configureMemoryParam = {0};
    ADC12_A_configureMemoryParam CH1_configureMemoryParam = {0};
    ADC12_A_configureMemoryParam CH2_configureMemoryParam = {0};
    ADC12_A_configureMemoryParam CH3_configureMemoryParam = {0};
    ADC12_A_configureMemoryParam CH4_configureMemoryParam = {0};
    ADC12_A_configureMemoryParam CH5_configureMemoryParam = {0};

    CH0_configureMemoryParam.memoryBufferControlIndex = ADC12_A_MEMORY_0;
    CH0_configureMemoryParam.inputSourceSelect = ADC12_A_INPUT_A0;
    CH0_configureMemoryParam.positiveRefVoltageSourceSelect = ADC12_A_VREFPOS_AVCC;
    CH0_configureMemoryParam.negativeRefVoltageSourceSelect = ADC12_A_VREFNEG_AVSS;
    CH0_configureMemoryParam.endOfSequence = ADC12_A_NOTENDOFSEQUENCE;

    CH1_configureMemoryParam.memoryBufferControlIndex = ADC12_A_MEMORY_1;
    CH1_configureMemoryParam.inputSourceSelect = ADC12_A_INPUT_A1;
    CH1_configureMemoryParam.positiveRefVoltageSourceSelect = ADC12_A_VREFPOS_AVCC;
    CH1_configureMemoryParam.negativeRefVoltageSourceSelect = ADC12_A_VREFNEG_AVSS;
    CH1_configureMemoryParam.endOfSequence = ADC12_A_NOTENDOFSEQUENCE;

    CH2_configureMemoryParam.memoryBufferControlIndex = ADC12_A_MEMORY_2;
    CH2_configureMemoryParam.inputSourceSelect = ADC12_A_INPUT_A2;
    CH2_configureMemoryParam.positiveRefVoltageSourceSelect = ADC12_A_VREFPOS_AVCC;
    CH2_configureMemoryParam.negativeRefVoltageSourceSelect = ADC12_A_VREFNEG_AVSS;
    CH2_configureMemoryParam.endOfSequence = ADC12_A_NOTENDOFSEQUENCE;

    CH3_configureMemoryParam.memoryBufferControlIndex = ADC12_A_MEMORY_5;
    CH3_configureMemoryParam.inputSourceSelect = ADC12_A_INPUT_A5;
    CH3_configureMemoryParam.positiveRefVoltageSourceSelect = ADC12_A_VREFPOS_AVCC;
    CH3_configureMemoryParam.negativeRefVoltageSourceSelect = ADC12_A_VREFNEG_AVSS;
    CH3_configureMemoryParam.endOfSequence = ADC12_A_NOTENDOFSEQUENCE;

    CH4_configureMemoryParam.memoryBufferControlIndex = ADC12_A_MEMORY_6;
    CH4_configureMemoryParam.inputSourceSelect = ADC12_A_INPUT_A6;
    CH4_configureMemoryParam.positiveRefVoltageSourceSelect = ADC12_A_VREFPOS_AVCC;
    CH4_configureMemoryParam.negativeRefVoltageSourceSelect = ADC12_A_VREFNEG_AVSS;
    CH4_configureMemoryParam.endOfSequence = ADC12_A_NOTENDOFSEQUENCE;

    CH5_configureMemoryParam.memoryBufferControlIndex = ADC12_A_MEMORY_12;
    CH5_configureMemoryParam.inputSourceSelect = ADC12_A_INPUT_A12;
    CH5_configureMemoryParam.positiveRefVoltageSourceSelect = ADC12_A_VREFPOS_AVCC;
    CH5_configureMemoryParam.negativeRefVoltageSourceSelect = ADC12_A_VREFNEG_AVSS;
    CH5_configureMemoryParam.endOfSequence = ADC12_A_NOTENDOFSEQUENCE;



    /* VSENA */

    /* VSENB */

    /* VSENC */

    /* VSENVM */

    /* POT */

    /* ISEN */


                            ADC12_A_MEMORY_0 |
                            ADC12_A_MEMORY_1 |
                            ADC12_A_MEMORY_2 |
                            ADC12_A_MEMORY_5 |
                            ADC12_A_MEMORY_6 |
                            ADC12_A_MEMORY_12, ADC12_A_REPEATED_SEQOFCHANNELS);

ADC interrupt

#pragma vector = ADC12_VECTOR
__interrupt void ADC12ISR (void)
    switch (__even_in_range(ADC12IV, 34))
        case 0: break; //Vector 0: No interrupt
        case 2: break; //Vector 2: ADC overflow
        case 4: break; //Vector 4: ADC timing overflow
        case 6:
            phaseA = ADC12_A_getResults(ADC12_A_BASE,ADC12_A_MEMORY_0);
            break; //Vector 6: ADC12IFG0
        case 8:
            phaseB = ADC12_A_getResults(ADC12_A_BASE,ADC12_A_MEMORY_1);
            break; //Vector 8: ADC12IFG1
        case 10:
            phaseC = ADC12_A_getResults(ADC12_A_BASE,ADC12_A_MEMORY_2);
            break; //Vector 10: ADC12IFG2
        case 12:break; //Vector 12: ADC12IFG3
        case 14: break; //Vector 14: ADC12IFG4
        case 16:
            //vccSupplyVoltage = ADC12_A_getResults(ADC12_A_BASE,ADC12_A_MEMORY_5);
            vccSupplyVoltage = ADC12_A_getResults(ADC12_A_BASE,ADC12_A_MEMORY_5) * 0.014;
            break; //Vector 16: ADC12IFG5
        case 18:
            drvPOT = ADC12_A_getResults(ADC12_A_BASE,ADC12_A_MEMORY_6);

            if( POT_counter <= 5)
                POT_Toplam += ADC12_A_getResults(ADC12_A_BASE,ADC12_A_MEMORY_6);

            if( POT_counter == 5 )
                POT_Ortalama = POT_Toplam/5;

            if( POT_counter > 5 )
                POT_Ortalama = ( POT_Ortalama * 4 + ADC12_A_getResults(ADC12_A_BASE,ADC12_A_MEMORY_6)) / 5;

            if( POT_counter < 6)

            //PWM = POT_Ortalama / 25.6;

            break; //Vector 18: ADC12IFG6
        case 20: break; //Vector 20: ADC12IFG7
        case 22: break; //Vector 22: ADC12IFG8
        case 24: break; //Vector 24: ADC12IFG9
        case 26: break; //Vector 26: ADC12IFG10
        case 28: break; //Vector 28: ADC12IFG11
        case 30:
            //drvISEN = ADC12_A_getResults(ADC12_A_BASE,ADC12_A_MEMORY_12);

            if( ISEN_counter <= 5)
                ISEN_Toplam += ADC12_A_getResults(ADC12_A_BASE,ADC12_A_MEMORY_12);

            if( ISEN_counter == 5 )
                ISEN_Ortalama = ISEN_Toplam/5;

            if( ISEN_counter > 5 )
                ISEN_Ortalama = ( ISEN_Ortalama * 4 + ADC12_A_getResults(ADC12_A_BASE,ADC12_A_MEMORY_12)) / 5;

            if( ISEN_counter < 6)

            drvISEN = ISEN_Ortalama;

            break; //Vector 30: ADC12IFG12
        case 32: break; //Vector 32: ADC12IFG13
        case 34: break; //Vector 34: ADC12IFG14
        default: break;

While the engine is running, the adc value on the compiler is constantly changing. When I measure the ISEN pin with a multimeter, the value appears to be 75mA.

What is wrong here?


  • Hi Ali,

    I will have time to check the DRV832X_MSP430F5529_Trapezoidal_Sensored_BLDC example tomorrow. Can you reiterate if the code you attached is your code or example code?

    Are you using the MSP-EXP430F5529 + BOOSTXL-DRV8320S out of the box? Does the GUI show more accurate current values compared to the compiler? 

    Current sense may be totaled for all three phases if I recall from the GUI, I will need to check this out later.

    What is the current and voltage you are running at with your motor?



  • Hi Aaron,

    The code I added is my code, yeah.

    MSP-EXP430F5529 + BOOSTXL-DRV8320S is not as it came out of the box, I had to replace 1 of the mosfets because 1 Mosfet exploded. (I wrote about this in another topic. The DRV8320 was solid, the problem was the mosfet)

    I feed the motor with an 18v / 5A supply.


  • Ali,

    Do you have a scope you can check the ISEN pin with or a current probe that you can measure the phase current directly?

    That would help us debug here since a multimeter is often very slow and will average the fast signal so it is not so helpful.



  • Hi Adam,

    I only have a multimeter with which I can measure the current value.

    Could you explain to me the following lines in the sample code that Ti In gave, the "Motor Phase Current Limit" value in the GUI defaults to 900 (DEC), which is 2.6A. what is the reason of this?

    Does the operation done on the code side in Picture 1 have anything to do with the ISEN pin and what is its relationship with the place where we set the Current on the GUI?

    Picture 1

    Picture 2

    Picture 3

  • Hi Ali,

    The motor phase current limit is a software current limit to trigger overcurrent used for the algorithm. You can alter the value as follows:

    From Picture 1, it appears that the sensoredTrapController.MotorPhaseCurrent reads the raw ADC value of the ISEN pin and then compares it to the MOTOR_PHASE_CURRENT_LIMIT value and if the absolute value of it is higher, then it triggers an OC fault. 

    If you can provide ISEN as a scope capture, we can measure the voltage on that pin and compare that current value to what the ADC is capturing on the GUI. 


  • Hi Aaron,

    sorry for my late reply, 

    If you have the DRV8320S development board, can you try to read the ISEN pin for me and share the code you read with me? My values are constantly changing. When the motor is running without load, it draws 0.49A from the power supply. When I try to read this value from the ISEN pin, it constantly changes in the range of 200 - 40 (DEC).

    ISEN pin = 0.72mV        (DEC) = It ranges from 200 to 40

    POT pin = 0.72mV        (DEC) = 94 


  • Hi,

    The problem is solved, we put a 100uf capacitor on the output of the ISEN pin.