Flashing ATTINYs via jtag2updi -> power consumption high

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

Hey there,

 

I have a custom board with an ATTINY1616 that I flash by using an Arduino Nano with jtag2updi. Flashing works perfectly fine and the code is executed immediately after. But after flashing the chip needs 1.35mA more than it normally does, like something is leaking. If I perform a hard reset this additional current is gone and everything is ok. Anyone has an idea where this is coming from and how to prevent it? I need to flash the software while the chip is connected to a battery that I can't disconnect, so no hard reset possible.

 

Best, Timm

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

timmbo85 wrote:
Anyone has an idea where this is coming from and how to prevent it?
UPDI is likely enabled; next, sleep is incomplete.

UPDI has its clock domain separate from CPU's clock domain (CLK_MAIN)

 

UPDI Regular Disable | tinyAVR® 1-series

[last]

If the disable operation is not performed, the UPDI and the oscillator’s request will remain enabled. This causes increased power consumption for the application.

Sleep Mode Operation | tinyAVR® 1-series

Clocks | UPDI | tinyAVR® 1-series

 

edit :

https://github.com/ElTangas/jtag2updi/blob/master/source/JTAG2.cpp#L287

 

"Dare to be naïve." - Buckminster Fuller

Last Edited: Thu. Apr 29, 2021 - 02:52 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

gchapman wrote:

timmbo85 wrote:

Anyone has an idea where this is coming from and how to prevent it?

 

UPDI is likely enabled; next, sleep is incomplete.

UPDI has its clock domain separate from CPU's clock domain (CLK_MAIN)

 

UPDI Regular Disable | tinyAVR® 1-series

[last]

If the disable operation is not performed, the UPDI and the oscillator’s request will remain enabled. This causes increased power consumption for the application.

Sleep Mode Operation | tinyAVR® 1-series

Clocks | UPDI | tinyAVR® 1-series

 

Heya. Ah, thanks, very interesting! So that disable operation should come from jtag2updi running on the Nano? Or is there any chance to disable it by Software?

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

Didn't proceed after locating JTAG2::go (post #2)

 

"Dare to be naïve." - Buckminster Fuller

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

gchapman wrote:

Didn't proceed after locating JTAG2::go (post #2)

 

 

Ok, the solution was easy.. I used last year's version of jtag2updi without go() ;-) Thanks for your help.