2020-06-10 03:54 AM
When I am trying to compile project Consumer_DRP_RTOS from C:\xx\X-CUBE-USB-PD-master\STM32CubeExpansion_USBPD_F0\Projects\STM32F072RB-Nucleo\Applications\USB_PD
I get a lot of errors. I managed to eliminate some of them by adding header files to the appropriate places. And so at the moment I have errors of the form (see the image below) . A project search indicates that function a is not present. There are only
USBPD_StatusTypeDef USBPD_DPM_InitOS(void)
and
USBPD_StatusTypeDef USBPD_DPM_InitCore(void)
but htis block of code is not compilling:
/* Initialize the Device Policy Manager */
if( USBPD_ERROR == USBPD_DPM_Init())
{
/* error the RTOS can't be started */
while(1);
}
And the question arises: do I do everything correctly (although it would seem-I opened the project, compiled it, and study the work, but in fact there were typos in several places like toogle instead of toggle).
Also I tryed to compile other project and got next result:
UPD 1.
Ok, I solved the problem with
USBPD_ERROR == USBPD_DPM_Init()
it is need to be replaced by
USBPD_DPM_InitCore()
but the other undefined symbols are very strange, because search in project tells me, that there is no one string with such veriables. And interesting one more thing: there is no one string in documentation about X-CUBE-USB-PD where are functions USBPD_DPM_InitOS(void) & USBPD_DPM_InitCore(void) are mentioned. For example UM2063 operates only with USBPD_DPM_Init().
Went to investigate further.
Solved! Go to Solution.
2020-06-10 11:35 PM
Dear @Eremizin
I think the X-CUBE-USBPD package is quite old because we don't support anymore P-NUCLEO-USB001.
For your information, you will find the current solutions we have for USB PD and Type-C solution at the following link:
https://www.st.com/content/st_com/en/stm32-usb-c.html
I advice you also to have a look at the UM2552 document for further details regarding latest APIs.
Regards
Yohann
2020-06-10 06:18 AM
Ok, I solved the problem with
USBPD_ERROR == USBPD_DPM_Init()
it is need to be replaced by
USBPD_DPM_InitCore()
but the other undefined symbols are very strange, because search in project tells me, that there is no one string with such veriables. And interesting one more thing: there is no one string in documentation about X-CUBE-USB-PD where are functions USBPD_DPM_InitOS(void) & USBPD_DPM_InitCore(void) are mentioned. For example UM2063 operates only with USBPD_DPM_Init().
Went to investigate further.
2020-06-10 11:35 PM
Dear @Eremizin
I think the X-CUBE-USBPD package is quite old because we don't support anymore P-NUCLEO-USB001.
For your information, you will find the current solutions we have for USB PD and Type-C solution at the following link:
https://www.st.com/content/st_com/en/stm32-usb-c.html
I advice you also to have a look at the UM2552 document for further details regarding latest APIs.
Regards
Yohann
2020-06-11 12:07 AM
Hello, @Yohann M , thank you for answer!
I tryed to use the X-CUBE-USBPD package from STM32CubeExpansion_USBPD_F0 and looks like it is old version.
But interesting thing, that one of the manuals what I red gives info about the STM32CubeExpansion_USBPD_F0\Projects\STM32F072RB-Nucleo\Applications\USB_PD directory with 16 projects inside. I tryed to compill one of them but the result is shown above.
Yes, my bad, I accidentally missed a UM2552 document.
I'm going to study the material. Thanks!
2020-06-11 12:37 AM
Dear @Eremizin
Could you please precise where you uploaded your X-CUBE-USBPD package?
On ST side, we updated it recently in removing the obsolete applications linked to P-NUCLEO-USB001 .
For your information, here is our official 'STMicroelectronics' github package: https://github.com/STMicroelectronics/x-cube-usb-pd
Regards,
Yohann
2020-06-11 12:52 AM
Dear @Yohann M.
I have 2 packages: one from ST site, got it thrue request and second I got frm https://github.com/st-one/X-CUBE-USB-PD and I thougth that it is official ST git repository. Looks like not.
Thank you for your answers!