Skip to main content
Lukasz Przenioslo
Associate III
November 3, 2018
Solved

STUSB1602 SPI interface

  • November 3, 2018
  • 47 replies
  • 6211 views

Hello there,

I am currently analyzing the STUSB1602 chip and the P-NUCLEO-USB002 eval kit. I have come across a topic I am not fully certain about. Its the SPI interface for the BMC communication. I cannot understand either it is necessary in all applications, or only if I want to exchange some specific data between devices over CC line? For example, if I intend to create a sink only device, so I have to connect the SPI lines and provide any data from the MCU? I would appreciate all help.

This topic has been closed for replies.
Best answer by Benoit FORET

not yet. This is a reference design: Altium design files are available on line for fast duplication: STREF-SCS001V1.

But I can ship one to you: just share with me your address via private messaging (accessible via the message button when pointing my name with the mouse).

Benoit

47 replies

ST Employee
November 12, 2018

​I'm not sure, but I think the P-NUCLEO-USB002 demo code is not checking VBUS voltage is in line with USB PD contract, either as SINK or SOURCE. While STREF-SCS001V1 will do all time long, in order to protect the powered application from a defective SOURCE (9V negotiated for instance but 15V supplied)

Lukasz Przenioslo
Associate III
November 13, 2018

Hello Benoit,

So my adventures with the P-NUCLEO-USB002 ended after I have connected external 20 V supply to the CN12 port. The whole circuit was not powered up at that instance. I have only heard the typical "crack" of a frying IC and then came the smell... With the corner of my eye I have seen the display of the lab AC adapter, on which some current was indicated for a moment. Looking at the schematics of the P-NUCLEO-USB002 I am not sure what went wrong. The + terminal of the CN12 goes to the INA199A1DCK chip, which has 26 V differential input. Also I did not swap terminals polarity, I am certain. INA199A1DCK must have transferred the 20V input to the output since all circuit is dead (both base Nucleo board and the USB C hat).

Benoit- Any chance you have this P-NUCLEO-USB002 for spare? Also, do you have any clue what went wrong here?

Lukasz Przenioslo
Associate III
November 12, 2018
The only logs from the STREF-SCS001V1 is the 2 leds. I see that the blue one is constantly ON, not blinking, which would mean it negotiated something (if I recall correctly the documentation). This is a peculiar one.
ST Employee
November 13, 2018

V, ​Hello Lukasz,

I'm afraid in order to use the board with power management (over 5V I mean), it does not work this way. The port in the back of the blue board is used for that but it is quite complex to set-up. The protocol manages accurately the voltage transition (from 5V to the agreed voltage). This is why 20V can't be plugged directly. I'm going to ship to you:

- an STEVAL-ISC004V1 that you can use as a 5V, 9V, 12V, 15V, 20V SOURCE / power supply, and in order to read SINK capabilities,

- and a replacement P-NUCLEO-USB002 that I advise to use as a "sniffer" (and not as a SOURCE), in order to read attached device role and profiles.

rgds,

Benoit

Lukasz Przenioslo
Associate III
November 14, 2018

Hello Benoit,

I started testing the p-nucleo-usb002 with STEVAL-ISC004V1 right ahead. I was able to choose all available profiles but 5th:

P-NUCLEO-USB00x Demo v1.0.4
Console v0.4
Type help for a list of commands.
STMicroelectronics
Copyright (c) 2017 - All Rights Reserved.
>
*** [1] attached on CC2 (Sink)
 
*** [1] selected cap #1
s 1
Role: Sink - Explicit contract CC2 Profile 1 5.00V
>r 1 1
Requested 1 : 5.00V 3.00A
>
*** [1] selected cap #1
r 1 2
Requested 2 : 9.00V 3.00A
>
*** [1] selected cap #2
r 1 3
Requested 3 : 12.00V 3.00A
>
*** [1] selected cap #3
r 1 4
Requested 4 : 15.00V 3.00A
>
*** [1] selected cap #4
r 1 5
Requested 5 : 20.00V 2.25A
>
*** [1] detached
 
