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.

Regards,
Eugeniy Meshcheryakov

Attachment: signature.asc
Description: Digital signature

_______________________________________________
rtems-devel mailing list
rtems-devel@rtems.org
http://www.rtems.org/mailman/listinfo/rtems-devel

Reply via email to