<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Awesome!! That was one of the ideas I
recall being mentioned!!!<br>
<br>
Asking a general question now. For sparc BSP users, any ideas<br>
on how to override CLOCK_SPEED without modifying the BSP.<br>
Currently this is a value in start.S. <br>
<br>
One thought would be to add a configure time BSP option.<br>
I think other BSPs have used linker variables which can be<br>
overridden at link time.<br>
<br>
Ideas?<br>
<br>
On 8/14/2013 2:35 PM, Fernando Nicodemos wrote:<br>
</div>
<blockquote
cite="mid:CAL5Gzm5djw269sbkCRDtRm=gD1-TF0yK2mrCF3VD60q_BjKc8A@mail.gmail.com"
type="cite">
<div dir="ltr">
<div class="gmail_default"
style="font-family:verdana,sans-serif;font-size:small">Guys,<br>
<br>
</div>
<div class="gmail_default"
style="font-family:verdana,sans-serif;font-size:small">Problem
solved.<br>
</div>
<div class="gmail_default"
style="font-family:verdana,sans-serif;font-size:small">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:<br>
</div>
<div class="gmail_extra"><br>
<div style="font-family:verdana,sans-serif;font-size:small">
<div>
<div>#include <stdint.h></div>
<div>#include "hardware.h"</div>
<div>#include <bsp.h></div>
<div><br>
</div>
<div>
void hardware_setup(void)</div>
<div>{</div>
<br>
<div> CLOCK_SPEED =
<div class="gmail_default"
style="font-family:verdana,sans-serif;font-size:small;display:inline">12</div>
; // <---- use the right ERC32 core clock value here
<div class="gmail_default"
style="font-family:verdana,sans-serif;font-size:small;display:inline">
(half from external oscilator)</div>
</div>
<div><br>
</div>
<div> /* approximately 1 us per countdown */</div>
<div> ERC32_MEC.Real_Time_Clock_Scalar = CLOCK_SPEED -
1;</div>
<div> ERC32_MEC.Real_Time_Clock_Counter =</div>
<div>
rtems_configuration_get_microseconds_per_tick();</div>
<div><br>
</div>
<div> ERC32_MEC_Set_Real_Time_Clock_Timer_Control(</div>
<div> ERC32_MEC_TIMER_COUNTER_ENABLE_COUNTING |</div>
<div> ERC32_MEC_TIMER_COUNTER_LOAD_SCALER |</div>
<div> ERC32_MEC_TIMER_COUNTER_LOAD_COUNTER</div>
<div> );</div>
<div><br>
</div>
<div> ERC32_MEC_Set_Real_Time_Clock_Timer_Control(</div>
<div> ERC32_MEC_TIMER_COUNTER_ENABLE_COUNTING |</div>
<div> ERC32_MEC_TIMER_COUNTER_RELOAD_AT_ZERO);</div>
<div><br>
</div>
<div>}
<div class="gmail_default"
style="font-family:verdana,sans-serif;font-size:small;display:inline"><br>
<br>
</div>
<div class="gmail_default"
style="font-family:verdana,sans-serif;font-size:small;display:inline">
Thanks to all</div>
</div>
</div>
<br>
</div>
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div
style="font-family:verdana,sans-serif;font-size:small">
Regards<br>
</div>
<div
style="font-family:verdana,sans-serif;font-size:small">
<br>
</div>
</div>
<div class="gmail_extra">
<div class="im"><br clear="all">
<div><font
style="font-family:arial,helvetica,sans-serif"><b
style="color:rgb(0,0,153)">Fernando G. Nicodemos</b></font><br
style="font-family:arial,helvetica,sans-serif">
<font style="font-family:arial,helvetica,sans-serif"
size="1"><i style="color:rgb(51,51,51)">Diretor de
Pesquisa e Desenvolvimento<br>
<br>
</i><b><span style="color:rgb(0,0,153)"></span></b></font><font
style="font-family:arial,helvetica,sans-serif"><span
style="color:rgb(0,0,153)">®</span></font><b
style="color:rgb(0,0,153);font-family:arial,helvetica,sans-serif"><font>NCB
- Sistemas </font></b><b
style="font-family:arial,helvetica,sans-serif"><span
style="color:rgb(0,0,153)"><font>Embarcados
Ltda.</font></span></b><font
style="font-family:arial,helvetica,sans-serif"
size="1"><font><font size="1"><span
style="color:rgb(0,0,153)"></span></font></font></font><font
style="font-family:arial,helvetica,sans-serif"
size="1"><font><font size="1"><span
style="color:rgb(0,0,153)"><br>
</span></font></font></font><b
style="color:rgb(0,0,153);font-family:arial,helvetica,sans-serif"><font
size="1"><span lang="PT-BR">23</span><span>°</span><span
lang="PT-BR"> 09’ 24.87”S</span></font></b><b
style="font-family:arial,helvetica,sans-serif"><font
size="1"><span lang="PT-BR"><span
style="color:rgb(0,0,153)"> 45</span></span><span
style="color:rgb(0,0,153)" lang="PT-BR">° 47’
26.49”W</span></font></b>
<font style="font-family:arial,helvetica,sans-serif"
size="1"><font><font size="1"><span
style="color:rgb(0,0,153)"></span></font></font></font><font
style="font-family:arial,helvetica,sans-serif"
size="1"><font><font size="1"><span
style="color:rgb(0,0,153)"><br>
São José dos Campos - SP - Brasil</span></font></font></font><span
style="font-size:7pt;color:rgb(0,0,153);font-family:arial,helvetica,sans-serif"></span><br>
<font style="font-family:arial,helvetica,sans-serif"
size="1"><font><font size="1"><span
style="color:rgb(0,0,153)">t.:+55 (12) </span><b
style="color:rgb(0,0,153)">3905.2243</b></font></font></font><font
style="font-family:arial,helvetica,sans-serif"
size="1"> </font><font
style="font-family:arial,helvetica,sans-serif"
size="1"><b style="color:rgb(0,0,153)"><br>
<a moz-do-not-send="true"
href="http://www.ncb.ind.br" target="_blank">www.ncb.ind.br</a></b></font><span
style="font-size:7pt;color:rgb(153,153,153);font-family:arial,helvetica,sans-serif"></span><font
size="1"><span
style="font-family:arial,helvetica,sans-serif"><br>
</span></font><span
style="font-size:7pt;color:rgb(153,153,153)"><br>
<b style="font-family:tahoma,sans-serif">AVISO:</b><span
style="font-family:tahoma,sans-serif"> 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.</span></span><br>
</div>
<br>
<br>
</div>
<div>
<div class="h5">
<div class="gmail_quote">2013/8/14 Chris Johns <span
dir="ltr"><<a moz-do-not-send="true"
href="mailto:chrisj@rtems.org" target="_blank">chrisj@rtems.org</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0
0 .8ex;border-left:1px #ccc
solid;padding-left:1ex">
<div>Fernando Nicodemos wrote:<br>
<blockquote class="gmail_quote"
style="margin:0 0 0 .8ex;border-left:1px
#ccc solid;padding-left:1ex">
Guys, problems solved.<br>
<br>
We forgot to change the right clock value in
linkcomands.<br>
Our board works on 12MHz in the core.<br>
<br>
</blockquote>
<br>
</div>
Well done. It may pay to post to the list this.<span><font
color="#888888"><br>
<br>
Chris<br>
</font></span></blockquote>
</div>
<br>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Joel Sherrill, Ph.D. Director of Research & Development
<a class="moz-txt-link-abbreviated" href="mailto:joel.sherrill@OARcorp.com">joel.sherrill@OARcorp.com</a> On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985 </pre>
</body>
</html>