View unanswered posts | View active topics It is currently 23 Feb 2018, 08:47

Reply to topic  [ 1 post ] 
 GPIO and USB stability issues 
Author Message

Joined: 11 Sep 2016, 00:24
Posts: 1

It all started so simple... I'm currently designing a PCB around the carambola2, where I'd like to connect an atmega2560 via UART. I also want to be able to update its flash using avrdude on the carambola. This means I need to be able to reset the atmega, which I hoped would work automatically when I connect GPIO11 or GPIO12 to the atmega's reset (I had found a datasheet where GPIO11/12 of the carambola were named RTS/CTS, respectively). However, after lots of trying with avrdude, stty and screen on /dev/ttyATH0, I never registered a level change on either of those two pins.

So I thougth I'd just use a GPIO pin on the carambola2 to reset the arduino manually. But have problems getting the GPIO pins to work. I read that GPIO 18-23 are trouble free, so I tried

root@carambola2:~# echo 20 > /sys/class/gpio/export
root@carambola2:~# echo out > /sys/class/gpio/gpio20/direction
root@carambola2:~# echo 1 > /sys/class/gpio/gpio20/value
root@carambola2:~# echo 0 > /sys/class/gpio/gpio20/value

...but my scope on J12 pin 12 (with GND on J12 pin 20) doesn't show a change of voltage. Same for 18,19,21,22,23. This is a pristine board, I haven't changed any configuration other than "opkg install"ing some packages. However, echo'ing to the leds-gpio max_brightness works fine for eth0, eth1 and wlan.

So then I thought I'll just connect a single-port FTDI to carambola's USB port and be done with it, and also avoid the kernel-logs causing trouble on my atmega (or the atmega interrupting the bootloader). Then, I read the 13page-long-thread about how the SOCs USB is very unstable in these scenarios, and I'm not sure if that's still the case. I don't plan on using wifi, so I think I can just rfkill it in rc.local...

So here's my questions:

- can I assign a GPIO pin to be the RTS, CTS or DTR for /dev/ttyATH0? If so, how?
- why doesn't /sys/class/gpio/gpio[18-23]/ work?
- can I get a stable FTDI on the USB port without having to ad another USB hub chip in between?

and more general, given all those problems:

- how would you connect carambola2 and atmega for binary communication at about 57600 baud with the ability to update the atmel from the carambola?

Thanks for your time!

11 Sep 2016, 01:53
Display posts from previous:  Sort by  
Reply to topic   [ 1 post ] 

Who is online

Users browsing this forum: No registered users

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.