Remove unsuitable clock configurations from init code

Only 48MHz, 72MHz, 96MHz and 120 MHz system clocks derived from an
external crystal are suitable for the usb peripheral, as the internal
oscillator is not stable enough. Also the usb-prescaler only supports
division by 1 (48MHZ), 1.5(72MHz), 2(96MHz) and 2.5(120Mhz).
120Mhz is also out of spec and not added here.
This commit is contained in:
Stefan Kerkmann
2021-08-07 11:03:16 +02:00
parent 733a362436
commit 1d2a57a9e1
2 changed files with 30 additions and 615 deletions
@@ -7,13 +7,16 @@
// 4 bits for interrupt level, 0 for priority.
// level 0 = lowest priority, level 15 = highest priority.
#define __ECLIC_INTCTLBITS 4
#define __ECLIC_INTCTLBITS 4
#define SOC_DEBUG_UART GD32_COM0
#define __SYSTEM_CLOCK 72000000
#define HXTAL_VALUE ((uint32_t)8000000)
#define DBG_KEY_UNLOCK 0x4B5A6978
#define DBG_CMD_RESET 0x1
#define DBG_KEY REG32(DBG + 0x0C)
#define DBG_CMD REG32(DBG + 0x08)
#define SOC_DEBUG_UART GD32_COM0
#define DBG_KEY_UNLOCK 0x4B5A6978
#define DBG_CMD_RESET 0x1
#define DBG_KEY REG32(DBG + 0x0C)
#define DBG_CMD REG32(DBG + 0x08)
#endif