--- a/STM8S_StdPeriph_Driver/inc/stm8s.h
+++ b/STM8S_StdPeriph_Driver/inc/stm8s.h
@@ -259,7 +259,7 @@
 /**
   * @brief  General Purpose I/Os (GPIO)
   */
-typedef struct GPIO_struct
+ typedef volatile struct GPIO_struct
 {
   __IO uint8_t ODR; /*!< Output Data Register */
   __IO uint8_t IDR; /*!< Input Data Register */
@@ -288,7 +288,7 @@
 /**
   * @brief  Analog to Digital Converter (ADC1)
   */
- typedef struct ADC1_struct
+ typedef volatile struct ADC1_struct
  {
   __IO uint8_t DB0RH;         /*!< ADC1 Data Buffer Register (MSB)  */
   __IO uint8_t DB0RL;         /*!< ADC1 Data Buffer Register (LSB)  */
@@ -380,7 +380,7 @@
   * @brief  Analog to Digital Converter (ADC2)
   */
 #if defined(STM8S208) || defined(STM8S207) || defined (STM8S007) || defined (STM8AF52Ax) || defined (STM8AF62Ax)
- typedef struct ADC2_struct
+ typedef volatile struct ADC2_struct
  {
   __IO uint8_t CSR;        /*!< ADC2 control status register */
   __IO uint8_t CR1;        /*!< ADC2 configuration register 1 */
@@ -430,7 +430,7 @@
 /**
   * @brief  Auto Wake Up (AWU) peripheral registers.
   */
-typedef struct AWU_struct
+ typedef volatile struct AWU_struct
 {
   __IO uint8_t CSR; /*!< AWU Control status register */
   __IO uint8_t APR; /*!< AWU Asynchronous prescaler buffer */
@@ -470,7 +470,7 @@
   * @brief  Beeper (BEEP) peripheral registers.
   */
 
-typedef struct BEEP_struct
+ typedef volatile struct BEEP_struct
 {
   __IO uint8_t CSR; /*!< BEEP Control status register */
 }
@@ -498,7 +498,7 @@
 /**
   * @brief  Clock Controller (CLK)
   */
-typedef struct CLK_struct
+ typedef volatile struct CLK_struct
 {
   __IO uint8_t ICKR;     /*!< Internal Clocks Control Register */
   __IO uint8_t ECKR;     /*!< External Clocks Control Register */
@@ -602,7 +602,7 @@
   * @brief  16-bit timer with complementary PWM outputs (TIM1)
   */
 
-typedef struct TIM1_struct
+ typedef volatile struct TIM1_struct
 {
   __IO uint8_t CR1;   /*!< control register 1 */
   __IO uint8_t CR2;   /*!< control register 2 */
@@ -814,7 +814,7 @@
   * @brief  16-bit timer (TIM2)
   */
 
-typedef struct TIM2_struct
+ typedef volatile struct TIM2_struct
 {
   __IO uint8_t CR1;   /*!< control register 1 */
 #if defined(STM8S103) || defined(STM8S003)
@@ -942,7 +942,7 @@
 /**
   * @brief  16-bit timer (TIM3)
   */
-typedef struct TIM3_struct
+ typedef volatile struct TIM3_struct
 {
   __IO uint8_t CR1;   /*!< control register 1 */
   __IO uint8_t IER;   /*!< interrupt enable register */
@@ -1048,7 +1048,7 @@
   * @brief  8-bit system timer (TIM4)
   */
 
-typedef struct TIM4_struct
+ typedef volatile struct TIM4_struct
 {
   __IO uint8_t CR1;  /*!< control register 1 */
 #if defined(STM8S103) || defined(STM8S003)
@@ -1111,7 +1111,7 @@
   * @brief  16-bit timer with synchro module (TIM5)
   */
 
-typedef struct TIM5_struct
+ typedef volatile struct TIM5_struct
 {
   __IO uint8_t CR1;       /*!<TIM5 Control Register 1                */
   __IO uint8_t CR2;       /*!<TIM5 Control Register 2                */
@@ -1250,7 +1250,7 @@
   * @brief  8-bit system timer  with synchro module(TIM6)
   */
 
-typedef struct TIM6_struct
+ typedef volatile struct TIM6_struct
 {
     __IO uint8_t CR1; 	/*!< control register 1 */
     __IO uint8_t CR2; 	/*!< control register 2 */
@@ -1318,7 +1318,7 @@
   * @brief  Inter-Integrated Circuit (I2C)
   */
 
-typedef struct I2C_struct
+ typedef volatile struct I2C_struct
 {
   __IO uint8_t CR1;       /*!< I2C control register 1 */
   __IO uint8_t CR2;       /*!< I2C control register 2 */
@@ -1425,7 +1425,7 @@
   * @brief  Interrupt Controller (ITC)
   */
 
-typedef struct ITC_struct
+ typedef volatile struct ITC_struct
 {
   __IO uint8_t ISPR1; /*!< Interrupt Software Priority register 1 */
   __IO uint8_t ISPR2; /*!< Interrupt Software Priority register 2 */
@@ -1463,7 +1463,7 @@
   * @brief  External Interrupt Controller (EXTI)
   */
 
-typedef struct EXTI_struct
+ typedef volatile struct EXTI_struct
 {
   __IO uint8_t CR1; /*!< External Interrupt Control Register for PORTA to PORTD */
   __IO uint8_t CR2; /*!< External Interrupt Control Register for PORTE and TLI */
@@ -1504,7 +1504,7 @@
   * @brief  FLASH program and Data memory (FLASH)
   */
 
-typedef struct FLASH_struct
+ typedef volatile struct FLASH_struct
 {
   __IO uint8_t CR1;       /*!< Flash control register 1 */
   __IO uint8_t CR2;       /*!< Flash control register 2 */
@@ -1574,7 +1574,7 @@
 /**
   * @brief  Option Bytes (OPT)
   */
-typedef struct OPT_struct
+ typedef volatile struct OPT_struct
 {
   __IO uint8_t OPT0;  /*!< Option byte 0: Read-out protection (not accessible in IAP mode) */
   __IO uint8_t OPT1;  /*!< Option byte 1: User boot code */
@@ -1599,7 +1599,7 @@
   * @brief  Independent Watchdog (IWDG)
   */
 
-typedef struct IWDG_struct
+ typedef volatile struct IWDG_struct
 {
   __IO uint8_t KR;  /*!< Key Register */
   __IO uint8_t PR;  /*!< Prescaler Register */
@@ -1623,7 +1623,7 @@
   * @brief  Window Watchdog (WWDG)
   */
 
-typedef struct WWDG_struct
+ typedef volatile struct WWDG_struct
 {
   __IO uint8_t CR; /*!< Control Register */
   __IO uint8_t WR; /*!< Window Register */
@@ -1661,7 +1661,7 @@
   * @brief  Reset Controller (RST)
   */
 
-typedef struct RST_struct
+ typedef volatile struct RST_struct
 {
   __IO uint8_t SR; /*!< Reset status register */
 }
@@ -1686,7 +1686,7 @@
   * @brief  Serial Peripheral Interface (SPI)
   */
 
-typedef struct SPI_struct
+ typedef volatile struct SPI_struct
 {
   __IO uint8_t CR1;    /*!< SPI control register 1 */
   __IO uint8_t CR2;    /*!< SPI control register 2 */
@@ -1757,7 +1757,7 @@
   * @brief  Universal Synchronous Asynchronous Receiver Transmitter (UART1)
   */
 
-typedef struct UART1_struct
+ typedef volatile struct UART1_struct
 {
   __IO uint8_t SR;   /*!< UART1 status register */
   __IO uint8_t DR;   /*!< UART1 data register */
@@ -1855,7 +1855,7 @@
   * @brief  Universal Synchronous Asynchronous Receiver Transmitter (UART2)
   */
 
-typedef struct UART2_struct
+ typedef volatile struct UART2_struct
 {
   __IO uint8_t SR;   /*!< UART1 status register */
   __IO uint8_t DR;   /*!< UART1 data register */
@@ -1963,7 +1963,7 @@
   * @brief  LIN Universal Asynchronous Receiver Transmitter (UART3)
   */
 
-typedef struct UART3_struct
+ typedef volatile struct UART3_struct
 {
   __IO uint8_t SR;       /*!< status register */
   __IO uint8_t DR;       /*!< data register */
@@ -2056,7 +2056,7 @@
   * @brief  Controller Area Network  (CAN)
   */
 
-typedef struct
+ typedef volatile struct
 {
   __IO uint8_t MCR;    /*!< CAN master control register */
   __IO uint8_t MSR;    /*!< CAN master status register */
@@ -2414,7 +2414,7 @@
   * @brief  Configuration Registers (CFG)
   */
 
-typedef struct CFG_struct
+ typedef volatile struct CFG_struct
 {
   __IO uint8_t GCR; /*!< Global Configuration register */
 }