[
https://issues.apache.org/jira/browse/MYNEWT-329?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15431722#comment-15431722
]
William San Filippo commented on MYNEWT-329:
--------------------------------------------
Modified the code so that the user does not need to define HAL_CPUTIME_1MHZ.
This definition is now set by default. In order to change this, the user now
should define HAL_CPUTIME and set it to some value other than 1000000 in their
project, target or BSP. For example:
/* Definition for HAL to count at 10MHz frequency (100ns per tick) */
#define HAL_CPUTIME 10000000
The reason for this change is that I suspect a typical CPUTIME implementation
will either use a 32.768 crystal (which is not yet implemented btw) or will use
a 1 usec CPUTIME as this is more efficient when converting microseconds to
ticks (and vice versa); plus the resolution is small enough to be used for most
applications.
> Make hal cputime more efficient when 1 MHz clock is used.
> ---------------------------------------------------------
>
> Key: MYNEWT-329
> URL: https://issues.apache.org/jira/browse/MYNEWT-329
> Project: Mynewt
> Issue Type: Improvement
> Components: HAL, Nimble
> Affects Versions: v0_9_0
> Reporter: William San Filippo
> Assignee: William San Filippo
> Fix For: v0_10_0
>
>
> We can make hal cputime be more efficient if we assume a 1 MHz frequency as
> the timebase for hal cputime.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)