[
https://issues.apache.org/jira/browse/MYNEWT-431?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15563512#comment-15563512
]
William San Filippo commented on MYNEWT-431:
--------------------------------------------
We decided to make cputime an OS service as opposed to a HAL as cputime did not
really belong in the HAL. The HAL timer API now provides a resource for high
resolution timers which is used by os cputime. In order to use cputime with
your application you will need to do two things:
1) Pick a timer to use for cputime. This is done by adding a configuration for
OS_CPUTIME_TIMER_NUM. Below you can see an example from the nrf52dk.
OS_CPUTIME_TIMER_NUM:
description: 'Timer to use for cputime'
value: 0
2) Enable the timer chosen since, by default, all timers are disabled in the
bsps. Example:
TIMER_0:
description: 'NRF52 Timer 0'
value: 1
Note that the bsps used by the ble stack have added the cputime timer
definition by default.
> Move cputime into OS
> --------------------
>
> Key: MYNEWT-431
> URL: https://issues.apache.org/jira/browse/MYNEWT-431
> Project: Mynewt
> Issue Type: Task
> Components: HAL
> Affects Versions: v0_9_0
> Reporter: William San Filippo
> Assignee: William San Filippo
> Fix For: v1_0_0_beta1
>
>
> We have decided to move cputime out of the HAL and into the OS.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)