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.

DRV8312 C2 kit - BLDC Development using Visual Studio and C#

Other Parts Discussed in Thread: DRV8312, CONTROLSUITE

Hi

I am looking for some help since I am new to this fourm.

I recently purchased a DRV8312-C2-KIT and I would like to develop an application using Visual Studio C# to control the speed of the motor.

Does the DRV8312 support Visual Studio development using C#?

Is there a C# example source code available anywhere that can help me?

Any help or guidance is very much appreciated.

Thanks

  • Hi Omid,

    You could add some code into the F2803x BLDC project to enable some desired variables to cross between the BLDC project and an SCI peripheral (which is most commonly used to interface as a serial port).

    You'd then go into Visual Studio and write some code to interface between your GUI objects and Visual Studio's SerialPort object.

    ===

    On the C2000 side, I'd start with the sci_echoback example:
    \controlSUITE\device_support\f2803x\v130\DSP2803x_examples_ccsv5\sci_echoback\

    Get that working with hyperterminal and then try to get that same echoback example to work with C#. 

    Eventually I would recommend changingthe interaction with the SCI on the C2000 device from from being interrupt-based to flag-based - before you migrate this code into the BLDC project.  If the communications processing is flag based, it will keep the motor control algorithm from being interrupted by the less time-critical SCI interactions.

    Hopefully this helps.

    (PS: if you wanted, we used to have a C# based GUI that went with some of our kits - you could utilize this as well.  You can find some information on the forum about it.  Today however, my recommendation would probably be to start anew using the path described above)


    Thank you,
    Brett

  • Hi Brett,
    Thanks for the information. You mentioned that TI had some C# GUI application in the past for some of their kits. Perhaps I can purchase a different dev kit that already comes with C# and visual studio examples. Could you provide me a list of dev kits that come with C# examples?

    Is there any way to get access to the CrossHairs application source code? Their website is not working ( ERR_CONNECTION_TIMED_OUT ).

    I am not sure how to contact that company about their application. Does TI own the Crosshairs engine? Is there some kind of an API for that application? I would be interested in acquiring a license for their application.

    A quick response is highly appreciated.
    Thanks in advance.
  • Hi Omid,

    I have a few comments:

    1) If your interest is in setting up a demo to prove the concept to your management or a customer, GUI Composer may meet your requirements.  It's based on Code Composer Studio - it can largely be seen just as a different front-end.  In it, you can have buttons effect variables in the C2000's source code and also display data visually.  It's also relatively straightforward to use.
    http://processors.wiki.ti.com/index.php/Category:GUI_Composer

    2) I would not recommend going down the Crosshairs route. 

    3) You could take a look at the following kit.  The kit is based on the 'F28027 and note that the C# GUI software source is included.
    \controlSUITE\development_kits\HVPFC2Phil\

    The following thread may also be helpful, if this is the path you proceed down:
    https://e2e.ti.com/support/microcontrollers/c2000/f/171/p/323334/1127678

    We don't really support this C# GUI (other than trying to make sure it works as customer is evaluating a kit) and there are undoubtedly improvements that could be made.  Perhaps it can be some help though.

    ===

    My recommendation is still to begin anew based on the path in my last post.  Or to use GUI Composer if you're trying to whip up a quick demo.


    Thank you,
    Brett

  • Hi Brett,
    I have created a simple C# application that can interact with sci_echoback target application.

    On the C2000 side... \controlSUITE\device_support\f2803x\v130\DSP2803x_examples_ccsv5\sci_echoback

    I would like to get some support as to how this can be expanded to handle serial packet communication.
    I looked at the GUI_project_InstaSPIN_BLDC project and that uses proprietary serial communication library (commros_28xx_c_full.lib) to send data from the Target to Host PC (GUI).

    I am assuming TI does not suppor the serial communication library (commros_28xx_c_full.lib). If that is not supported anymore, what is the replacement or alternative library that handles serial communication?

    A quick response is highly appreciated.
    Thanks
  • Hi Omid,

    With regards to commros:  The commros file was part of the package that Crosshairs developed.  Crosshairs is no longer in business and we did not own the source code.

    With regards to next steps after sci_echoback and the path you're currently on:  I'd start by breaking apart the immediate echo on the c28x side. You can then work on sending multiple characters, adding the FIFO if necessary, etc.  You can just define a packet format that meets the needs of your application.


    Thank you,
    Brett