I've written a C code to access the serial port which is ttyS0, that should
appear on pin 9 and 10 as far as I know. First when I tried my code on a
pre-built image I've got from the gumstix official website I found no
response on the serial port when I connected it to an oscillascope, then I
used the factory Image without the microSD and everything worked fine. A
while later the factory software has corrupted for no obvious reason. Now I
am trying to open the serial port on the microSD Image, but I found that I
have to perform some pin Muxing. Now if someone could please send me a
u-boot.bin with serial and I2C already pin muxed or tell me the steps for
the pin muxing operation in details I would be very thankful.
You can use devmem2 if you have that on your system.
There are some instructions on how to use it for pin muxing here
I got this output from a running system where I know UART1 is working
because I'm using it.
I'm assuming I2C3 is mux'd correctly as well, but I did not check.
root@...:~# echo 148 > /dev/mux
0x4800217c GPIO_148 (0x0000) : IDIS | PTD | DIS | M0
root@...:~# echo 151 > /dev/mux
0x48002182 GPIO_151 (0x0100) : IEN | PTD | DIS | M0
root@...:~# echo 184 > /dev/mux
0x480021c2 GPIO_184 (0x0100) : IEN | PTD | DIS | M0
root@...:~# echo 185 > /dev/mux
0x480021c4 GPIO_185 (0x0100) : IEN | PTD | DIS | M0
So given the above, this is how I would manually mux the UART1 and I2C3 pins
devmem2 -h 0x4800217c 0x0000
devmem2 -h 0x48002182 0x0100
devmem2 -h 0x480021c2 0x0100
devmem2 -h 0x480021c4 0x0100
I didn't run that.
You should check the TRM Table 7.4 and verify the numbers yourself.
View this message in context: http://gumstix.8.n6.nabble.com/Open-serial-port-and-I2C-in-gumstix-tp4964548p4964624.html
Sent from the Gumstix mailing list archive at Nabble.com.
Get latest updates about Open Source Projects, Conferences and News.