Glomation
 
Advanced Search
Welcome, Guest. Please login or register.

Login with username, password and session length
February 05, 2012, 05:48:31 AM
News: Glomation introduced new wireless ready low cost GESBC-9260S
Pages: 1 [2]
Topic Tools  
Read June 14, 2010, 04:14:32 PM #15
arapoport

Re: RS485 on 9G20

I have a strange problem with RS-485.

I compiled the kernel (2.6.30) setting the USART3 following the indications on http://glomation.net/smf/index.php/topic,175.0.html but since I have a 9G20, I put it on the board-sam9g20ek.c file instead of board-sam9260ek.c

The kernel loads ok and shows the four serial ports. Then I run the devmem2 command, but I can't make any connection to ttyS4 and my RS-485 device. On the other hand, when I load the kernel compiled by Glomation I can use the serial port without any problem.

It seems that I have some differences with the Glomation's kernel. Is there any other way to make sure the port is available ? Something to configure in the kernel ? Or the .c file ?

I modified the machine name in MACHINE_START just to make sure that it is indeed compiled.

Attached are my board-sam9g20ek.c , .config.

thanks

Alejandro

* board-sam9g20ek.c (5.78 KB - downloaded 40 times.)
* .config (35.62 KB - downloaded 41 times.)
* uImage (1651.28 KB - downloaded 50 times.)
 
Read October 26, 2010, 10:06:45 AM #16
sebacancinos

Re: RS485 on 9G20

I think I figured out what's the issue. Not solved it thou.

I was using the 2.6.30 kernel sources. It listed the port ok, I set the 0xfffd0004 register but when I opened the port on my app, I couldn't read or write to the RS-485 port (/dev/ttyS4).

At some point, I tried setting the 0xfffd0004 register AFTER opening the port and that was the magic. The new kernel, sets the RTS bit on 0 when it opens the port. So the RS485 converter is not enabled. The old kernel driver didn't properly manage RTS, so setting the RTS bit on 1 at start up enabled the converter for the long run. The new one, needs to be set every time you open the port.

Now, It'd be cool to be able to open the port and tell it to enable the RTS bit so I don't have to, besides I'm not confident that the new driver won't set it to 0 at some point and disable the converter. It'd be nice to have some way to enable it on the kernel so the driver won't use the RTS bit at all.

I know the supported Kernel is 2.6.27, but I need a newer version because they have GPIO support.

 
Pages: 1 [2]
Jump to:  

Theme Update by Runic Warrior Originally created by m3talc0re