Because of the Thanksgiving holiday in the U.S., TI E2E™ design support forum responses may be delayed from November 25 through December 2. Thank you for your patience.

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.

CCS/TM4C1294NCPDT: Manually rpm set for drv8308 using tm4c1294ncpdt

Part Number: TM4C1294NCPDT
Other Parts Discussed in Thread: DRV8308, , EK-TM4C1294XL, DRV8303, DRV8308EVM, DRV8303EVM

Tool/software: Code Composer Studio

Hi Team,

I create this separate thread for the customer inquiry for manual rpm set for drv8308 using tm4c1294ncpdt and also, need ccs program for manual rpm set.

Please let me know if you need more information from the customer.

Thanks,

Jonathan


  • Jonathan,

      Your post got forwarded to Stellaris forum again by the CCS team. What is the manual RPM you are talking about? Is this some tool or example that comes with the DRV8303 evaluation board? If this is the case, I will forward your question to the Motor forum. If this is not specific to DRV0803 then what is the manual RPM you are referring to? As far as any examples for motor control, we don't have as such that is specific to DRV0803. We have PWM dead-band generation example if that is something will help you get started. The example can be found in <TivaWare_Installation>/examples/boards/ek-tm4c1294xl/pwm_dead_band. 

  • i want particular rpm set in pwm mode (rpm is adjustable) which parameter in define? in drv8308 register address? with closed loop.

  • Hi Govind,

      I will suggest you go through the PWM module in the device datasheet to be familiar with how the TM4C129 PWM works. Basically, the PWM module will have the period counter. You and pre-load the period counter with a value that determines your desired period of the PWM.  Please refer to the below snippet of example which you can also find in <TivaWare_Installation>/examples/boards/ek-tm4c1294xl/pwm_invert. Suppose you want 15000 RPM. Note this is only an example RPM. Your application determines what RPM you need. A 15000 RPM means 250Hz on the PWM period. See the below code how the PWM is configured for 250Hz. The below snippet assumes your PWM clock is 16MHz. You can program this per your application requirement to reach your desired RPM.

        //
        // Set the PWM clock to the system clock.
        //
        SysCtlPWMClockSet(SYSCTL_PWMDIV_1);
    
        //
        // The PWM peripheral must be enabled for use.
        //
        SysCtlPeripheralEnable(SYSCTL_PERIPH_PWM0);
    
        //
        // For this example PWM0 is used with PortB Pin6.  The actual port and
        // pins used may be different on your part, consult the data sheet for
        // more information.
        // GPIO port B needs to be enabled so these pins can be used.
        // TODO: change this to whichever GPIO port you are using.
        //
        SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOB);
    
        //
        // Configure the GPIO pin muxing to select PWM00 functions for these pins.
        // This step selects which alternate function is available for these pins.
        // This is necessary if your part supports GPIO pin function muxing.
        // Consult the data sheet to see which functions are allocated per pin.
        // TODO: change this to select the port/pin you are using.
        //
        GPIOPinConfigure(GPIO_PB6_M0PWM0);
    
        //
        // Configure the PWM function for this pin.
        // Consult the data sheet to see which functions are allocated per pin.
        // TODO: change this to select the port/pin you are using.
        //
        GPIOPinTypePWM(GPIO_PORTB_BASE, GPIO_PIN_6);
    
        //
        // Configure the PWM0 to count up/down without synchronization.
        //
        PWMGenConfigure(PWM0_BASE, PWM_GEN_0, PWM_GEN_MODE_UP_DOWN |
                        PWM_GEN_MODE_NO_SYNC);
    
        //
        // Set the PWM period to 250Hz.  To calculate the appropriate parameter
        // use the following equation: N = (1 / f) * SysClk.  Where N is the
        // function parameter, f is the desired frequency, and SysClk is the
        // system clock frequency.
        // In this case you get: (1 / 250Hz) * 16MHz = 64000 cycles.  Note that
        // the maximum period you can set is 2^16.
        // TODO: modify this calculation to use the clock frequency that you are
        // using.
        //
        PWMGenPeriodSet(PWM0_BASE, PWM_GEN_0, 64000);
    
        //
        // Set PWM0 to a duty cycle of 25%.  You set the duty cycle as a function
        // of the period.  Since the period was set above, you can use the
        // PWMGenPeriodGet() function.  For this example the PWM will be high for
        // 25% of the time or 16000 clock ticks (64000 / 4).
        //
        PWMPulseWidthSet(PWM0_BASE, PWM_OUT_0,
                         PWMGenPeriodGet(PWM0_BASE, PWM_GEN_0) / 4);

  • thank you for response my doubt but i want particular start rpm is 10 rpm i am using drv8308evm gui software and clock frequency mode and i want to starting rpm is 10 rpm up to max with fine tuning parameter 

  • Hi,

      Sorry, I have to say I'm still confused as to what you are looking for. Here is my understanding. Correct me if I'm wrong. Please answer my questions so I have a better understanding of what you want to do. Your post got assigned to the TM4C forum. If your question is more related to the DRV8303EVM hardware and the software that comes with it then we will find the Motor forum expert to assist you accordingly. 

      - You are using a drv8303evm and the evaluation board comes with a GUI software that allows you to control the RPM. Is this correct?

      - As far as I know the drv8303evm evaluation board uses a MSP430 processor as the host processor to interface with the DRV8303 driver. Where I'm confused is what do you want to do with the TM4C1294NCPDT processor? I don't understand the relationship between the TM4C129 and the DRV8303EVM at this moment. Please clarify.

      - Are you trying to design your own board but instead of using MSP430, do you want to use the TM4C1294 processor to control the DRV8383 and you are looking for the same GUI software? If this is the case, then no. There is no such GUI software for the TM4C129. 

    Below is the schematic I found for the DRV8303EVM. The host processor on the board is the MSP430, not TM4C129. 

  • sorry for that ,  i want only 10 rpm rotation in clock frequency mode i see datasheet for that I'm still confused which parameter is perfact for 10 rpm

    please refer that parameter to spin exetly 10 rpm

  • at 250 rpm is working good but torque so low how can i increase  particular  parameter ?

  • Hi,

      I'm transferring your question to our Motor forum expert.  

  • Govind,

    Please summarize your needs from the motor drive team.

    Regards,

    -Adam