SPARC BSP CLOCK_SPEED was Re: Why RTEMS timeslice is not as configured.

Fernando Nicodemos fgnicodemos at ncb.ind.br
Fri Aug 16 18:34:29 UTC 2013


Guys, i will finish my doctorate now. 3 months left.
After that time, if no one appears i can take this, ok?

Regards,

*Fernando G. Nicodemos*
*Diretor de Pesquisa e Desenvolvimento

***®*NCB - Sistemas **Embarcados Ltda.*
*23° 09’ 24.87”S**     45° 47’ 26.49”W*
São José dos Campos - SP - Brasil
t.:+55 (12) *3905.2243*                *
www.ncb.ind.br*

*AVISO:* Esta mensagem pode conter informações privilegiadas e seu conteúdo
é confidencial. É endereçada somente para destinatários conhecidos. Se você
não for um destinatário conhecido, não está autorizado a distribuir,
divulgar, imprimir, copiar e se utilizar desta mensagem e seu conteúdo.


2013/8/14 Joel Sherrill <joel.sherrill at oarcorp.com>

>  Awesome!! That was one of the ideas I recall being mentioned!!!
>
> Asking a general question now. For sparc BSP users, any ideas
> on how to override CLOCK_SPEED without modifying the BSP.
> Currently this is a value in start.S.
>
> One thought would be to add a configure time BSP option.
> I think other BSPs have used linker variables which can be
> overridden at link time.
>
> Ideas?
>
> On 8/14/2013 2:35 PM, Fernando Nicodemos wrote:
>
>  Guys,
>
>  Problem solved.
>  I forgot to configure the register in the right way, exactly with the
> correct oscillator value. In this case our board use a 24MHz external
> oscilator. ERC32 core and system runs at 12MHz with this oscillator. So the
> function the configure this is:
>
>  #include <stdint.h>
> #include "hardware.h"
> #include <bsp.h>
>
>  void hardware_setup(void)
> {
>
>   CLOCK_SPEED =
> 12
> ; // <---- use the right ERC32 core clock value here
> (half from external oscilator)
>
>    /* approximately 1 us per countdown */
>   ERC32_MEC.Real_Time_Clock_Scalar  = CLOCK_SPEED - 1;
>   ERC32_MEC.Real_Time_Clock_Counter =
>       rtems_configuration_get_microseconds_per_tick();
>
>    ERC32_MEC_Set_Real_Time_Clock_Timer_Control(
>       ERC32_MEC_TIMER_COUNTER_ENABLE_COUNTING |
>         ERC32_MEC_TIMER_COUNTER_LOAD_SCALER |
>             ERC32_MEC_TIMER_COUNTER_LOAD_COUNTER
>     );
>
>      ERC32_MEC_Set_Real_Time_Clock_Timer_Control(
>       ERC32_MEC_TIMER_COUNTER_ENABLE_COUNTING |
>             ERC32_MEC_TIMER_COUNTER_RELOAD_AT_ZERO);
>
>  }
>
>
>  Thanks to all
>
>    Regards
>>
>>
>> *Fernando G. Nicodemos*
>> *Diretor de Pesquisa e Desenvolvimento
>>
>> ***®*NCB - Sistemas **Embarcados Ltda.*
>> *23° 09’ 24.87”S**     45° 47’ 26.49”W*
>> São José dos Campos - SP - Brasil
>> t.:+55 (12) *3905.2243*                *
>> www.ncb.ind.br*
>>
>> *AVISO:* Esta mensagem pode conter informações privilegiadas e seu
>> conteúdo é confidencial. É endereçada somente para destinatários
>> conhecidos. Se você não for um destinatário conhecido, não está autorizado
>> a distribuir, divulgar, imprimir, copiar e se utilizar desta mensagem e seu
>> conteúdo.
>>
>>
>>   2013/8/14 Chris Johns <chrisj at rtems.org>
>>
>>> Fernando Nicodemos wrote:
>>>
>>>> Guys, problems solved.
>>>>
>>>> We forgot to change the right clock value in linkcomands.
>>>> Our board works on 12MHz in the core.
>>>>
>>>>
>>>  Well done. It may pay to post to the list this.
>>>
>>> Chris
>>>
>>
>>
>
>
> --
> Joel Sherrill, Ph.D.             Director of Research & Development joel.sherrill at OARcorp.com        On-Line Applications Research
> Ask me about RTEMS: a free RTOS  Huntsville AL 35805
> Support Available                (256) 722-9985
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20130816/919db969/attachment-0001.html>


More information about the users mailing list