简体   繁体   中英

What does RESERVERD0 in Registers like USART1 in stm32f103 mean in stm32f10x.h header file? And how do I define a custom struct for the same?

So recently I started bare-metal programming an stm32f103 device, and I was referring a builtin file "stm32f10x.h" in Keil uVision5, and I came across the TypeDef of USART struct it was like,

      typedef struct
      {
      __IO uint16_t SR;
      uint16_t  RESERVED0;
      __IO uint16_t DR;
      uint16_t  RESERVED1;
      __IO uint16_t BRR;
      uint16_t  RESERVED2;
      __IO uint16_t CR1;
      uint16_t  RESERVED3;
      __IO uint16_t CR2;
      uint16_t  RESERVED4;
      __IO uint16_t CR3;
      uint16_t  RESERVED5;
      __IO uint16_t GTPR;
      uint16_t  RESERVED6;
      } USART_TypeDef;

And I could not able to find any declaration or reference for these RESERVEDx registers. And if I want to define one custom struct for this register how do I do it? Thanks in advance:)

They are not RESERVEDx registers only higher word of the 32 bit register which should not be touched. Simply ignore them, do not touch them, do not think about them.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM