Skip to main content
Associate II
July 25, 2024
Solved

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

  • July 25, 2024
  • 4 replies
  • 5401 views

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

Best answer by PPAIL.1

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

 

 

4 replies

PPAIL.1
PPAIL.1Best answer
ST Employee
July 26, 2024

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

 

 

Robert7Author
Associate II
August 1, 2024

n/a

Robert7Author
Associate II
July 26, 2024

n/a

Robert7Author
Associate II
July 26, 2024

n/a

PPAIL.1
ST Employee
August 19, 2024

Hi @Robert7

Please can you try again with following ADC settings:

PPAIL1_0-1724066327338.png

The rest of your project looks perfect.

Best regards,

Pascal

Robert7Author
Associate II
August 20, 2024

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

PPAIL.1
ST Employee
August 21, 2024

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