Hello,
I was able to get the RS485 mode to work. However after I run my test application, the ehternet stops working. These are the pins I'm using:
GPIO_PG1 (gpio 17) for CTS
GPIO_PH0 (gpio 32) for RTS
I don't see these pins having anything to do with ehternet.
I'm using ezbrd for BF518.
This is my code inside: arch/blackfin/mach-bf518/boards/
static struct resource bfin_uart1_resources[] = {
...
#ifdef CONFIG_BFIN_UART1_CTSRTS
{ /* CTS pin */
.start = GPIO_PG1,
.end = GPIO_PG1,
.flags = IORESOURCE_IO,
},
{ /* RTS pin */
.start = GPIO_PH0,
.end = GPIO_PH0,
.flags = IORESOURCE_IO,
},
#endif
These are the tests I'm doing:
test1
1. "ping 192.168.1.7" which works
2. run my test application, which sends some data and toggles RTS as expected
3. I try the ping again, and it fails
There are no error messages on the console or in dmesg
ifconfig shows this after step 3 above.
root:/> ifconfig eth0
eth0 Link encap:Ethernet HWaddr EE:CD:CB:88:99:9C
inet addr:192.168.1.9 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1
RX packets:801 errors:0 dropped:7 overruns:0 frame:0
TX packets:73 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:68258 (66.6 KiB) TX bytes:8662 (8.4 KiB)
test2
1. Export GPIO_PG1 and GPIO_PH0 as GPIO pins. Set them to high or low values (I tried both)
2. Ping still works
This test backs up my belief that those pins do not interfere with the ethernet.
test3
1. Build the kernel without support for CTS/RTS on the UART
2. Run my test app. It sends some data. RTS does not do anything, as expected.
3. Ping still works
Any ideas on what is causing the ethernet to stop working.
Thanks,
Mike