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.
Tool/software: Code Composer Studio
Hi,
I am currently working on an application to run a simple program on my sensored BLDC motor using DRV8313EVM module. I would like to run the motor in stand alone mode with a certain set of algorithms.
The algorithms would be running CW for 40% duty cycle for 1minute, 100% duty cycle for 3 minute CW, 80% duty cycle for 2 min CCW and repeat.
1) For programming BLDC motor, usually there are 6 inputs need to be keyed in (INHA, INLA, INHB, INLB, INHC, INLC), however for the DRV8313EVM (MPS430G2553 chip), there are only points of EN1, EN2, EN3, IN1, IN2 and IN3? As far as I know, usually need to program High and Low for each channel but in this case there are one for EN and one for IN.
So how do I go about programming this sequence for CW and CCW as well as using timer to program the time using DRV8313EVM.
I am quite new to programming in CCS. Appreciate any advice/help
Thanks,
Thena
Hi Peter,
Thanks for the information and help.
Looking forward for your reply. :)
Thanks,
Thena
Hi Peter,
Thanks for the update. :)
Another quick question;
I came across this sample code below but just curious about the code.
In the code below, its written P2OUT &= ~ (BIT5);
-- > meaning its clearing/reset the bit for P2.5 but in the comment it says reset bits P2.4, P2.5.
Hence, should the code be P2OUT &= ~ (BIT4 | BIT5)?
Because below that, there is also another code --> P1OUT &= ~(BIT4 | BIT5); this states it clearing/reset P1.4 and 1.5
/* Reset switches for phase U (HIGH) */
P2OUT &= ~(BIT5); /* Reset bits P2.4 , P2.5 */
P2SEL &= ~(BIT5); /* Select P2.4 , P2.5 as I/O Function for Phase U*/
/* Reset switches for phase V (LOW-HIGH)*/
P1OUT &= ~(BIT4 | BIT5); /* Reset bits P1.4 , P1.5 */
P1SEL &= ~(BIT4 | BIT5); /* Select P1.4 , P1.5 as I/O Function for Phase V*/
Thanks,
Thena
Hi Peter,
haha. ok. understand.
No worries.
Here is the link of where I downloaded the software files -> http://www.ti.com/tool/BOOSTXL-DRV8323RS
Its from the sample code given from the folder "DRV8323_MSP430F5529_Trapezoidal_Sensored_BLDC" --> in global.c file
I downloaded it from the zip file DRV832x Software (MSP-EXP430F5529LP)--> I extracted that folder after installing "DRV832x_EVM_FW_1.0.0_windows-installer" found in that zip file.
Thanks,
Thena
Hi,
For DRV8313EVM, I followed the samples in the user guide, I was able to get the motor running with GUI, but I need to run the motor without the GUI (gives a voltage and the motor will run according to the algorithm). I tried to generate the config and check the codes but these are the codes I got (see below).
There are no any codes in the void Process_UART_Data.
My question would be :
1) is it supposed to be like that ? --> no any motor control portion code in the void Process_UART_Data (void) .
2) how do I write the codes for just one input of signals for the algorithm below?
The algorithms would be running CW for 40% duty cycle for 1minute, 100% duty cycle for 3 minute CW, 80% duty cycle for 2 min CCW and repeat.
As mention by your colleague, "The motor control portion of the code is "hidden" in a library file included in the project. The source file with the visible code, as you indicated, is just containing the processing of the UART data from the GUI, and based on the received data then calling the respective functions in the library."
Am i able to get that section when i try to generate the config file?
Appreciate your help. :)
/*
#ifndef CONFIG_C_
#define CONFIG_C_
#include "msp430g2553.h"
extern unsigned int INTEGRATION_CONSTANT;
extern unsigned char START_UP_DUTY; //%
extern unsigned char START_UP_MAX_DUTY ; //%
extern unsigned char INCREMENTAL_DUTY ; //%
extern unsigned char INCREMENTAL_TIME ; //mS
extern unsigned int WAIT_TIME ; //mS
extern unsigned char SPEED_DUTY_MAX; //%
extern unsigned char SPEED_DUTY_MIN ; //%
extern unsigned char SPEED_RAMP_CYCLES ;
extern unsigned char Speed_Control,State,Hysteritic_Control,Rotation ;
void Init_System_Variables(void)
{
INTEGRATION_CONSTANT = 20;
START_UP_DUTY = 1; //%
START_UP_MAX_DUTY = 15; //%
INCREMENTAL_DUTY = 1; //%
INCREMENTAL_TIME = 4; //mS
WAIT_TIME = 200; //mS
SPEED_DUTY_MAX = 97; //%
SPEED_DUTY_MIN = 10; //%
SPEED_RAMP_CYCLES = 2;
Hysteritic_Control = 2;
State = 1;
Speed_Control = 0;
Rotation = 0;
}
void Process_UART_Data (void) {}
#endif
*/
Thanks,
Thena
**Attention** This is a public forum