HAL_PCD_SetTestMode() doesn't clear register bits before setting them #10
Labels
bug
Something isn't working
hal
HAL-LL driver-related issue or pull-request.
internal bug tracker
Issue confirmed and logged into the internal bug tracking system
usb
Universal Serial Bus
Describe the set-up
Describe the bug
Inspection of the code for HAL_PCD_SetTestMode() shows that the RW bits for TCTL in the OTG_DCTL register are not cleared before setting them. This function will work on the first usage but future changes to test mode will garble the bits.
For completeness there should probably also be a define for test mode disabled (0U).
The text was updated successfully, but these errors were encountered: