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.

TMS320F28379D: EnDat interface real requirments

Part Number: TMS320F28379D


Hello,

I'm working on a custom control board that will need EnDat interface and 2 resolvers. To have a very quick access to the dedicated resolver to digital parallel outputs I'm thinking to use the EMIF interface in an unconventional way. At the same time I would like to use the same emif1 to interface with an external flash memory. As a result I need all three chip select of the asynchronous interface (2 for the resolvers and 1 for the flash memory). EMI1CS2 can only be muxed on GPIO34. 
According to sprui35 4.2.7 and 5 it seems that GPIO34 is the only possible choice for the EnDat Direction Control. At the same time sprui71 (about tformat, that is using the same interface) section 5 seems to say something different: 

GPIO34 is used for this purpose on IDDK and
example projects. User can choose any GPIO with
OUTPUTXBAR1 mux option.

Do you confirm me that it is possible to use other pins instead of GPIO34? In that case, according to the fact that OUTPUTXBAR1 has to be used the other possible pins are: GPIO2, GPIO24, GPIO58. 

I have another question about resource requirments of EnDAT/BiSSC/tformat interface: in the respective sprui it appears that EPWM4 is dedicated for clock generation. However, in the initialization process it seems that registers of other EPWM has to be modified:

SPRUI35 (EnDat) 4.2.5 

Enable clocks to EPWM Instances 1, 2, 3 and 4.
CpuSysRegs.PCLKCR2.bit.EPWM1 = 1;
CpuSysRegs.PCLKCR2.bit.EPWM2 = 1;
CpuSysRegs.PCLKCR2.bit.EPWM3 = 1;
CpuSysRegs.PCLKCR2.bit.EPWM4 = 1;

SPRUI71 (tformat) 4.2.4

Enable clocks to EPWM Instances 1, 2, 3 and 4.
tformatData.spi = &SpibRegs;
PM_tformat_setupPeriph();

SPRUI37 (BiSSC) 4.2.6

Enable clocks to EPWM Instances 3 and 4:
CpuSysRegs.PCLKCR2.bit.EPWM3 = 1;
CpuSysRegs.PCLKCR2.bit.EPWM4 = 1;

So the second question is: why do I have to modify registers of other EPWM than the numeber 4? Will I be free to use EPWM1 2 and 3 without any kind of limitation while using the interface for EnDat/tformat/BiSSc? that question is relevant, because I need to use at least 18 PWM channels at the same time, so I need at least 9 dedicated EPWM periferrals.

I also have a third question that is of lower importance. Is that possible in some way to have more than one EnDat encoder connected? I was thinking about routing some signals. A possible way can be to have two indipendent interfaces and to route EnDatclk, SPISIMO,SPISOMI and direction control by means of some dedicated integrated circuit. Do you think this solution can be feasable?

Thanks in advance

  • Hi Alessandro,

    Your understanding is correct about the GPIO34. The implementation is different between EnDat and tformat/Biss-C protocols. Since it's a pre-compiled library, you'll have to use the pins as documented in the user guide.

    Regarding EPWMs used, it's different for different protocols. It's important to have the clocks enabled for these modules.
    This is because the configurable logic tiles (described in the library user guide) are linked to the corresponding EPWM instances and also the clock is shared between the modules. In case of Endat, you should be able to use EPWM modules (other the EPWM4) in application - but make sure that the clocks are not changed from defaults in the library.

    Regarding the third question, if you are using one encoder at a time by selecting one and routing corresponding signals via. external circuit - yes this is feasible. But, if you have to do 2 interfaces concurrently, that's not feasible with the existing libraries.

    -Bharathi.

    -Bharathi.
  • Thanks a lot for your answer!
    Honestly I did not completely understand.

    Can I make a multifunctional (for EnDat, tformat and Biss-C) hardware interface similar to the one on the IDDK but using another pin ( among GPIO2, GPIO24, GPIO58) instead of GPIO34? It seems to be something logic because of the fact that both on EnDat and t-format the CLB output (TxEn) is on OUTPUTXBAR1 and OUTPUTXBAR1 can be muxed on these other pins. For example, if I would use GPIO24 I could initialize by substituting:

    GpioCtrlRegs.GPBMUX1.bit.GPIO34 = 1; // Configure GPIO34 as EnDat TxEN

    with:

    GpioCtrlRegs.GPAMUX2.bit.GPIO24 = 1;
    GpioCtrlRegs.GPAGMUX2.bit.GPIO24 = 0;

    Concerning EPWM, imagine I'm using the hardware interface as an EnDat. EPWM4 will be dedicated, so I won't be able to use it for other purposes. Will I be able to use EPWM1, EPWM2 and EPWM3 without any kind of restriction? I'm particularly interested in possible restrictions about ePWM synchronisation (by means of synchronisation chains or TBCLKSYNC = 1).

    For the third question, do you think I can do something like an "hot swap" of the encoders?
    Sending a request to the first encoder (by means of routing signals to it)
    changeing route through GPIO pins connected to the mux
    Sending a request to the encoder (now is the second one)
    and so on..
    Do you think it will give some problems to the system? Like some loss of synchronisation or some error in general.

    Thanks in advance

  • Hi,

    GPIO34 is required for EnDat - it's a dedicated resource, not user configurable, as listed in the documentation for EnDat.
    It's different for other protocols - can be configured via outputxbar - as you've rightly noted.

    "For the third question, do you think I can do something like an "hot swap" of the encoders?"

    I don't think will work - because you may have to go through a reset cycle before re configuring the software for the new encoder interface.

    -Bharathi.

  • thank you very much for the quick answer!
    I hope that I hope for more flexible pinout restrictions for the position manager interface in the future :)