cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L412 interfacing with STUSB1602 by porting existing software library.

SCoyn.1
Associate

Hello

I am currently attempting to interface a STM32L412 with a STUSB1602 TCPC. I am attempting to get this started by porting one of the existing STUSB1602 software libraries for another MCU.

It appears like this port could be very arduous and error prone.

Has anyone successful done this or can they recommend a good workflow for doing this?

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Gregory Go.
Senior II

Hello,

The STUSB1602 software library has already been ported to STM32L4R5, and it is available here:

https://www.st.com/content/st_com/en/products/embedded-software/evaluation-tool-software/stsw-stusb015.html

Note that STUSB1602 doesn’t implement the TCPC interface, but it uses a custom interface based on I2C + SPI.

View solution in original post

3 REPLIES 3
Gregory Go.
Senior II

Hello,

The STUSB1602 software library has already been ported to STM32L4R5, and it is available here:

https://www.st.com/content/st_com/en/products/embedded-software/evaluation-tool-software/stsw-stusb015.html

Note that STUSB1602 doesn’t implement the TCPC interface, but it uses a custom interface based on I2C + SPI.

Hello Gregory

Thank you for the info. Correct me if I am wrong, but it looks like the meat of the setup is in the p-nucleo-L4R5.h file. My plan is to modify the port and pin definitions contained in that file to match our custom board. I am also going to remove the ADC monitoring, LEDs, and Push Button as our board does not support that. Are there any other critical files that I am missing that need modifying?

Thanks for the help.

Gregory Go.
Senior II

Hi,

Indeed the default library example uses some features that you may not need in your final application, like LED or ADC, etc ...

So yes, you need to customize the software project depending on your application. 

I don't know exactly which files to modify, but there should be few of them where you need to adjust the pin definitions for your custom board.