Having problem in reading can on IMX8 QuadMax device with MCIMX8-8x-BB board

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

Having problem in reading can on IMX8 QuadMax device with MCIMX8-8x-BB board

1,007件の閲覧回数
k_miwa
Contributor I

Hello! I’m new to this community and I’m currently working on the IMX8 QuadMax device. I have encountered a problem while reading CAN on the MCIMX8-8x-BB board. I installed QNX 7.1 on the device and launched the dev-can-mx7x-mx8x driver with this argument: -b250K can0. Then, I called canctl -u0,rx0 -m0 -f0 to receive all messages and typed cat /dev/can0/rx0. However, even though I’m sending CAN messages to the CAN0 port, cat outputs nothing. I would greatly appreciate it if someone could help me out. Thank you for reading.

This is debug output for the driver...

#canctl -u0,rx0 -i
Message queue size: 100
Wait queue size: 16
Mode: IO
Bitrate: 0 Baud
Bitrate prescaler: 20
Sync jump width: 1
Time segment 1: 8
Time segment 2: 2
TX mailboxes: 32
RX mailboxes: 32
Loopback: NONE
Autobus: OFF
Silent mode: OFF

# canctl -u0,rx0 -s
Transmitted frames: 0
Received frames: 0
Missing ACK: 0
Total frame errors: 0
Stuff errors: 0
Form errors: 0
Dominant bit recessiv: 0
Recessiv bit dominant: 0
Parity errors: 0
CRC errors: 0
RX FIFO overflow: 0
RX queue overflow: 0
Error warning state #: 0
Error passive state #: 0
Bus off state #: 0
Bus idle state #: 0
Power down #: 0
Wake up #: 0
RX interrupts #: 0
TX interrupts #: 0
ラベル(1)
0 件の賞賛
返信
1 返信

973件の閲覧回数
Sanket_Parekh
NXP TechSupport
NXP TechSupport

Hello @k_miwa 

I hope you are doing well.

I have a few queries to ask

1)have you set the message id with -m flag as described below(example only)?
Use the -m option or the CAN_DEVCTL_SET_MID devctl() command to specify a new MID. Here we set this for a TX device and the corresponding RX device:
# canctl -u1,rx1 -m0x11CC0000
# canctl -u1,tx6 -m0x11CC0000

2)have you set the filter id with -f flag as described below(example only)?
Use the -f option (or the CAN_DEVCTL_SET_MFILTER devctl() command) to set the local area mask (LAM) filter on RX0 and RX1:
# canctl -u1,rx0 -f0xFFFFFFF0
# canctl -u1,rx1 -f0xFFFFFFF0

Please try to transmit & Recieve the message as given below.
Transmit a CAN message from tx0:
# echo testing > /dev/can1/tx0

Determine which RX device received that message:
# cat /dev/can1/rx0
[Ctrl+C]

Thanks & Regards.

Sanket Parekh

0 件の賞賛
返信