[PATCH] bsp/lm4f120: new BSP to support TI LM4F120 XL LaunchPad board

Eugeniy Meshcheryakov eugen at debian.org
Wed Aug 28 22:01:14 UTC 2013


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.

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

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

Regards,
Eugeniy Meshcheryakov
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.rtems.org/pipermail/devel/attachments/20130829/14323a1c/attachment.bin>


More information about the devel mailing list