*** [1] attached on CC2 (Sink)
 
*** [1] selected cap #1

When I connected the STREF-SCS001V1 to the STEVAL-ISC004V1, I got 20 V output, so this one works. What could be the case for p-nucleo-usb002?

Lukasz Przenioslo
Associate III
November 13, 2018
Hello Benoit,
I understand, maybe I should study this more carefully. Thank you very much for help!
ST Employee
November 14, 2018

​Hi Lukasz,

very strange. working properly on my side. Which Power supply are you using to power STEVAL-ISC004V1 (SOURCE)? We recommend 24V DC to supply the DC/DC from the board and ensure clean 20V output. What might happen is that the DC/DC can't regulate properly at 20V, so either the SOURCE and the SINK may terminate the connection as not in line with the expected contract (20V) +/- OVLO/UVLO (usually 10% if I remember well). In this case, the 2 different SINKs may have different settings, explaining the difference.

rgds,

Benoit

Lukasz Przenioslo
Associate III
November 14, 2018
Hi Benoit,
I was providing 23V from a lab AC adapter. Didnt try 24 V. The sink device has the default settings. The day after tommorow I will be at the office again. I will try with higher input voltage, thank you.
ST Employee
November 14, 2018

..

Lukasz Przenioslo
Associate III
November 16, 2018

Hello Benoit,

I just tried connecting 25 V to the STEVAL-ISC004V1. I was able to successfully switch to the last profile like you now using the p-nucleo-usb002. Probably voltage drop on the DC-DC converter was to high. Thank you for help.

Btw, I wanted to test how would the p-nucleo-usb002 act after I connect a generic USB charger to it, like this: https://allegro.pl/ladowarka-gc-usb-c-45w-laptopa-acer-asus-dell-hp-i7527595704.html (frogive the polish language). Anyways, the specification says that it should support the following profiles: 5V-3A, 9V-3A, 12V-3A, 15V-3A, 20V-2.25A.

After I connected it to the p-nucleo-usb002 connector, I havent seen any event in the terminal nor on the leds- like the p-nucleo-usb002 didnt notice this charger at all. What could be the case here, since it is possible to charge a mobile phone using this USB C charger?

ST Employee
November 16, 2018

Hi Lukasz,

no reason, it should connect properly. Have you tried connecting ​the STREF-SCS001V1 to this USB charger? it should connect at 20V automatically if I cross properly the PDO from both devices.

benoit

Lukasz Przenioslo
Associate III
November 16, 2018
Yes I did,
Nothing happens as well (no led)...
ST Employee
November 16, 2018

​so, if both boards (which use different devices) reject the original attach, it means there could be an issue with the SOURCE (VBUS different from vSafe 5V, discharge issue, not cold socket etc...) or with the Type-C cable (please use the one from P-NUCLEO-USB002 pack when possible). Do you confirm both  boards still work with STEVAL-ISC004V1? If you can't find the issue, I'm interested to borrow your AC adapter to have a look at it (and ship back of course). Did you perform some trials with your DELL laptop?

Lukasz Przenioslo
Associate III
November 16, 2018

Benoit,

Unfortunetally, I left the at the P-NUCLEO-USB002 office and cannot check either I can get better voltages from the dell PC... I will check that asap at monday and let you know.

As for the mentioned charger, it consists of 2 ports: USB A and USB C:

0690X000006COLBQA4.png 

If I connect my android phone to the USB C (USB C ,-> USB C cable), I get a system message that fast charging is in progress:

0690X000006COL1QAO.jpg

While if I connect it to the USB A ports (using USB C to USB A plug cable), I get regular charging:

0690X000006COL6QAO.jpg

This would suggest that the phone made a handshake with the charger over USB C. I wonder why didnt this work with the eval boards.