From mboxrd@z Thu Jan 1 00:00:00 1970 From: Heiko Schocher Date: Wed, 26 Aug 2015 06:45:35 +0200 Subject: [U-Boot] Periodic task In-Reply-To: References: Message-ID: <55DD446F.8010808@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hello Ran, Am 25.08.2015 um 22:03 schrieb Ran Shalit: > Hello, > > I need to do some periodic very simple task during u-boot prompt > (while u-boot wais for commands). The task is very simple, just > writing into a watchdog refresh register. > But it seems that it's very difficult to "hack" u-boot with such periodic task. > I see that main loop is waiting in loop for characters in a call to > getc, which is a blocking command. If it was non-blocking, it might > have help me. I'm not sure if there is a way to replace the getc with > a non-blocking call. > > Does anyone have any idea if there is some simple way to do periodic > task in u-boot ? As you want to trigger a watchdog, have a look at u-boot:/drivers/watchdog and grep the U-Boot code for CONFIG_WATCHDOG CONFIG_HW_WATCHDOG bye, Heiko -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany