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.

TMS570 Halcogen - get message identifier

Other Parts Discussed in Thread: HALCOGEN, TMS570LS3137

Hello,

I have a question about TMS570 - Halcogen - CAN.

I'm using TMS570LS3137, Halcogen 3.3.1 and CCS 5.2.1.

I noticed that halcogen does not allow dynamic management of identifiers (ID) of the CAN messages in the TX e RX functions, Halcogen allows me to configure the ID in MessageBox only in the initialization phase of the CAN.

point 1) how should be the function to transmit a CAN message with the ID parameter?

uint32_t  canTransmit_NEW(canBASE_t *node, uint32_t messageBox, uint32_t messageId, const uint8_t *data)

point 2) how should be the function to receive a CAN message with the reading of the ID?

uint32_t  canGetData_NEW(canBASE_t *node, uint32_t messageBox, uint32_t *messageId, uint8_t * const data)

Thank You

Best regards

  • Enrico,

    Thank you for using our forum.

    Here is an extract from the DCAN specification part of the TMS570LS3137 Technical Reference Manual:

    24.4.2.2 Configuration of Message Objects
    The whole Message RAM should be configured before putting the CAN into operation. All the message
    objects are deactivated by default. The user should configure the message object that are to be used to a
    particular identifier. The user can change the configuration of any message object or deactivate it when
    required.
    The message objects can be configured only through the Interface registers (IFx) and the CPU does not
    have direct access to the message object (Message RAM) when DCAN is in operation.

    In order to change an ID in a mailbox, the DCAN will have to be stopped first. (This is not dynamic)

    Can you elaborate and explain what you are trying to achieve?

  • Hi,

    I need to configure the message box dynamically.

    For example:

    message box1: to trasmit CAN messages with identifier form 1 to 15

    message box2: to trasmit CAN messages with identifier form 16 to 31

    message box3: to receive CAN messages with identifier form 32 to 45

    message box4: to receive CAN messages with identifier form 46 to 61

    So, the transmit and receipt functions should manage the ID at run time.

    In transmit function, I should set the message ID .

    In receipt function, I should get the message ID .

    Note: in receipt, I should use the interrupt.

     

    Thanks.

     

  • Enrico,

    Sorry for the delay in our response.
    I did look more in detail in DCAN specification, and it is possible to change the ID of a mailbox dynamically.
    Halcogen does not provide this option, but you can add this feature in your own version of the canTransmit() routine.

    For information, here is an extract of DCAN user guide.

    Please let me know if this answer your question.