SPRACE5A May   2019  – May 2021 F29H850TU , F29H859TU-Q1 , TMS320F280021 , TMS320F280021-Q1 , TMS320F280023 , TMS320F280023-Q1 , TMS320F280023C , TMS320F280025 , TMS320F280025-Q1 , TMS320F280025C , TMS320F280025C-Q1 , TMS320F280040-Q1 , TMS320F280040C-Q1 , TMS320F280041 , TMS320F280041-Q1 , TMS320F280041C , TMS320F280041C-Q1 , TMS320F280045 , TMS320F280048-Q1 , TMS320F280048C-Q1 , TMS320F280049 , TMS320F280049-Q1 , TMS320F280049C , TMS320F280049C-Q1 , TMS320F28075 , TMS320F28075-Q1 , TMS320F28076 , TMS320F28374D , TMS320F28374S , TMS320F28375D , TMS320F28375S , TMS320F28375S-Q1 , TMS320F28376D , TMS320F28376S , TMS320F28377D , TMS320F28377D-EP , TMS320F28377D-Q1 , TMS320F28377S , TMS320F28377S-Q1 , TMS320F28378D , TMS320F28378S , TMS320F28379D , TMS320F28379D-Q1 , TMS320F28379S , TMS320F28384D , TMS320F28384S , TMS320F28386D , TMS320F28386S , TMS320F28388D , TMS320F28388S , TMS320F28P650DH , TMS320F28P650DK , TMS320F28P650SH , TMS320F28P650SK , TMS320F28P659DH-Q1 , TMS320F28P659DK-Q1 , TMS320F28P659SH-Q1

 

  1.   1
  2.   2
    1.     3
  3.   4
  4.   5
    1.     6
    2.     7
    3.     8
      1.      9
      2.      10
      3.      11
  5.   12
    1.     13
      1.      14
    2.     15
    3.     16
    4.     17
    5.     18
  6.   19
  7.   20

How to Change the GPIO Assignment for the CAN Pins

The example C file has the following statements:

GPIO_setPinConfig(DEVICE_GPIO_CFG_CANRXA);
GPIO_setPinConfig(DEVICE_GPIO_CFG_CANTXA);
GPIO_setPinConfig(DEVICE_GPIO_CFG_CANRXB);
GPIO_setPinConfig(DEVICE_GPIO_CFG_CANTXB);
  • The function GPIO_setPinConfig(uint32_t pinConfig) is in gpio.c file.
  • The argument DEVICE_GPIO_CFG_CANRXA is in device.h file.
#define DEVICE_GPIO_CFG_CANRXA      GPIO_30_CANRXA  // "pinConfig" for CANA RX

The constant #define GPIO_30_CANRXA 0x00081C01U is defined in pin_map.h file.

To change the GPIO mapping, edit the device.h file as follows: (Table 4-1 was used as an example).

// Modified configuration 
#define DEVICE_GPIO_CFG_CANRXA      GPIO_70_CANRXA  // "pinConfig" for CANA RX
#define DEVICE_GPIO_CFG_CANTXA      GPIO_71_CANTXA  // "pinConfig" for CANA TX
#define DEVICE_GPIO_CFG_CANRXB      GPIO_73_CANRXB  // "pinConfig" for CANB RX
#define DEVICE_GPIO_CFG_CANTXB      GPIO_72_CANTXB  // "pinConfig" for CANB TX
Note:

device.h file is unique to every example directory in the workspace. The edits you make for one project will not get carried over across other projects.

For the ControlCARD, CANTXA is on GPIO31 and CANRXA is on GPIO30. CANTXB is on GPIO8 and CANRXB is on GPIO10. GPIOs will be different on Launchpad. For more information, see the board schematics in the /boards directory in C2000ware.