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.

DRV8703-Q1EVM: DRV8703-Q1EVM

Part Number: DRV8703-Q1EVM
Other Parts Discussed in Thread: MSP430G2553

HI,

i have source code of DRV8703Q1 EVM (brushed motor controller and driver PCB) ( MSP430G2553IPW20 MICROCONTROLLER) which was downloaded from Ti website..

Now i want to read this source code( or i want to understand ),after understanding the source code.. i want to change PWM technique to generate sinusoidal single phase by using this EVM ....

will you please tell the
1. how t read source code or if you have  any document to understanding the source code.
2.do you have any document explanation of source code of DRV8703Q1EVM.
3.my intention  is  if i want to change PWM, ( especially i want to change PWM so that H- bridge inverter output frequency has to be changed)  which parameter or which source file code has to change to generate the different frequency  range as output of this EVM.

4.Please share document to understand the source code file of DRV8703Q1 EVM.

  • See inline answers below:

    1. How to read source code or if you have any document to understanding the source code.

    HH >> No documentation to understand the source code. The source code comments are what is utilized as code description. Can you point to me what areas of the source code you would like a description of?


    2. Do you have any document explanation of source code of DRV8703Q1EVM?

    HH >> See answer to question 1.


    3. My intention is if I want to change PWM, ( especially I want to change PWM so that H- bridge inverter output frequency has to be changed) which parameter or which source file code has to change to generate the different frequency range as an output of this EVM.

    HH >> If what you want to modify is the PWM frequency/period, please proceed to file located in the project directory:

    DRV870X-Q1EVM_FW\drv870x-q1\source\drv870x-q1.c

    In that file, go to line 193:

      TA1CCR0 = 99;

    Timer A1's interrupt count is set to count 100 times at a 2MHz frequency (it runs off SMCLK and that clock speed is set on Line 63 as 2MHz:

          // 2MHz SMCLK required for PWM frequency

       BCSCTL2 |= DIVS_2;

    The math needed to calculate the PWM frequency is 2 MHz / (TA1CCR0 + 1). The timer count starts at 0 instead of 1, thus the offset.

    Currently, the firmware runs at a PWM frequency of 20 kHz. I updated TA1CCR0 to 49. I effectively ran the motor with a PWM frequency at 40kHz after this code update.

    4. Please share a document to understand the source code file of DRV8703Q1 EVM.

    HH >> See answer to question 1 and 2.

  • Thanks you .. actually I want to generate 50Hz square wave at the output ( as a single phase inverter)......will you please suggest changes in source code (in the same code only ),
    so that I will run the single phase motor ( square wave ac motor )
  • Hi hector ,

    i changed source code (according to you mentioned) to generate square wave alternating wave at the output terminal of DRV8703q1 evm...

    Please verify the code and correct me,suggest the changes to generate the square wave alternating wave.(since i dont have launch pad of MSP430g2553, i ordered it,it will take time)

    P2SEL |= EN_IN2;
    TA1CTL = TASSEL_2 | MC_0 | TACLR;
    TA1CCTL0 = CCIE;
    TA1CCTL1 = OUTMOD_7;// The output is reset when the timer counts to the TA1CCR1 value. It is set when the timer
    counts to the TACCR0 value.
    TA1CCTL2 = OUTMOD_3;// The output is set when the timer counts to the TA1CCR2 value. It is reset when the timer
    counts to the TACCR0 value.
    TA1CCR0 = 40000; // 20MSEC PWM period;
    TA1CCR1 = 19900; // 10m sec on
    TA1CCR2 = 19900; // 10m sec off

  • Hi Vasanth,

    We do not support firmware changes to packaged software on our EVMs. These changes must be done by yourself. 

    Did you purchase the MSP-EXP430G2 v1.5 board?

    http://www.ti.com/tool/MSP-EXP430G2

    You have to make sure it is v1.5 as the new version has not been tested in programming the EVM.