I try to disable the SWIM interface in a STM8AL3168 derivative but it does not seem to work (see details). What am I doing or thinking wrong?
I try to disable the SWIM interface in a STM8AL3168 derivative, by setting the SWD bit of the global configuration register (CFG_GCR) = 1 in main().
typedef struct CFG_struct
{
__IO uint8_t GCR; /*!< Global Configuration register */
}
CFG_TypeDef;
#define CFG ((CFG_TypeDef *) CFG_BASE)
#define CFG_BASE (uint16_t)0x7F60
CFG->GCR = 0x01;
But this does not seem to work, because afterwards I can still read out the programm memory using the ST Visual Programmer.
What am I doing or thinking wrong?
