Overclocking ATtiny1634 - Page 1
Forum section: electronics / general

author: Unixon
author_rank: Frequent Contributor
timestamp: October 28, 2021, 08:15:19 pm
content: I know this is bad to run things over the spec but...Have anybody tried to run ATtiny1634 at 16-20MHz (max spec 12MHz at 5Vcc)?Does it run at this frequency and is it stable enough for practical use?

author: PCB.Wiz
author_rank: Super Contributor
timestamp: October 28, 2021, 09:19:40 pm
content: Quote from: Unixon on October 28, 2021, 08:15:19 pmWhat temperature do you want to run up to ?Easiest and safest to just buy an ATTINY thatisrated to 20MHz, there are plenty to choose from.

author: Unixon
author_rank: Frequent Contributor
timestamp: October 29, 2021, 06:03:45 am
content: Any temperature MCU can surviveI have a device designed around ATtiny2313/4313 which runs at 20MHz naturally,but I may need to replace 4313 with a pin-to-pin compatible MCU in QFN20 package that has more FLASH memory.Currently the only option I'm partially confident of is ATtiny1634, but it has lower speed spec.

author: Kleinstein
author_rank: Super Contributor
timestamp: October 29, 2021, 06:49:30 am
content: It is a bit strange that the µC is not specified for 16 or 20 MHz. Other similar chips are. There is a good chance the µC can run faster than specified, espeically at moderate temperature. The temperature extremes are usually the conditions they fail first.The other option may be to have a look at the code, if the high clock speed or more memory is really needed. More efficient code may allow a lower or smaller code.

author: Unixon
author_rank: Frequent Contributor
timestamp: October 29, 2021, 09:38:51 am
content: Yes, some of memory could be definitely fought off with optimizations by putting in some effort. Maybe 4K will still be enough, I can't tell for sure. The other problem with code is that I have to pass this device to other people, some of which may be less experienced and less willing to spend their time on optimizations and their modifications to firmware must still fit withing a reasonable margin.

author: up8051
author_rank: Frequent Contributor
timestamp: October 29, 2021, 03:23:33 pm
content: Quote from: Unixon on October 29, 2021, 06:03:45 amATTINY1634 isn't pin-to-pin compatibile with ATTINY4313.ATTINY4313 has ports A,B and D, ATTINY1634 has ports A,B and C.In QFN20 case there is ATTINY816/1616/3216 (20MHZ).

author: nctnico
author_rank: Super Contributor
timestamp: October 29, 2021, 03:31:47 pm
content: Quote from: Kleinstein on October 29, 2021, 06:49:30 amNo. The attiny design is marginal at best. You are lucky if you can run it at full speed at the speficied supply voltage range.

author: Unixon
author_rank: Frequent Contributor
timestamp: October 29, 2021, 07:43:41 pm
content: Quote from: nctnico on October 29, 2021, 03:31:47 pmMarginal design? Why?

author: PCB.Wiz
author_rank: Super Contributor
timestamp: October 29, 2021, 07:54:06 pm
content: Quote from: Unixon on October 29, 2021, 06:03:45 amThat's not a sensible engineering reply. What temperatures do you actuallyneed?If you really do need extreme temperatures, then find a device spec'd to those. Tiny AVRs come in 20MHz and -40°C ~ 125°C (TA)Quote from: Unixon on October 29, 2021, 06:03:45 amTest some. If you are really pushing the envelope, you need to collect your own information.MCUs follow a predictable Temperature/Voltage/MHz curve, so try your choice, and maybe compare with a full spec'd 20MHz part like maybe ATTINY1626-MF or ATTINY3226-MFThat should show if it is fundamentally lower spec.

author: wraper
author_rank: Unknown
timestamp: October 29, 2021, 08:01:02 pm
content: Quote from: up8051 on October 29, 2021, 03:23:33 pmNot only it's not pin compatible, it's not compatible because VCC pin is on opposite side. Not to say ATTINY816/1616/3216 are not less similar to 4313, are cheaper and don't need overclocking. Arbitrarily selecting ATTINY1634 seems strange.

