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.

PROCESSOR-SDK-AM335X: Getting DCAN Example running on AMIC110_ICE_EVM

Part Number: PROCESSOR-SDK-AM335X
Other Parts Discussed in Thread: AMIC110

I would like to get the DCAN Example Running on an AMIC110_ICE_EVM Board.

I connected a CAN Interface Chip: https://www.nxp.com/docs/en/data-sheet/PCA82C250.pdf

To D17 and D18. Acording to the Datasheet of the AM335X Family this should allow me to use the DCAN0 Interface.

Then i build the pdk starterware examples (E:\ti\pdk_am335x_1_0_17\packages\ti\starterware\examples)

and Deployed the dcan frame_tx_rx example (E:\ti\pdk_am335x_1_0_17\packages\ti\starterware\examples\dcan\frame_tx_rx)

BOARDInit status [0x0]
 SoC                   : [AM335X]
 Core                  : [A8]
 Board Detected        : [AMIC110]
 Base Board Revision   : [UNKNOWN]
 Daughter Card Revision: [UNKNOWN]
Invalid device ID!!
Device is not available on this board!

FAILURE!!!

I am now looking through the Code but i havent found the Code where i can tell that the Board has a CAN Controller and how it should Configure the PinMux.

  • Ok the Pinmuxing is made in $starterware/board/am335x/.*_pinmux_data.c

    Right now D17 and D18 are set to PINMUX_SS_PRU_ICSS_ECAT.

    there are two header Files that include the PINMUX Configuration Constants: pinmux.h and am335x_pinmux.h

    But there is no constant for DCAN.

  • Hi,

    I would recommend you to first try the DCAN loopback example in the PDK. You can find instructions here to create and build PDK examples.

    Regards,

    Jianzhong

  • Right now D17 and D18 are set to PINMUX_SS_PRU_ICSS_ECAT.

    there are two header Files that include the PINMUX Configuration Constants: pinmux.h and am335x_pinmux.h

    According to AMIC 110 data sheet (https://www.ti.com/lit/gpn/amic110), Table 4-4. Pin Attributes, pin names for D17 and D18 are UART1_RTSn and UART1_CTSn, which are defined in header file: pdk_am335x_1_0_17\packages\ti\starterware\board\am335x\am335x_pinmux.h.

  • Ok i think i got it. (It now detects DCAN)

    I opened the pinmux configuration from $(STARTERWARE)/tools/pinmux_config

    I Removed the EtherCat Stuff and enabled DCAN0 on D17 and D18.

    I modified the generated amic110_pinmux_data.c to replace the original am335x_amic11x_pinmux_data.c

    Then i modified $(STARTERWARE)/board/am335x/am335x_amic110.c

    There is an array: const boardDeviceData_t gBoardAm335xAMIC110DevData[]

    I added the following entry to it:

    #if defined(BUILDCFG_MOD_DCAN)
       { /* DCAN */
            DEVICE_ID_DCAN_CONNECTOR,           /* devId */
            0U,                                 /* devInstNum */
            CHIPDB_MOD_ID_DCAN,                 /* ctrlModId */
            1U,                                 /* ctrlModInstNum */
            0U,                                 /* ctrlInfo */
            CHIPDB_MOD_ID_INVALID,              /* dataModId */
            INVALID_INST_NUM,                   /* dataModInstNum */
            NULL,                               /* selectDev */
            NULL,                               /* resetDev */
            NULL,                               /* powerOnDev */
       },
    #endif /* if defined(BUILDCFG_MOD_DCAN) */

    Now The DCAN Controller is detected:

     StarterWare DCAN Application!!
    BOARDInit status [0x0]
     SoC                   : [AM335X]
     Core                  : [A8]
     Board Detected        : [AMIC110]
     Base Board Revision   : [UNKNOWN]
     Daughter Card Revision: [UNKNOWN]
    DCAN Instance number: 1
    The instance address is 481d0000
    Please Input
    1) CAN frame transmit
    2) CAN frame receive