Beware ATTiny on Aliexpress Reset Disabled from Factory :-/ - Page 1
Forum section: electronics / general

author: sleemanj
author_rank: Super Contributor
timestamp: July 17, 2015, 12:59:40 pm
content: Man, what a PITA. There's a long story behind this, but to save boring with the details.I got a hundred ATTiny13A-SSU from Aliexpress which hadreset disabled "from the factory"making them unable to be programmed with ISP, until you fix them using a high voltage serial programmer.They were shipped in standard SMD tape. And it took me way too much time and effort to work this out, including building an 'Fuse Doctor' (based onthis one), and ordering some legit samples from RS.Anyway, once I'd managed to get the fuses read using the HVSP fuse doctor, specifically they had the following:Fusebits L:7A H:F8Lockbits DISABLED (FF)Reading the flash of fuse-corrected one doesn't appear to contain anything, but the "fuse doctor" firmware above may do a full erase, I'm not sure (source isn't available, can't be bothered anymore looking to find out).Aliexpress seller was "Core Electronics", but I don't imagine they are the only ones, as we all know the aliexpress sellers are often as not middle men, so there are probably a crap ton of these ATTiny with duff fuses out in the wild there somewhere. Unfortunately I'd already placed good feedback on the seller, I'd checked some ATMega in the same order and they were ok, stupidly assumed the others would be too.PS: If anybody should want to build a Fuse Doctor based on that design above, take notice that to put that design into "HVSP" mode (SP = Serial Programming) instead of "HVPP" (Parallel) that pins 6 and 8 of the adapter connector need to be shorted (the low pin count AVR use HVSP), it took me FOR BLEEDING EVER to debug this because I overlooked that connection in the original schematic for the attiny adapter. ARGH!

author: Whales
author_rank: Super Contributor
timestamp: July 17, 2015, 01:54:10 pm
content: Sounds nasty.I'm trying to imagine what the backstory might be. They could have been leftover from a batch programmed to a particular purpose that someone has repackaged. Was there anything in the main flash?QuoteAlways delay feedback as long as you can if nothing initially comes upIt looks like you see feedback as a chore, wanting to fill it out after testing the megas. Feedback can be fun too (for the buyer only)!.

author: ralphd
author_rank: Frequent Contributor
timestamp: July 17, 2015, 02:08:44 pm
content: If I needed a HVSP, I'd build this one.http://www.simpleavr.com/avr/hvsp-fuse-resetter

author: Ian.M
author_rank: Super Contributor
timestamp: July 17, 2015, 02:14:51 pm
content: Many programmable chip manufacturers offer a factory programming service for bulk orders. Most grey market distributors are less than stringent about their part sourcing. It's therefore not at all surprising to occasionally find part reels that have been preprogrammed to other than the original default settings. Count yourself lucky that the setting in question on ATtiny chips isn't OTP!

author: amyk
author_rank: Super Contributor
timestamp: July 17, 2015, 02:16:37 pm
content: Looks like the BOD has been set to 4.3V and CKDIV8 is 1, so these were probably intended for a 5V application.If you used that firmware then it has the option of erasing or not:QuoteBut if the lockbits are unprogrammed, then do try reading one out to see what it contains - it could be blank, in which case my guess is that someone erased them before selling, clearing the lockbits and memory, but forgot to reset the fuses too....or just connect one up to 5V and see if the pins do anything.

author: ralphd
author_rank: Frequent Contributor
timestamp: July 17, 2015, 03:40:32 pm
content: The tiny13a's are attractively cheap on Aliexpress now; 337c/10 with free shipping.I would be nice to have more functionality though; after working with the tinyx5's , the tiny13a is pretty brain-dead.The chips must have a hardware shift register to support programming via SPI, so why not expose it in the registers like USI?The ADC is limited to 4 inputs and there's no on-chip temperature sensor like most other AVRs.Lastly watch out for the output drive differences - only PB0 and PB1 are full strength (20mA) source/sink.

author: sleemanj
author_rank: Super Contributor
timestamp: July 18, 2015, 12:40:23 am
content: Quote from: amyk on July 17, 2015, 02:16:37 pmThe flash on them is empty.Your idea is probably right, most likely they were originally programmed, an over-run on production or ghost-shift after the official run, and then erased.The erase process (in AVRs) clears the lock bits but doesn't touch the fuse bits, so somebody forgot to do that.

author: eneuro
author_rank: Super Contributor
timestamp: July 20, 2015, 08:26:39 am
content: Quote from: ralphd on July 17, 2015, 02:08:44 pmBut... you have to fix its schematics first, since drawn (in Corel Draw?) NPN transistor which is used to turn OFF 12V on reset pin has emitter and collector swappedThey wrote this on this under this link:QuoteSo, if they know schematics is wrong why they didn't fix this for.... 5 years?Publishing electronics circuits with bad schematics is bad-publishing them if you know it is wrong it is even worseI've fixed myself this schematics, but they should do it, because of this image will show up somewhere in thegooglesearch and... puzzling young players with bad circuits is bad.Hopefully, they published some source code, so one can review and check if it is bug free...

author: neslekkim
author_rank: Super Contributor
timestamp: July 20, 2015, 08:45:12 am
content: Quote from: eneuro on July 20, 2015, 08:26:39 amthis?http://www.simpleavr.com/avr/hvsp-fuse-resetter/fuse.chttp://www.simpleavr.com/avr/hvsp-fuse-resetter/makefile

author: eneuro
author_rank: Super Contributor
timestamp: July 20, 2015, 08:01:30 pm
content: Quote from: neslekkim on July 20, 2015, 08:45:12 amYep-I might want to use all 4 ADCs on ATTiny85, so I need disable its RESET pin, so I'd like to have some backup if my developed tiny bootloader for some reason will not be able flash new program using only one pin-then HV trick might be needed during development and probably will take a look into this source code, since didn't made my custom HV programmer yet, to compare with tiny datasheet if this what is going on in this code makes sense.Of course I do need any segment displays, since I LED can be used to send this kind of information directly to PC or on special kind of LCD with support to read 1 wire data and display, so trying to figure out if I could use ATTiny85 to... make this kind of tricky HV stuff to be able go back to factory fuse settings and enable ISP programming to examine contents of MPU by reading its flash, etc-just in the case I had problems with new developed 1 optical wire bootloader.If we remove this useless display and add a few resistors between MPU pins quite small BOM so maybe in spare time will try do my own custom HV programmer, since I might need it soon, so while using custom ISP programmer, why not make own customized HV programmer to automate service of own MPUs with intentionaly disabled RESET

author: mcinque
author_rank: Unknown
timestamp: July 20, 2015, 08:41:12 pm
content: hmm, maybe just a bit OT: can the fusebit doctor remove a lockfuse without erasing the code so basically allowing to anyone to recover the bin inside a locked MCU?

author: sleemanj
author_rank: Super Contributor
timestamp: July 20, 2015, 10:28:23 pm
content: Quote from: mcinque on July 20, 2015, 08:41:12 pmNo. The only (practical) way to unlock a locked avr is to erase it.