This is the mail archive of the mailing list for the eCos project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Cortex-M1/3 SysTick/RTC

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_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))


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.


Before posting, please read the FAQ:
and search the list archive:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]