having trouble programming [solved]

Started by sgoudelis, April 21, 2017, 10:49:32 AM

sgoudelis

Hello,

I just received my moteino mega a couple of days ago. I have being having issues flashing it. Every time I attempt to program it I get one of the following errors:

avrdude: stk500_paged_load(): (a) protocol error, expect=0x10, resp=0x00
avrdude: stk500_cmd(): programmer is out of sync
avr_read(): error reading address 0x0000
    read operation not supported for memory "flash"
avrdude: failed to read all of flash memory, rc=-2
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x00
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x00


...
avrdude: stk500_cmd(): programmer is out of sync
avrdude: stk500_cmd(): programmer is out of sync
avrdude: stk500_cmd(): programmer is out of sync
avrdude: stk500_cmd(): programmer is out of sync
avrdude: stk500_cmd(): programmer is out of sync
avrdude: stk500_cmd(): programmer is out of sync
avrdude: stk500_cmd(): programmer is out of sync
avrdude: stk500_cmd(): programmer is out of sync
...



avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
An error occurred while uploading the sketch


I am using Arduino IDE 1.6.11 with the correct board selected and I am using this FTDI cable http://www.ebay.com/itm/1PCS-6pin-FTDI-FT232RL-USB-to-Serial-adapter-module-TTL-RS232-Arduino-cables-N-/181846983236?hash=item2a56ecc244:g:cxMAAOSwa39Ux4zU

Thats not the best cable I know but the power requirements are met.


Occasionally it actually flashes. Once every 30 attempts or so. I had issues with this since the very first attempt of programming it.

Any idea what is happening? I am also waiting for a second moteino to be delivered to me. When it comes I can test whether it is an issue with the moteino itself or not.

Felix

Definitely looks like serial adapter issues.
While many other 3rd party will also work fine, I would recommend the FTDI-Adapter from the shop which was designed specifically for Moteinos and has a genuine FTDI chip.

sgoudelis

#2

Felix

I don't know, I have not tried it.

sgoudelis

Is there a recipe to flash it with another arduino ?

Felix

Many out there, some discussed in the forum, many links with details how it can be done you can also find on the web.
I always wonder why some folks prefer to do those kinds of things and spend their time and money when there is an easy way.

sgoudelis

For me it is because I want to get on with my project and not wait two weeks for the ftdi adapter to reach me. Will probably order one though.

Felix

As long as you find a 5V power and 3.3v signal FTDI adapter with same header pins and DTR for reset, you should be OK.
Another option is to use DHL at checkout (~$30) - yes i know it's more than double the cost of the FTDI.
Another is to get everything in the beginning knowing that it might cost a lot more (time too) later ;)

sgoudelis

An update regarding this. After I received a new USB-Serial adapter with a genuine FTDI chip the above issues reduced greatly but not completely. What actually made the issues go away completely was that fact that I made sure all other components of my project got their power supply from another source and not the moteino mega itself. After that there were no issues programming it.

Felix

Thanks for the update, makes complete sense, I hope others see the value in using genuine components!
And you made another important find, that the Moteino LDO can only deliver a limited amount of current (@3.3v) and is not generally meant to power the whole project, especially when the transceiver is used at max output power.