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.

80 pin InstaSPIN Motion Chip TMS320F28069MPN

Other Parts Discussed in Thread: MOTORWARE, DRV8312

We have been using the 8312 dev kit with instaspin motion and would like to implement this on the 80 pin chip. I noticed a couple of differences between the two and would like to better understand what the migration process is.

1)      Ease and process of remapping of analog measurements.  On the 100 pin version, the following signals are used but do not exist on the 80 pin version.  Can they be wired and remapped in software to one of the available analog inputs?
a.       ADC-A3  -> IC-FB (Phase C current)
b.      ADC-A7 -> ADC-Vhb2 (Phase B voltage)
c.       ADC-B3 -> IA-FB (Phase A current)
d.      ADC-B7 -> ADC-Vhb1 (Phase A voltage)


2)      What is the motivation for the current measurements (IA-FB, IB-FB, and IC-FB) being wired into two analog inputs?  Can the software handle wiring into just one of the ports?  If so, the signals run to ports available on the 80 pin chip.  If not, is it possible to remap the signals that are wired to pins that do not exist on the 80 pin version (same question as above)?
 
Below is a table of the analog pins on the chip.  Pins highlighted in yellow are not present on the 80 pin version.  Note the duplicates of phase current measurement.
 

Thanks,

Sina

  • 1. yes.

    all mapping of peripherals is done in the hal.c / hal.h files

    you can base your hal files for your inverter off of these

    sw\modules\hal\boards\drv8312kit_revD\f28x\f2806x\src

    I have a reply on another post about creating \solution\myinstaspin_foc that will be helpful to follow. You can either create your sw\modules\hal\boards\myboard or move the hal files into your solutions \src folder to keep all of your files that change in one location, making it easy to update the MotorWare drivers, modules, and any solutions files you want to re-use.

    2. we wired this up for two reasons

    a) the controlCARD interface supports multiple controlCARDs, and they all aren't identical with their layout.  We designed the DRV8312 EVM like 4 years ago...

    b) in this case we were also setting it up so the evaluation board had some flexibility to use the 2-SH feature to grab different pairs of signals.  On the Piccolo devices you can only sample two signals simultaneously if they are on the same channel #, ex A1 and B1.  you can see in this case we made it so we could do

    A1 + B1: Ia + Ib
    A3 + B3: Ic + Ia
    A5 + B5: Ic + Ib

    this allows us to get any of the two best signal pairs when the third current isn't readable because the duty cycle is too low for the low side shunt.

    HOWEVER - we aren't even using this for MotorWare InstaSPIN-FOC or -MOTION.  You will notice in HAL that we are simply taking all the currents, then voltages sequentially.  And we handle the determination of which of the currents to use outside the ADC sampling.

    We have intention to update the ADC driver to use the 2SH feature....but as you can see, it isn't completely necessarily....it really only helps as frequencies get much faster and for higher short circuit motors (more current ripple)....if even then.

    For your design, you just need to get the 2-3 currents, 3 phase and 1 bus voltage to the ADC pins, and then set-up your hal file appropriately.

    The key thing is getting the values into pAdcData-> in the correct order (Iu, Iv, Iw, Vu, Vv, Vw, Vbus).

     

     

  • Thanks Chris. I identified one place that I believe should change in hal.c line 850

      // configure the SOCs for drv8312kit_revD
      // sample the first sample twice due to errata sprz342f
      ADC_setSocChanNumber(obj->adcHandle,ADC_SocNumber_0,ADC_SocChanNumber_A1);
      ADC_setSocTrigSrc(obj->adcHandle,ADC_SocNumber_0,ADC_SocTrigSrc_EPWM1_ADCSOCA);
      ADC_setSocSampleDelay(obj->adcHandle,ADC_SocNumber_0,ADC_SocSampleDelay_9_cycles);
    
      ADC_setSocChanNumber(obj->adcHandle,ADC_SocNumber_1,ADC_SocChanNumber_A1);
      ADC_setSocTrigSrc(obj->adcHandle,ADC_SocNumber_1,ADC_SocTrigSrc_EPWM1_ADCSOCA);
      ADC_setSocSampleDelay(obj->adcHandle,ADC_SocNumber_1,ADC_SocSampleDelay_9_cycles);
    
      ADC_setSocChanNumber(obj->adcHandle,ADC_SocNumber_2,ADC_SocChanNumber_B5);
      ADC_setSocTrigSrc(obj->adcHandle,ADC_SocNumber_2,ADC_SocTrigSrc_EPWM1_ADCSOCA);
      ADC_setSocSampleDelay(obj->adcHandle,ADC_SocNumber_2,ADC_SocSampleDelay_9_cycles);
    
      ADC_setSocChanNumber(obj->adcHandle,ADC_SocNumber_3,ADC_SocChanNumber_A5);
      ADC_setSocTrigSrc(obj->adcHandle,ADC_SocNumber_3,ADC_SocTrigSrc_EPWM1_ADCSOCA);
      ADC_setSocSampleDelay(obj->adcHandle,ADC_SocNumber_3,ADC_SocSampleDelay_9_cycles);
    
      ADC_setSocChanNumber(obj->adcHandle,ADC_SocNumber_4,ADC_SocChanNumber_B7);
      ADC_setSocTrigSrc(obj->adcHandle,ADC_SocNumber_4,ADC_SocTrigSrc_EPWM1_ADCSOCA);
      ADC_setSocSampleDelay(obj->adcHandle,ADC_SocNumber_4,ADC_SocSampleDelay_9_cycles);
    
      ADC_setSocChanNumber(obj->adcHandle,ADC_SocNumber_5,ADC_SocChanNumber_A7);
      ADC_setSocTrigSrc(obj->adcHandle,ADC_SocNumber_5,ADC_SocTrigSrc_EPWM1_ADCSOCA);
      ADC_setSocSampleDelay(obj->adcHandle,ADC_SocNumber_5,ADC_SocSampleDelay_9_cycles);
    
      ADC_setSocChanNumber(obj->adcHandle,ADC_SocNumber_6,ADC_SocChanNumber_B4);
      ADC_setSocTrigSrc(obj->adcHandle,ADC_SocNumber_6,ADC_SocTrigSrc_EPWM1_ADCSOCA);
      ADC_setSocSampleDelay(obj->adcHandle,ADC_SocNumber_6,ADC_SocSampleDelay_9_cycles);
    
      ADC_setSocChanNumber(obj->adcHandle,ADC_SocNumber_7,ADC_SocChanNumber_B2);
      ADC_setSocTrigSrc(obj->adcHandle,ADC_SocNumber_7,ADC_SocTrigSrc_EPWM1_ADCSOCA);
      ADC_setSocSampleDelay(obj->adcHandle,ADC_SocNumber_7,ADC_SocSampleDelay_9_cycles);
    
      return;
    } // end of HAL_setupAdcs() function
    

    Are there other places that require the change? Some ADC inputs are not available in the 80 pin version (A3,A7, B3, B7).  Are there any read commands for those that need to be disabled? I am new to hal.c and hal.h. Your input is highly appreciated.

    Thanks,
    Sina

  • yes, if just changing which pins are connected to Iu, Iv, Iw, Vu, Vw, Vw, Vbus you have the right section.