cancel
Showing results for 
Search instead for 
Did you mean: 

Battery Charger Detection not working in STM32 NUCLEO L4R5ZI

Hi Everyone;

I am new to ST family and was trying out battery charger detection in stm32L4R5ZI in Nucleo board. The Examples provided by ST doesn't cover an dedicated example for STM32L4R5ZI, so I tried creating my own code using Cube MX. I configured USB OTG and MSC in middleware with battery charger detection. The code was generated successfully and Board is detecting USB device also and gives interrupt and calls VBus detect function. The Vbus detect function also gives successful call back to the call back function associated . But every time it is give Data contact detection intially. So I removed the option of Data contact detection now the function call back gives SDP detection every time even when connected to power charger and returns Discover completed at the end with USB start . The program is exactly similar to the example given in other board's example. I made sure I have enabled the proper bits after referring th reference manual also. If anybody know the solution it would be very helpful for me. If any precheck code or exmaple for specific code is available also please mail to roopak.ms93@gmail.com. Thanking in Anticipation.

Note: I tried other board BCD examples also with this board since Vbus Pin and USB OTG registers are similar but gives same output every time.

0 REPLIES 0