Re: Heartbeat LED during init script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Feb 17, 2021 at 01:22:32PM +0100, barebox+mailing@xxxxxxxxxxxxx wrote:
> Hey everyone,
> 
> we use the barebox bootloader in on of our products.
> Because of some norms we need to make a memtest of the RAM. To do that, we use the provided memtest tool.
> So one of our our scripts is `/env/init/10-memtest`, which has just `memtest -tc` in it.
> 
> 
> The other script is `/env/init/05-heartbeat` which contains 
> 
> #!/bin/sh
> 
> led -b board-red 100 1000
> 
> So, at first the 05 script is executed, afterwards the memtest script.
> 
> The problem is, that during the memtest the led does not blink, but flashes red the whole time. After the memtest is done, the blinking is done perfectly fine, but not during the memtest.
> 
> I create a small video to showcase this exact problem: https://imgur.com/a/9sxHTcm
> 
> Can anybody tell me why the barebox isn't able to keep up with the blinking as well as how to mitigate that?

barebox doesn't support interrupts. LED blinking is done in pollers,
that are little function that run each time a timing related function is
called. What you can do is to add for example add a ctrlc() call to your
memtester code inside some loop. That will cause the poller to run.

Sascha

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux