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.

TDA4VM: How to set the mask bit (eg: 0x400~0x41f) of a certain segment of the received message ID in MCUSW autosar?

Genius 13655 points
Part Number: TDA4VM
Other Parts Discussed in Thread: TDA4VL

Hello Champs,

How to set the mask bit (eg: 0x400~0x41f) of a certain segment of the received message ID in MCUSW  autosar?

Thanks.
Rgds
Shine

  • Hello Shine,

    Can you elaborate on the driver you are referring to inside of MCUSW? You mentioned the "Received Message ID", it sounds like a communication protocol. Also, can you add which SDK version you are using?

    Thanks,

    Erick

  • Hi Erick,

    Thanks for your quick reply. 

    Customer is referring to the CAN driver, which needs to filter and receive the CAN ID of a certain network segment (such as 0X400~0X47F), and the SDK package is 8.03 or 8.04 (tda4vl).

    Thanks.
    Rgds
    Shine

  • Hi Shine

    So essentially you are looking to add a range filter for all IDs from 0x400 to 0x47F?

    Currently the MCAL CAN driver has the configuration where if for standard CAN IDs you set CanHandleType == CAN_FULL (in Can_Cfg.c) will in turn the SFT to 0x0 (Range Filter from SFID1 to SFID2) and SFID2 to 0x7FF (Max for standard IDs).

    If you modify the Can_Cfg.c to update the CanHwFilterCode = 0x400 then this will modify the SFID1 to 0x400 and hence you should be able to setup a range filter from 0x400 to 0x7FF.

    Now in case this doesn't work for you and leads to unintended message reception, then we need to make a driver modification to make SFID2 as 0x47F.

    Regards

    Karan

  • Hi Karan,

    Thanks for your support. 

    Following your suggestion, customer modified the code as follows:




    But still unable to receive any ID in the 0x400~0x47F network segment.

    The MCANSS_RX_BUFFER_ELEM_ID_MASK received at the bottom layer in Mcan.c is 0x1FFFF480U, and it still cannot be received.

    Thanks.
    Rgds
    Shine

  • Hi Karan,

    Customer has resolved the issue by setting CanHandleType =1(Basic) to 1.

    Thanks for your support.

    Rgds
    Shine