2021-07-25 08:58 AM
2021-07-25 09:49 AM
The "USB" define is correct and matches the RM.
#define USB ((USB_TypeDef *) USB1_BASE)
#define USB1_BASE (APB1PERIPH_BASE + 0x00006800UL)
The "USB_BASE" define is incorrect. Possibly a copy/paste error from another chip.
#define USB_BASE (0x40005C00UL)
I2C3 is actually at this address:
#define PERIPH_BASE (0x40000000UL)/*!< Peripheral base address */
#define I2C3_BASE (APB1PERIPH_BASE + 0x00005C00UL)
#define APB1PERIPH_BASE PERIPH_BASE
2021-07-25 09:49 AM
The "USB" define is correct and matches the RM.
#define USB ((USB_TypeDef *) USB1_BASE)
#define USB1_BASE (APB1PERIPH_BASE + 0x00006800UL)
The "USB_BASE" define is incorrect. Possibly a copy/paste error from another chip.
#define USB_BASE (0x40005C00UL)
I2C3 is actually at this address:
#define PERIPH_BASE (0x40000000UL)/*!< Peripheral base address */
#define I2C3_BASE (APB1PERIPH_BASE + 0x00005C00UL)
#define APB1PERIPH_BASE PERIPH_BASE