Programmer is not responding


#1

Hi. I’m trying to get the Mezzanine board going with the original HiKey board (not HiKey960). Following Sensor_Mezzanine_Getting_Started and the Blink example I get these:
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding

According to some post I read in another forum, this is due to the fact that (early?) Mezzanine boards were shipped without a working firmware, and the only available solution involves me buying a USBTinyISP programmer and re-program the board offline. I think it would be nice to confirm this issue here in the Mezzanine forum and clarify the steps needed. There is no other solution?


#2

Hello @mansson,

Yes. Some of the boards comes without the Arduino bootloader pre flashed. So, you need to flash bootloader onto the ATMega328 controller inorder to use it with Arduino IDE.

More instructions here: https://learn.sparkfun.com/tutorials/installing-an-arduino-bootloader

Hope this helps!

-Mani


#3

Thanks. Well, it turns out that you can also use any old Arduino ( I had a nano laying around) instead of buying a programmer. It’s already prepared in the Arduino IDE, all you have to do is wire it up correctly and use “Arduino as ISP” as programmer. Did it work? No, but after I had removed R5 (not R4 as it says in the heading) according to recommendations by Jean-Marc Jobin in his blog post after the OpenHours episode about the sensor board, I was able to reflash the bootloader. Yay! Did it help? No. So maybe that wasn’t the problem. After much work I still can’t upload to the board when it’s mounted on the HiKey. The first obstacle is that /dev/TTYAMA2 needs write permission. But so far avrdude is not able to arouse anything in the other end of that port. Commands like “avrdude -q -V -D -v -v -v -F -p atmega328p -C /usr/share/arduino/hardware/tools/avr/…/avrdude.conf -c arduino -b 115200 -P /dev/ttyAMA2 -U flash:w:build-uno/humid_temp.hex:i” which is similar to what “make upload” issues, will only result in "avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00"
I’m thinking there is a timeout window when the protocol window is open after a reset? I’m running out of ideas.


#4

TBH even I can’t make my sensor mezzanine boards to work after flashing the bootloader. I have 3 boards and all reported the same issue.

But I heard that some people were able to get it work after flashing bootloader using external programmer like USBTinyISP, etc… That’s why I suggested you to try that.

I spent lot of time trying out different methods but nothing worked. My USBTiny programmer successfully programmed bootloader to the sensor mezzanine but it was not working when trying to program using CE board. So I’m suspecting an issue with the board itself.

Maybe @danielt can provide more info here.


#5

The serial protocol used between baseboard and sensor board (like all Arduino clones) relies on flow control signals being under software control (it is used to assert/deassert the reset line to the AVR). If the baseboard doesn’t have the flow control pins on LS-UART0 working correctly then the board cannot be programmed easily because the programmer cannot place it into programming mode.

I’m afraid I’ve never connected a sensors board to hikey so I’ve no idea if the flow control pins work on this board. However you should be able to test this with the following commands and observing pin 5 of P6 with a multimeter.

$ stty -F /dev/tty96B0 -hupcl # Release ATMEGA from reset
$ stty -F /dev/tty96B0 hupcl # Place ATMEGA into reset


#6

Anyone got it working? I’m facing the same problem with Dragonboard820c.


#7

please find the instructions in our documentation repo: https://github.com/96boards/Sensor_Mezzanine_Getting_Started/blob/master/README.md#using-atmega-io