Missing CAN rx messages on our iMX6 when the USB Port(A) is used

Hello all,

We have a problem of missing CAN rx messages on our iMX6 when the USB Port(A) is used.

The iMX6 has an integrated FLEXCAN module with two CAN interfaces.

Communication on CAN bus logged with PcanView, shows all messages in correct order

  1. 18801.5 Rx 0201 5 61 02 00 FF 00 //request for 8 answers by Apalis

  2. 18802.8 Rx 0204 7 61 02 00 3D 4A EC 40 //answer 1

  3. 18803.2 Rx 0204 7 61 02 01 3D 4D B4 B5 //answer 2

  4. 18803.6 Rx 0204 7 61 02 02 3D 4F C3 D3 //answer 3

  5. 18804.1 Rx 0204 7 61 02 03 3D 45 73 C7 //answer 4

  6. 18804.5 Rx 0204 7 61 02 04 3D 59 EC 9C //answer 5

  7. 18805.0 Rx 0204 7 61 02 05 3D 2B 41 4F //answer 6

  8. 18805.4 Rx 0204 7 61 02 06 3D 64 E4 5C //answer 7

  9. 18805.9 Rx 0204 7 61 02 07 3D 3E 8C C0 //answer 8

  10. 19345.6 Rx 0200 2 D8 00 //disconnect

Candump from iMX6 (Apalis board) messages missing and order incorrect

<0x204> [7] 61 02 00 3d 4a ec 40 //answer 1

<0x204> [7] 61 02 01 3d 4d b4 b5 //answer 2

<0x204> [7] 61 02 02 3d 4f c3 d3 //answer 3

<0x204> [7] 61 02 03 3d 45 73 c7 //answer 4

<0x204> [7] 61 02 04 3d 59 ec 9c //answer 5

<0x204> [7] 61 02 05 3d 2b 41 4f //answer 6

<0x201> [5] 61 02 00 ff 00 //request for 8 answers by iMX6 !!!

<0x200> [2] d8 00 //missing answer 7 and 8 => sending disconnect

The logging information of PcanView shows the messages in valid order, instead the log from candump which shows the answers before the request! Further, two answers are missing which leads to sending the disconnect message after a time out of 500ms. This event is reproducible on any access to USB devices e.g. a flash memory stick or a web cam.

Thanks in advance.
Best Regards,

Jens

gentle ping?

Hi

We did not do any performance tests with the flexcan module so it is a bit hard to comment on what you see.

On top of that it looks like you use a quite old kernel. There were a lot of commits to the flexcan driver, some sound like they address performance issues. So I would recommend to update to our V2.7 image with a 4.1 kernel.

What bitrate are using for CAN?

Do the error counter reflect the issue? ip -s link show dev can0

Does it help if you do not have candump redirect to a file in ram disk?
e.g. candump 2>&1 > /tmp/test.txt

Max