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.

CCS/TMS320F280049C: Can't understand the X-BAR function of F280049C

Part Number: TMS320F280049C

Tool/software: Code Composer Studio

Dear Sir,

The MUXxx in the X-BAR chapter of F280049C CPU has never been understood, so in some programs, the instructions related to X-BAR cannot be connected to the actual circuit in inside of F280049C CPU. Now, the following 5 lines of instructions, please advanced and help explain for me. The best way is point out where can I find the relation’s figure , table or page from "TMS320F28004x Microcontrollers, Technical Reference Manual, Literature Number: SPRUI33C" . Thank you very much for your advanced help.

 

#1    XBAR_enableEPWMMux(XBAR_TRIP4, 0x00);

 

#2    XBAR_setOutputMuxConfig(XBAR_OUTPUT3, BAR_OUT_MUX00_CMPSS1_CTRIPOUTH);

#3    XBAR_enableOutputMux(XBAR_OUTPUT3, XBAR_MUX00);

 

#4    XBAR_setEPWMMuxConfig(XBAR_TRIP4, XBAR_EPWM_MUX00_CMPSS1_CTRIPH);

#5    XBAR_enableEPWMMux(XBAR_TRIP4, XBAR_MUX00);

 

Hung-Jin CHen

  • I'm not sure why you have #1, the rest are correct.

  • Dear Nima,

    1. The #1 instruments comes from the code of  "line no. 271 of pfc1ph3ilttpl_board.c of pfc1ph3ilttpl_F28004x's project in Design Guide: TIDM61B". The trip parameters are declaration :

    typedef enum
    {
    XBAR_TRIP4 = 0, //!< TRIP4 of the ePWM X-BAR
    XBAR_TRIP5 = 2, //!< TRIP5 of the ePWM X-BAR
    XBAR_TRIP7 = 4, //!< TRIP7 of the ePWM X-BAR
    XBAR_TRIP8 = 6, //!< TRIP8 of the ePWM X-BAR
    XBAR_TRIP9 = 8, //!< TRIP9 of the ePWM X-BAR
    XBAR_TRIP10 = 10, //!< TRIP10 of the ePWM X-BAR
    XBAR_TRIP11 = 12, //!< TRIP11 of the ePWM X-BAR
    XBAR_TRIP12 = 14 //!< TRIP12 of the ePWM X-BAR
    } XBAR_TripNum;

    May I know, where can I find the the code of 0, 2, 4,...12, 14 defined in F28004x reference manual ?

    2. Where can I find the CMPINxP pin  (the positive input of CMPSSx, where x = 1,2,3,4,5,6,7) of   F280049c in 100 pins package from  F28004x reference manual ?

    I would very appreciate for your helping.

    Regards

    Hung-Jin Chen

    According the 

  • XBARTrip numbers are used in the driverlib code as offsets for accessing the resgiters. So from just looking that the numbers, they dont really make a lot of sense,

    Here is an example:

    XBAR_TRIP4 = 0

    XBAR_TRIP4 = 2

    In the driverlib function for EPWM XBAR ENABLE:

    static inline void
    XBAR_enableEPWMMux(XBAR_TripNum trip, uint32_t muxes)
    {
        //
        // Set the enable bit.
        //
        EALLOW;
    
        HWREG(XBAR_EPWM_EN_REG_BASE + (uint16_t)trip) |= muxes;
    
        EDIS;
    }
    

    You increase the address TRIP4 EPWM XBAR ENABLE by 2 to access the next trip TRIP5.

    In the TRM these addresses are given:

    20h TRIP4MUXENABLE ePWM XBAR Mux Enable for TRIP4 EALLOW Go
    22h TRIP5MUXENABLE ePWM XBAR Mux Enable for TRIP5 EALLOW Go
    24h TRIP7MUXENABLE ePWM XBAR Mux Enable for TRIP7 EALLOW Go
    26h TRIP8MUXENABLE ePWM XBAR Mux Enable for TRIP8 EALLOW Go
    28h TRIP9MUXENABLE ePWM XBAR Mux Enable for TRIP9 EALLOW Go
    2Ah TRIP10MUXENABLE ePWM XBAR Mux Enable for TRIP10 EALLOW Go
    2Ch TRIP11MUXENABLE ePWM XBAR Mux Enable for TRIP11 EALLOW Go
    2Eh TRIP12MUXENABLE ePWM XBAR Mux Enable for TRIP12 EALLOW Go
    

  • For pinmux, specially analog pinmux, refer to the DATASHEET.