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.

RTOS/LAUNCHXL2-TMS57012: extendend CAN and standard CAN-ID in one message box

Part Number: LAUNCHXL2-TMS57012
Other Parts Discussed in Thread: HALCOGEN

Tool/software: TI-RTOS

Hi,

is there an option to receive messeages with extended AND standard IDs in one messagebox?

thanks,

br Peter

  • Hi,

    Sorry no there isn't. There is just the 'Xtd' bit to select either extended or standard but you cannot select both in the same mailbox.
  • How do I have to configure the can to use one messagebox for the extended can messages and another messagebox for the standard can messages.

    br,

    Peter
  • Hi Peter,

    Sorry I didn't understand the question.

    I assume you are asking about doing this through HalCoGen because there is only one checkbox for extended ID on the general tab.
    Is that the question?

    The hardware has an 'Xtd' bit in each mailbox to specify whether the mailbox uses the base or extended addressing scheme. I cannot explain why this doesn't show up as an option in each mailbox on the HalCoGen GUI.

    -Anthony
  • static void init_can_device (can_device_t* hcan) {
        uint8_t mailbox;
        can_cmd_iface_t* ifx = CAN_GET_IF1(hcan->Instance);
        for (mailbox = MAILBOX_COUNT_TX + 1; mailbox <= MAILBOX_COUNT_TOTAL; mailbox++) {
            while ((ifx->IFxSTAT & IFxSTAT_BUSY) == IFxSTAT_BUSY) {
            };
            ifx->IFxCMD = IFxCMD_WRITE | IFxCMD_MASK | IFxCMD_ARB | IFxCMD_CLR_INT_PND | IFxCMD_CONTROL;
            ifx->IFxMSK = IFxMSK_MDir;
            ifx->IFxARB = IFxARB_MsgVal;
            ifx->IFxMCTL = IFxMCTL_UMask | IFxMCTL_RxIE;
            if (mailbox == MAILBOX_COUNT_TOTAL) { /* last buffer in FIFO */
                ifx->IFxMCTL |= IFxMCTL_EoB;
            }
            ifx->IFxNO = mailbox;
        }
        canEnableErrorNotification (hcan->Instance);
    }
    

    You can setup can malbox to receive ANY can messages.

  • thank you for the answeres. I solved my problem by setting the MXtb bit to zero.

    canREG3->IF1MSK  = 0x00000000;

    now i get a notification for every message.

    br Peter