[PATCH 2/2] bsp/lm4f120: new BSP to support TI LM4F120 XL LaunchPad board
Karel Gardas
karel.gardas at centrum.cz
Mon Aug 19 21:13:06 UTC 2013
On 08/19/13 10:07 PM, Eugeniy Meshcheryakov wrote:
> 19 серпня 2013 о 20:40 +0200 Karel Gardas написав(-ла):
>> On 08/14/13 11:49 PM, Eugeniy Meshcheryakov wrote:
>>> Hi,
>>>
>>> 14 серпня 2013 о 16:54 +0200 Karel Gardas написав(-ла):
>>>> What makes me more nervous about supporting older chips is addition:
>>>>
>>>> rcc&= SYSCONRCC_MOSCDIS;
>>>> syscon->rcc = rcc;
>>> Ugh, wait, you are clearing all bits but SYSCONRCC_MOSCDIS in RCC? That
>>> could not be right. Did you mean to do
>>>
>>> rcc&= ~SYSCONRCC_MOSCDIS;
>>>
>>> ??
>>
>> No, I mean exactly what's there. What's the problem with disabling
>> main oscillator here? i.e. to disable main oscillator you need to
>> set MOSCDIS.
>>
> You cannot set MOSCDIS by using&= , you need |=. By using&= you are
> clearing all bits but MOSCDIS, including reserved bits and previously
> set SYSCONRCC_BYPASS. MOSCDIS is _not_ changed by this, but it is set
> after reset on both MCUs.
Err, indeed, good catch! With rcc |= SYSCONRCC_MOSCDIS; everything's
running fine here...
Karel
More information about the devel
mailing list