ADP (USB Attachment Detection Protocol) on STM32L4
Hi All,
Does anyone use the ADP feature in any STM MCUs? I'm trying to set it up on an STM32L496AG. The reference manual (47.15.19) says: "In order to read from the OTG_GADPCTL register, program AR=0b01 and keep polling till AR=0b00. The core updates the other fields of this register and makes AR=0b00. Read values of this register are valid only when AR=0b00."
When I write AR to 0b01, it stays 0b01 forever, the core never makes AR=0b00.
I tried writing too, but AR is stuck that way too.
OTG FS clock is enabled with __HAL_RCC_USB_OTG_FS_CLK_ENABLE().
Can anyone give me some hint on what could be wrong? I've also tried to search for STM specific information regarding ADP, but didn't found anything. If someone has some information, it would be appreciated.
