AnsweredAssumed Answered

Activation Level

Question asked by on May 7, 2014
Latest reply on May 7, 2014 by
I'm using the STM8L101F3 with IAR. I would like to set and clear the Activation level bit.
There is no library function to access this and I'm not sure how to access this register from code.

Looking at iostm8l101f3.h, the register and bit is defined:

/* Global configuration register */
#ifdef __IAR_SYSTEMS_ICC__
typedef struct
  unsigned char SWD         : 1;
  unsigned char AL          : 1;

#define CPU_CFG_GCR_AL           CPU_CFG_GCR_bit.AL

But trying to modify the bit from code using:


generates an error:  Error[Pe020]: identifier "CPU_CFG_GCR_AL" is undefined

How can I modify this bit?