• AVR Freaks

Helpful ReplyHot!PICKIT4 programmer for attiny402(UPDI)

Page: 12 > Showing page 1 of 2
Author
Jeet_Panchal
New Member
  • Total Posts : 19
  • Reward points : 0
  • Joined: 2018/07/25 23:30:49
  • Location: 0
  • Status: offline
2018/10/03 04:09:04 (permalink)
0

PICKIT4 programmer for attiny402(UPDI)

Can PICKIT4 programmer be used for programming and debugging ATTINY402 as ATTINY402 uses UPDI for programming and debugging?
If so, in UPDI programming it is mentioned that 12 V supply is needed to program the UPDI. So how is 12V generated in pickit4.
#1
DevMod1
Administrator
  • Total Posts : 471
  • Reward points : 0
  • Joined: 2009/02/10 09:34:30
  • Location: 0
  • Status: offline
Re: PICKIT4 programmer for attiny402(UPDI) 2018/10/03 08:54:28 (permalink)
0
Yes, this part is supported in PICkit 4, the 12V is only required to get the part out of a certain state, and the PICkit 4 can generate that voltage internally.
 
 

_____________________________

Please read the forum posting guidelines. Do not double post, please help keep these forums professional and comments respectful.
Please notify the moderators of problems/spam/trolls.
#2
NKurzman
A Guy on the Net
  • Total Posts : 17916
  • Reward points : 0
  • Joined: 2008/01/16 19:33:48
  • Location: 0
  • Status: offline
Re: PICKIT4 programmer for attiny402(UPDI) 2018/10/03 10:06:50 (permalink)
0
So how is 12V generated in pickit4?  Most likely a Boost Mode switching regulator.
#3
qhb
Superb Member
  • Total Posts : 9999
  • Reward points : 0
  • Joined: 2016/06/05 14:55:32
  • Location: One step ahead...
  • Status: offline
Re: PICKIT4 programmer for attiny402(UPDI) 2018/10/03 13:34:24 (permalink)
0
NKurzman
Most likely a Boost Mode switching regulator.

+1
Such as every USB powered PIC programmer has contained for years...
 

Nearly there...
#4
dilo83
New Member
  • Total Posts : 7
  • Reward points : 0
  • Joined: 2014/07/08 08:01:24
  • Location: 0
  • Status: offline
Re: PICKIT4 programmer for attiny402(UPDI) 2019/06/11 12:45:37 (permalink)
0
I bricked my ATTiny816 by resetting UPDI fuse, so I need the 12V pulse for resetting. I used the Atmel ICE for programming, but this cannot generate the 12V pulse (Datasheet P. 41). So I read this thread and bought an PICkit4, but I'm not able to reprogram the fuse. I tried Atmel Studio 7 and MPLAB IPE, but in MPLAB IPE I didn't found the checkbox to enable 12V programming voltage. And wasn't the 12V generated on /MCLR pin instead of PGD pin?
#5
DevMod1
Administrator
  • Total Posts : 471
  • Reward points : 0
  • Joined: 2009/02/10 09:34:30
  • Location: 0
  • Status: offline
Re: PICKIT4 programmer for attiny402(UPDI) 2019/06/12 10:35:46 (permalink)
0
Sorry, I was mistaken about PICKit 4 being able to do this.  This feature is not yet supported, but will be in the MPLAB X v5.25 release due out late July.
 
Sorry for the confusion.
 

_____________________________

Please read the forum posting guidelines. Do not double post, please help keep these forums professional and comments respectful.
Please notify the moderators of problems/spam/trolls.
#6
Ankit.Patel
New Member
  • Total Posts : 5
  • Reward points : 0
  • Joined: 2019/06/13 14:23:44
  • Location: 0
  • Status: offline
