4

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.

Electric_90
  • 2,112
  • 13
  • 25
dramsay
  • 51
  • 4
  • 4
    what is the specification for programming the chip? – jsotola Mar 27 '18 at 04:50
  • 1
    The 1.8V for the BOD is the *typical* value. It can actually be as high as the *maximum* value. – Ignacio Vazquez-Abrams Mar 27 '18 at 04:59
  • 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. – dramsay Mar 27 '18 at 05:15
  • @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. – jonk Mar 27 '18 at 05:26
  • @jonk Thank you both for the quick/thoughtful replies! What I tried to say (but perhaps didn't emphasize) in my original post was that *even* with the BOD set to off, I still can't program the atmega with the 1.8V supply. I merely thought it was useful information that perhaps the 1.8V rail wasn't sensed properly by the MCU, but thanks to Ignacio I think I can rule that out. When I saw I could power the chip with the BOD fuse off I immediately tried flashing the program with no luck. – dramsay Mar 27 '18 at 07:21
  • 1
    @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. – jonk Mar 27 '18 at 07:38
  • I seem to recall on an ATTINY406 datasheet, that it called out a specific voltage required for programming, separate from the BOD threshold. Is there any specific programming thresholds in this part's datasheet? – gregb212 Nov 10 '19 at 18:23

1 Answers1

1

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!

dramsay
  • 51
  • 4