Skip to main content
Visitor II
February 4, 2022
Question

[STM32G431KBU3 - USBPD] - Problem when trying to use another ADC

  • February 4, 2022
  • 12 replies
  • 5811 views

Dear all,

I wanted to develop a USB Power Delivery SINK project using my STM32G431KBU3 MCU.

For that reason, I have designed a custom PCB and follwed carefully ST's WiKi:

https://wiki.st.com/stm32mcu/wiki/STM32StepByStep:STM32_Advance_USB-Power_Delivery_Sink

I have successfully created an advanced SINK aplication in which I can negotiate Up to 6 different PDOs. I have used ADC2 Channel2 to read VBUS regarding my PCB demanded that.

The point is, everything works OK but, when trying to use ADC1 for other purposes of my aplication, USBPD negotiation stops working. Only configuring ADC1 in CUBE makes USBPD stops working. I didn't use ADC1 functions yet.

When sniffing USBPD trace, I can notice that something is wrong with ADC2 Channel2, the one which monitors VUSB.

So, my question is, are ADC1 and ADC2 not compatible in this USBPD SINK application? Is there any way to use ADC1 without stopping ADC2 and USBPD app??

Thank you in avance!

    This topic has been closed for replies.

    12 replies

    Visitor II
    May 31, 2022

    Dear Heol,

    Thanks for your outstanding support.

    Case can be closed, since there is no other open topic on this request.

    Thanks and Best Regards,

    Tania

    CGonz.5Author
    Visitor II
    May 31, 2022

    Dear Heol, Tania,

    Issue was solved some time ago by using ADC1 channels 1, 2 and 3 with continous reading by DMA to map all my 3 parameters. I passed ADC1 channel1 reading to my PD application and channels 2 and 3 to read other magnitudes.

    ADC2 was unusable at the same time thatn ADC1 if I want FreeRTOS PD application running properly, so there must be an incompatibility issue there.

    Thank you for your support, you can close the thread with no problem.

    Regards,

    Carlos.