Skip to main content
Visitor II
August 12, 2020
Question

usbpd change from sink to source soft reset

  • August 12, 2020
  • 3 replies
  • 2250 views

my stm32 set default is sink. when Phone connected, it's sink and the nego finish. after that, I change it to source to charge this phone, but it's soft reset.

please refer trace attach

    This topic has been closed for replies.

    3 replies

    H V N DAuthor
    Visitor II
    August 24, 2020

    @Yohann M.​  this is behavior:

    • In DRP mode, if STM32 is fixed SRC default, soft reset appear
    • If STM32 is fixed SNK default, soft reset not appear, I can Power Role Swap anytime

    Please tell me the reason

    thanks

    ST Employee
    August 25, 2020

    Hello HVND.

    Thanks for the trace.

    The soft reset is sent because the accept from the source comes too late.

    The accept should come between 24 and 30ms.

    Here we get it 51ms after the power role swap request is sent. What is the phone used ?

    I see no link with the default role.

    What is the MCU used ? (SYSTICK value ?)

    H V N DAuthor
    Visitor II
    August 26, 2020

    Hi @Nicolas P​ 

    I'm testing with Xiaomi Redmi Node 7

    SYSTICK  I fix PLL 64Mhz

    ST Employee
    August 27, 2020

    Do you have another device to test with ?

    Do you have an another external tool to have a protocol trace ?

    ST Employee
    August 31, 2020

    Dear @H V N D​ 

    Regarding your SOFT reset, what it is strange is that the port partner answers to the power role swap after the expiration of the tSenderResponse timer (set to 27ms in our library). It is why we have a soft reset after receiving the accept message:

    0693W000002ljoNQAQ.png

    ACCEPT is received 50ms after the gooodCRC of PR_SWAP.

    Problem is linked to your port partner.

    Can you try to test with another port partner?

    Regards

    Yohann