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

SPC574 CAN Problem

  • March 7, 2018
  • 2 replies
  • 1199 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.

    2 replies

    Erwan YVIN
    ST Employee
    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

    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.