Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nrf5x: Fix race condition during startup #1221

Merged

Commits on Dec 8, 2021

  1. nrf5x: Fix race condition during startup

    When NRF5x device is reset by software (after DFU for example),
    power event is ready from the beginning.
    When power interrupt is triggered before tud_init() finished
    USBD_IRQn is enabled before it would be enabled in tud_init().
    This in turn may result in BUS RESET event being sent from
    USB interrupt to USB task when queue is not initialized yet.
    This scenario often happens in Mynewt build where queue creation
    takes more time.
    
    To prevent this scenario USBD_IRQn is not enabled in power event
    interrupt handler before dcd_init() was called.
    kasjer committed Dec 8, 2021
    Copy the full SHA
    21db235 View commit details
    Browse the repository at this point in the history