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.

RTOS/TDA2P-ACD: DCAN module board to board test

Part Number: TDA2P-ACD

Tool/software: TI-RTOS

Hi,

We have custom TDA2Px board and are trying to use DCAN module in PROCESSOR_SDK_VISION_03_03_00_00.

Both starterware and csl tests for DCAN and MCAN passed successfully (board to board setup) and now we want to use DCAN module on vision_sdk.

We enabled DCAN module in apps/configs/tda2px_evm_bios_all/cfg.mk by changing DCAN_INCLUDE to yes (DCAN_INCLUDE=yes).

When we enable loopback in modules/dcan/system_dcan.c (ENABLE_B2B_DCAN_TEST = 0) the board is able to receive data that it sends (everything works as expected).

Now we want to use board to board setup (ENABLE_B2B_DCAN_TEST = 1) but we couldn't manage to configure CAN messages for both boards.

Default configuration for first board is:

static Void System_dcanInitCfgStruct(dcanConfig_t * dcanConfig)
{
    Int i;
    UInt8 msgData[] = {0xAA,0xEE,0xBB,0xFF,0xCC,0xDD,0x55,0xAA};

#if ENABLE_B2B_DCAN_TEST
    dcanConfig->enableLoopback     = FALSE;
#else
    dcanConfig->enableLoopback     = TRUE;
#endif
    dcanConfig->enablePeriodicTx   = TRUE;
    dcanConfig->rxMsgId            = 0xC1;
    dcanConfig->txMsgId            = 0xC2;
    dcanConfig->enableSendRxAck    = TRUE;
    dcanConfig->enableReceiveRxAck = TRUE;
    dcanConfig->txAckMsgId         = 0xC4;
    dcanConfig->rxAckMsgId         = 0xC5;
    dcanConfig->rxMsgCb            = System_dcanRxMsgHandler;
    dcanConfig->rxAckMsgCb         = System_dcanRxAckMsgHandler;
    dcanConfig->txMsgPeriod_ms     = SYSTEM_DCAN_TX_PRD_MS;
    dcanConfig->dcanCntrlIntrId    = SYSTEM_DCAN_INTR_ID;
    dcanConfig->dcanTxTskPri       = SYSTEM_DCAN_TX_TSK_PRI;
    dcanConfig->dcanRxTskPri       = SYSTEM_DCAN_RX_TSK_PRI;
    dcanConfig->dcanInputClk_hz    = SYSTEM_DCAN_INPUT_CLK;
    dcanConfig->dcanBaudRate_hz    = SYSTEM_DCAN_BIT_RATE;
    dcanConfig->enableTxMsgCycle   = TRUE;
    dcanConfig->dcanTxPrdMsg.dataLength = UTILS_ARRAYSIZE(msgData);
    for ( i = 0 ; i < UTILS_ARRAYSIZE(msgData); i++)
    {
        dcanConfig->dcanTxPrdMsg.msgData[i] = msgData[i];
    }
}

Our question is: What configuration should be used (rx/tx Ids etc.) on the second board in order for them to communicate?


Regards,

Mladen Stupar