Re: PICKIT4 programmer for attiny402(UPDI) 2019/06/14 15:06:40 (permalink)
0
Does that mean you can't program ATTiny 402 with the PicKit 4 just yet? I built some ATTiny 402 boards, & tried programming them with the PicKit 4. I've been having trouble, & keep getting "PDI Physical Timed Out (25)". I've used both MPLAB & Studio 7, but keep getting that "PDI Physical Timed Out (25)" error. I'm fairly new to AVR programming, & I wasn't sure if the errors "Physical Timed Out (25)" error was related to the issues mentioned above (UPDI - 12V)?
#7
judd
New Member
  • Total Posts : 16
  • Reward points : 0
  • Joined: 2019/04/15 22:30:22
  • Location: 0
  • Status: offline
Re: PICKIT4 programmer for attiny402(UPDI) 2019/06/17 23:16:01 (permalink)
0
If you leave the RSTPINCFG bits in SYSCFG0 fuse set to UPDI then you will not need 12V and PK4 will work.
If you get timeout errors, perhaps you have hardware issues?
#8
Ankit.Patel
New Member
  • Total Posts : 5
  • Reward points : 0
  • Joined: 2019/06/13 14:23:44
  • Location: 0
  • Status: offline
Re: PICKIT4 programmer for attiny402(UPDI) 2019/06/18 06:04:17 (permalink)
0
I think I have the fuses setup correctly. Below is the code I have written. I believe it matches what you stated above, but let me know if something looks incorrect. Thanks in advance
 
FUSES = {
.OSCCFG = FREQSEL_20MHZ_gc,
.SYSCFG0 = CRCSRC_NOCRC_gc | RSTPINCFG_UPDI_gc,
.SYSCFG1 = SUT_64MS_gc,
.APPEND = 0X00, //Application data selection disabled
.BOOTEND = 0X02 // Boot selection size = 512 bytes
};
#9
judd
New Member
  • Total Posts : 16
  • Reward points : 0
  • Joined: 2019/04/15 22:30:22
  • Location: 0
  • Status: offline
Re: PICKIT4 programmer for attiny402(UPDI) 2019/06/18 08:56:05 (permalink)
0
I would advise explicitly setting all fields in the struct since unspecified ones will be 0x00.
You can use the _DEFAULT in the headers, for example:
.WTDCFG = FUSE_WDTCFG_DEFAULT,
.BODCFG = FUSE_BODCFG_DEFAULT,
 
Still, I am not sure that solves your problem, since many defaults are 0 :/
 
#10
Ankit.Patel
New Member
  • Total Posts : 5
  • Reward points : 0
  • Joined: 2019/06/13 14:23:44
  • Location: 0
  • Status: offline
Re: PICKIT4 programmer for attiny402(UPDI) 2019/06/19 10:20:19 (permalink)
4 (1)
Thanks Judd,
 
I can now program the ATTiny 402 boards with the PicKit 4. You were right, the problem was a hardware issue & wasn't related to needing 12V. I should have doubled checked my connections on the SOIC clip. 
 
#11
Hexum064
New Member
  • Total Posts : 3
  • Reward points : 0
  • Joined: 2017/06/19 23:23:04
  • Location: 0
  • Status: offline
Re: PICKIT4 programmer for attiny402(UPDI) 2019/07/05 11:46:56 (permalink)
0
Is there a pre-release anywhere that will allow the 12v programming to work? I am working on a project using the ATTiny412 that needs to use the Reset/PDI pin as the CS for SPI (the other two free pins are in use).
#12
dilo83
New Member
  • Total Posts : 7
  • Reward points : 0
  • Joined: 2014/07/08 08:01:24
  • Location: 0
  • Status: offline
Re: PICKIT4 programmer for attiny402(UPDI) 2019/07/26 00:08:37 (permalink) ☄ Helpfulby Hexum064 2019/07/26 06:57:29
0
I have now revived my Tiny816 using an arbitrary signal generator, generating one single pulse from around 200µs.
 
First I tried it with an push-button to pull the UPDI line to 12V, but it seems that the pulse must be in the time range (datasheet says 100µs ... 1 ms) to work properly. With the push button I recognized that the pin changed his behavior (the level on the scope changes after the pulse) but programming still doesn't work.
 
Now I've inserted the 12V via opto-coupler to the UPDI-Line because the generator only delivers 2V.
Attention: Save the life of your programmer with an resistor between 12V and UPDI-Pin from Atmel-ICE! May be disconnecting programmer in this time also works. I used jumper wires to make those connections.
 
