Trying to program ATtiny1616 with Atmel Power Debugger and UPDI

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

Hi,

 

I'm trying to bring up a board with ATtiny1616 using Atmel Power Debugger.

 

I'm doing thins on Mac with MPLAB X 5.20

 

The programmer appears to work i.e. MPLAB can talk to it but the actual programming fails with:

 

Currently loaded versions:
Application version...........1.57.153 (0x01.0x39.0x99)
Target voltage detected

Configuration memory will not be programmed because no configuration bits settings have been defined in your code. 
To program configuration memory, either define the settings in your code or use the Program Configuration Bits button on the configuration memory window.

Erasing...
PDI physical timed out. (25)
Programming did not complete.

 

According to what I've read forums a factory fresh ATtiny should not need +12V to enable UPDI, but cannot find this in the datasheet, can anyone confirm that?

 

Anticipating the problem that the chip has the RESET pin configured for non-UPDI we bought the Atmel Power Debugger that is supposed to be able to output the required +12V pulse.

 

Looking at the signal with the oscilloscope we see the normal UPDI sequence as per datasheet but no +12V.

 

And I can find no info or command on how to enable the +12V in the MPLAB X IDE or IPE.

 

Some post somewhere in the avrfreaks forums mentions Tools/Device... menu but there no such thing in MPLAB X.

 

Does anyone know how this is supposed to work, should it always output +12V pulse or should it be enabled or does it detect somehow when it is necessary and when not?

 

I posted essentially same question in Microchip forum and on that question there is a piece of schematics that show how the UPDI is wired in our system, in case some wants to have a look:

https://www.microchip.com/forums...

wbr Kusti

 

 

 

 

 

 

 


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

I think for 12V UPDI you have to use Atmel Studio...

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

MPLAB X 12V support is in the making.

 

Tiny's with UPDI fresh from fab will have the pin configured as UPDI. Then you don't need 12V.

 

The mode of the UPDI pin is controlled by the fuse SYSCFG0 -> RSTPINCFG[1:0]

If you configure the UPDI pin as GPIO or RESET, then you need to do the 12V activation to configure the pin back to UPDI mode to do programming and debugging. This activation will only be temporarily for that session, unless you configure the fuse SYSCFG0 -> RSTPINCFG[1:0] back to UPDI mode.

 

PowerDebugger will always try to activate normally first, and will only do the 12V activation if the first attempt fails AND you have set the PowerDebugger to use 12V activation.

 

At the moment the only configuration that properly supports UPDI 12V activation is Studio + PowerDebugger.

 

 

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

Thanks!

 

Good to know where we stand and knowing this motivated us to find the silly wiring mistake that prevented programming so now we can proceed.

 

However, we do need the UPDI/GPIO/RESET pin to function as GPIO in the final product so to develop the software the +12V activation is essential.

 

Moving the development to Atmel Studio really is not an option as I'm on macOS not to mention a new IDE and tool chain learning curve.

 

So any idea when this feature would be available for MPLAB X ?

 

Seems like this should be pretty high in priority and easy to implement.

 

I would expect most people who want to use these tiny pin count constrained devices is bound to entertain the idea of using the UPDI/GPIO/RESET as GPIO and to develop the code without the +12V activation seems like totally impractical.

 

Is it feasible to 'manually' inject the +12V pulse into the UPDI line?  

 

Meaning if we create a circuitry that does this at the press of a button to enable the UPDI before we invoke target programming from the MPLAB X are there timing constraints?

 

I've looked at the UPDI communication from Power Debugger to the target and it looks to me like it tries twice to communicate with the target if it fails... would it be possible to (in hardware) to 'hook' into the first attempt and inject the 12V pulse in between the  first and second tries?

 

 

wbr Kusti

 

 

 

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

This comment gives a brief description of the 12V procedure. A key needs to be sent on the UPDI pin within 65ms after the 12V pulse, so activating UPDI by injecting a pulse like you suggests will be quite tricky.

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

je_ruud wrote:
MPLAB X 12V support is in the making.
Including the Vpp capability in MPLAB PICkit 4?

Thanks!

 

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

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

If you mean powering the target from PICKit4, then that is not a part of this 12V scope. I don't know when the target powering feature will be added.

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

timed 12V (Vpp) onto pin 4 (UPDI.DAT)

Thanks!

 

MPLAB® PICkit™ 4 Debugger Program Options - Developer Help

...

 

Programming mode entry

...

For the high-voltage method, a voltage in excess of 9 V will be placed on Vpp.

 

...

MPLAB® PICkit™ 4 Debugger Block Diagram - Developer Help

[VPP GEN]

 

MPLAB® PICkit™ 4 Debugger Pinouts for Interfaces - Developer Help

oh ... TVPP is pin 1 (ICSP.MCLR) (PIC, PIC24, dsPIC, PIC32)

 

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

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

HELLO

AM FACING THE SAME ERROR ON ATTINY 1616 CONTROLLER. BUT BEFORE IT WAS WORKING. BUT AFTER SOME DAY I TRY TO REPROGRAM THE CONTROLLER, NOW NOT SHOWING THE "PDI physical timed out. (25)
Programming did not complete." ERROR

 CAN SOME ONE HELP ME TO SOLVE THIS ISSUE

 

REGARDS 

JD

 

JD

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

JANARTHANAN DURAIRAJ wrote:

HELLO

AM FACING THE SAME ERROR ON ATTINY 1616 CONTROLLER. BUT BEFORE IT WAS WORKING. BUT AFTER SOME DAY I TRY TO REPROGRAM THE CONTROLLER, NOW NOT SHOWING THE "PDI physical timed out. (25)
Programming did not complete." ERROR

 CAN SOME ONE HELP ME TO SOLVE THIS ISSUE

 

REGARDS 

JD

 

 

have you changed the settings of the UPDI pin ? did you change the FUSE setting ?, did you try to configure UPDI pin as output/ GPIO ? answer these and then we might be able to help you.

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

CURRENTLY WE HAVE 6 BOARDS, WE ARE TRYING TO REPROGRAM THOSE 6 BOARDS. NOW ONE BOARD ONLY SUCCESSFULLY PROGRAMMED. REMAINING NOT. WE DIDN'T CHANGE ANY SETTINGS.

JD

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

which debugger/programmer you are using ?

 

EDIT: please disable CAPS LOCK

Last Edited: Wed. Aug 14, 2019 - 10:46 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

also what is the board you are using/mcu..etc ?

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

we are using MCU is ATtiny1616mfr and programmer is Atmel-ICE

JD

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

JANARTHANAN DURAIRAJ wrote:
we are using MCU is ATtiny1616mfr and programmer is Atmel-ICE

 

And did you change the fuses? Please post your fuses section code if you did.