This is the mail archive of the
mailing list for the eCos project.
Re: Conditional define of HAL_DELAY_US in Cortex-M architecture HAL
- From: Ilija Kocho <ilijak at siva dot com dot mk>
- To: ecos-patches at ecos dot sourceware dot org
- Date: Thu, 16 Dec 2010 12:28:39 +0100
- Subject: Re: Conditional define of HAL_DELAY_US in Cortex-M architecture HAL
- References: <4D08BE09.email@example.com> <4D08E56D.firstname.lastname@example.org>
On 15.12.2010 16:57, Gary Thomas wrote:
> On 12/15/2010 06:09 AM, Ilija Kocho wrote:
>> This is a small patch that enables redefinition of HAL_DELAY_US at
>> variant or platform level.
>> An example use case is substitution of hal_delay_us() with "equivalent"
>> that provides sub microsecond polling (for devices that require low
>> latency response).
> Just curious; what good does "sub microsecond polling" do when
> this function defines the delay in microseconds??
Such an example is USB serial device for RedBoot (that we are working on
and are going to contribute soon).
Response delay of 10ms, or even 1ms is too much for USB. True, it
doesn't have to be sub microsecond, but for shared medium such as USB
it's good to be ASAP. In reality, with typical system clock frequency of
Cortex-M controllers typical response shall be bellow 1us (worst case
may be above).
> Note: I don't have a problem with the concept as in most cases
> the ability to provide architecture/family/target overrides is
> considered useful.