$BC]G72<MM(B<br><br>$B$$$D$b$*@$OC$K$J$C$F$*$j$^$9!#(B<br>$B8eF#$G$9!#(B<br><br>$B$42sEz$"$j$,$H$&$4$6$$$^$9!#(B<br><br>$B$4O"MmD:$$$?J}K!$G8=:_3NG'$r<B;\$7$F$*$j$^$9$,!"$^$@4pHD$r2p$7$F$NAw<u?.$r(B<br>$B3NG'=PMh$k>u67$K$O;j$C$F$*$j$^$;$s!#(B<br><br>$B$J$*3NG'$r9T$&Cf$G0lE@!"ITL@$JE@$,$"$j$^$9$N$G3NG'$r$5$;$FD:$1$l$P$H;W$$$^$9!#(B<br><br>”ifconfig can0”$B$r<B9T$7$?7k2L$r2<5-$K5-:\CW$7$^$9$,!"(B”HWaddr”$B$H$$$&9`L\$,(B<br>
$BA4$F(B00$B$H$J$C$F$$$k$3$H$r3NG'$7$F$*$j$^$9!#(B<br>$B>e5-(B”HWaddr”$B$G$9$,Aw<u?.$r<B;\$9$k$K$"$?$j!"2?$i$+$NCM$,@_Dj$5$l$F$$$kI,MW$,(B<br>$B$"$k9`L\$K$J$j$^$9$G$7$g$&$+!)(B(ID$BEy!)(B)<br><br>(ifconfig can0 $B<B9T7k2L(B)<br>can0 Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00<br>        UP RUNNING NOARP  MTU:16  Metric:1<br>
        RX packets:0 errors:0 dropped:0 overruns:0 frame:0<br>        TX packets:809 errors:0 dropped:0 overruns:0 carrier:0<br>        collisions:0 txqueuelen:64<br>        RX bytes:0 (0.0 B)  TX bytes:6178 (6.0 KiB)<br>
<br>$B0J>e$K$D$-$^$7$F3NG'$r$5$;$F2<$5$$!#(B<br>$B59$7$/$*4j$$CW$7$^$9!#(B<br><br><div class="gmail_quote">2010$BG/(B11$B7n(B8$BF|(B21:45 Takenoshita Koyo <span dir="ltr"><<a href="mailto:takenoshita@atmark-techno.com">takenoshita@atmark-techno.com</a>></span>:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
$BC]G72<$G$9!#(B<br>
<br>
> 1.make config<br>
> 2.make menuconfig<br>
>    <*> Virtual Local CAN Interface (vcan)  (<*> $B$XJQ99(B)<br>
$B$3$l$O!"I,MW$J$$$G$9$M!#(B<br>
<br>
> 3.make<br>
> 4.$B<B5!5/F08e$N(B ifconfig can0 $B$N<B9T(B<br>
> 5.ifconfig can0 up $B$N<B9T(B<br>
$B%I%i%$%P$O!"@5>o$KAH$_9~$^$l$F$$$k$h$&$G$9!#(B<br>
<br>
> 6.CON14 $B$K(BPC$B$+$i(BCAN$B%P%9$K%Q%1%C%H$rAw?.(B<br>
> # $B$^$:$O>e5-$K$F2?$i$+$N%G!<%?$r<u?.$7$?$i(B ifconfig can0 $B$N<B9T$K$F(B<br>
> packets$B$NCM$,(B<br>
> # $BA}2C$9$k$3$H$GDL?.$N3NG'$,=PMh$k$HG'<1$7$F$*$j$^$7$?$,!"8=>u$G$O(B0$B$N$^(B<br>
> $B$^$G$9!#(B<br>
$B3NG'J}K!$H$7$F$O!"(Breceive packets$B$NCM$r8+$k$N$G!"@5$7$$$H;W$$$^$9!#(B<br>
$B$,!"A4$/H?1~$7$F$$$J$$$H$&$3$H$G$9$M!#(B<br>
$B0J2<$NE@$r3NG'$7$F$$$?$@$1$^$9$+!)(B<br>
<br>
0. $B%O!<%I%&%'%"(B($BFC$KEE8;<~$j(B)<br>
$B:n@.$5$l$?4pHD$K@5$7$/EE8;$,6!5k$5$l$F$$$k$+!"$43NG'$/$@$5$$!#(B<br>
<br>
1. CAN$BDL?.B.EY$N@_Dj(B<br>
CAN$B$NDL?.@_Dj$O(B /sys/devices/platform/FlexCAN.1/$B%G%#%l%/%H%j0J2<$N%U%!%$%k$K(B<br>
$BCM$r=q$-9~$`$3$H$GJQ99$G$-$^$9!#3F(Bsysfs$B%U%!%$%k$N5!G=$K$D$$$F$O%=%U%H%&%'%"(B<br>
$B%^%K%e%"%k$r;2>H$7$F$/$@$5$$(B[*1]$B!#(B<br>
<br>
$B$H$j$"$($:!"DL?.B.EY$,@5$7$/@_Dj$5$l$F$$$l$PDL?.$O$G$-$^$9!#DL?.B.EY$O!"(B<br>
$B%/%m%C%/%=!<%9$H%W%j%9%1!<%i$NJ,<~Hf$K$h$C$F@_Dj$7$^$9!#(B<br>
$B7W;;<0$O0J2<$NDL$j$G$9(B[*2]$B!#(B<br>
<br>
$BDL?.B.EY(B[bps] = src_clk / br_presdiv / (1 + br_propseg + br_pseg1 + br_pseg2)<br>
$BC"$7!"(Bbr_clksrc = bus $B$N>l9g(B src_clk = 66,500,000<br>
      br_clksrc = osc $B$N>l9g(B src_clk = 24,000,000<br>
<br>
*1: <a href="http://manual.atmark-techno.com/armadillo-4x0/armadillo-400_series_software_manual_ja-1.3.0/ch08.html#table-CAN-sysfs" target="_blank">http://manual.atmark-techno.com/armadillo-4x0/armadillo-400_series_software_manual_ja-1.3.0/ch08.html#table-CAN-sysfs</a><br>

*2: <a href="http://manual.atmark-techno.com/armadillo-4x0/armadillo-400_series_software_manual_ja-1.3.0/ch08.html#fig-CAN" target="_blank">http://manual.atmark-techno.com/armadillo-4x0/armadillo-400_series_software_manual_ja-1.3.0/ch08.html#fig-CAN</a>$BDL?.B.EY7W;;(B<br>

<br>
$BNc!'(B(br_clksrc=bus$B;~(B)<br>
1007575bps = br_presdiv=3, br_propseg=7, br_pseg1=7, br_pseg2=7<br>
950kbps = br_presdiv=5, br_propseg=4, br_pseg1=5, br_pseg2=5<br>
500kbps = br_presdiv=7, br_propseg=5, br_pseg1=5, br_pseg2=8<br>
25kbps = br_presdiv=133, br_propseg=6, br_pseg1=6, br_pseg2=7<br>
10390bps = br_presdiv=256, br_propseg=8, br_pseg1=8, br_pseg2=8<br>
<br>
$B$J$*!"DL?.B.EY$N@_Dj$O(BCAN$B%$%s%?!<%U%'!<%9$rDd;_$7$F$$$k>uBV(B<br>
(ifconfig [$B%$%s%?!<%U%'!<%9L>(B] down$B$7$?8e(B)$B$G9T$C$F$/$@$5$$!#(B<br>
<br>
<br>
2. CAN$BAw<u?.%D!<%k$N;HMQJ}K!(B<br>
<br>
can-utils$B$H$$$&%D!<%k$G!"(BCAN$B$NAw<u?.$N%F%9%H$,$G$-$^$9!#(B<br>
<br>
2.1. $B%D!<%k$N%S%k%I(B<br>
$B0J2<$N<j=g$G%=!<%9$r<hF@$7!"%S%k%I$7$F$/$@$5$$!#(B<br>
<br>
$B%=!<%9$N<hF@(B<br>
$ svn co --revision {20101108}  <a href="http://svn.berlios.de/svnroot/repos/socketcan/trunk/can-utils/" target="_blank">http://svn.berlios.de/svnroot/repos/socketcan/trunk/can-utils/</a><br>
$ cd can-utils/<br>
<br>
Makefile$B$r0J2<$N$h$&$K=$@5(B<br>
PROGRAMS = candump cansend cangen<br>
<br>
$B%S%k%I(B<br>
$ CC=arm-linux-gnueabi-gcc make<br>
<br>
cansend$B!"(Bcangen$B!"(Bcandump$B$H$$$&<B9T%U%!%$%k$,:n@.$5$l$^$9$N$G!"$=$l$i$r(BArmadillo$B$K(B<br>
$B%3%T!<$7$F!"<B9T8"8B$r$D$1$F$/$@$5$$!#(B<br>
<br>
<br>
2.2. $B%D!<%k$N;H$$J}(B<br>
$B$=$l$>$l$N%D!<%k$N4JC1$J;H$$J}$O0J2<$N$h$&$K$J$j$^$9!#(B<br>
<br>
2.2.1. candump$B%3%^%s%I(B<br>
candump$B$O<u?.$7$?%a%C%;!<%8$NFbMF$rI=<($7$^$9!#(B<br>
<br>
$B%3%^%s%I$N<B9TJ}K!(B<br>
# candump [$B%*%W%7%g%s(B] [$B%$%s%?!<%U%'!<%9L>(B]<br>
<br>
can0$B$G<u?.$7$?%a%C%;!<%8$rI=<($9$k(B<br>
# candump can0<br>
<br>
$B$9$Y$F$N(BCAN$B%$%s%?!<%U%'!<%9$G<u?.$7$?%a%C%;!<%8$rI=<($9$k(B<br>
# candump any<br>
<br>
2.2.2. cansend$B%3%^%s%I(B<br>
cansend$B$O;XDj$7$?(BID$B$H%G!<%?$+$i$J$k%a%C%;!<%8$rAw?.$7$^$9!#(B<br>
<br>
$B%3%^%s%I$N<B9TJ}K!(B<br>
# cansend [$B%$%s%?!<%U%'!<%9L>(B] [ID]#[$B%G!<%?(B]<br>
<br>
ID$B$K$O(B3$B7e(B($BI8=`%U%)!<%^%C%H(B)$B$^$?$O(B8$B7e(B($B3HD%%U%)!<%^%C%H(B)$B$N(B16$B?J?t$r;XDj$9$k$3$H$,$G$-$^$9!#(B<br>
$B%G!<%?$N@_Dj$O(B1$B%G!<%?$"$?$j(B16$B?J?t(B2$B7e$G!"(B0$B$+$i(B8$B8D$^$G$N%G!<%?$r;XDj$9$k$3$H$,$G$-$^$9!#(B<br>
$B$^$?!"%G!<%?$O(B1$B%G!<%?$4$H$K(B"."($B%I%C%H(B)$B$G6h@Z$k$3$H$b$G$-$^$9!#(B<br>
<br>
$B<B9TNc(B<br>
<br>
ID=333($BI8=`%U%)!<%^%C%H(B), DATA=33$B$N%a%C%;!<%8$r(Bcan0$B$KAw?.(B<br>
# cansend can0 333#33<br>
<br>
ID=00004444($B3HD%%U%)!<%^%C%H(B), DATA=44$B$N%a%C%;!<%8$r(Bcan0$B$KAw?.(B<br>
# cansend can0 00004444#44<br>
<br>
$B%G!<%?$O:GBg(B8$B8D$^$G;XDj2DG=(B<br>
# cansend can0 555#5051525354555657<br>
<br>
$B%G!<%?$O(B.$B$G6h@Z$k$3$H$b$G$-$k(B<br>
# cansend can0 666#60.61.62.63.64.65.66.67<br>
<br>
<br>
2.2.3. cangen$B%3%^%s%I(B<br>
cangen$B$OJ#?t$N%a%C%;!<%8$r;XDj$7$?4V3V$GAw?.$7$^$9!#(B<br>
<br>
$B%3%^%s%I$N<B9TJ}K!(B<br>
# cangen [$B%$%s%?!<%U%'!<%9L>(B] [$B%*%W%7%g%s(B]<br>
<br>
$B<B9TNc(B<br>
<br>
$B?'!9$J;H$$J}$,$"$k$N$G!">\:Y$O(Bhelp$B$r;2>H$7$F$/$@$5$$!#!#(B<br>
<br>
tomoki goto $B$5$s$O=q$-$^$7$?(B:<br>
> $B$*@$OC$K$J$j$^$9!#(B<br>
> $B8eF#$H?=$7$^$9!#(B<br>
><br>
> Armadillo-440 $B$G$N(BCAN$BDL?.$K$D$$$F$*Ld9g$;$r$5$;$FD:$-$^$9!#(B<br>
><br>
> $B8=:_!"%^%K%e%"%kEy$K5-:\$NFbMF$K=>$$$^$7$F(BCAN$BDL?.$NF0:n3NG'$r(B<br>
> $B<B;\$7$h$&$H;n$_$F$*$j$^$9$,DL?.$,=PMh$F$$$J$$>u67$G$9!#(B<br>
><br>
> $B2<5-$K8=:_$^$G$K<B9T$7$?FbMF$r<($7$^$9$N$G;HMQJ}K!!"<j=g!"(B<br>
> $B@_DjFbMF$NITHwEy$,$"$j$^$7$?$i$465<(D:$1$l$P$H;W$$$^$9!#(B<br>
><br>
><br>
> $B<B9T4D6-$O2<5-$NDL$j$G$9!#(B<br>
>  $B!&(Batmark-dist-20100918<br>
>  $B!&(Blinux-2.6.26-at11<br>
>  $B!&(BHermit-At v2.0.7<br>
><br>
><br>
> 1.make config<br>
>   Armadillo-400 $B%7%j!<%:%=%U%H%&%'%"%^%K%e%"%k(B<br>
>    6.1.2. $B%G%U%)%k%H%3%s%U%#%.%e%l!<%7%g%s$NE,MQ$NFbMF$HF1Ey!#(B<br>
><br>
> 2.make menuconfig<br>
> menuconfig $B$GJQ99$7$?FbMF$N$_2<5-$K5-:\!#(B<br>
>   - Armadillo-400 Board options<br>
>    [ ] Enable I2C2 at CON14    ([ ] $B$XJQ99(B)<br>
>    [*] Enable CAN2 at CON14  ([*] $B$XJQ99(B)<br>
><br>
>   - CAN bus subsystem support<br>
>    <*>   Raw CAN Protocol (raw access with CAN-ID filtering)  (<*> $B$XJQ99(B)<br>
>    <*>   Broadcast Manager CAN Protocol (with content filtering)  (<*><br>
> $B$XJQ99(B)<br>
>            CAN Device Drivers  --->$B!!(B<br>
><br>
>   - CAN Device Drivers<br>
>    <*> Virtual Local CAN Interface (vcan)  (<*> $B$XJQ99(B)<br>
>    [*] CAN devices debugging messages  ([*] $B$XJQ99(B)<br>
>    <*> Freescale FlexCAN  (<*> $B$XJQ99(B)<br>
><br>
> 3.make<br>
> $BFC5-L5$7(B($B%(%i!<L5$7(B)<br>
><br>
> 4.$B<B5!5/F08e$N(B ifconfig can0 $B$N<B9T(B<br>
>  can0 Link encap:UNSPEC  HWaddr<br>
> 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00<br>
>          NOARP  MTU:16  Metric:1<br>
>          RX packets:0 errors:0 dropped:0 overruns:0 frame:0<br>
>          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0<br>
>          collisions:0 txqueuelen:64<br>
>          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)<br>
><br>
> # /sys/devices/platform/FlexCAN.1/state $B$NFbMF$O(B ”Stop::normal”$B!#(B<br>
><br>
> 5.ifconfig can0 up $B$N<B9T(B<br>
>  can0 Link encap:UNSPEC  HWaddr<br>
> 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00<br>
>          UP RUNNING NOARP  MTU:16  Metric:1<br>
>          RX packets:0 errors:0 dropped:0 overruns:0 frame:0<br>
>          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0<br>
>          collisions:0 txqueuelen:64<br>
>          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)<br>
> # /sys/devices/platform/FlexCAN.1/state $B$NFbMF$O(B ”Start::normal” $B$H$J$k(B<br>
> $B$3$H$r3NG'!#(B<br>
><br>
> 6.CON14 $B$K(BPC$B$+$i(BCAN$B%P%9$K%Q%1%C%H$rAw?.(B<br>
>  Armadillo-400 $B%7%j!<%:%O!<%I%&%'%"%^%K%e%"%k(B CAN$B?.9f$N;29M2sO)Nc$r;29M(B<br>
> $B$K:n@.$7$?(B<br>
>  $B4pHD$r2p$7$F%G!<%?$rAw?.!#(B<br>
><br>
> # $B$^$:$O>e5-$K$F2?$i$+$N%G!<%?$r<u?.$7$?$i(B ifconfig can0 $B$N<B9T$K$F(B<br>
> packets$B$NCM$,(B<br>
> # $BA}2C$9$k$3$H$GDL?.$N3NG'$,=PMh$k$HG'<1$7$F$*$j$^$7$?$,!"8=>u$G$O(B0$B$N$^(B<br>
> $B$^$G$9!#(B<br>
><br>
><br>
> $B8=>u$N3NG'$H$7$F$O0J>e$K$J$j$^$9!#(B<br>
> $B:,K\E*$J;HMQJ}K!$K$D$$$FG'<10c$$$,$"$k$+$b$7$l$^$;$s$N$G;HMQJ}K!!"(B<br>
> $B<j=g5Z$SDL?.$N3NG'J}K!$K$D$$$F$465<(D:$1$l$P$H;W$$$^$9!#(B<br>
><br>
> $B$*K;$7$$$H$3$m$*<j?t$*3]$1CW$7$^$9$,59$7$/$*4j$$CW$7$^$9!#(B<br>
><br>
> +-<br>
>  $B8eF#(B<br>
><br>
><br>
> ------------------------------------------------------------------------<br>
><br>
> _______________________________________________<br>
> armadillo mailing list<br>
> <a href="mailto:armadillo@lists.atmark-techno.com">armadillo@lists.atmark-techno.com</a><br>
> <a href="http://lists.atmark-techno.com/cgi-bin/mailman/listinfo/armadillo" target="_blank">http://lists.atmark-techno.com/cgi-bin/mailman/listinfo/armadillo</a><br>
<font color="#888888"><br>
<br>
--<br>
Koyo Takenoshita<br>
<br>
_______________________________________________<br>
armadillo mailing list<br>
<a href="mailto:armadillo@lists.atmark-techno.com">armadillo@lists.atmark-techno.com</a><br>
<a href="http://lists.atmark-techno.com/cgi-bin/mailman/listinfo/armadillo" target="_blank">http://lists.atmark-techno.com/cgi-bin/mailman/listinfo/armadillo</a><br>
</font></blockquote></div><br>