Sunday, February 14, 2010

I wanted a UART but I got GPIO

Time finally came to hookup IMU to Gumstix. I carefully soldered a couple of ribbon cables and put on a scope at the RXD and TXD pins to see if I could run a loopback test. The Gumstix UART page is suitably vague and confusing. Fine I can do some guesswork and deal with ambiguities. I soldered both the HWUART and the BTUART since that's where the ambiguity lies. I tried to send some data to the serial using cat. Lo and behold it did not work. So I put both receive and transmit pins in GPIO mode and manually toggled the state using:

 while(true);do echo "GPIO out set" > /proc/gpio/GPIO43;sleep 1;echo "GPIO out clear" > /proc/gpio/GPIO43;sleep 1;done

My soldering is rock solid (I have gotten better) and I got a 1 second pulse on the cable soldered to the the supposedly unused HWUART. More fiddling is needed before I can get the 3rd UART I need.

No comments: