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.

I have questions about CAN communication

Other Parts Discussed in Thread: HALCOGEN, RM46L852

Hi

I use Hercules SafeTI HALCoGen. MCU: R4F series RM46L852 and Compiler:CCSv6 

I try to CAN communication. I am novice,

I have questions belows

1. I can't find configuring CAN ID. It is neccessary To use CAN  communication. (If it is wrong teach me please)

   CAN1, CAN2, CAN3's CAN ID is 1,2,3 (I was learn from CAN Analyzer device, I can't find the setting that CAN ID)

 2. NOW, I don't know what How to setting that CAN ID. I want to CAN Communication between various device that include iRM46XX chip(MCU).

     Then how can i do?(teach me how to setting CAN ID)

3. I wonder HalCoGen's CAN data.( = message object = mailbox)

    Why transfer size of data 0 to 8(byte, Is unit byte right?)? whay data size is fixed? If data large than 8 byte,(data over flow) than what's going on?

   How can i  coding? if i want to txdata. the txdata is larger than 8byte. then txdata is must devide? and devided txdata transfer several times?

please help me//

 

  • CAN1, CAN2 and CAN3 are three separate modules on the RM46L852 device. The CAN ID is associated with a frame. In HALCoGen select the CAN1 tab, then select a message tab such as CAN1 Msg1-8. At the right near the CANRX pin you will see a box for Id, and another box for Mask. The CAN ID goes in the Id box. The CAN standard only supports 8 bytes per frame. If the data is more than 8 bytes, it must be sent using multiple frames.
  • Thanks to reply

    I understand your explain :) Thanks!

    I have another questions.

    1. IF the data is more than 8bytes, I suggest that send multipleframes. than how to configure receive frame?

    IF i want transfer 64byte data, CAN1 Msg1-8 to transfer CAN 2 Msg 9-16. then How to configure in HALCOGen?    

    2.I wonder why be CAN Core, CAN RAM register, Message Object, Message RAM, Message handler, RAM interface. I can't match the CAN standard. (CAN of TI standard is difficult)

    How can I understand?

    I looking forward to your message.

    Thanx!!

  • You can setup eight mailboxes with 8 different message ID's for transmit and 8 mailboxes with 8 different message ID's for receive. A more general solution would be to use one message ID for transmit and another for receive. When the first 8 bytes have transmitted, generate an interrupt and have the CPU load the next 8 bytes and start the next transfer. Likewise, generate an interrupt on receive and copy the data into a buffer so that the same mailbox will be available to receive the next frame. The time to transmit or receive a frame is relatively long compared to the time for the CPU to service the message.