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.

CAN bit field access

HI,

I would like to access individual bits and grouped bits on my mailbox.  I can only find access to the high and low "words" at the moment.  I would ideally like to break down both high and low words into their variable values and assign them to a dedicated structure for that mailbox (does that seem prudent?)

 

Thanks

  • Hi Kevin,

    The mailboxes for CAN are specific to the micro processor and the software structures and drivers you are using.  This forum is for the actual physical interface, which for CAN is seperate from the protocol layers (what the mailboxes deal with).  In order to get the support you need with respect to the specific micro processor or DSP and software it would be most efficient to post to the E2E forum specifically supporting your TI microprocessor/DSP so the appropriate software and hardware engineers can support the topic directly. 

    -- Scott

  • Hi Scott, are you able to move this post? If so...I'm using a TI F28335 DSP and using CCS4. thanks 

  • Kevin,

    the F28x CAN - mailboxes are accesable in 3 ways:  all (32Bit), word (16bit) and byte (8bit) - just inspect the corresponding header file "DSP2833x_ECan.h" and look for union "CANMDH_REG" or "CANMDL_REG"

    Now, to adapt the existing union to accept additional access techniques is just a matter of changing that union definition. For example you can add a float member to read all 32-bit as a single folating point number. Or, you can setup any fancy combination for the 64 bits of the mailbox. It is just standard C.

     

  • Many Thanks Frank - I'm slowly knocking the rust off