• Earle F. Philhower, III's avatar
    Fix USB crashes in FreeRTOS (#1419) · 5a949443
    Earle F. Philhower, III authored
    Fixes #1402
    
    The global USB mutex is auto-shadowed with a FreeRTOS semaphore while in
    FreeRTOS mode.  Unfortunately, while the core was using the proper
    FreeRTOS semaphore to lock access to the USB port, the actual FreeRTOS
    USB task was using the naked Pico SDK mutex, leading to cases where it
    could acquire the mutex even though some other FreeRTOS task actually
    owned the shadowed mutex.
    
    Properly lock the shadowed Semaphore, not mutex_t, in the FreeRTOS
    USB periodic task.
    5a949443
CoreMutex.cpp 2.11 KB