Re: hal watchdog

2016-09-23 Thread Mathew Calmer
I also worry (slightly) that the default time between sanity waking up and the watchdog firing may not be enough. It is configurable so that is all good, but maybe the default should be a bit longer as sanity is checked in the idle task and if a system has lots of tasks the idle task may not

Re: hal watchdog

2016-09-23 Thread will sanfilippo
Well, I have worked on systems where 200 or even 500 msecs would definitely have caused the code to crash. For example, you have to do lots of crypto processing and you dont have HW support. That being said, I think this is a moot point as it is configurable so all good. I just like to hear

Re: hal watchdog

2016-09-23 Thread will sanfilippo
Oh yeah, sorry. I dont know why I said 200 when it is clearly 500 :-) Thanks for pointing that out. All good about the msec v sec thing. > On Sep 23, 2016, at 11:02 AM, Sterling Hughes wrote: > > 2 reasons: > > - most (all) chips provide that granularity that i’ve seen,

Re: hal watchdog

2016-09-23 Thread Sterling Hughes
2 reasons: - most (all) chips provide that granularity that i’ve seen, so why not? IMO, it’s not up for us to decide what people set watchdog interval to in the HAL if it’s portable. - as you point out, it’s convenient to have a consistent timebase between sanity and watchdog, given how

Re: hal watchdog

2016-09-23 Thread will sanfilippo
Why is the interval defined in milliseconds btw? Is there a particular reason for it? Is it because you wanted to be able to separate the sanity interval and the watchdog interval by less than one second? Or are you worried that some watchdogs may have very small timeouts and milliseconds would

Re: hal watchdog

2016-09-22 Thread Sterling Hughes
Hey — A follow up on this, I’ve committed initial support for the Nordic platforms for the watchdog, along with modifying this API a bit. I made the watchdog expiry a millisecond value (in hal_watchdog_init()), as pretty much every watchdog I’ve seen executes in millisecond resolution. I

Re: hal watchdog

2016-08-30 Thread Mathew Calmer
On August 30, 2016 at 12:28:50 PM, will sanfilippo (wi...@runtime.io) wrote: Sounds reasonable. As I am sure you know, doing it through the sanity task sometimes is an issue getting the time right as you would then need to know the worst-case timing of all the tasks

Re: hal watchdog

2016-08-30 Thread Sterling Hughes
Hi, 2) When developers create the system and want a HW watchdog, what in the OS tickles the watchdog? Is that done by the sanity task or is it done by the OS in some other manner (os time tick, for example)? Or does the creator of the application need to provide for the tickle? This would

Re: hal watchdog

2016-08-30 Thread will sanfilippo
Sounds reasonable. As I am sure you know, doing it through the sanity task sometimes is an issue getting the time right as you would then need to know the worst-case timing of all the tasks that could be running… but any way you cut it, you have to put some time limit on that… in past lives I