Jana-Marie / Otter-Iron-PRO

USB-PD soldering station for JBC C245 handles.
284 stars 36 forks source link

Incorrect current profiles set for STUSB4500 chip #26

Closed ElRoberto538 closed 3 years ago

ElRoberto538 commented 3 years ago

I just got a new 100w USB adapter and had trouble getting more than 15v 3A out of it. I read the datasheet for the STUSB4500 and found that the current setting is based on a lookup table, whereas the code is setting it to an absolute value. To get a working 100w profile I set the profile to 20000mv and 150ma in the main.c file (150 will be divided by 10 in the STUSB4500.c file which gives the 5Amp profile from the lookup table in the datasheet).

This doesn't seem to matter for some chargers, but apparently my new one more closely checks the profile limits. Might be helpful for anyone else with the same issue.