[OpenWRT] board reboots once in sleep mode

This forum is for users of Microchip MPUs and who are interested in using Linux OS.

Moderator: nferre

Api13
Posts: 6
Joined: Tue May 05, 2020 1:06 am

[OpenWRT] board reboots once in sleep mode

Tue May 05, 2020 2:40 pm

Hi Guys

I face a few issues when using low power states under open WRT on a SAMA5D27_SOM1_EK1

when I try to use the sleep modes - using, for example :

Code: Select all

echo mem > /sys/power/state
the system goes asleed as expected, for 10s or so, and then the module reboots (like after a reset).

example :

Code: Select all

root@OpenWrt:/# echo mem > /sys/power/state
[   39.869872] PM: suspend entry (deep)
[   39.873444] PM: Syncing filesystems ... done.
[   39.882249] Freezing user space processes ... (elapsed 0.001 seconds) done.
[   39.890482] OOM killer disabled.
[   39.893605] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
[   39.903799] Suspending console(s) (use no_console_suspend to debug)
...then during 10s, no change, then :

Code: Select all

RomBOOT


AT91Bootstrap 3.9.0 (2019-01-30)

SDHC: fix in place for SAMA5D2 SoM VDDSDMMC over-consumption errata
SD/MMC: Image: Read file u-boot.bin to 0x23f00000
MMC: ADMA supported
SD: Card Capacity: High or Extended
SD: Specification Version 3.0X
SD/MMC: Done to load image
<debug_uart>
....
in standby - If I press the 'user' button before that ~10s duration, then it goes out of sleep mode as expected.

Code: Select all

root@OpenWrt:/# echo standby > /sys/power/state
[   19.287864] PM: suspend entry (shallow)
[   19.291608] PM: Syncing filesystems ... done.
[   19.322803] Freezing user space processes ... (elapsed 0.001 seconds) done.
[   19.330891] OOM killer disabled.
[   19.334122] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
[   19.342556] Suspending console(s) (use no_console_suspend to debug)
[   19.504644] atmel_usart_serial atmel_usart_serial.0.auto: using dma0chan5 for rx DMA transfers
[   19.504757] atmel_usart_serial atmel_usart_serial.0.auto: using dma0chan6 for tx DMA transfers
[   19.641852] OOM killer enabled.
[   19.644918] Restarting tasks ... done.
[   19.667811] sdhci-at91 a0000000.sdio-host: update clk mul to 19 as gck rate is 480000000 Hz and clk base is 24000000 Hz
[   19.679436] sdhci-at91 b0000000.sdio-host: update clk mul to 19 as gck rate is 480000000 Hz and clk base is 24000000 Hz
[   19.724085] PM: suspend exit
I would have expected that the system would stay in hibernation until something would trigger it. And anyway, would not reboot. Is there something to do to recover expected behavior ?

thank you for your help

cheers

François
blue_z
Location: USA
Posts: 2154
Joined: Thu Apr 19, 2007 10:15 pm

Re: [OpenWRT] board reboots once in sleep mode

Tue May 05, 2020 8:13 pm

The watchdog timer is likely causing a reset.
But there's no reason to guess. The kernel boot log after the reset will report the cause of the reset.
See this topic for examples of the "AT91: Starting after..." message to look for.

Regards
Api13
Posts: 6
Joined: Tue May 05, 2020 1:06 am

Re: [OpenWRT] board reboots once in sleep mode

Tue May 05, 2020 11:00 pm

Hi blue_z !

Thank you very much for your quick answer.

You are absolutely right :

[ 1.267679] at91-reset f8048000.rstc: Starting after watchdog reset
[ 1.275275] sama5d4_wdt f8048040.watchdog: initialized (timeout = 16 sec, nowayout = 0)

So there is a watchdog reset, with a timeout of 16sec.

we see that also in openwrt :
root@OpenWrt:~# ubus call system watchdog
{
"status": "running",
"timeout": 16,
"frequency": 5,
"magicclose": false
}
I managed to disable it with magicclose feature in openwrt (see : https://openwrt.org/docs/guide-user/hardware/watchdog)

and now, the board behaves as expected !

Thank you.

Cheers,

François

Return to “LINUX”

Who is online

Users browsing this forum: No registered users and 3 guests