Re: OS time tick initialization

2016-02-03 Thread p...@wrada.com
Thanks Will, I was reading this which shows some headaches of the multi platform SOC issues that Linux had. https://archive.fosdem.org/2013/schedule/event/arm_in_the_linux_kernel/atta chments/slides/273/export/events/attachments/arm_in_the_linux_kernel/slides /273/arm_support_kernel.pdf I

Re: OS time tick initialization

2016-02-03 Thread will sanfilippo
That is a good question; wish I had a good answer. For now we could kick the can down the road and simply pass the priority in the API. Or just have the BSP program the interrupt priority to 1 less than the lowest priority. We could also return the interrupt vector used by the BSP to the OS and

Re: OS time tick initialization

2016-02-03 Thread p...@wrada.com
I just pulled your changes and went to implement os_bsp_systick_init(). It was really just moving systick_init from os_arch_arm.c to os_bsp.c. However, the current sys tick_init code needs an interrupt vector priority which depends on the priority of the SVC. How should we resolve the interrupt

OS time tick initialization

2016-02-02 Thread will sanfilippo
Hello: Porting the OS to the nrf51 has exposed an issue for certain cortex-M MCU’s, namely the lack of SysTick. Furthermore, it may be advantageous from a power perspective to use a different timer for the OS time tick. Thus, the problem is this: how does the developer pick the timer to use

Re: OS time tick initialization

2016-02-02 Thread will sanfilippo
Well, that would have been a better way to put it if you ask me. :-) A good example of picking a different timer would be time accuracy vs power related savings. For example, a device that is constantly powered may want to use a timer off a high accuracy crystal as opposed to one that is lower

Re: OS time tick initialization

2016-02-02 Thread p...@wrada.com
I¹ll throw in my support as well. Certainly on some processors different timers have different current draw and require different sleep states. For wearables, this is super critical for battery life. I expect that folks will want to use alternate timers for the system tick to maximize battery

Re: OS time tick initialization

2016-02-02 Thread p...@wrada.com
One more quick note. I think that there are probably a number of things in the MCU that are good defaults for most folks, but we may want to allow override in the BSP. I wish I had a good list, but I don’t :(. On 2/2/16, 2:43 PM, "p...@wrada.com" wrote: >I¹ll throw in my