[ECOS] Cortex-M1/3 SysTick/RTC

simon.kallweit@intefo.ch simon.kallweit@intefo.ch
Thu Sep 11 15:44:00 GMT 2008


Andrew Lunn wrote:
> On Thu, Sep 11, 2008 at 05:18:11PM +0200, simon.kallweit@intefo.ch wrote:
>   
>> I had a quick look at the ecos clock system. The clock is usually  
>> implemented using a timer interrupt in the variant or platform code.  
>> With the Cortex-M1/3, we have a SysTick timer which belongs to the  
>> architecture itself. I think we should use the SysTick as the clock  
>> source.
>>     
>
> I agree. Use the NVIC clock. It is there, always. It makes a port to a
> new target so much simpler since often the clock is often a hard part.
>   

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?!?

>  The STM32 additionally provides an RTC, but I guess this should  
>   
>> be implemented as a Wallclock driver, right? A quick look over the  
>> wallclock interface showed that there is no function for setting wakeup  
>> alarms. Is this functionality defined elsewhere or is it missing?
>>     
>
> I just had a very quick look at the date sheet. The RTC looks like it
> could be used for a wallclock, however it depends on the hardware. Is
> it equipped with a 32.786 Hz clock? Is it using the internal RC clock?
> is it calibrated etc? So writing a generic STM32 wallclock driver
> might not be possible, it probably needs to the target specific.
>   

The RTC can be sourced from variable clocks. For serious RTC 
applications an external 32.768 is pretty much a must, so I guess the 
wallclock could define that as a requirement.



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