2024-07-25 02:52 PM
Hello,
I try to build a 'PDO SINK' project on B-U585I-IOT02A and I have watched the video How to build an USBPD Sink application using the X-Cube-TCPP software pack - YouTube.
Issue:
After build project on STM32CubeMX 6.12.0 and opened project in STM32CubeIDE 1.13.2, there is errors shows '../TCPP/App/app_tcpp.h:26:10: fatal error: usbpd_ADC_SNK.h: No such file or directory'.
Could you please review attached screenshot and let me know if there is something I'm missing in my project setup.
Best regards,
Robert
Solved! Go to Solution.
2024-07-26 05:07 AM
Hi Robert7
Thanks for sharing your .ioc and project.
As you are not using a BSP (which is correct), you should fill the platform settings tab of the X-CUBE-TCPP. This is why usbpd_ADC_SNK.h is missing.
But the main point is that the B-U585I-IOT02A has a TCPP03 embedded and not a TCPP01.
So, to build a sink application with this board:
- Select the Sink application and the TCPP0203 board part in the software pack selection
Configure ADC4-IN5 for Vbus, I2C2 for the TCPP03 I2C, PE8 as GPIO-EXTI (Falling Edge detection with pull up) for the TCPP03 FLG and PB5 as GPIO Output for the TCPP03 Enable.
- Assign them in the platform settings tab
- And adapt the parameter settings tab values to the board
Please find attached my .ioc for this case in reference.
Best regards
Pascal
2024-07-26 05:07 AM
Hi Robert7
Thanks for sharing your .ioc and project.
As you are not using a BSP (which is correct), you should fill the platform settings tab of the X-CUBE-TCPP. This is why usbpd_ADC_SNK.h is missing.
But the main point is that the B-U585I-IOT02A has a TCPP03 embedded and not a TCPP01.
So, to build a sink application with this board:
- Select the Sink application and the TCPP0203 board part in the software pack selection
Configure ADC4-IN5 for Vbus, I2C2 for the TCPP03 I2C, PE8 as GPIO-EXTI (Falling Edge detection with pull up) for the TCPP03 FLG and PB5 as GPIO Output for the TCPP03 Enable.
- Assign them in the platform settings tab
- And adapt the parameter settings tab values to the board
Please find attached my .ioc for this case in reference.
Best regards
Pascal
2024-07-26 11:02 AM - edited 2024-08-07 11:45 AM
n/a
2024-07-26 01:04 PM - edited 2024-08-07 11:46 AM
n/a
2024-08-01 10:25 AM - edited 2024-08-01 01:00 PM
n/a
2024-08-07 04:45 PM - edited 2024-08-08 03:03 PM
Hello Pascal,
Thank you very much for your help on STM32U585 - Evaluation board. I am so sorry for keep updating my support request.
Now I start to build a sink application with STM32U575QII6Q(UFBGA132) + TCPP03-M20. I have received trace message. But I can't receive USB-C power supply profile from STM32CubeMonitor-UCPD 1.3.0 after I have modified B-U585I-IOT02A *.ioc as below:
Changed I2C2 to I2C1
Changed TCPP0203 bus IO driver to I2C1
Configured ADC4-IN10 PA5 for ADC_VBUS
Enabled ICACHE
Enabled SMPS
But I can receive USB-C power supply profile under STM32CubeMonitor-UCPD 1.3.0 without changing STM32U585IIxQ to STM32U575QII6Q. I have received trace message as well.
I would be appreciative if you could let me know that I missed in 'STM32U575QII6Q(UFBGA132) + TCPP03-M20' project setup or share your *.ioc for this case to guide me complete the USB-C 9v/3A sink configuration.
I attached both *.ioc and schematic for your reference.
Best regards,
Robert
2024-08-19 05:04 AM
Hi Robert
Please can you try again with following ADC settings:
The rest of your project looks perfect.
Best regards,
Pascal
2024-08-20 09:20 AM - edited 2024-08-20 09:21 AM
Hello Pascal,
Thank you for your reply. It works!
However, I got a new problem which ibus(current) value is always '0'.
1) 'ADC Isense' is not used in usbpa_ADC.h. 'ADC_VBUS_ONLY' is ture in custom_board_usbpd_pwr.c.
2) 'ADC_VBUS_ONLY' might caused ibus shows '0'. But I haven't found any 'ADC_VBUS_ONLY' settings in STM32CubeMX.
I would appreciate it if you could let me know how to get right ibus value in STM32CubeMonitor-UCPD.
Best regards,
Robert.
2024-08-21 12:40 AM
Hi Robert
Thanks for your feedback and you are welcome,
For ADC Isense, just enable a GPDMA for ADC4.
Then usbpd_ADC.h should be like this:
Also I saw in your .ioc that no RTOS is enable for the moment, please dont forget to enable TheadX.
Best regards
Pascal
2024-08-22 01:11 PM - edited 2024-08-23 11:17 AM
Hello Pascal,
Thank you very much for your help. The usbpd_ADC.h has been updated as per your reply.
Best regards,
Robert