Pages: 1 2 [3]   Go Down
Author Topic: Mega - serial1, 2 und 3 - initialization fails  (Read 7551 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 27
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I did some more tests.

I connect the serial3 from my mega to a serial cable back to my computer and check what was send out through serial3.
the data send was correct, arduino mega serial does work.
BUT still I am only able to successfully communicate with my motor controller, if i use software serial (and newsoftware serial).

does anyone know what the difference between all those serial options are?

thx,
stephan.
« Last Edit: April 28, 2010, 01:32:21 pm by stephanschulz » Logged

Forum Administrator
Cambridge, MA
Offline Offline
Faraday Member
*****
Karma: 11
Posts: 3538
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Anyone know if there are changes I can make to the HardwareSerial source code to get all the Serial objects working with the avr-gcc 4.4.x compilers?
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 10
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I didn't read the entire thread. However, FWIW, using an Arduino Mega with Serial for serial communication and Serial3 for a Parallax RFID reader works just fine.
Logged

Canby, OR
Offline Offline
Full Member
***
Karma: 1
Posts: 158
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I have a Fedora 13 system and it came with avc-gcc-4.5.0 and avc-gcc-g++-4.5.0 which for whatever reason break all serial output on the Mega (but not on the Duememilnove). I removed those versions and installed the versions from Fedora 10 and now I can get serial output on my Mega.

This is what is current and working on my Fedora 13 x86_64 system.

avr-libc-1.6.7-2.fc13.noarch
avr-binutils-2.20-2.fc13.x86_64
avr-gcc-c++-4.3.3-2.fc11.x86_64
avrdude-5.10-2.fc13.x86_64
avr-gcc-4.3.3-2.fc11.x86_64

For the record commenting the serial port lines out of Hardware.cpp did not work for me. I had to revert avr-gcc
Logged

Canby, OR
Offline Offline
Full Member
***
Karma: 1
Posts: 158
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Does any know if this has been filed as a bug? It's seems like a pretty obvious regression if we can pinpoint it. I opened a bug here:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44617

I'm a little over my head in providing them the debugging info they need. Hoping to get this fix for the next release.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 2
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Posting one normal message so i can post links.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 2
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Had a similar problem with Sanguino (http://code.google.com/p/sanguino/issues/detail?id=11). When calling Serial.begin it would hang, replacing SIGNAL with ISR corrected the behaviour.

I don't know if this resolves the problem for the Arduino Mega as i don't have one. Code is untested but compiles.
Patch: http://dpaste.com/hold/211172/

According to the docs (http://www.nongnu.org/avr-libc/user-manual/group__avr__interrupts.html) the incorrect interrupts we're being used for 1280 before. I changed those to the correct but don't know if it works. I also replaced all other SIGNAL's with ISR.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 30
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

same problem here:
arduino programming interface version 18

kernel compiler and libraries info
Code:
uname -a
Linux TOOLBOX 2.6.35-rc3 #6 SMP Thu Jun 17 23:16:48 CEST 2010 x86_64 Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz GenuineIntel GNU/Linux



avr-gcc --version
avr-gcc (Gentoo 4.4.3-r2 p1.2) 4.4.3
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

gcc --version
gcc (Gentoo 4.4.3-r2 p1.2) 4.4.3
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


/usr/lib64/rxtx-2/librxtxRS485-2.2pre1.so
/usr/lib64/rxtx-2/librxtxRS485.so
/usr/lib64/rxtx-2/librxtxSerial-2.2pre1.so
/usr/lib64/rxtx-2/librxtxI2C.so
/usr/lib64/rxtx-2/librxtxSerial.so
/usr/lib64/rxtx-2/librxtxParallel.so
/usr/lib64/rxtx-2/librxtxParallel-2.2pre1.so
/usr/lib64/rxtx-2/librxtxRaw.so
/usr/lib64/rxtx-2/librxtxI2C-2.2pre1.so
/usr/lib64/rxtx-2/librxtxRaw-2.2pre1.so

java -version
java version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
Java HotSpot(TM) 64-Bit Server VM (build 16.3-b01, mixed mode)
emerge --info
Code:
Portage 2.1.8.3 (default/linux/amd64/10.0, gcc-4.4.3, glibc-2.11.1-r0, 2.6.35-rc3 x86_64)
=================================================================
System uname: Linux-2.6.35-rc3-x86_64-Intel-R-_Core-TM-_i7_CPU_920_@_2.67GHz-with-gentoo-2.0.1
Timestamp of tree: Thu, 24 Jun 2010 16:45:01 +0000
app-shells/bash:     4.0_p37
dev-java/java-config: 2.1.11
dev-lang/python:     2.6.5-r2, 3.1.2-r3
dev-util/cmake:      2.8.1-r2
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     9999
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.65
sys-devel/automake:  1.8.5-r4, 1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.51.0.9
sys-devel/gcc:       4.4.3-r2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.8-r1
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://mirror.gentoo.no/"
LDFLAGS="-Wl,-O1"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.ie.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X Xaw3d a52 aac aalib acl acpi addns ads aio akonadi alisp alsa amd64 amr archive autoipd avahi bash-completion beagle berkdb bidi big-tables bl blender-game bluetooth bonjour bookmarks bs2b bzip2 c3p0 cairo caps cdda cdparanoia cli cluster consolekit contrast cracklib crypt cscope cups cupsd curl cxx daap dbus derby device-mapper dga dhcp dhcpcd dirac directfb disk-partition diskio djvu dri dvb dvd dxr3 eap-sim eds elf emacs examples exchange exif expat extensible extraengine faac faad fasteap fax fbcon ffmpeg fftw fits flac fontforge foomaticdb fortran fpx ftp fuse gcj gconf gdal gdbm gdu ggi gif gimp gnome gnome-keyring google-gadgets gpc gphoto2 gpm gps graphite graphviz gs gsm gstreamer gtk gunit gzip-el hal hardware-carrier hdri hesiod hotpixels hpijs iconv ieee1394 imagemagick imlib inotify ipod ipv6 irda java javascript jbig jce joystick jpeg jpeg2k kde kdrive kismet ladspa lame lastfm latex lcms ldap ldb lensfun libcaca libgda libnl libnotify lirc lm_sensors log4j lqr lua lzo m17n-lib mad madwifi mapnik md5sum mfd-rewrites mmap mmx mmxext mng modules motif mp3 mp3tunes mpeg mtp mudflap multilib multimedia mysql mythtv nas nautilus ncurses network networkmanager nis nls nptl nptlonly nsplugin nut objc objc++ objc-gc odbc odbcmanual odk ogg okular openal openexr opengl openmp pam parport pbxt pch pcre pda pdf perl phonon php plotutils png pnm policykit ppds pppd pulseaudio pvr python q32 q8 qimageblitz qscintilla qt3support qt4 quota qwt radio raster raw readline reflection rle rpm ruby samba scanner schroedinger scripts sdk sdl secure-delete session slang slp smbsharemodes smp smux snmp soap sound soup speech speex spl sql sqlite sse sse2 ssl ssse3 startup-notification static-ppds svg swat swig sysfs syslog system-sqlite taglib tcl tcpd tdbtest teletext templates tga theora thumbnail tiff timezone tk toolkit-scroll-bars tools trace tracker transmitter truetype tslib udev-acl unicode usb util v4l v4l2 vcd vdpau verse vim-pager vim-syntax vorbis wavpack webkit wicd wifi winbind wmf wps wxwidgets x264 xanim xemacs xft xinerama xml xmp xorg xtradb xv xvid xvmc zlib zoran" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CAMERAS="adc65 agfa_cl20 aox barbie canon casio_qv clicksmart310 digigr8 digita dimagev dimera3500 directory enigma13 fuji gsmart300 hp215 iclick jamcam jd11 jl2005a kodak_dc120 kodak_dc210 kodak_dc240 kodak_dc3200 kodak_ez200 konica konica_qm150 largan lg_gsm mars mustek panasonic_coolshot panasonic_dc1000 panasonic_dc1580 panasonic_l859 pccam300 pccam600 polaroid_pdc320 polaroid_pdc640 polaroid_pdc700 ptp2 ricoh ricoh_g3 samsung sierra sipix_blink sipix_blink2 sipix_web2 smal sonix sony_dscf1 sony_dscf55 soundvision spca50x sq905 stv0674 stv0680 sx330z topfield toshiba_pdrm11" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse acecad aiptek joystick penmount synaptics tslib void wacom" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIRC_DEVICES="all" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
« Last Edit: June 25, 2010, 09:05:01 am by xevilstar » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 30
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

bump ?
Logged

Wuppertal/Germany
Offline Offline
God Member
*****
Karma: 1
Posts: 895
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
bump ?
The solution has been mentioned several times already :
downgrade to a avr-gcc 4.3.x version and it works.

Eberhard
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 30
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

isn't there a patch to make everything work with the latest avr-gcc ?
Logged

SF Bay Area (USA)
Offline Offline
Tesla Member
***
Karma: 124
Posts: 6654
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Problem found, I think.
http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&p=736620
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 4
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yep, downgraded to avr-gcc-4.3.3 and it worked.



Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 4
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

j/k  what kind of a giant a55h0le would I be if thats all i posted.

google and download avr-gcc-c++-4.3.3-1.fc10 rpm and avr-gcc-4.3.3-1.fc10 rpm into /home/your-user-name

in a terminal type

su
your-root-password

rpm -i --oldpackage --replacefiles /home/your-user-name/rpm-file-you-downloaded

rpm -i --oldpackage --replacefiles /home/your-user-name/other-rpm-file-you-downloaded

If there's a faster way you should post it.  If there isn't... :'(
« Last Edit: October 11, 2010, 12:31:54 am by john8888 » Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 92
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

I am running a seeduino MEGA with only one serial (under windows).  My code is running at 4800bps because of the device I am communicating with.  If I use 017, everything works A1.  If I switch to 021, it look like the RX queue is corrupted and the code does not work properly. I noticed that both windows version 017 and 021 are using avr-gcc 4.3.2.  I read that the solution is to go to 4.3.x but I guess it wont help in my case.

Anyone had that problem or may have a clue?

thanx

Mart
« Last Edit: October 18, 2010, 08:38:23 am by Mart » Logged

Pages: 1 2 [3]   Go Up
Jump to: