Hi all,
I have some project using Arduino Mega 2560, LAN shield with SD Card (not use) and some sensors (BMP28 and DHT11). Application is a small web server showing data from installed sensors.
In first step i develop this app using Arduino Uno only. When my code grow up I move to Mega.
My working process is 1) make some changes in program 2)install it into Arduino 3) test it and back to one.
It was working fine with Uno. After moving to Mega the process was the same only for a couple of rounds. After it the uploading is like lottery. Sometimes is successful, sometimes not with some error. The workaround (not 100% working) is 1) to disconnect LAN, 2) reset Arduino 3)wait a moment 4) start uploading over USB 5) program is working.
But I got the error message "write error" sometimes too and I have to close Visual Studio, disconnect Arduino from power (USB), wait a moment, connect Arduino back (without LAN), start Visual Studio, upload program and its working.
Its not nice to use this process. Do you have some advice?
Thank you
Petr
Here is text from compiler:
Compiling 'Barometr' for 'ATmega2560 (Mega 2560) (Arduino Mega)'
Program size: 39 632 bytes (used 16% of a 253 952 byte maximum) (1,57 secs)
Minimum Memory Usage: 3679 bytes (45% of a 8192 byte maximum)
AVR Memory Usage
----------------
Device: atmega2560
Program: 39632 bytes (15.1% Full)
(.text + .data + .bootloader)
Data: 3679 bytes (44.9% Full)
(.data + .bss + .noinit)
text data bss dec hex
0 39632 0 39632 9ad0
Uploading 'Barometr' to 'ATmega2560 (Mega 2560) (Arduino Mega)' using 'COM4 '
Uploader started for board ATmega2560 (Mega 2560) (Arduino Mega)
Upload method will be: bootloader
Uploading via Bootloader
ino17\bin\avrdude rduino17/etc/avrdude.conf" -v -V -patmega2560 -cwiring "-PCOM4 " -b115200 -D rometr.ino.hex:i"
avrdude: Version 6.3-20190619
Copyright (c) 2000-2005 Brian Dean,
http://www.bdmicro.com/ Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is uino17/etc/avrdude.conf"
Using Port : COM4
Using Programmer : wiring
Overriding Baud Rate : 115200
AVR Part : ATmega2560
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PA0
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 65 10 8 0 no 4096 8 0 9000 9000 0x00 0x00
flash 65 10 256 0 yes 262144 256 1024 4500 4500 0x00 0x00
lfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
efuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
lock 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
Programmer Type : Wiring
Description : Wiring
Programmer Model: AVRISP
Hardware Version: 15
Firmware Version Master : 2.10
Vtarget : 0.0 V
SCK period : 0.1 us
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.01s
avrdude: Device signature = 0x1e9801 (probably m2560)
avrdude: safemode: lfuse reads as FF
avrdude: safemode: hfuse reads as D8
avrdude: safemode: efuse reads as FF
avrdude: reading input file .hex"
avrdude: writing flash (39632 bytes):
Writing | ################avrdude: ser_send(): write error: sorry no info avail
avrdude: stk500_send(): failed to send command to serial port
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout