cancel
Showing results for 
Search instead for 
Did you mean: 

fatal error: usbpd_ADC_SNK.h: No such file or directory

Robert7
Associate II

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,

RobertNew Project.pngSoftware_Packs_Componment.JPGUCPD1.JPGdebug_err1.JPG

1 ACCEPTED SOLUTION

Accepted Solutions
PPAIL.1
ST Employee

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.

PPAIL1_1-1721995109773.png

 

So, to build a sink application with this board:

- Select the Sink application and the TCPP0203 board part in the software pack selection

PPAIL1_0-1721994972421.png

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

PPAIL1_2-1721995398077.png

- And adapt the parameter settings tab values to the board

PPAIL1_3-1721995471834.png

Please find attached my .ioc for this case in reference.

Best regards

Pascal

 

 

View solution in original post

11 REPLIES 11
PPAIL.1
ST Employee

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.

PPAIL1_1-1721995109773.png

 

So, to build a sink application with this board:

- Select the Sink application and the TCPP0203 board part in the software pack selection

PPAIL1_0-1721994972421.png

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

PPAIL1_2-1721995398077.png

- And adapt the parameter settings tab values to the board

PPAIL1_3-1721995471834.png

Please find attached my .ioc for this case in reference.

Best regards

Pascal

 

 

Robert7
Associate II

n/a

Robert7
Associate II

n/a

n/a

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:

image.png

 

  1. Changed I2C2 to I2C1

  2. Changed TCPP0203 bus IO driver to I2C1

  3. Configured ADC4-IN10 PA5 for ADC_VBUS

  4. Changed x_cube_tcpp Vbus_shunt_resistor 47m to 10m to support 9v/3A
  5. Enabled ICACHE

  6. 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.

50-03-00066_U5_SNK_V1011 - U585AI.ioc trace message from USB-C power supply50-03-00066_U5_SNK_V1011 - U585AI.ioc trace message from USB-C power supply

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

 

 

PPAIL.1
ST Employee

Hi Robert

Please can you try again with following ADC settings:

PPAIL1_0-1724066327338.png

The rest of your project looks perfect.

Best regards,

Pascal

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.

 

image.png

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:

PPAIL1_0-1724225746563.png

Also I saw in your .ioc that no RTOS is enable for the moment, please dont forget to enable TheadX.

 

Best regards

Pascal

 

 

Hello Pascal,

Thank you very much for your help. The usbpd_ADC.h has been updated as per your reply.

Best regards,

Robert