ALTracer commented on issue #8968: URL: https://github.com/apache/nuttx/issues/8968#issuecomment-1497816053
@davids5 Maybe you didn't read my #8906 ? Moving half of comment from PR to this issue: > I see something funny in otgfsdev driver code: https://github.com/apache/nuttx/blob/d3f659b85427401c334aea8f2c633516222f7982/arch/arm/src/stm32/stm32_otgfsdev.c#L5361-L5369 F446, F469 and MP15x have a newer DWC2 and only VBDEN bit in ther GCCFG register. F411 has a slightly older revision and is controllable by all the bits: VBUSASEN. VBUSBSEN, NOVBUSSENS. STM32F411CE Reference Manual contains a OTG Device mode programming sequence, where they tell to write the VBUSBSEN bit to enable Vbus B-mode sensing logic, if VBus pad is muxed. Or they tell to write the NOVBUSSENS bit if VBus pad is not connected. NuttX driver code writes BOTH VBUSASEN, VBUSBSEN unconditionally, and there is no git history for these two lines since basically 2015. Sure, some might say after NOVBUSSENS this is largely irrelevant, but 1) it contradicts the RM; (not really, it's just _not stated_) 2) there are multiple threads/GH-issues in libopencm3 which consider this subject/problem of non-working OTG device on F411 and friends. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
