Armadilloフォーラム

CANエラー検出に関して

k-marine

2017年11月8日 14時25分

お世話になります。

Armadillo-IOT GWで、CANを使用しています。
CANからのエラー検出ですが、アプリケーションで、なんらかの理由で検出されないようです。

CANエラーを検出するために、設定等が必要になりますでしょうか。

ご教示ください。

 なお、同じエラー環境(違うビットレートを接続する)を、他同じCPUを使ったものでCANDUMPでエラー
確認したところ、エラー検出することができましたので、エラー環境としては問題ないかと
思っています。

以上、ご教示願います。

下記、CANDUMP
-------

〇 実行結果
# candump -ta -d -e -x -c can0
flexcan 2090000.can can0: writing ctrl=0x03292055
(1508830271.709872) can0 RX - - 20000004 [8] 00 04 00 00 00 00 00 00 ERRORFRAME
controller-problem{rx-error-warning}

(1508830177.567402) can0 RX - - 6CA [5] 7E 10 F4 03 00
DROPCOUNT: dropped 1740 CAN frames on 'can0' socket (total drops 251533)
(1508830177.893960) can0 RX - - 40F [7] D8 BF F5 03 00 00 00
DROPCOUNT: dropped 1 CAN frame on 'can0' socket (total drops 251534)
(1508830177.894338) can0 RX - - 478 [7] DA BF F5 03 00 00 00
(1508830177.894627) can0 RX - - 696 [6] DB BF F5 03 00 00
-------------------------------------------
〇 Usage: candump [options] +
(use CTRL-C to terminate candump)

Options: -t (timestamp: (a)bsolute/(d)elta/(z)ero/(A)bsolute w date)
-c (increment color mode level)
-i (binary output - may exceed 80 chars/line)
-a (enable additional ASCII output)
-S (swap byte order in printed CAN data[] - marked with '`' )
-s (silent mode - 0: off (default) 1: animation 2: silent)
-b (bridge mode - send received frames to )
-B (bridge mode - like '-b' with disabled loopback)
-u (delay bridge forwarding by microseconds)
-l (log CAN-frames into file. Sets '-s 2' by default)
-L (use log file format on stdout)
-n (terminate after receiption of CAN frames)
-r (set socket receive buffer to )
-d (monitor dropped CAN frames)
-e (dump CAN error frames in human-readable format)
-x (print extra message infos, rx/tx brs esi)
-T (terminate after without any reception)

コメント

k-marine

2017年11月13日 10時34分

お世話になります。
上村と申します。

こちらの件ですが、CANエラー取得(バスオフなど)情報ありませんでしょうか。
ご教示お願い致します。

宜しくお願い致します。

> お世話になります。
>
> Armadillo-IOT GWで、CANを使用しています。
> CANからのエラー検出ですが、アプリケーションで、なんらかの理由で検出されないようです。
>
> CANエラーを検出するために、設定等が必要になりますでしょうか。
>
> ご教示ください。
>
>  なお、同じエラー環境(違うビットレートを接続する)を、他同じCPUを使ったものでCANDUMPでエラー
> 確認したところ、エラー検出することができましたので、エラー環境としては問題ないかと
> 思っています。
>
> 以上、ご教示願います。
>
>
> 下記、CANDUMP
> -------
>
> 〇 実行結果
> # candump -ta -d -e -x -c can0
> flexcan 2090000.can can0: writing ctrl=0x03292055
> (1508830271.709872) can0 RX - - 20000004 [8] 00 04 00 00 00 00 00 00 ERRORFRAME
> controller-problem{rx-error-warning}
>
> (1508830177.567402) can0 RX - - 6CA [5] 7E 10 F4 03 00
> DROPCOUNT: dropped 1740 CAN frames on 'can0' socket (total drops 251533)
> (1508830177.893960) can0 RX - - 40F [7] D8 BF F5 03 00 00 00
> DROPCOUNT: dropped 1 CAN frame on 'can0' socket (total drops 251534)
> (1508830177.894338) can0 RX - - 478 [7] DA BF F5 03 00 00 00
> (1508830177.894627) can0 RX - - 696 [6] DB BF F5 03 00 00
> -------------------------------------------
> 〇 Usage: candump [options] +
> (use CTRL-C to terminate candump)
>
> Options: -t (timestamp: (a)bsolute/(d)elta/(z)ero/(A)bsolute w date)
> -c (increment color mode level)
> -i (binary output - may exceed 80 chars/line)
> -a (enable additional ASCII output)
> -S (swap byte order in printed CAN data[] - marked with '`' )
> -s (silent mode - 0: off (default) 1: animation 2: silent)
> -b (bridge mode - send received frames to )
> -B (bridge mode - like '-b' with disabled loopback)
> -u (delay bridge forwarding by microseconds)
> -l (log CAN-frames into file. Sets '-s 2' by default)
> -L (use log file format on stdout)
> -n (terminate after receiption of CAN frames)
> -r (set socket receive buffer to )
> -d (monitor dropped CAN frames)
> -e (dump CAN error frames in human-readable format)
> -x (print extra message infos, rx/tx brs esi)
> -T (terminate after without any reception)
>

at_yuma.arakawa

2017年11月20日 11時11分

荒川です。

ご質問の内容の確認なのですが、
"〇 実行結果"に記載いただいている内容は
> 他同じCPUを使ったものでCANDUMPでエラー
> 確認したところ、エラー検出することができましたので、
こちらの結果という認識でよろしいでしょうか。

また、
> CANからのエラー検出ですが、アプリケーションで、なんらかの理由で検出されないようです。
こちらの状況が発生しているログも同様にお教えいただけないでしょうか。

以上です。
よろしくお願いいたします。

k-marine

2017年11月20日 16時58分

荒川様

 ご返答ありがとうございます。
質問内容整理させていただきます。

★IO-Tで、CANのエラー(バスオフなど)の確認をアプリケーションから行えない。
エラーを検出しない設定などが、ありますでしょうか。

■弊社の確認方法
 先に連絡させていただいたいのは、エラーが起こる条件をIoTではないボード(フリースケールのCPUは使用しています)で
CANDUMP -eオプションをつけておこなった試験結果です。
 ドライバは、IoTと同じSocketCANをつかったものです。

おなじ内容を、CANのエラーがでる環境で、IOTでおこなっても
エラーが発生して、CANが受信しなくなるので、なにも出力されません。
ですので、ログをお送りすることができない状況です。

 IOTで、CANを正常に使用するためには、何かしら設定がいるのでは
ないかと思っておりますが、ご確認いただければと幸いです。

以上、よろしくお願いします。

> 荒川です。
>
> ご質問の内容の確認なのですが、
> "〇 実行結果"に記載いただいている内容は
> > 他同じCPUを使ったものでCANDUMPでエラー
> > 確認したところ、エラー検出することができましたので、
> こちらの結果という認識でよろしいでしょうか。
>
> また、
> > CANからのエラー検出ですが、アプリケーションで、なんらかの理由で検出されないようです。
> こちらの状況が発生しているログも同様にお教えいただけないでしょうか。
>
> 以上です。
> よろしくお願いいたします。