Proble to Wakeup from power-down mode

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

Hello,

I am a new user to the AVR and I am having a problem to wakeup from a falling or rising edge on the INT0 pin after going into power down mode on the AT90LS2343.

I am using the internal oscillator and have the watchdog disabled. If I modify the MCUCR SFR to a value of 0x22 and only use IDLE mode then everything seems to work, as I would expect. If I configure the MCUCR SFR to a value of 0x30 then again everything seems to work as expected (except for the expected multiple interrupts while INT0 is low). However, if I use a setting of 0x32 or 0x31 for the MCUCR SFR the controller appears not to wakeup. I have measured the signal at PB1 with an oscilloscope and there is no bouncing of the signal and I have transitioned the period at a rate of 100 milliseconds or more.

I would appreciate it if someone could give me a hint as to what I am doing wrong?

Thanks in advance for your help

Best Regards,

Chris

admin's test signature
 

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

from the AVR datasheet :

"When the SM bit is set (one), the SLEEP instruction forces the MCU into the Power-down Mode. In this mode, the external oscillator is stopped while the external interrupts and the Watchdog (if enabled) continue operating. Only an external reset, a Watchdog reset (if enabled), an external level interrupt on INT0 or INT1 can wake up the MCU."

So I suppose you must alter your design to use a level interrupt. What kind of peripheral is connected to that interrupt line ?

admin's test signature
 

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

Alexander,

Thanks, I didn't pay attention to the fact that the wakeup from power down required a LEVEL interrupt from INT0.

I have a digial hall sensor connected to this input and I modified the code to use the level interrupt to bring me out of power down.

Thanks again for your help...

-Chris

admin's test signature