2
\$\begingroup\$

I'm perplexed by this one:

I'm trying to run my ATMega328P at 1.8V. The voltage at the chip (pin 4 and 21) sits at 1.82V (BK Precision Multimeter). When using the AVRISP mkII, the programmer LED lights up green (recognizing a powered chip) but fails to program.

Using an bench power supply, I discovered that at exactly 2V, the ability to program the chip returns. This is true regardless of the BOD/Extended Fuse setting (which I have set off with 0xFF).

I did notice the 1.8V BOD setting (0xFE for the extended fuse) keeps the MCU from powering on even after flashing. With it off, the chip will run using the 1.8V rail. I thought this might be useful debugging information, but Ignacio in the comments pointed out that this is expected behavior given the specced range of BOD threshold.

  • Did I miss something obvious?
  • Is 1.8V programming not actually supported at 1MHz on the ATMega328P?
  • Do I need to design a 2V power supply instead if I want to be able to flash?
  • Does the BOD circuit has some protective effect during programming, even when disabled? Could it be the programmer?

Thanks for any suggestions/debugging ideas!

Edited: Ignacio pointed out that the BOD cutoff for the 1.8V setting could vary up to 2V, so the BOD is behaving as expected. I thought perhaps the 'misfiring' of the BOD was a useful clue for why it mightn't be programming, but that no longer seems to be the case. The above was edited for clarity.

\$\endgroup\$
  • 4
    \$\begingroup\$ what is the specification for programming the chip? \$\endgroup\$ – jsotola Mar 27 '18 at 4:50
  • 1
    \$\begingroup\$ The 1.8V for the BOD is the typical value. It can actually be as high as the maximum value. \$\endgroup\$ – Ignacio Vazquez-Abrams Mar 27 '18 at 4:59
  • \$\begingroup\$ Ah, fair enough-- the BOD isn't the part that I'm concerned about though, I thought maybe it just helped diagnose the chip not recognizing 1.8V as 1.8V. The datasheet seems to suggest it should be able to be put into programming mode with a true 1.8V power supply, but maybe there is a tolerance I'm missing on that one as well. \$\endgroup\$ – dramsay Mar 27 '18 at 5:15
  • \$\begingroup\$ @dramsay If I understood your question, I think Ignacio nailed the issue. If you are using serial programming, the Vcc can indeed be as low as 1.8 V. I don't see a specific spec for it, except the diagram "reads" that way to me. However, you have no control over the BOD if you activate it. The spec says it can trigger anywhere from 1.7 V to 2.0 V when programmed as 110. This isn't a conflict. It only says that this particular BOD setting doesn't have a reliable use if your Vcc is below about 2.2 V. Use a higher Vcc if you want the BOD to do something for you. Or use 1.8 V and turn off the BOD. \$\endgroup\$ – jonk Mar 27 '18 at 5:26
  • 1
    \$\begingroup\$ @dramsay The chip appears to have a bootloader, a serial programming mode, and a parallel programming mode. I assumed you were talking about the serial mode because the parallel mode requires a large voltage and the bootloader looks like it is software-invoked. The diagram does appear to show 1.8 V, for serial programming. But I didn't see a specification, either. So if I were doing this professionally and seriously couldn't find it, this would mean I'd call the FAE and just ask. You are probably out of spec, if you are using proper tools and all. \$\endgroup\$ – jonk Mar 27 '18 at 7:38
0
\$\begingroup\$

I visited a friend who has the AVR ICE programmer, and it worked just fine with my board. My AVR ISP mkII might (?) be counterfeit or otherwise not properly buffered, though it works above 2V.

For anyone else that runs into this kind of issue (programming cutting out at 2V exactly) it's probably your programmer, and it's worth buying the Atmel ICE through a reputable source.

Thanks to @jonk and @Ignacio for the help!

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.