ATTiny and Main Clock Speeds confusion

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

Hi, I am going to use an ATTiny402 in on of my projects. I'm just playing with the Studio 7 IDE. I also have the ATTiny416 XPlained demo.

 

The users manual for the 402 series says it has an OSC20M and call's it 16MHz. This micro only has one fast internal clock. However, the start configurator has listed two. OSC20M and OSC16M. It lists OSC20M as 20MHz but the manual clearly says the OSC20M is 16MHz. So im lost.

 

I created some test code for the 416. Again, both clocks show up. This time I chose the OSC16M and ran some tests. This is clocking at 20MHz! So I assume the actual clock is 20MHz here and the 16 is a mistake in the configurator. But what does this mean for the 402 which has seemingly the same clock requirements!?

 

The question will answer itself I suppose when I get my hands on a 402. But I'd rather find an answer in the specification.

This topic has a solution.
Last Edited: Sun. Feb 9, 2020 - 04:33 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

There’s a fuse that controls whether the main clock runs 16 or 20 mhz.  OSCCFG.FREQSEL

 

 

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

How does that work exactly? The manual just says it can be set to 0x1 which means 16MHz and the other values are reserved. Is this some type of overclocking thing where you just put a big number some register?

This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It is clearly stated in my manual.

 

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

Thanks! I've been working with the automotive data sheet which covers the whole 0-series. Apparently automotive isn't qualified for 20MHz as that does not appear. I have the 202/204 data sheet now and I see the choice!