CLK_CPU and CLK_PER on 0-series

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

Are they always the same or not? It looks that they are. But I don't see this clearly spelled in the (ATmega4809) datasheet. Interestingly, one of the older ATtiny417/814/816/817 datasheet says "On this device, CLK_CPU and CLK_PER share the prescaler setting, and hence, always have the same frequency". But for some reason they removed that note from newer datasheets.

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

They seem to be always the same. The only difference is that CLK_CPU is disabled in idle mode, while CLK_PER is not.

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

Same problem in ATtiny 1604. Despite what the documentation says, the frequency of these two signals CLK_CPU & CLK_PER is the same and depends on the Main Clock Prescaler settings. Because of this, a problem arises, either the program is executed at a clock frequency of 20/16 MHz, but the USART does not work, or the USART works, but the program is executed at a clock frequency of 10 MHz or lower. By the way, there is not a word in the documentation that USART does not work if CLK_PER > 10 MHz. I wonder if Microchip is aware of these issues?

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

There was a thread about this recently: https://www.avrfreaks.net/forum/meaning-clkmain

 

Specifically: https://www.avrfreaks.net/commen...

 

slava737 wrote:
I wonder if Microchip is aware of these issues?

Please raise a support ticket - then they will be aware!

 

See: https://www.avrfreaks.net/commen...

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

slava737 wrote:
By the way, there is not a word in the documentation that USART does not work if CLK_PER > 10 MHz.

 

What? I'm pretty sure I've used the USART at 20MHz, not exactly on the  ATtiny 1604 but on other chips of the AVRxt (xtiny) series.