After inserting the pulse and trying to connect via AtmelStudio I got an error message wit "CRC error...please erase flash". Good thing, to have another error message as before LoL: LoL... but I did what it says and erased the chip (Memories-Tab -> Erase chip). Then I go on to setup Fuses and set SYSCFG0.RSTPINCFG to UPDI mode.
 
Now it works as before.
 
@Microchip: It would be a good thing to have an programmer that can do this - especially when it's so easy to brick the chip.
#13
Hexum064
New Member
  • Total Posts : 3
  • Reward points : 0
  • Joined: 2017/06/19 23:23:04
  • Location: 0
  • Status: offline
Re: PICKIT4 programmer for attiny402(UPDI) 2019/07/26 06:59:05 (permalink)
0
That's great news, dilo83!
From what I read in the datasheets, you need to send a sync byte withing a specific period of time after the 12v pulse. How did you get the timing working on all of that?
#14
dilo83
New Member
  • Total Posts : 7
  • Reward points : 0
  • Joined: 2014/07/08 08:01:24
  • Location: 0
  • Status: offline
Re: PICKIT4 programmer for attiny402(UPDI) 2019/07/28 23:39:01 (permalink)
0
I am not sure how long the time may be. I injected the pulse and then pressed the "read device signature" button. May be this takes 1 second or longer. I tried it twice (because I wasn't sure about the CRC error) and both works. After read signature I unplugged the AWG first. So there was a huge amount of time before erasing chip and go on.
May be this behavior depends on Atmel-Type. I have only the ATtiny816 here.
#15
judd
New Member
  • Total Posts : 16
  • Reward points : 0
  • Joined: 2019/04/15 22:30:22
  • Location: 0
  • Status: offline
Re: PICKIT4 programmer for attiny402(UPDI) 2019/07/31 00:01:50 (permalink)
0
It might be useful to read this thread on freaks: https://www.avrfreaks.net/comment/2616176#comment-2616176
The procedure for 12V pulsing was altered to be more robust against ESD; the older devices (817? etc) required just a simple pulse without a key.
#16
Hexum064
New Member
  • Total Posts : 3
  • Reward points : 0
  • Joined: 2017/06/19 23:23:04
  • Location: 0
  • Status: offline
Re: PICKIT4 programmer for attiny402(UPDI) 2019/07/31 07:22:40 (permalink)
0
That's a very valid point! Thanks!
It might very well be that the ATTiny412 needs more precise timings, if their datasheet is to be believed (because we all know it could easily be wrong).
#17
westfw
New Member
  • Total Posts : 23
  • Reward points : 0
  • Joined: 2007/09/10 15:25:20
  • Location: 0
  • Status: offline
Re: PICKIT4 programmer for attiny402(UPDI) 2019/09/03 13:25:14 (permalink)
0
>> [HVUPDI support on PICKit4] will be in the MPLAB X v5.25 release due out late July.
So  MPLABX 5.25 is out now, but I don't see any PICKit4 options to enable the HV programming.
Does it decide to do that automatically, based on fuse settings "somewhere"? (seems a bit dangerous!)
Or did it not make it into the release after all?
 
#18
miceduan
Super Member
  • Total Posts : 252
  • Reward points : 0
  • Joined: 2007/09/29 15:47:37
  • Location: Canada
  • Status: offline
Re: PICKIT4 programmer for attiny402(UPDI) 2019/10/22 11:10:35 (permalink)
0
>So  MPLABX 5.25 is out now, 
why not give it a try first, it won't hurt anything even if it doesn't work.
#19
ixqprint
New Member
  • Total Posts : 4
  • Reward points : 0
  • Joined: 2019/10/17 17:40:49
  • Location: 0
  • Status: offline
Re: PICKIT4 programmer for attiny402(UPDI) 2019/10/23 00:39:14 (permalink)
0
PICkit 4 can generate this voltage internally.
#20
Page: 12 > Showing page 1 of 2
Jump to:
© 2019 APG vNext Commercial Version 4.5