Skip to content

Conversation

@zfields
Copy link
Contributor

@zfields zfields commented Dec 8, 2025

In draft PR state, until CDC issue is resolved.

Failing in premain() at:

premain()
└─ init()
   └─ hw_config_init()
      └─ USBD_CDC_init()
         └─ CDC_init()
            └─ USBD_Init()
               └─ USBD_LL_Init()
                  └─ HAL_PCD_Init()
                     └─ USB_CoreInit()
                        └─ USB_CoreReset()

It only seems to exit the following loop with HAL_TIMEOUT:

  /* Core Soft Reset */
  USBx->GRSTCTL |= USB_OTG_GRSTCTL_CSRST;

  do
  {
    count++;

    if (count > HAL_USB_TIMEOUT)
    {
      return HAL_TIMEOUT;
    }
  } while ((USBx->GRSTCTL & USB_OTG_GRSTCTL_CSRST) == USB_OTG_GRSTCTL_CSRST);

  return HAL_OK;
}

Since I never make it into initVariant(), I'm not sure how I'm supposed to adapt my implementation.

There appears to be a related issue #2855. Currently awaiting response to my request for clarification.

@zfields zfields force-pushed the zak-heron branch 2 times, most recently from 17ea058 to 6a05634 Compare December 8, 2025 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant