Author Topic: Unable to flash moteino  (Read 1223 times)

tleavitt

  • NewMember
  • *
  • Posts: 27
Unable to flash moteino
« on: May 25, 2020, 11:19:10 PM »
So I ran into a rather curious issue today trying to update the code on a couple moteinos I have. Of the 6 I needed to update, I had two I was unable to flash code to, but they run the existing code in memory just fine. When attempting to flash, I get an out of sync error with the resp usually being some random hex code. But all 10 attempts have the same hex code. Does anyone have any ideas on what has happened to my motes and if there is any way to flash new code to them, or are they basically bricked with the current code?

Also, I have two more motes that Im not sure if theyre dead or not. Attempting to flash them gets the out of sync error as well with a non zero response, but I have no idea what code is on them at this point. Is there an easy way to tell if a chip is just outright dead?

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6867
  • Country: us
    • LowPowerLab
Re: Unable to flash moteino
« Reply #1 on: May 26, 2020, 10:38:09 AM »
Moteinos don't normally just decide to refuse accepting an upload.
How exactly do you "flash code" to them?

tleavitt

  • NewMember
  • *
  • Posts: 27
Re: Unable to flash moteino
« Reply #2 on: May 26, 2020, 11:22:51 PM »
Moteinos don't normally just decide to refuse accepting an upload.
How exactly do you "flash code" to them?

I use your FTDI header and Arduino IDE 1.8.12.
The moteinos reset when the upload attempts to start but the chip and FTDI adapter never get in sync. Is it possible something happened to the boot loader?

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6867
  • Country: us
    • LowPowerLab
Re: Unable to flash moteino
« Reply #3 on: May 27, 2020, 09:16:51 AM »
I use your FTDI header and Arduino IDE 1.8.12.

And what do you use with the FTDI header? Please explain the entire procedure, is what I was asking.
Does that same procedure work with another Moteino?

Is it possible something happened to the boot loader?

If you get a ISP programmer, read the flash memory and then you will know for sure, if and what happened.
Otherwise its a guessing game.

tleavitt

  • NewMember
  • *
  • Posts: 27
Re: Unable to flash moteino
« Reply #4 on: May 27, 2020, 12:40:36 PM »
And what do you use with the FTDI header? Please explain the entire procedure, is what I was asking.
Does that same procedure work with another Moteino?

If you get a ISP programmer, read the flash memory and then you will know for sure, if and what happened.
Otherwise its a guessing game.

So my normal procedure is to plug the FTDI chip into my laptop and then I select the port in the arduino IDE. Then I plug the FTDI adapter onto the header on the moteino, then upload the code and check it with the serial monitor. This process works on every moteino I have but 2.
I will have to try the ISP checking. I don’t have a dedicated ISP chip, but I believe I can use the arduino as ISP with the moteinos, correct?

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6867
  • Country: us
    • LowPowerLab
Re: Unable to flash moteino
« Reply #5 on: May 27, 2020, 01:50:56 PM »
What FTDI Adapter are you using? The LPL one or some 3rd party one?
You can use Arduino as ISP but I would not put myself through that torture. A proper ISP programmer is a good companion when you work with AVRs a lot.

tleavitt

  • NewMember
  • *
  • Posts: 27
Re: Unable to flash moteino
« Reply #6 on: May 27, 2020, 03:25:04 PM »
What FTDI Adapter are you using? The LPL one or some 3rd party one?
You can use Arduino as ISP but I would not put myself through that torture. A proper ISP programmer is a good companion when you work with AVRs a lot.

Im using the LPL FTDI adapter.
Ill have to look into ordering a proper ISP. Im getting more and more moteinos and arduinos as my projects expand so I probably should invest in one for next time something funky happens with them.

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6867
  • Country: us
    • LowPowerLab
Re: Unable to flash moteino
« Reply #7 on: May 27, 2020, 09:04:40 PM »
If you power those 2 in question, and reset them (short RST to GND for a second), does the LED blink at all?

tleavitt

  • NewMember
  • *
  • Posts: 27
Re: Unable to flash moteino
« Reply #8 on: May 27, 2020, 10:24:52 PM »
If you power those 2 in question, and reset them (short RST to GND for a second), does the LED blink at all?

Yeah, the LED flashes.

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6867
  • Country: us
    • LowPowerLab
Re: Unable to flash moteino
« Reply #9 on: May 28, 2020, 12:46:23 PM »
So, LEDs dont flash on their own, fortunately  ;)
That means there's a program on the AVR. Ie the bootloader (or something else).
If it's the bootloader that means there's some problem resetting that Moteino from the FTDI adapter just before starting the serial upload.

tleavitt

  • NewMember
  • *
  • Posts: 27
Re: Unable to flash moteino
« Reply #10 on: May 28, 2020, 01:40:19 PM »
So, LEDs dont flash on their own, fortunately  ;)
That means there's a program on the AVR. Ie the bootloader (or something else).
If it's the bootloader that means there's some problem resetting that Moteino from the FTDI adapter just before starting the serial upload.

I’ll look into ordering an ISP then and see what’s up with the boot loader. Maybe I corrupted something while experimenting with OTA programming