CAN RX FIFO Filter

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

CAN RX FIFO Filter

1,777件の閲覧回数
Raana
Contributor III

Dear Team,

I'm using i.mx25 base custom board. I'm using automotive product in the vehicle using this SOC.

When Reverse transmission is engaged, the rear camera of the device should turn ON within 1~2 seconds. But it is turning ON after 50~60 seconds. This delay is happening due to CAN message traffic.

Since the device is accepting and scanning all the CAN RX messages. Instead, I want to accept only the respective messages which we are actually processing. I have set of CAN RX messages and listed below:

/* PGN request */
0x18EAFFF9,
0x18EAFFFA,
0x18EA4CF9,
0x18EA4CFA,

0x1CE34CF9, /* PITS diagnostic */
0x0CFF2800, /* RSA */
0x1CFFFE00, /* SWC */

/* DM 13 handling */
0x18DF4CF9,
0x18DF4CFA,
0x18DF4CFF,

0x18D54C4D, /* J1939 time/date */
0x18D04C00, /* CAN dimming */
0x18EF4C00, /* Audible alarm */
0x18F00500, /* ETC transmission */
0x18FEF100, /* Vehicle Speed */
0x18EEFF4C, /* address claim */

/* VP39 */
0x0CFF273A,
0x0CFF2717,

0x18FEE617, /* VOLVO time/date */
0x18FF2600, /* VP38 */
0x0CFF2F17, /* VP47 */
0x0CFF2537, /* VP37 */
0x1CEB4C00, /* TP data transfer */
0x1CEC4C00 /* TP handling */

I have referred the patch done in i.MX6 which is attached with this post.
I have attached my i.Mx25 patch also. But I'm not seeing any changes and I'm getting below error in ESR and ECR

0327: [AP]  ECR::0x7a
0328: [AP]  ESR::0x280

and below are the register dump:

0322: [AP]  MCR::0x6087003f
0323: [AP]  CTRL::0xd37e0c2
0324: [AP]  RXGMASK::0x0
0325: [AP]  RX14MASK::0x0
0326: [AP]  RX15MASK::0x0
0327: [AP]  ECR::0x7a
0328: [AP]  ESR::0x280
0329: [AP]  IMASK2::0xffffffff
0330: [AP]  IMASK1::0xffffffff
0331: [AP]  IFLAG2::0x0
0332: [AP]  IFLAG1::0x0

Please help me to make it work with respect to FIFO/ RX filters. And share me the patches if any related with this done on i.Mx25

ラベル(2)
0 件の賞賛
返信
3 返答(返信)

1,754件の閲覧回数
Raana
Contributor III

Hi igor,

I have downloaded the source code which you shared. Both my code and the one you share is same.
And also there is no filter implementation available in the source code you shared. By default, it is accepting all the messages.

        /* Set global mask to receive all messages */
        __raw_writel(0, flexcan->io_base + CAN_HW_REG_RXGMASK);
        __raw_writel(0, flexcan->io_base + CAN_HW_REG_RX14MASK);
        __raw_writel(0, flexcan->io_base + CAN_HW_REG_RX15MASK);

        memset(flexcan->hwmb, 0, sizeof(*hwmb) * FLEXCAN_MAX_MB);
        /* Set individual mask to receive all messages */
        memset(flexcan->rx_mask, 0, sizeof(unsigned int) * FLEXCAN_MAX_MB);

 
I want to add filter implementation into the driver with the set of CAN messages which I posted above.
Please help me to share any of such implementation done in this SOC or Kernel.

Thank you,

Regards,

J.P.RAJA

0 件の賞賛
返信

1,718件の閲覧回数
Yuri
NXP Employee
NXP Employee

@Raana 
Hello,

    according to "i.MX PDK Linux Reference Manual", section "Linux Menu Configuration Options",
it is possible to select

Networking > CAN bus subsystem support > Raw CAN Protocol (raw access with CAN-ID
  filtering).

   Customer can use CAN-ID filtering code as an example.

Regards,
Yuri.

0 件の賞賛
返信

1,766件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

Hi Raja

 

unfortunately i.MX25 processors are not supported in NXP BSPs as outdated,

just for test one can try with L2.6.31 where it was supported

https://source.codeaurora.org/external/imx/linux-imx/tree/?h=imx_2.6.31_caf

 

Best regards
igor

0 件の賞賛
返信