Hi, I am not able to set bitrate using below command, ip link set can0 type can bitrate 125000Instead, I did following command to set the bit rate# echo 125000 > /sys/devices/platform/FlexCAN.0/bitrate But, I am trying send CAN frame using following Commandcansend can1 -i 0x10 0x11 0x22 0x33 0x44 0x55 0x66 0x77 0x88 In Second Board, I was using following command to receive the CAN framecandump can1 But I am not getting anything. Please suggest me to resolve this issue as soon as possible
root@mx28evk /sys/devices/platform/FlexCAN.1$ candump can1
interface = can1, family = 29, type = 3, proto = 1
root@mx28evk /sys/devices/platform/FlexCAN.1$
Hi,
FlexCAN is working in iMX28 evk. Now I am able to send/receive CAN frame. Problem was in DB9 cable. I used DB9 crossover cable, instead of null modem(straight cable). RandyKrakora has pointed out the problem and suggested the solution.
This is the update from him,
Depends on the type of db9 connector, do you mean a typicaly rs-232/serial cable, like used for viewing the linux console? Because there is also the null modem db9 cable. Plus you have to make sure the pins on the db9 header for CAN match pins that actually go through the db9 cable you selected to the proper pins on the other board. I would recommend finding just the CAN_H and CAN_L pins on each board and connect them with single wires to make sure they go to the right spot.
Thanks RandyKrakora
You can use kernel 4.13.2 which has Flexcan support by default on mx28evk.
Hi Estevam,
Hi Estevam,
I am using ltib build tool, in menuconfig max kernel version we can choose is 3.1 something I dont see any 4.13.2. Can you please share me the path to download the source code(NXP supported code for imx28 evk) and tell me whether I can go with ltib build or Yocto build to compile linux 4.13.2 for imx28 evk support.
Can't FlexCAN support in linux 2.6.35 in imx28 evk?
Hi Karthikeyan
one can try try patches provided on
i.MX28 CAN frame transmission order problem
and use canconfig for bitrate configuration as described on
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi igor,
Thanks for replying.
As you told, I applied following patch
420-kernel2.6.35NewCANDriver.patch
But code was not built. It was showing following error
+ '[' '%{kernel_series}' = 2.4 ']'
+ make ARCH=arm CROSS_COMPILE= 'HOSTCC=ccache /usr/bin/gcc -B/usr/bin/' uImage
scripts/kconfig/conf -s arch/arm/Kconfig
CHK include/linux/version.h
CHK include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
CC arch/arm/mach-mx28/device.o
arch/arm/mach-mx28/device.c:1145: error: array type has incomplete element type
arch/arm/mach-mx28/device.c:1147: error: field name not in record or union initializer
arch/arm/mach-mx28/device.c:1147: error: (near initialization for 'flexcan_data')
arch/arm/mach-mx28/device.c:1150: error: field name not in record or union initializer
arch/arm/mach-mx28/device.c:1150: error: (near initialization for 'flexcan_data')
arch/arm/mach-mx28/device.c:1695: warning: initialization makes integer from pointer without a cast
make[1]: *** [arch/arm/mach-mx28/device.o] Error 1
make: *** [arch/arm/mach-mx28] Error 2
make: *** Waiting for unfinished jobs....
make: *** wait: No child processes. Stop.
error: Bad exit status from /home/irhpoq/ltib/ltib/tmp/rpm-tmp.6811 (%build)
RPM build errors:
Bad exit status from /home/irhpoq/ltib/ltib/tmp/rpm-tmp.6811 (%build)
Build time for kernel-2.6.35: 12 seconds
Failed building kernel-2.6.35
f_buildrpms() returned an error, exiting
traceback:
main:572
Started: Thu Sep 14 14:19:10 2017
Ended: Thu Sep 14 14:19:22 2017
Elapsed: 12 seconds
These packages failed to build:
kernel-2.6.35
Build Failed
Kindly help me to resolve FlexCAN problem.