added p4, seems to work well and enumerated
This commit is contained in:
@@ -508,18 +508,6 @@ static void edpt_schedule_packets(uint8_t rhport, uint8_t const epnum, uint8_t c
|
||||
/*------------------------------------------------------------------*/
|
||||
/* Controller API
|
||||
*------------------------------------------------------------------*/
|
||||
#if CFG_TUSB_DEBUG >= DWC2_DEBUG
|
||||
void print_dwc2_info(dwc2_regs_t* dwc2) {
|
||||
// print guid, gsnpsid, ghwcfg1, ghwcfg2, ghwcfg3, ghwcfg4
|
||||
// use dwc2_info.py/md for bit-field value and comparison with other ports
|
||||
volatile uint32_t const* p = (volatile uint32_t const*) &dwc2->guid;
|
||||
TU_LOG(DWC2_DEBUG, "guid, gsnpsid, ghwcfg1, ghwcfg2, ghwcfg3, ghwcfg4\r\n");
|
||||
for (size_t i = 0; i < 5; i++) {
|
||||
TU_LOG(DWC2_DEBUG, "0x%08" PRIX32 ", ", p[i]);
|
||||
}
|
||||
TU_LOG(DWC2_DEBUG, "0x%08" PRIX32 "\r\n", p[5]);
|
||||
}
|
||||
#endif
|
||||
|
||||
static void reset_core(dwc2_regs_t* dwc2) {
|
||||
// reset core
|
||||
@@ -633,8 +621,15 @@ static void phy_hs_init(dwc2_regs_t* dwc2) {
|
||||
}
|
||||
|
||||
static bool check_dwc2(dwc2_regs_t* dwc2) {
|
||||
#if CFG_TUSB_DEBUG >= DWC2_DEBUG
|
||||
print_dwc2_info(dwc2);
|
||||
#if CFG_TUSB_DEBUG >= DWC2_DEBUG || 1
|
||||
// print guid, gsnpsid, ghwcfg1, ghwcfg2, ghwcfg3, ghwcfg4
|
||||
// Run 'dwc2_info.py render-md' and check dwc2_info.md for bit-field value and comparison with other ports
|
||||
volatile uint32_t const* p = (volatile uint32_t const*) &dwc2->guid;
|
||||
TU_LOG1("guid, gsnpsid, ghwcfg1, ghwcfg2, ghwcfg3, ghwcfg4\r\n");
|
||||
for (size_t i = 0; i < 5; i++) {
|
||||
TU_LOG1("0x%08" PRIX32 ", ", p[i]);
|
||||
}
|
||||
TU_LOG1("0x%08" PRIX32 "\r\n", p[5]);
|
||||
#endif
|
||||
|
||||
// For some reason: GD32VF103 snpsid and all hwcfg register are always zero (skip it)
|
||||
|
||||
Reference in New Issue
Block a user