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.

LAUNCHXL-F280039C: f28003x_eqep.h types definition

Part Number: LAUNCHXL-F280039C
Other Parts Discussed in Thread: C2000WARE

Hi,

I want to use the digital motor control library as a base for a motor controller. I am using some code from 'Dual axis servo drive fcl'. In this project, _MOTOR_Vars_t_ is the variable struct that contains many of the algorithm variables. One of the elements of this struct is:

    volatile struct EQEP_REGS *pQEPRegs;  // Aligned to lower 16-bits

EQEP_REGS is defined in f28003x_eqep.h, which I have included in my project.

The issue happens as this file defines the forementioned struct:

struct EQEP_REGS {
    Uint32                                   QPOSCNT;                      // Position Counter
    Uint32                                   QPOSINIT;                     // Position Counter Init
    Uint32                                   QPOSMAX;                      // Maximum Position Count
    Uint32                                   QPOSCMP;                      // Position Compare
    Uint32                                   QPOSILAT;                     // Index Position Latch
    Uint32                                   QPOSSLAT;                     // Strobe Position Latch
    Uint32                                   QPOSLAT;                      // Position Latch
    Uint32                                   QUTMR;                        // QEP Unit Timer
    Uint32                                   QUPRD;                        // QEP Unit Period
    Uint16                                   QWDTMR;                       // QEP Watchdog Timer
    Uint16                                   QWDPRD;                       // QEP Watchdog Period
    union   QDECCTL_REG                      QDECCTL;                      // Quadrature Decoder Control
    union   QEPCTL_REG                       QEPCTL;                       // QEP Control
    union   QCAPCTL_REG                      QCAPCTL;                      // Qaudrature Capture Control
    union   QPOSCTL_REG                      QPOSCTL;                      // Position Compare Control
    union   QEINT_REG                        QEINT;                        // QEP Interrupt Control
    union   QFLG_REG                         QFLG;                         // QEP Interrupt Flag
    union   QCLR_REG                         QCLR;                         // QEP Interrupt Clear
    union   QFRC_REG                         QFRC;                         // QEP Interrupt Force
    union   QEPSTS_REG                       QEPSTS;                       // QEP Status
    Uint16                                   QCTMR;                        // QEP Capture Timer
    Uint16                                   QCPRD;                        // QEP Capture Period
    Uint16                                   QCTMRLAT;                     // QEP Capture Latch
    Uint16                                   QCPRDLAT;                     // QEP Capture Period Latch
    Uint16                                   rsvd1[15];                    // Reserved
    union   REV_REG                          REV;                          // QEP Revision Number
    union   QEPSTROBESEL_REG                 QEPSTROBESEL;                 // QEP Strobe select register
    union   QMACTRL_REG                      QMACTRL;                      // QMA Control register
    union   QEPSRCSEL_REG                    QEPSRCSEL;                    // QEP Source Select Register
};

The unions are mostly Uint16, however, I have not defined the Uint16 type, is there an include I'm missing? I have tried seing the examples from the resource explorer on eqep, but those don't use f28003x_eqep.h but another file.

In the same library I'm also missing the definition of int32, what file includes this type definition?

Thanks and regards