Skip to main content
huang yiwei
Associate
March 7, 2018
Question

SPC574 CAN Problem

  • March 7, 2018
  • 4 replies
  • 1224 views
Posted on March 07, 2018 at 09:14

I'm using SPC574K72E5 for CAN application, so I create a demo project SPC574Kxx_RLA CAN Test Application for Discovery and get nothing on CAN output. I have already choose the NO_LOOPBACK mode and select RX/TX pin in the pin map but the programe have problem at

returnvalue = can_lld_transmit(&CAND2, CAN_ANY_TXBUFFER, &txf);

returnvalue is always CAN_MSG_WAIT.

    This topic has been closed for replies.

    4 replies

    Erwan YVIN
    ST Technical Moderator
    March 7, 2018
    Posted on March 07, 2018 at 14:47

    Hello Huang ,

    This message means that there is no txbuffer available.

     /*if txbuffer value is not assigned No tx buffer available */
     if (txbuffer == 0xFFU) {
     return CAN_MSG_WAIT;
     }�?�?�?�?

    Have you configured correctly the CAN drivers ?

    Check the TX Buffer

    Best regards

    Erwan

    In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.
    huang yiwei
    Associate
    March 9, 2018
    Posted on March 09, 2018 at 08:33

    I use the Demo Project, the configuration should be right. And 

    can_lld_transmit function can be excuted once, the next time it returns 

    CAN_MSG_WAIT.

    270284440
    Associate II
    March 21, 2018
    Posted on March 21, 2018 at 04:24

    did u add delay between CAN transmit? is there any receiver CAN node on bus.