DRV8312-pmsm-28M35H52

Altair Forum User
Altair Forum User
Altair Employee
edited October 2020 in Community Q&A

Submitted by allejard on Fri, 03/22/2013 - 03:48 
Is the VisSim embedded control project DRV8312-pmsm-28M35H52 designed to operate with the TMDXCNCDH52C1 Concerto controlCARD plugged into the DRV8312EVM motor driver evaluation board? If so, are there any tips on getting this to run? I'm having some trouble that I suspect stems from the dual core architecture.

Tagged:

Answers

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited June 2016

    Submitted by Anders89 on Sat, 03/23/2013 - 00:00.

    Yes, that project is designed to work with the Concerto F28M35H52 ControlCard plugged into the DRV8312 motor kit and provide both sensorless FOC PMSM motor control on the C28 core, and run a web server from the ARM Cortex core using the Embedded\Examples\CortexM3\web28M35H52-m3. With these two diagram, you can control the motor from a web page, and plot motor speed history on the web page. To get the card running do the following.

    1. You must make sure you are connected to the USB jack on the left side of the board (ethernet port up, chip side facing you. Configure the JTAG for XDS100-v2 like so:xds100v2-JTAG-Select.png

    2. As the F28x is the slave core, you must first run a program on the ARM Cortex master core that assigns chip resources needed for the motor control to the c28 core. VisSim will do this automatically for you if you check the F28x config box like so:

              Concerto-preload-out-file.png

           3. If you want to generate code directly for the ARM Cortex M3 side, you must install the ARM Cortex target support here

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited June 2016

    Submitted by allejard on Tue, 03/26/2013 - 01:04.

    I've gotten it to drive the PWM driver IC a few times now, but it's not working properly. It seems that the only time it works is when I flash the M3 core with the setup_m3.out file from Code Composer Studio, close CCS, open VisSim, and run from VisSim. I think I've got some settings wrong, but I've played with each one of them and have yet to make it work consistently. I've included snapshots of my System Properties and F28x Properties dialog boxes. One other thing of note: my ePWM modules are running at half the frequency I expect. A timer period of 3750 should yield 40kHz off a 150Mhz clock, but I'm getting 20kHz. Hopefully this is a useful clue.

    Another thing: if I program the setup_m3.out file into flash, I shouldn't need to preload the .out file in VisSim, right?

    Thanks again for your time.

    <?xml version="1.0" encoding="UTF-8"?>F28x_Properties.jpg

    <?xml version="1.0" encoding="UTF-8"?>System_Properties.jpg

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited June 2016

    Submitted by Anders89 on Wed, 03/27/2013 - 09:47.

    We are not sure what you mean by 'not working properly'. Our setup_m3.out is linked for RAM operation. The PWM frequency is odd. If you cooked up your own setup_m3.out, you must be sure to set the M3 system frequency to 75MHz so that the C28 core can run at 150MHz. You should request a free introductory webinar to sort our your issues.

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited June 2016

    Submitted by allejard on Wed, 03/27/2013 - 23:49.

    I'm still working out the motor control issues and getting it to switch to sensorless control (as well as the PWM frequency issue) , but I think everything else is working as expected. I think the main problem was my switch settings on the Concerto controlCARD. The 4 switches on SW1 need to be 'X ON ON ON' and the 2 switches for SW3 need to be 'ON OFF', and I need to preload the setup file as you suggested.

    I've experimented with the clock source for the MCU. I noticed on your screen shot that it is set to External Oscillator at 10x. On the controlCARD, there is a 20MHz crystal clock source, so I would think that using External Crystal and 7.5x settings to achieve the 150MHz system clock frequency would be needed. Is this incorrect?

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited June 2016

    Submitted by Anders89 on Thu, 03/28/2013 - 22:46.

    Good catch. You are correct, it should be 'External Crystal' and 7.5x to get 150 MHz given the onboard 20 MHZ crystal.

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited June 2016

    Submitted by allejard on Fri, 03/29/2013 - 00:46.

    I have a question about the target interface properties dialog box (image attached). Per the ECD User Guide, it says that the Target Frequency field 'indicates the speed of your CPU. VisSim needs to know the speed in order for the timing to be accurate.' I've noticed that this stays at 100MHz all the time, and it is not user selectable. How do I make this match the 150MHz CPU system clock frequency?

    <?xml version="1.0" encoding="UTF-8"?>F280x Target Interface Properties_0.jpg

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited June 2016

    Submitted by Anders89 on Fri, 03/29/2013 - 23:54.

    Good question. It is important to set the proper CPU speed in the C28x config screen so that the code generator initialized timer registers to proper values to generate interrupts at the proper rate.
    The 'Target Interface Properties' screen you mention will normally get the CPU rate from the target during the download handshake, then it will report in the dialog box. It is not used by the code generator, it is only for verification. However, it looks like we are not reporting the right value for the c28 core on the Concerto, so you can ignore it for now.