(LCD 7 + RS485) & Kernel 3.14 = crash

Hi everyone,

I’m trying to make the RS 485 working on the kernel 3.14 .

One good news, there is already something to support rs485

My problems, it’s that with my hello world program, it doesn’t last a long time … I need to switch off the beagle to make the beagle working again … that not normal.

One thing that you need to know about the rs485 on the kernel 3.14, it’s that you don’t need to configure it anymore on your program, it’s handled in the device tree.

get the sources :
http://elinux.org/Beagleboard:Capes_3.8_to_3.14#Custom_dtb

the compiler :
sudo apt-get update ; sudo apt-get install build-essential device-tree-compiler

the file to modify for ttyO4 :
sudo nano src/arm/am335x-ttyO4.dtsi

modify the file like that :

&uart4 {
pinctrl-names = “default”;
pinctrl-0 = <>;

/* No extra delay after/before transmissions */
rs485-rts-delay = <0 0>;

/* GPIO0 pin 22 for data direction */
rts-gpio = <&gpio0 22 GPIO_ACTIVE_HIGH>;

/* Enable RS-485 */
linux,rs485-enabled-at-boot-time;

status = “okay”;
};

then sudo make install
reboot the beagle
and with a simple echo “1234” > /dev/ttyO4 the GPIO direction is moving ! Great !

I don’t know why, but it crash when I’m sending a packet in a loop.

I also got this message once ( before starting the program ) :

arm login: [ 102.366458] INFO: rcu_preempt detected stalls on CPUs/tasks: {} (detected by 0, t=2102 jiffies, g=3000, c=2999, q=52)
[ 102.386869] INFO: Stall ended before state dump start

I will make more test later …