From: David H. <da...@sw...> - 2007-05-29 16:22:06
|
Dave Hylands wrote: > Hi David, > > On 5/29/07, David Hearn <da...@sw...> wrote: > >> I'm trying to connect a Pololu USB to Serial converter to the HWUART >> ports of the breakout-gs, connected to a connex400xm (with a tweener too). >> >> The info at: http://www.pololu.com/products/pololu/0391/ gives all the >> pin outs. I've connected on the Pololu board I've connected GND, TX and >> RX to the breakout-gs's HWUART ports GND, TXD and RXD respectively >> (HWUART being the 2nd one down (60pin connector top) on the right hand >> side - directly below PWM1/PWM0 etc. >> > > You may need to cross Tx and Rx. Tx is on output on the gumstix, and > Rx is an input on the gumstix. > > Looking at the web page for the voltage converter you're using, it > also as Tx as an output and Rx as an input. > > So you need to connect Tx on the gumstix to Rx on the voltage > converter, and Rx on the gumstix to Tx on the voltage converter. > I tried it that way first (thinking TX is output from Gumstix, and RX being input into converter), but changing it to TX-TX, RX-RX didn't make any difference (still didn't work). I think it's the GPIO config hinted in the Wiki. >> I then installed all the Pololu drivers etc and I'm able to open up that >> port in Windows now. However, I was hoping to just do something as >> simple as "echo "Hello" > /dev/ttyS3" to test it was working, however >> nothing arrives (and no error). >> > > Also make sure that you have hardware flow control disabled on the PC side. > Already done. >> I note in the Wiki that "The HWUART can be routed to two different sets >> of pins. By default, it is routed to a set of pins shared with the >> BTUART (and connected to the Gumstix's Bluetooth module, if present). It >> can be routed to a different set, freeing up the HWUART and leaving the >> BTUART to control the Bluetooth module. However, this second set of pins >> is shared with the PCMCIA/CompactFlash interface, and thus cannot be >> used with expansion boards which have a CF card interface, or a network >> interface (including the wifistix). Currently, this includes all >> connex-only expansion boards. >> >> The Gumstix Linux kernel maps the HWUART to /dev/ttyS3." >> >> This makes me wonder whether I need to do anything to enable the HWUART >> before I can use it, as it might otherwise be connected to the BTUART? >> > > You can check the configuration of the GPIO pins for HWUART by doing: > modprobe proc_gpio > cat /proc/gpio/GPIO48 > cat /proc/gpio/GPIO49 > What I see is: # cat /proc/gpio/GPIO48 48 AF2 out set # cat /proc/gpio/GPIO49 49 AF2 out set > GPIO48 should show something like AF1 out, and GPIO49 should show AF1 in. > Okay, so I then try: # echo "AF1 out" > /proc/gpio/GPIO48 Set (AF1,out,set) via /proc/gpio/GPIO48 # echo "AF1 in" > /proc/gpio/GPIO49 Set (AF1,in,set) via /proc/gpio/GPIO49 # cat /proc/gpio/GPIO48 48 AF1 out set # cat /proc/gpio/GPIO49 49 AF1 in set I now understand the Wiki entry about those AF1 bits now. I read it as being needed for GPIO use rather than enabling it for serial. These settings appear to reset on reboot, I can look into that later. > Note, even you were connected up properly, you won't see anything from > the host if you don't have some software on the gumstix connected to > /dev/ttyS3. > > I'd recommend using sertest: > <http://docswiki.gumstix.com/Sample_code/C/Serial> > > I've just tried that app, using ./sertest -p ttyS3 -b 9600 and with the PC end of the adaptor running a 9600 with flow control disabled, yet I see no comms either way. I'm using a serial monitoring program too and that's showing no comms either. Any suggestions? Thanks David |