author: nctnico
author_rank: Super Contributor
timestamp: October 29, 2021, 09:13:18 pm
content: Quote from: Unixon on October 29, 2021, 07:43:41 pmTry to run it 50mV below the lowest operating voltage and you'll find out for sure. Other microcontrollers typically have a 150mV margin but not the Attiny.

author: Unixon
author_rank: Frequent Contributor
timestamp: October 29, 2021, 10:04:15 pm
content: Quote from: PCB.Wiz on October 29, 2021, 07:54:06 pmThat wasn't an engineering reply at all. I mean if if runs at that frequency at any temperature then I start looking at temperature ranges.I think commercial grade 0-+70C will be enough.Quote from: PCB.Wiz on October 29, 2021, 07:54:06 pmSure, if I get few of these chips before we settle on something particular for release.

author: Bassman59
author_rank: Super Contributor
timestamp: October 29, 2021, 10:11:45 pm
content: Quote from: Unixon on October 28, 2021, 08:15:19 pmThe only guarantees you have are specified in the data sheet.Running outside of those specifications results in undefined behavior.You design could work, or it could fall down. It could appear to work but also open up a micro-sized black hole in Bayonne, NJ. These possibilities all fall under "undefined operation."

author: Unixon
author_rank: Frequent Contributor
timestamp: October 29, 2021, 10:16:02 pm
content: Quote from: wraper on October 29, 2021, 08:01:02 pmOh, yes, it's not compatible, just the same package. F... I may need a new board for thisI guess I had 1634 flagged few years back as 16K FLASH QFN20 as a smallest AVR with this amount of memory and now I just pulled it back from memory.Didn't look through new Microchip series yet as our suppliers aren't good at catching up to Microchip on new MCUs plus chipageddon pulls the plug on many products.

author: Unixon
author_rank: Frequent Contributor
timestamp: October 31, 2021, 07:39:06 am
content: According to this Microchip's map there's only two series of tiny AVRs with large span of memory sizes: ATtiny20x/40x/80x/160x and ATtiny21x/41x/81x/161x/321x.Unfortunately, almost none of them in stock yet. Out of 8K+ FLASH 16/20MHz QFN20 AVR in stock and at hand there are 841, 816 and 1634. So, there's really not much to choose from.I have plenty of 841s at hand and 1634 in transit, 816 model is in stock. Whether 816 fits better than 841 is up to project requirements, math is faster + unique peripherals.Unless the whole new series are available there's not much hope for upgradability.

author: SiliconWizard
author_rank: Super Contributor
timestamp: October 31, 2021, 05:23:57 pm
content: And with all that said, I suppose switching to a more recent and more powerful MCU would be out of the question, instead of trying to beat this one hard until it barely meets your processing requirements?

author: Picuino
author_rank: Super Contributor
timestamp: October 31, 2021, 07:21:17 pm
content: Try to see if it works. I once ran a PIC16F15324 at 80MHz when its maximum frequency is 32MHz (2.5x overclocking)https://www.microchip.com/en-us/product/PIC16F15324

author: Unixon
author_rank: Frequent Contributor
timestamp: October 31, 2021, 08:26:50 pm
content: Quote from: SiliconWizard on October 31, 2021, 05:23:57 pmWell, yes, if that part will become available in stock in sufficient quantities and survives price pressure.Considering the project, what I was looking for is one of cheapest possible AVR or STM32 that can run SPI at 10MHz and has enough memory for firmware, debug UART is appreciated but optional. Currently 4313 is doing fine, I very much hope I won't have to switch to 1634 or any other slow micro and keep the speed requirements at the same time

