memmap.inc 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. #if defined(STM32L0)
  2. #define USB_EPBASE 0x40005C00
  3. #define USB_REGBASE 0x40005C40
  4. #define USB_CNTR 0x00
  5. #define USB_ISTR 0x04
  6. #define USB_FNR 0x08
  7. #define USB_DADDR 0x0C
  8. #define USB_BTABLE 0x10
  9. #define USB_BCDR 0x18
  10. #define USB_PMABASE 0x40006000
  11. #define RCC_BASE 0x40021000
  12. #define RCC_APB1RSTR 0x28
  13. #define RCC_APB1ENR 0x38
  14. #define UID_BASE 0x1FF80050
  15. #elif defined(STM32L1)
  16. /* common definitions for STM31L100xx STM32L151xx STM32L152xx STM32L162xx */
  17. #define USB_EPBASE 0x40005C00
  18. #define USB_REGBASE 0x40005C40
  19. #define USB_CNTR 0x00
  20. #define USB_ISTR 0x04
  21. #define USB_FNR 0x08
  22. #define USB_DADDR 0x0C
  23. #define USB_BTABLE 0x10
  24. #define USB_PMABASE 0x40006000
  25. #define SYSCFG_BASE 0x40010000
  26. #define SYSCFG_PMC 0x04
  27. #define RCC_BASE 0x40023800
  28. #define RCC_APB1ENR 0x24
  29. #define RCC_APB1RSTR 0x18
  30. #define RCC_APB2ENR 0x20
  31. #if defined(STM32L100xB) || defined(STM32L100xBA) || \
  32. defined(STM32L151xB) || defined(STM32L151xBA)
  33. /* Cat.1 and Cat.2 devices */
  34. #define UID_BASE 0x1FF80050
  35. #else
  36. #define UID_BASE 0x1FF800D0
  37. #endif
  38. #else
  39. #error Unsupported MCU
  40. #endif