Pin change interrupt wake up from Power-down mode (ATtiny26)

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

Hi all,

I'm planning an application using the ATtiny26. Most of the time the application will be in Sleep mode (especially Power-down mode). The datasheet describes this on page 41 and page 42.
Is it possible to wake up the device from power-down mode using the Pin change interrupt because the text on page 41 says yes but on page 42 note 2 below table 20 says the opposite (note2 Only level interrupt INT0).

Thanks for your help.

This topic has a solution.
Last Edited: Fri. Sep 23, 2022 - 12:01 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi!
I've never worked with Tiny26, but most of the AVRs can be wake from power down only with INTx level. I use low level INT0 to wake AT90S2313.

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

I don't know the tiny26 but on the mega169 I believe the pin change interrupts work in all sleep modes.

As for the int0, only the int0 level interrupts work in all sleep modes. The int0 edge interrupts only work in Idle sleep mode.

At least that's the way I understand it.

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

I have the same doubt. Is posible? Don´t work to me. In 2022.

In the micro ATtiny 1627 model and we need its consumption to be the lowest possible so we have selected the Power-Down sleep mode.

To wake up from sleep mode we use 2 different gpio pins, each one with its respective interrupt.

As you can see in the following image, in the product DataSheet, in the Sleep Mode section we have a table that tells us that this is possible as long as we configure the I/O pin according to the asynchronous pin properties:

But if we configure the pin through the MCC tool, we see that in the interrupts section of the CCL module it tells us that the interrupts for the ATtiny devices are absent: "CCL Interrupts are absent in the ATtiny^devices"

 

We have configured the micro according to the DataSheet specifications, and although we observe that the micro does enter the lowest power mode, it does not wake up by interrupting the pins.
Is it really available the option to wake up from Power-Down mode the ATtiny 1627 micro through an I/O pin interrupt?

 

 

Thank you very much.

--- Nice Day ---

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

If the datasheet is lying, you're in big trouble.

Wakeup is possible by setting the input sense configuration of any pin to BOTHEDGES or LEVEL.

Px2 and Px6 can wake up in any input sense configuration.

I don't use the MPLABX IDE, so I can't advise on that.

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

Dear Kabasan, thank you for your reply.

I can't believe that the datasheet lies.

The only explanation I can think of is that we are either misunderstanding the configuration or that the MCC of the MPLABX IDE is the one that does not support that configuration. In both cases, I have not been able to solve it yet.

I would like that if someone manages in any ATTiny, to go to powerdown and to exit with the pin change interrupt, tell me that it works and so I know that the datasheet does not lie and I am the one who can not get it to work.

 

If anyone has this information, it would be a great help.

 

Thanks.

--- Nice Day ---

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

fact

I actually operate with such a configuration.
It waits in power down mode and wakes up with the switch connected to PA3.

This is the configuration of PA3.

   	PORTA.PIN3CTRL = PORT_PULLUPEN_bm | PORT_ISC_LEVEL_gc;

An interrupt is generated by being set to low level by the switch.

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

can you confirm that the standby mode is "powerdown" and not "idle"?

--- Nice Day ---

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

You won't believe anything I say
The settings have already been shown.
It's very easy and you don't even need to use MCC.
You can check it yourself.

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

I tried this in the Studio Simulator - It didn't wake from SMODE_PDOWN with either of ISC_BOTHEDGES or ISC_LEVEL.

It did however wake from SMODE_IDLE.

 

I'm putting this down to a Simulation Failure.

 

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

Kaban. Issue solved, thanks to you. You are absolutely right. It works correctly and it is solved.

Yes the edge detector is on both or low level and I have tested it and it worked.

Thank you very much.

--- Nice Day ---