author: SiliconWizard
author_rank: Super Contributor
timestamp: November 01, 2021, 07:53:50 pm
content: If this is mainly a supply issue - which has unfortunately plagued us for over a year now, and still going strong - then I can understand. But as discussed on a regular basis, there's no real guarantee that picking any particular chip that looks available right now will make you safe. The ATtiny1634, for all I know, may become unobtainium in a couple months.What's the quantity you would need per month/year? Is it going to be a product? Tons of MCUs out there would fit the short description you just gave. Now maximizing your chances of getting a steady supply is another story.

author: Unixon
author_rank: Frequent Contributor
timestamp: November 01, 2021, 10:12:41 pm
content: Quote from: SiliconWizard on November 01, 2021, 07:53:50 pmThe problem is one level deeper, I can't see real prices for parts not in stock and hence can't estimate costs and use them for making decisions.Quote from: SiliconWizard on November 01, 2021, 07:53:50 pmIt's a small part of a product, I would guess we'll need something from few hundreds to few thousands per year depending on how the product takes off. Not too many, not too few.

author: Unixon
author_rank: Frequent Contributor
timestamp: November 15, 2021, 08:56:22 pm
content: Back to original question, simply out of curiosity.How fast the stability of operation (MTBF) will drop vs frequency vs supply voltage vs operating temperature?

author: PCB.Wiz
author_rank: Super Contributor
timestamp: November 15, 2021, 09:49:45 pm
content: Quote from: Unixon on November 15, 2021, 08:56:22 pmMost MCUs have some sort of curves for MHz vs Vcc, and you can infer the temperature effects by comparing the same-die in differing temps specs.Automotive 125'C parts often have lower MHz than 85'C parts.All those curves have some margin.

author: Unixon
author_rank: Frequent Contributor
timestamp: November 16, 2021, 07:13:13 am
content: Quote from: PCB.Wiz on November 15, 2021, 09:49:45 pmWell, yes, but this basic inference is not what mean.Let's say we take a sample of N=10,100,... MCUs and run all of them at certain voltage and frequency in temperature stabilized environment.And we measure the time from power up to when a test firmware produces bad result or stops responding or otherwise diverges from other samples.Then we plot mean time before failure with error bars against frequency at const voltage and const temperature t(f)|const V,T;Then we also plot t(V)|const f,T; then t(T)|const f,V for all (f,V,T) points on a grid.Eventually we end up with a 3D distribution <t>(f,V,T), and considering measured error also with <t>-e(f,V,T) and <t>+e(f,V,T).It is interesting to see what this function looks like and what slices along coordinates and paths withing this (f,V,T) volume will look like.

author: fchk
author_rank: Frequent Contributor
timestamp: November 16, 2021, 07:40:08 am
content: You might think about this one:https://www.microchip.com/en-us/product/PIC24F08KL301This is a 16 bit architecture.fchk

author: Unixon
author_rank: Frequent Contributor
timestamp: November 16, 2021, 09:44:53 am
content: Quote from: fchk on November 16, 2021, 07:40:08 amOh, thanks, I'll keep that in mind.Probably I should have changed the topic to "Limits of MCU stability beyond recommended operating area"

author: PCB.Wiz
author_rank: Super Contributor
timestamp: November 17, 2021, 12:37:24 am
content: Quote from: Unixon on November 16, 2021, 07:13:13 amThat's a lot of measurementsYou would expect classic bathtub curves, with zero failures inside operating region, and rapid failures outsideI did see this post, which seems to show one portion of a part being tested with MHz/Temp and Vcc curves so you can get an idea of Vcc and temp effects on limitshttps://www.avrfreaks.net/comment/3231246#comment-3231246

author: westfw
author_rank: Super Contributor
timestamp: November 17, 2021, 10:42:18 am
content: QuoteThat sounds right. With a desktop processor, overclocking might lead to over-temp conditions and decreased MTBF via heat damage to the CPU, but I think with a microcontroller, the issues are different, and you're likely to see it work "fine", up to the point where it doesn't work at all.