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.

TMS570LC4357: TMS570LC4357

Part Number: TMS570LC4357


请问大佬们,我用两块4357开发板进行CAN通信,我把他们分别都接到了stm32的收发器上了,并且以及将收发器++、--相连接,但是通过串口打印消息时一直显示收不到消息(两块板子都烧录了这个程序)

void main(void)
{
    /************************CAN Init**********************/
    _enable_IRQ_interrupt_();
    canInit();
    canDisableloopback(canREG1);
    canEnableErrorNotification(canREG1);
     while(1)
    {
        can_mess(canREG1,canMESSAGE_BOX1,TEXT3);
    }
    
}
void can_mess(canBASE_t *node, uint32 messageBox, uint8 * data_tx)
{
    send_mess(node,messageBox,data_tx);
    //canMessageNotification(node, canMESSAGE_BOX1);
    printf("can ID is : %d",canGetID(node,messageBox));
    printf("\r\n");
//    receive_mess(node,messageBox,data_rx);
//    sciDisplayText(sciREG1,&data_rx[0],sizeof(data_rx));
}

void send_mess(canBASE_t *node, uint32 messageBox, uint8 * data_tx)
{

    canTransmit(node,messageBox,data_tx);
    while((node->ES)&0x08==0);
}


void receive_mess(canBASE_t *node, uint32 messageBox, uint8 * data_rx)
{
    //canInit();
    canGetData(node,messageBox,data_rx);
    while(((node->ES)>>1)&0x08==0);
}


void canMessageNotification(canBASE_t *node, uint32 messageBox)
{
    printf("接收数据:\r\n\t");
    receive_mess(node,messageBox,rx_data4);
    sciDisplayText(sciREG1,&rx_data4[0],8);
    printf("\r\n");
}