TMS320F28P650DK: TMS320F28P650DK7芯片关于clb和xbar的使用问题

Part Number: TMS320F28P650DK

#define GPIO_11_GPIO11                  0x00061600U
#define GPIO_11_EPWM6_B                 0x00061601U
#define GPIO_11_SCIB_RX                 0x00061602U
#define GPIO_11_OUTPUTXBAR7             0x00061603U
#define GPIO_11_EQEP1_B                 0x00061605U
#define GPIO_11_SD4_D1                  0x00061607U
#define GPIO_11_ESC_GPO3                0x0006160AU
#define GPIO_11_ESC_TX0_DATA1           0x0006160BU
#define GPIO_11_FSIRXB_CLK              0x0006160DU
#define GPIO_11_FSIRXA_D1               0x0006160EU
#define GPIO_11_PMBUSA_ALERT            0x0006160FU

#define GPIO_12_GPIO12                  0x00061800U
#define GPIO_12_EPWM7_A                 0x00061801U
#define GPIO_12_CLB_OUTPUTXBAR6         0x00061802U
#define GPIO_12_ADCSOCAO                0x00061803U
#define GPIO_12_EQEP1_STROBE            0x00061805U
#define GPIO_12_SCIA_TX                 0x00061806U
#define GPIO_12_SD4_C2                  0x00061807U
#define GPIO_12_EMIF1_A1                0x00061809U
#define GPIO_12_ESC_GPO4                0x0006180AU
#define GPIO_12_ESC_TX0_DATA2           0x0006180BU
#define GPIO_12_FSIRXC_D0               0x0006180DU
#define GPIO_12_FSIRXA_D0               0x0006180EU
#define GPIO_12_PMBUSA_CTL              0x0006180FU

#define GPIO_13_GPIO13                  0x00061A00U
#define GPIO_13_EPWM7_B                 0x00061A01U
#define GPIO_13_CLB_OUTPUTXBAR7         0x00061A02U
#define GPIO_13_EQEP5_STROBE            0x00061A03U
#define GPIO_13_EQEP1_INDEX             0x00061A05U
#define GPIO_13_SCIA_RX                 0x00061A06U
#define GPIO_13_SD4_D2                  0x00061A07U
#define GPIO_13_EMIF1_CS0N              0x00061A09U
#define GPIO_13_ESC_GPO5                0x00061A0AU
#define GPIO_13_ESC_TX0_DATA3           0x00061A0BU
#define GPIO_13_FSIRXC_D1               0x00061A0DU
#define GPIO_13_FSIRXA_CLK              0x00061A0EU
#define GPIO_13_PMBUSA_SDA              0x00061A0FU

#define GPIO_14_GPIO14                  0x00061C00U
#define GPIO_14_EPWM8_A                 0x00061C01U
#define GPIO_14_SCIB_TX                 0x00061C02U
#define GPIO_14_EQEP5_INDEX             0x00061C03U
#define GPIO_14_LINA_TX                 0x00061C05U
#define GPIO_14_OUTPUTXBAR3             0x00061C06U
#define GPIO_14_OUTPUTXBAR8             0x00061C07U
#define GPIO_14_ESC_GPO6                0x00061C0AU
#define GPIO_14_ESC_PHY1_LINKSTATUS     0x00061C0BU
#define GPIO_14_FSIRXC_CLK              0x00061C0DU
#define GPIO_14_EMIF1_D17               0x00061C0EU
#define GPIO_14_PMBUSA_SCL              0x00061C0FU

#define GPIO_15_GPIO15                  0x00061E00U
#define GPIO_15_EPWM8_B                 0x00061E01U
#define GPIO_15_SCIB_RX                 0x00061E02U
#define GPIO_15_LINA_RX                 0x00061E05U
#define GPIO_15_OUTPUTXBAR4             0x00061E06U
#define GPIO_15_CLB_OUTPUTXBAR8         0x00061E07U
#define GPIO_15_ESC_GPO7                0x00061E0AU
#define GPIO_15_EQEP5_A                 0x00061E0BU
#define GPIO_15_FSIRXD_D0               0x00061E0DU
#define GPIO_15_EMIF1_DQM2              0x00061E0FU

根据以上的定义,GPIO15可以使用#define GPIO_15_OUTPUTXBAR4             0x00061E06U

或者#define GPIO_15_CLB_OUTPUTXBAR8         0x00061E07U两种方式,通过xbar路由到CLB中作为输出引脚。配置如下:

image.png

image.png

实际测试中,GPIO15通过GPIO_15_CLB_OUTPUTXBAR8这种方式,CLB5无法正常控制输出。

image.png

通过GPIO_15_OUTPUTXBAR4方式路由到CLB5的OUTLUT5进行输出,实测结果正常。

#include "board.h"

//*****************************************************************************
//
// Board Configurations
// Initializes the rest of the modules. 
// Call this function in your application if you wish to do all module 
// initialization.
// If you wish to not use some of the initializations, instead of the 
// Board_init use the individual Module_inits
//
//*****************************************************************************
void Board_init()
{
    EALLOW;

    PinMux_init();
    CLB_init();
    CLB_OUTPUTXBAR_init();

    EDIS;
}

这两种不同的方式有什么区别吗,对于GPIO12和GPIO13只有CLB_OUTPUTXBAR的路由方式怎么解决呢?