stm32f7xx_hal_driver icon indicating copy to clipboard operation
stm32f7xx_hal_driver copied to clipboard

HAL_PCD_SetTestMode() doesn't clear register bits before setting them

Open kevinpt opened this issue 1 year ago • 1 comments

Describe the set-up

  • STM32F723
  • IDE 1.14.1, HAL 1.3.1

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).

kevinpt avatar Jul 10 '24 14:07 kevinpt