Giacomo Petrini

OSCTRIM = Optional on QY4A

Discussion created by Giacomo Petrini on Apr 23, 2007
Latest reply on Apr 24, 2007 by Giacomo Petrini
I'm using Codewarrior 3.1 and the Cyclone to program a QY4A micro.

I've "problem" setting the OSCTRIM. With the QY2 (and QY4)  trimming the oscillator with OSCTRIM = Optional (wich copy the value stored in the address 0xFFC0 in the OSCTRIM register) works fine.
With the QY4A there is an error (well maybe is done correctly, and it's me that has misunderstanded) in the mc68hc908qy4a.c and mc68hc908qy4a.h files.
In the qy4a.h there is:

extern const volatile OptionalSTR _Optional @0x0000FFC0;
#define Optional                        _Optional.Byte

but in the qy4.h there is

extern volatile OptionalSTR _Optional @0x0000FFC0;
#define Optional _Optional.Byte

and in the qy4a.c

the line declaring OptionalSTR _Optional is commented, and when I compile of course the linker can't find Optional.

It's this right? or I can eliminate the const and uncomment the line in the .c like for the QY4?

Thanks Bye Jack