Page 1 of 1

SAM9G45 LowPowerMode

Posted: Tue Oct 17, 2017 12:35 pm
by mcgeorge
Hi,

currently I have a board with a SAM9G45 and want to put into a sleep mode (triggered via button). In this case I use the library function:

Code: Select all

void PMC_CPUInIdleMode(void)
{
#ifndef CP15_PRESENT	
    PMC_DisableProcessorClock();
#else
    AT91C_BASE_PMC->PMC_SCDR = AT91C_PMC_PCK; 
    CP15_WaitForInterrupt();
#endif
}

So far so good, it works fine (power consumption decreases). The problem is, afterwards I can't reconnect the target via J-Link debugger. Probably because the µC is still in sleep mode. Do I need to take additional steps to wake-up device before downloading/debugging firmware?

Thanks and regards
george

Re: SAM9G45 LowPowerMode

Posted: Wed Oct 18, 2017 3:23 am
by blue_z
mcgeorge wrote:currently I have a board with a SAM9G45 and want to put into a sleep mode (triggered via button).
...
The problem is, afterwards I can't reconnect the target via J-Link debugger. Probably because the µC is still in sleep mode.
The AT91SAM9G45 has an ARM926EJ-S processor, and Atmel classifies it as a microprocessor (MPU) rather than a microcontroller (MCU).

mcgeorge wrote:Do I need to take additional steps to wake-up device before downloading/debugging firmware?
Yes.
The ARM926EJ-S Technical Reference Manual mentions that if you want a debugger to force an exit from wait for interrupt mode (e.g. idle mode), then either issue an external debug request EDBGRQ, or a debug request made by writing to the DBGRQ bit of the ARM9EJ-S debug control register using scan chain 2.
The latter requires access to the ARM9EJ-S debug control register which needs to be enabled by asserting the DBGTCKEN input.
There's also reference to the ARM9EJ-S Technical Reference Manual for details of how DBGTCKEN is generated and used.

BTW you interchangeably use the (ambiguous) terms "LowPowerMode" and "sleep mode" with the use of PMC_CPUInIdleMode().
The SoC has five operating modes: normal mode, idle mode, slow-clock mode, standby mode, and backup mode.

Regards

Re: SAM9G45 LowPowerMode

Posted: Mon Oct 23, 2017 7:21 am
by mcgeorge
Hi,

thanks for your explanations. I've tested different modes (clock switching, IDLE mode) but in best case my current consumption ist 25 mA (G45 and external memories). I don't know how to implement the standby mode. Do I have to enable the slow clock and wait for an interrupt ("CP15_WaitForInterrupt()")? In best case which power consumption is possible?

Thanks and regards
Michael

Re: SAM9G45 LowPowerMode

Posted: Tue Oct 24, 2017 1:06 am
by blue_z
mcgeorge wrote:I don't know how to implement the standby mode. Do I have to enable the slow clock and wait for an interrupt ("CP15_WaitForInterrupt()")?
The steps to enter standby (aka suspend) mode are described in section 2.4 Suspend Mode in the app note "Optimizing Power Consumption of AT91SAM9261-based Systems", which "is applicable to most devices belonging to the SAM9 family". There are similar app notes for the ARM Cortex devices.

Regards

Re: SAM9G45 LowPowerMode

Posted: Fri Oct 27, 2017 9:39 am
by mcgeorge
Hi,

thanks for your notice. One more general question - is ist possible to use a LP-DDRRAM with the "Suspend" mode? The DDRRAM has the self-refresh and auto-refresh mode. Is it even possible to use the DDRRAM with a slow clock (e.g. 32 kHz)?

Thanks and regards

Re: SAM9G45 LowPowerMode

Posted: Mon Oct 30, 2017 12:27 am
by blue_z
mcgeorge wrote:One more general question - is ist possible to use a LP-DDRRAM with ...
I'm not qualified to give HW component advice.

Regards