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.

DRA7xx_EVM D_CAN Message Objects


Actually when i am trying to write continuously on the bus with no other device connected to the bus(or no device receiving )... I am getting "no buffer space available" error after 26 times.. i.e., all the tx msg objects allocated for CAN are filled, correct? But in the driver if you see c_can.c,

#define C_CAN_NO_OF_OBJECTS 32
#define C_CAN_MSG_OBJ_RX_NUM 16
#define C_CAN_MSG_OBJ_TX_NUM 16

No of msg objects for C_CAN_TX and C_CAN_RX are 16 na?..So I should get error after 16 times na?
Also i think for CAN total 64 msg objects available then why in macro fixed to 32 ?

Thanks & Regards,
Ganesh

  • Hello Ganesh,

    I think that the definitions below are not the issue for your problem with DCAN module:

    "But in the driver if you see c_can.c,
    #define C_CAN_NO_OF_OBJECTS 32
    #define C_CAN_MSG_OBJ_RX_NUM 16
    #define C_CAN_MSG_OBJ_TX_NUM 16"

    No of msg objects for C_CAN_TX and C_CAN_RX are 16 na?..So I should get error after 16 times na?
    Also i think for CAN total 64 msg objects available then why in macro fixed to 32 ?

    I suggest you to take a detail look on section 24.10.4.7 Configuration of Message Objects Description in TRM.

    It would help you to configure DCAN module messages correctly.

    Take a look on this function:

    /*
     * Configure C_CAN message objects for Tx and Rx purposes:
     * C_CAN provides a total of 32 message objects that can be configured
     * either for Tx or Rx purposes. Here the first 16 message objects are used as
     * a reception FIFO. The end of reception FIFO is signified by the EoB bit
     * being SET. The remaining 16 message objects are kept aside for Tx purposes.
     * See user guide document for further details on configuring message
     * objects.
     */
    static void c_can_configure_msg_objects(struct net_device *dev)

    Best regards,

    Yanko

  • Hello Yanko,

    If the error is not related to message objects, then what will be the reason for --
    when i am trying to write continuously on the bus with no other device connected to the bus(or no device receiving )... I am getting " no buffer space available(perror)" error after 26 times..

    Regards,
    Ganesh
  • Hello Ganesh,

    Please take a look on similar thread - e2e.ti.com/.../693485

    Could you try to execute following commands:

    a. Transmit 8 bytes with standard packet id number as 0x10

    $ cansend can0 -i 0x10 0x11 0x22 0x33 0x44 0x55 0x66 0x77 0x88

    b. Transmit 8 bytes with extended packet id number as 0x800

    $ cansend can0 -i 0x800 0x11 0x22 0x33 0x44 0x55 0x66 0x77 0x88 -e

    c. Transmit 20 packets of 8 bytes each with same extended packet id number as 0xFFFFF

    $ cansend can0 -i 0xFFFFF 0x11 0x22 0x33 0x44 0x55 0x66 0x77 0x88 -e --loop=20

    d. Transmit a sequence of numbers from 0x00-0xFF, till the buffer availability

    $ cansequence can0

    e. Transmit a sequence of numbers from 0x00-0xFF and roll-back in a continuous loop

    $ cansequence can0 -p

    Receive packets

    Packet reception can be achieve by using candump utility

    $ candump can0

    Afterwards, send us a log with results.

    Best regards,
    Yanko
  • Hello Yanko,

    In DRA7xx_EVM i have tried to use cansend,candump commands but may the utilities are missing and i am getting command not found....
    I am sending data from CAN from userspace by opening a socket and transmitting it..

    Regards,
    Ganesh