Atmega324P: Sleep modes

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

Hello friends,

I am planning to use atmega324P device in my application.

Requirement:

I need an edge trigger interrupt to wake up this device from the sleep mode & perform necessary action and again enter sleep mode.

The table 7-1.(page no. 43 of full data sheet) in the device data sheet provides sleep modes and wake up sources. The note 3 specifies:

For INT0, only level interrupt.

1. Does that mean for INT1 and INT2 edge trigger interrupt is available?
2. In table 7-1, for each mode columns marked with 'X' means these functionalities will be available during sleep mode? Is this statement true?
3. How can we estimate the consumption of device in power save, power down mode at 4 MHz clock frequency?

Thanks in Advance.

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

data sheet wrote:
Pin change interrupts on PCINT31:0 are detected asynchronously. This implies that these interrupts can be used for waking the part also from sleep modes other than Idle mode.
...
Low level interrupts and the edge interrupt on INT2:0 are detected asynchronously. This implies that these interrupts can be used for waking the part also from sleep modes other than Idle mode. The I/O clock is halted in all sleep modes except Idle mode.
However, from this thread - AVR Errata - Unpublished, and other "Gotchas":
https://www.avrfreaks.net/index.p...
ATMEL support wrote:
Comment regarding questions about ATmega164P/324P/644P and mega644: in all sleep modes other than idle, INT2:0 covers level detected interrupt (low level int.) while PCINT31:0 when enabled, detects any edge.
The data sheet incorrectly claims the edge interrupt on INT2:0 are detected asynchronously, when they are really detected synchronously and cannot be used for wake up from sleep when CLKio is not running.
In your case the pin change interrupt (detects both edges) and will have to be used as an external interrupt edge triggered wake up source. Edge triggered INT0 through INT2 external interrupts only work for Idle sleep mode.

Look at the data sheet section 26. Typical Characteristics. You will have to interpolate your estimate from the table values.

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

Dear Mike,

Thanks a lot :)

Have a nice day.