How to set CANSTBY gpio low on IMX6Q-sabre-sdp

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to set CANSTBY gpio low on IMX6Q-sabre-sdp

926 Views
jiaweiyu
Contributor I

Hello,

I am using CAN on IMX6Q-sabre-sdp with Freescale BSP r14.10.28.

I modified flexcan settings(status = "okay";) in imx6qdl.dtsi and set ethernet "fec"  status to "disable" due to pin conflict.

Besides I include the driver for Freecsale Flexcan in kernel menconfig. Then I make dtb and zImage file again.

After copy the new zImage and sabresd.sdb files to the board, I use cmd "ip link set can0 up type can bitrate 250000" to enable CAN. “ifconfig -a” cmd shows that CAN0 is up and running properly.However, I can't receive any message using the cmd "cansend can0 111#1122334455667788" with a CAN analyser.

It seems that the cause is the canstandby gpio status is high. The TJA1040 datasheet indicates the stby pin status must be low.I tried to force the pin to low with a cable connect to GND and it works. Thus I think it is key to set the canstby pin to low to solve the problem.

How can i set the canstby gpio(GPIO4_IO5,GPIO19) to low status?

1.jpg

Much thanks!

Labels (1)
0 Kudos
Reply
1 Reply

691 Views
igorpadykov
NXP Employee
NXP Employee

Hi Jiawei

please look at function mx6q_flexcan_switch() and flexcan0_en, flexcan_stby_gpio

in

linux-2.6-imx.git - Freescale i.MX Linux Tree

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply