[SOLVED] Error in uploading sketch on emonTx V. 3.2.1

Hi guys!

I'm not able to upload my sketch on my emonTx v.3.2.1. I have modified the emonTx V3 Discrete Sampling V1.3.1 adding the nodeId on serial port because I'm using it directly connected to raspberry. When I try to upload the sketch I have this problem: 

avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x01
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x01
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x01
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x01
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x01
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x01
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x01
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x01
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x01
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x01

avrdude done.  Thank you.

I'm using this USB to UART chip: http://prolificusa.com/portfolio/pl2303hx-rev-d-usb-to-serial-bridge-controller/ 

Can anyone help me??

Thanks!!

 

SinyaWeo's picture

Re: [SOLVED] Error in uploading sketch on emonTx V. 3.2.1

Switched RX and TX was my problem in this situation.

glyn.hudson's picture

Re: [SOLVED] Error in uploading sketch on emonTx V. 3.2.1

Check your programming cable is 5V. It it's 3.3V you will need to provide the emonTx with 5V USB power at the same time as programming. Also check pinout of your cable matches: 

http://shop.openenergymonitor.com/programmer-usb-to-serial-uart/

Also ensure you have selected board type to be Arduino Uno in Arduino IDE

hercules71035's picture

Re: [SOLVED] Error in uploading sketch on emonTx V. 3.2.1

Thanks guys! 

The problem was that I must have the reset button pressed when upload the firmware, but I don't knew this! :)

Now I have to test it with emoncms via serial.

Thanks

dBC's picture

Re: [SOLVED] Error in uploading sketch on emonTx V. 3.2.1

The problem was that I must have the reset button pressed when upload the firmware, but I don't knew this! :)

It's good that you discovered that old trusty work-around.  In theory you shouldn't have to do that.  There'll be a pin on your emonTx FTDI header variously referred to as DTR or RTS.   A pulse on that pin will have the same affect as pressing the RESET button.  The Arduino IDE will attempt to pulse that pin before it starts a download.  So if you want the convenience of not having to reach over and hit a well-timed RESET each time you want to reflash, you might want to investigate why that path isn't working.

 

hercules71035's picture

Re: [SOLVED] Error in uploading sketch on emonTx V. 3.2.1

Hi,

How can I connect the RTS pin? My USB-to-UART chip has only 5 pins: GND, TX, RX, 5V, 3.3V.

dBC's picture

Re: [SOLVED] Error in uploading sketch on emonTx V. 3.2.1

The chip you referenced above seems to have a full set of modem control signals:

http://prolificusa.com/files/SCH_PL2303HXD-QFN32_v1.0.pdf

but if it doesn't, then I guess you can't.

pksmith's picture

Re: [SOLVED] Error in uploading sketch on emonTx V. 3.2.1

I am getting a similar error uploading my sketch to emonTX v3, updated calibration factors to emonTxV3_4_RFM12B_DiscreteSampling, using the shop programer: 

Arduino: 1.6.1 (Windows 7), Board: "Arduino Uno"

Sketch uses 15,950 bytes (49%) of program storage space. Maximum is 32,256 bytes.

Global variables use 1,516 bytes (74%) of dynamic memory, leaving 532 bytes for local variables. Maximum is 2,048 bytes.

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x42

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x42

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x42

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x42

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x42

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x42

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x42

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x42

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x42

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x42

Problem uploading to board.  See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.

 

Any ideas?

pb66's picture

Re: [SOLVED] Error in uploading sketch on emonTx V. 3.2.1

Firstly I would hold off trying to upload a new sketch until you have successful communication via the programmer.

If you are uploading to the v3.x in this post http://openenergymonitor.org/emon/node/10166#comment-28591 it is a v3.2 not a v3.4 so the firmware isn't correct but that would normally just stop it working once loaded not stop it loading so you may have more than 1 issue here.

When did you update your IDE? 1.6 had some bugfixes a couple of days ago.

Does the existing sketch output anything to serial? just to test the programmer, lead, drivers etc.can you get any response in the serial console within the IDE ?

Is the programmer orientated correctly? (it's very easy to get it upside down) what are the leds doing?

Paul

pksmith's picture

Re: [SOLVED] Error in uploading sketch on emonTx V. 3.2.1

Paul,

I goofed. I had the programmer installed upside down. I was paying more attention to the orientation of the programmer (led up seemed like the logical way to insert it). The sketch uploaded correctly now.

Thanks for your help!

hercules71035's picture

Re: [SOLVED] Error in uploading sketch on emonTx V. 3.2.1

Hi,

if your programmer doesn't have the RTS pin [ programmer from shop has RTS pin ] you have to press RESET (on board) just before that the upload starts. More precisely, immediately after this: Global variables use 1,516 bytes (74%) of dynamic memory, leaving 532 bytes for local variables. Maximum is 2,048 bytes.

Robert Wall's picture

Re: [SOLVED] Error in uploading sketch on emonTx V. 3.2.1

"if your programmer doesn't have the RTS pin..."

The programmer from the shop DOES have RTS, so this comment does not apply here.

hercules71035's picture

Re: [SOLVED] Error in uploading sketch on emonTx V. 3.2.1

So, it's possible use only stuff from the shop?!? Mah...

pb66's picture

Re: [SOLVED] Error in uploading sketch on emonTx V. 3.2.1

Not at all and that is not what Robert was implying!

This is pksmiths opening statement

"I am getting a similar error uploading my sketch to emonTX v3, updated calibration factors to emonTxV3_4_RFM12B_DiscreteSampling, using the shop programer: "

Since we all now know he is using a "shop programmer" which we also know does have the required RTS, the comment 

"if your programmer doesn't have the RTS pin..."

as Robert points out to prevent distraction 

"does not apply here"

Many people use other programmers and it may be relevant to them, but not in this case !

Paul

hercules71035's picture

Re: [SOLVED] Error in uploading sketch on emonTx V. 3.2.1

Sure Paul,

you are right!! I edit my post!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.