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.

[DRA829] Confirmation of the configuration of can module in EB

Other Parts Discussed in Thread: DRA829

Hi,

1. I saw in the EB that the type of CanHandleType of the CAN module can be configured as Full or Basic, but I did not see this type of processing in the CAN driver of MCAL. Does the current MCAL code of the SDK package support this mode?

2. Because we now use MCAN0 in the main domain, it has 95 Messages to receive, but the CAN channel has only 64 receiving mailboxes. How should I configure it in EB to achieve the functions I need?

Please reply as soon aspossible,

Regards,

Xie

  • Hi Xie Linda,

    Xie Linda said:
    I saw in the EB that the type of CanHandleType of the CAN module can be configured as Full or Basic, but I did not see this type of processing in the CAN driver of MCAL. Does the current MCAL code of the SDK package support this mode?

    The support for Basic mode is not there in the SDK 6.02. This will come in as a part of the upcoming SDK 7.0 release. (coming out mid Jun)

    Xie Linda said:
    Because we now use MCAN0 in the main domain, it has 95 Messages to receive, but the CAN channel has only 64 receiving mailboxes. How should I configure it in EB to achieve the functions I need?

    When you say 95 messages, do you mean 95 different message IDs or same ID but 95 messages of that ID? The latter shouldn't be a problem.

    Regards,

    Karan

  • Hi,Karan

    1.As you said, I used 95 different message IDs.

    2.And I have another question. I saw in the manual that the DRA829 has a total of 16 CANs, each CAN has 64 receiving mailboxes, and a total of 1024 receiving mailboxes. So I would like to ask, do these mailboxes support sharing? I means one CAN whether could use other CAN mailboxs?

    3.In the manual, I see that there are 64 mailboxes on one CAN channel, and then there are Buffer/FIFO0/FIFO1. There are 64 mailboxes in these three methods, or are there 64 mailboxes in each mode?

    Regards,

    Xie

  • Hi Xie,

    Xie Linda said:
    As you said, I used 95 different message IDs

    This will only be possible with BASIC mode support (not there in SDK6.02 and coming as a part of SDK7.0)

    Xie Linda said:
    And I have another question. I saw in the manual that the DRA829 has a total of 16 CANs, each CAN has 64 receiving mailboxes, and a total of 1024 receiving mailboxes. So I would like to ask, do these mailboxes support sharing? I means one CAN whether could use other CAN mailboxs?

    The MCAN Message RAM is dedicated per controller. These can not be shared in hardware, i.e. a message coming on MCAN4 can not be stored Message RAM for MCAN2. You can do a memcpy of the data, but I don't see that serving any purpose.

    Xie Linda said:
    In the manual, I see that there are 64 mailboxes on one CAN channel, and then there are Buffer/FIFO0/FIFO1. There are 64 mailboxes in these three methods, or are there 64 mailboxes in each mode?

    There are 64 elements in Rx Buffers. 64 distinct elements in FIFO0 and another 64 elements in FIFO1.

    Regards,

    Karan

  • Hi,Karan

    There are 64 elements in Rx Buffers. 64 distinct elements in FIFO0 and another 64 elements in FIFO1.

    1.According to what you said, I understand that there are 64*3=192 mailboxes in a CAN channel? To be honest, I don’t understand the usage of FIFO 0/1, and it is not possible to configure it in EB to choose what is received. Where is the data stored? If my understanding is correct, why only 64 mailboxes can be used in EB, but not 192 mailboxes?

    2.In section 12.4.4.4.7 of the TRM manual, I saw a sentence The transfer of received message to the Rx Buffer or to one of the two Rx FIFOs. This sentence understands that I can choose to store the received message in In any mailbox, how is this implemented in EB?

    3.The last question, can you roughly explain how to understand and use Rx Buffer and FIFOs? Or what is their scope?

    Regards,

    Xie

  • Hi Xie,

    On the EB tool, I'll let my colleague answer.

    Xie Linda said:
    .The last question, can you roughly explain how to understand and use Rx Buffer and FIFOs? Or what is their scope?

    On this, the difference between FIFO and Buffers on the Rx side is as follows:

    In case of a message coming in the dedicated buffer after the acceptance filtering, this will trigger an a flag MCAN_IR[19] DRX indicating that a messages is stored in a dedicated Rx buffer. The respective New Data flag in register MCAN_NDAT1/MCAN_NDAT2 is set. Based on the value of the new data register, we can get to know where the message is received and the CPU can consume this message.

    All this interrupt generation per message and also draining a particular message is not possible when you use the hardware RX FIFO. But there are other uses for that. In case of FIFO, when incoming messages are coming at a higher rate and that too of same ID then in case if we dedicate a buffer for that and upon acceptance filtering if it was to go to the buffer there is a high probability that the next time the same ID comes the previous message is not drained and we lose the message.

    You can look at the TRM for more details.

    Regards,

    Karan

  • Hi,Karan

    1.According to your description, can I understand that we should choose which IDs are stored in Rx Buffer and which IDs are stored in FIFOs according to the user's own needs? Then when we use FIFOs, he will not generate an interrupt, then we need to use another way to get the flag and data, I don’t know what way to get it? Is it necessary to poll the Task to find the Index in the FIFOs register or other methods?

    2.By the way, I just downloaded SDK7.0 and I see that MCAL has new Fls and Fee modules, but there is no released EB tool installation package. So how can we use the latest added modules in EB?

    Please reply as soon as possible

    Regards,

    Xie

  • Hi Xie,

    Xie Linda said:
    According to your description, can I understand that we should choose which IDs are stored in Rx Buffer and which IDs are stored in FIFOs according to the user's own needs?

    Yes, this is all user defined. As I explained in my previous reply, you can think of Buffer as something which will give you the functionality to consume a particular message from a particular Buffer while FIFO will let you handle bursts of messages and will drain the FIFO in order of their arrival (as the name suggests).

    Xie Linda said:
    Then when we use FIFOs, he will not generate an interrupt, then we need to use another way to get the flag and data, I don’t know what way to get it?

    As mentioned in section 12.4.4.4.7.2 of TRM

    "The Rx FIFO watermark can be used to prevent an Rx FIFO overflow. If the Rx FIFO fill level reaches the Rx FIFO watermark configured by the MCAN_RXFnC[30-24] FnWM filed (where: n = 0 or 1) an interrupt flag MCAN_IR[1] RF0W/MCAN_IR[5] RF1W is set."

    So it is not like FIFO will not generate an interrupt but will not generate one for every message.

    Xie Linda said:
    Is it necessary to poll the Task to find the Index in the FIFOs register or other methods?

    You can poll, but this is not the only thing which can be done. As mentioned above in this reply you can rely on the interrupt generated by the FIFO.

    Xie Linda said:
    By the way, I just downloaded SDK7.0 and I see that MCAL has new Fls and Fee modules, but there is no released EB tool installation package. So how can we use the latest added modules in EB?

    I will need to check this and come back.

    Meanwhile please collate more questions in case you have any.

    Regards,

    Karan

  • Hi Linda,

    1.According to what you said, I understand that there are 64*3=192 mailboxes in a CAN channel? To be honest, I don’t understand the usage of FIFO 0/1, and it is not possible to configure it in EB to choose what is received. Where is the data stored? If my understanding is correct, why only 64 mailboxes can be used in EB, but not 192 mailboxes?

    >>> In the 6.2 release, CAN driver designed to use only FIFO 0. In the EB Tresos if CanHwObjectCount > 1 it was using FIFO0 and if CanHwObjectCount = 1 it was using Buffer.So atmost 128 mailboxes in a CAN channel could have been used.

          7.0 release supports AUTOSAR version 4.3.1 which introduces MIXED mode feature in CAN driver. To support this both FIFO's are used in the CAN driver but if the user configures CanRxProcessing parameter as INTERRUPT/MIXED and CanHardwareObjectUsesPolling set to FALSE, then FIFO0 is used otherwise if CanRxProcessing parameter set as POLLING/MIXED and CanHardwareObjectUsesPolling set to TRUE, FIFO1 is used.  So you can configure all the 192 mailboxes of hardware CAN channel with the above. 

    2.In section 12.4.4.4.7 of the TRM manual, I saw a sentence The transfer of received message to the Rx Buffer or to one of the two Rx FIFOs. This sentence understands that I can choose to store the received message in In any mailbox, how is this implemented in EB?

    >> As I mentioned in the above reply, In the EB Tresos if CanHwObjectCount > 1 it uses FIFO and if CanHwObjectCount = 1 it uses Buffer.This is internally taken care in the driver based on the EB Tresos Configuration.

    3. By the way, I just downloaded SDK7.0 and I see that MCAL has new Fls and Fee modules, but there is no released EB tool installation package. So how can we use the latest added modules in EB?

    >> please find here. https://www.ti.com/securesoftware/docs/autopagepreview.tsp?opnId=22781