atprogram.exe: read voltage and reset commands

Go To Last Post
4 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi guys,

I need program MCU via command line interface. Atprogram is very friendly but I cannot find reply for two questions:

1. How can I read MCU's target voltage?

2. Is it possible to directly set MCU's reset pin to low via my programmer? Firmware for sleeping device and I am not sure that MCU still awake until verify flash/eeprom command will be filed. Could this be a problem?

Many thanks!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I came across this post looking for answers to the same questions. I'm not sure about reset but I found how to read target voltage:

 

With no target connected:

> .\atprogram.exe parameters --voltage
Firmware check OK
0.25 V

With power at VTG:

> .\atprogram.exe parameters --voltage
Firmware check OK
5.09 V

 

EDIT: Parameters is apparently a new option to atprogram.exe. The above works with Version 0.6.1.1042 which is included in Atmel Studio 7.

Pushing AVRs to their limits

Last Edited: Fri. Apr 21, 2017 - 12:51 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

if you just type

> atprogram

it gives you a whole load of help information.

 

mine doesn't mention 'parameters'

 

>atprogram --version
Atmel Studio Command Line Interface
Copyright (C) 2013 Atmel Corporation.

Version 0.6.1.944

What version is yours?

 

But it does have 'info'

>atprogram help info
Usage:
    atprogram [options] info <arguments>

Information:
    Display information about a device.

Options:
    Execute atprogram without arguments to list available options.

Arguments:
  --voltage                 Display the target voltage only.

Examples:
  atprogram -t avrone -i jtag -d atmega2560 info
    Display the information about the connected device.

 

There is also a --externalreset option:

>atprogram --help
:
:

  -xr --externalreset        Apply external reset when starting a session.
:
:

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

`info --voltage`works on the newer tool as well but requires that you specify some `--interface` and `--device`. 

> .\atprogram.exe --interface TPI --device attiny5 info --voltage
Firmware check OK
5.06 V

I've been playing with `--externalreset` a bit as well. I'm not exactly sure what the OP was referring to with regards to firmware for sleeping/waking before verification, but my guess is that they want to programmatically hold the reset line low.

 

Some commands/actions, with the `--externalreset`, do briefly pull the reset line low. I have not found a way to hold it low for an extended period of time.

Pushing AVRs to their limits