Search

Technical Discussion Group Forum

This forum is provided for user discussion. While Beacon EmbeddedWorks support staff and engineers participate, Beacon EmbeddedWorks does not guarantee the accuracy of all information within in the Technical Discussion Group (TDG).

The "Articles" forums provide brief Articles written by Beacon EmbeddedWorks engineers that address the most frequently asked technical questions.

To receive email notifications when updates are posted for a Beacon EmbeddedWorks product download, please subscribe to the TDG Forum of interest.

TDG Forum

PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 29 Oct 2007 05:03 AM by  srinivas.acharya@lntemsys.com
CAN for Linux
 2 Replies
Sort:
You are not authorized to post a reply.
Author Messages
scoti_tre@interia.pl
New Member
New Member
Posts:


--
26 Aug 2007 06:45 AM
    Hi All,

    I want to transmit CAN message using can_send function and when I try to do this with extended IDs (29 bits) I receive (on the other PC) only 17 bits of the CAN IDs. For example I send CAN message with ID=0x1FFFFFFF and on receiving site I get only ID=0x0001FFFF.
    I am sure that I put right ID in can_send function and that the receive application work properly (type of the variable). When I am sending can message with standard ID everything it's ok.

    Thank's for any sugestions !

    Regards
    mcelweep@msoe.edu
    New Member
    New Member
    Posts:


    --
    27 Aug 2007 08:02 AM
    There are two files that need to be changed. For some reason, which is beyond me, the macro that forces an identifier to be extended just doesn't make it 29 bits, it makes it 18 bits, which is not right. I changed it in my code, here are my patches.


    diff --exclude CVS -uNr linux-2.6.17.7/include/asm-m68knommu/m5253sim.h linux-2.6.17.7.modified/include/asm-m68knommu/m5253sim.h
    --- linux-2.6.17.7/include/asm-m68knommu/m5253sim.h 2007-08-17 08:24:36.000000000 -0500
    +++ linux-2.6.17.7.modified/include/asm-m68knommu/m5253sim.h 2007-08-02 08:17:16.000000000 -0500
    @@ -288,7 +288,7 @@
    #define MB_CNT_LENGTH(x) (((x)&0x0F)<<16)
    #define MB_CNT_TIMESTAMP(x) ((x)&0xFFFF)
    #define MB_ID_STD(x) (((x)&0x07FF)<<18)
    -#define MB_ID_EXT(x) ((x)&0x3FFFF)
    +#define MB_ID_EXT(x) ((x)&0x1FFFFFFF)


    /****************************************************************************/
    srinivas.acharya@lntemsys.com
    New Member
    New Member
    Posts:


    --
    29 Oct 2007 05:03 AM
    How do I initialise the ports for CANTx and CANRX lines in MCf5329EVB?
    You are not authorized to post a reply.