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.

Experimenting with the Piccolo (TMS320F28027) on the TMDXIDK3359 dev kit

Other Parts Discussed in Thread: TMS320F28027, DRV8412, DRV8312

Hello, I recently received my TMDXIDK3359 and am very enthusiastic about the possibilities!  I want to perform some basic motor control (BLDC) proof of concepts via the Piccolo controller on the daughterboard.  However, I'm a bit stumped as to how best to proceed.  The introductory demos for this kit do not seem to involve the motor control facilities of the kit -- that, or I'm failing to encounter such documentation.  

I have the following questions and would very much appreciate answers and direction:

- How do I experiment with InstaSPIN on the Piccolo on this kit?

- Will I need to purchase a separate JTAG adapter/emulator and connect to J18?

- What application code is preloaded onto the Piccolo TMS320F28027 on this kit?  Does this involve any kind of demonstration, etc that is useful for training or otherwise getting familiar with the part?

If documentation covering the above exists, please kindly point me in the right direction -- I'll be embarrassed, but appreciative :)

  • Hi Brandon,

    great to see your excitement. There are quite a lot of things that can be done with IDK. However so far not all of the features are supported out of the box. The focus of this board is still on industrial communication. In all the demo code we have we use the Piccolo device for measuring the motor currents and voltage and then send this to the AM335x via SPI. The ARM device is the running an FOC algo (same as C2000) and controls the PWMs. There is no InstaSPIN for ARM so far. Also we are not supporting InstaSPIN on the IDK platform (the C2000 team has their own hw platforms).

    If you are familiar with Picollo you may use it via JTAG in a standard way. The schematics are available to see what connections are there.

    We will update wikis once we have more software support for motor control part of the IDK.

    Regards.

  • Ok, thanks for the direction.  InstaSPIN just looked like a good starting point.  I don't mind jumping right in with FOC control, provided there is functioning software demos.  Do I understand you correctly that this FOC demo code is something internal to TI at this point?

    I really intended to quickly spin some motors with this kit using TI provided examples.  Is there some way I can get my hands on example code that will allow me to easily accomplish this?  Otherwise, an ETA on when such features will be available in the SDK would be good to know.

  • Hi Brandon,

    The FOC demo code for IDK is currently TI internal - I don't have a date when this will be made public, because it is only a demo right now.

    However, you could use the following steps to get familiar with the FOC code and spin a motor on IDK.

    1. If you plan to get started very easily with an out-of-the-box  experience you should look at the DRV8412-C2 Motor Control Kit. http://www.ti.com/tool/drv8412-c2-kit. This kit comes with FOC source code and is very well documented. We have used this project as a starting point for IDK demo when porting the FOC code to the AM335x. Using this kit you can understand the fundamentals (in case you are not aware of them already).

    2. On IDK you can re-route the PWM signals for DRV8412, and let the F280xx device generate them. There are resistor options to re-router this (on IDK schematics, look for R150/R152 and similar). This would be similar to DRV8412 Kit setup. You should be able to use the DRV8412-Kit example with some modification.

    3. After you completed the first two steps you can look into porting the FOC code to AM335x.

    Hope this gets you started.

    Regards,

     Thomas

  • Brandon,

    I also wanted to mention that you can download for free the C2000 FOC software/documentation for the DRV8412 Kit here: http://www.ti.com/lsds/ti/microcontroller/32-bit_c2000/software.page

    Regards,

     Thomas

  • Thomas,

    Thanks for the suggestions.  You have essentially confirmed my 'plan B' strategy.  We've actually ordered the DRV8312 kit to achieve some baseline experiments and confidence.  I had indeed intended to move the 3 resistors on the IDK to route the PWM signals from the Piccolo to the DRV8412.  In future revisions of the daughterboard, I suggest that TI layout these 3 resistors in a more convenient location for end-user rework as well as increase the sizes to 0805, or even better, replace with .100 headers and jumpers if feasible.  As it stands, one resistor is on top and the other two are on the bottom of the PCB.  Furthermore, they are very small and prone to issues when switching back and forth.

    Thanks again,

    Brandon

  • I just wanted to follow up and report that I was able to get the Sensorless FOC code building and running at BUILDLEVEL7 on this DevKit (TMDXIDK3359).  I can see now that this kit is very much geared for FOC control.  I had to move the program code to Flash to work around the very limited RAM available on the Piccolo 28027.  Also there were changes pertaining to the PWM and ADC routing on the board.  Another snag had to do with the current measurement ADC value being negated (some kind of phase adjustment from the op-amp circuits?) in the code for the DRV8312 which the IDK should not be doing -- otherwise the motor goes crazy and you will get nowhere trying to tune the PID.

    So now my motors are spinning quietly and smoothly and I'm looking at pretty sinusoids on my scope! It's cool how very little the DRV8412 warms up once you get to BUILDLEVEL7. It would have been nice though to have a QEP on the Piccolo on this kit.  Perhaps my next step will be to involve the Sitara and use one of it's QEPs to monitor the encoder, and send the stats to the Piccolo via SPI.

    I've attached a 7-zip archive of the ported code for anyone else's benefit.  At this point its still all just TI code with configuration changes. It certainly could use some tidying up, and there are a few debugging hacks/spikes, but it works.

    Also, be sure to set SW2 #3 and #4 to ON in order to put the DRV8412 in the proper mode for BLDC/PMSM.

    MyPMSM_FOC_Sensorless(Level 7 Building and Running FLASH).7z