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.

DCAN stuff error

I get "stuff error" ( ErrStat = 0x00000063 ) when I send messages with the function "canTransmit". I use the USB stick and CCSv4. I run the demo project "Demo_Software_Ver1_1". I have only added two lines:

canInit();

 

i = canTransmit((canBASE_t *)canREG1, canMESSAGE_BOX1, mess);

and altered one line (can.c line 156):

canREG1->IF1ARB = 0x80000000U | 0x40000000 | 0x20000000U | ((1U & 0x1FFFFFFFU) << 0U);

/Jonas

 

  • Hi Jonas,

    I run the same test on one TMS570 board. I don't see the error. How do you design the mess in your code? Please try this setting for mess.

     

     

     

    unsigned 

     

     

    Regards,

    QJ

    char  mess[8] = {0x11,0x22,0x33,0x44,0x55,0x66,0x77,0x88};

  • I tried what you suggested but it didn't help. Could you try with the USB stick and see if you could reproduce this behaviour?

    /Jonas

     

  • Hi Jonas,

    I tried on USB stick, and transmitted data is good. This is my main function. I use the same init data for IF1ARB.

     

     

     

     

     

     

     

     

     

     

    void

     

     

          unsigned int i;

     

     

           unsigned char mess[8] = {0x11,0x22,0x33,0x44,0x55,0x66,0x77,0x88};

     

     

     

           swi_enable_fiq_irq();

     

     

     

     

           canInit();

           i = canTransmit((canBASE_t *)canREG1, canMESSAGE_BOX1, mess);

    }

     

    canREG1->IF1MSK = 0x40000000U | ((0x000007FFU & 0x1FFFFFFFU) << 0U);

    canREG1->IF1ARB = 0x80000000U | 0x40000000 | 0x20000000U | ((1U & 0x1FFFFFFFU) << 0U);

    canREG1->IF1MCTL = 0x00001080U | 0x00000000U | 8U;

    canREG1->IF1CMD = 0xF8;

    canREG1->IF1NO = 1;

    Regards,

    QJ

    main(void)

    {