[ECOS] Cortex-M1/3 SysTick/RTC
simon.kallweit@intefo.ch
simon.kallweit@intefo.ch
Thu Sep 11 16:02:00 GMT 2008
Andrew Lunn wrote:
>> Yes, I will use the SysTick for the real time clock source, moving this
>> to the architecture. So there will be no need to define this in new
>> variants and platforms. We probably should provide macros for overriding
>> though?!?
>>
>
> That is easy to do. The porting guide says the official interface is:
>
> HAL_CLOCK_INITIALIZE( period )
> HAL_CLOCK_RESET( vector, period )
> HAL_CLOCK_READ( pvalue )
>
> So you can include var_io.h or plf_io.h first and then do:
>
> ifndef HAL_CLOCK_INITIALIZE( period )
> #define HAL_CLOCK_INITIALIZE cyg_cortex_clock_init( (period))
> #endif
>
> etc...
>
Ok, moving the clock source to the architecture, we need a way to define
the frequency of the SysTick clock source, which is implementation
defined. Can we do this using a CDL interface, requiring the cortex
variants to provide the SysTick clock frequency? Otherwise we'd have to
move the clock functions back to the variant.
Simon
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
More information about the Ecos-discuss
mailing list