On 08/29/13 12:01 AM, Eugeniy Meshcheryakov wrote:
Hello,
26 серпня 2013 о 19:05 +0200 Karel Gardas написав(-ла):
+ lm3s69xx_syscon_delay_3x_clocks(524288);
What is this large delay for? Where the number came from?
This comes from TI's StellarisWare SysCtlClockSet function. I've
used that value since I've thought TI knows what they do (and what
they don't correctly describe in spec.) and that's it's probably
there for compatibility reason. The comment to this value claims
that you need to give used oscillator a time to stabilize and more
time is used for faster clock source. Anyway, the value is not
needed for my board so if you don't like it I'm free to remove it.
Well, at that place main oscillator is powered off. And internal
osicallator will not be used once PLL is running. I think this delay can
be removed.
OK, will remove it then.
You do the same with SYSCONRCC2_OSCSRC2_MSK. Oring with
SYSCONRCC2_OSCSRC2_MSK cannot be possibly correct, you should use some
constant similar to SYSCONRCC_OSCSRC_IOSC. SYSCONRCC2_OSCSRC2_MSK = 7 in
this field corresponds to 32 kHz oscillator that I dont have available
on my board.
Indeed, that's a bug, but on the other hand coincidentally works.
Anyway what I'd like to use is:
rcc2 = (rcc2& ~(SYSCONRCC2_PWRDN2 | SYSCONRCC2_OSCSRC2_MSK))
| SYSCONRCC2_USERCC2 | SYSCONRCC2_OSCSRC2(0x0);
as I'd like to use main oscillator. Are you OK with that?
Yes, that fixes my board.
Cool!
BTW, although you claim 32 kHz oscillaros is not available on your
board, I've looked into both lm3s6965 and lm3s3749 and both provides
0x7 value for 32.768 kHz external oscillator -- perhaps you've been
looking in RCC paragraph instead of RCC2?
No, all those MCUs support 32kHz oscillators, but to use them one need
to have external components, that my board does not have.
ACK, so I'll amend the previous patch and resubmit again for your review.
Thanks a lot for your time!
Karel
_______________________________________________
rtems-devel mailing list
[email protected]
http://www.rtems.org/mailman/listinfo/rtems-devel