2021-07-16 09:23 AM
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
Solved! Go to Solution.
2021-07-16 12:21 PM
Hello,
The STUSB1602 software library has already been ported to STM32L4R5, and it is available here:
Note that STUSB1602 doesn’t implement the TCPC interface, but it uses a custom interface based on I2C + SPI.
2021-07-16 12:21 PM
Hello,
The STUSB1602 software library has already been ported to STM32L4R5, and it is available here:
Note that STUSB1602 doesn’t implement the TCPC interface, but it uses a custom interface based on I2C + SPI.
2021-07-16 12:41 PM
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.
2021-07-16 03:00 PM
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.