Re: Schedule task with strict fixed timing and variable workload

2016-12-28 Thread Kevin Townsend
I think you're right that this should follow the ADC model since the constraints are similar. On 28/12/16 19:19, Sterling Hughes wrote: +1 for PWM support, but as a driver, not HAL. https://issues.apache.org/jira/browse/MYNEWT-525 Sterling

Re: Schedule task with strict fixed timing and variable workload

2016-12-28 Thread Sterling Hughes
+1 for PWM support, but as a driver, not HAL. https://issues.apache.org/jira/browse/MYNEWT-525 Sterling On 28 Dec 2016, at 10:11, David G. Simmons wrote: +1 on PWM. dg On Dec 26, 2016, at 2:14 PM, will sanfilippo wrote: I think there was some discussion re: HAL PWM but

Re: Schedule task with strict fixed timing and variable workload

2016-12-28 Thread David G. Simmons
+1 on PWM. dg > On Dec 26, 2016, at 2:14 PM, will sanfilippo wrote: > > I think there was some discussion re: HAL PWM but I cannot quite recall the > end result. Maybe that this would be a driver instead of a HAL? I agree; PWM > is very commonly used so having PWM support

Re: Schedule task with strict fixed timing and variable workload

2016-12-27 Thread Sterling Hughes
+1 - I agree with this thread. https://issues.apache.org/jira/browse/MYNEWT-522 On 26 Dec 2016, at 10:26, Kevin Townsend wrote: Hi Will, Thanks for the feedback. 1) Unless you are the highest priority task, other tasks can run which could cause delays, and thus you are not waking up at the

Re: Schedule task with strict fixed timing and variable workload

2016-12-26 Thread will sanfilippo
I think there was some discussion re: HAL PWM but I cannot quite recall the end result. Maybe that this would be a driver instead of a HAL? I agree; PWM is very commonly used so having PWM support (in either driver or HAL form) should be added. > On Dec 26, 2016, at 10:26 AM, Kevin Townsend

Re: Schedule task with strict fixed timing and variable workload

2016-12-26 Thread Kevin Townsend
Hi Will, Thanks for the feedback. 1) Unless you are the highest priority task, other tasks can run which could cause delays, and thus you are not waking up at the desired time. Yeah, everything is based on the assumption that priority is resolved by design, and that the scheduling

Re: Schedule task with strict fixed timing and variable workload

2016-12-26 Thread will sanfilippo
There is nothing in the OS to delay until a specific OS time or to cause the scheduler to periodically wake up at a certain rate. There are different ways to go about doing this and it really depends on what you want. Using a task to guarantee timing can be tricky. Some things to be aware of

Re: Schedule task with strict fixed timing and variable workload

2016-12-26 Thread Kevin Townsend
Hi Fabio, Thanks for the feedback and suggestion. I didn't think to have separate sync and read tasks. It does add a decent amount of code when this could be solved with one or two lines and a built in helper class, but it's a workable and reliable solution today. I also tested the code

Re: Schedule task with strict fixed timing and variable workload

2016-12-26 Thread Fabio Utzig
Hi Kevin, One pattern I have used for solving the problem would be to create one extra task simply signaling the first task and looping on the required timeout. That guarantees to some extent that the first task is always waken up at a fixed rate. Something on the lines of (disclaimer: non-tested