STM32G0 USB PD Middleware?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-01-04 10:11 PM
Hello,
I have built a board using the STM32G0 with the intention of utilizing the USB PD middleware.
I pulled the middleware from STM32CubeG0 into my project, but I can't get it to build without errors.
The USB PD demo project in the STM32CubeG0 does not look like it uses the stock middleware. Is there one that does?
Solved! Go to Solution.
- Labels:
-
STM32G0 Series
-
USB
-
USB-PD
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-06-05 5:12 AM
Hello Alex,
On github, I can see that your solution seems working. Main pb I saw was a conflict between DMA channels used between UCPD and TRACE.
I suggest to close this thread.
Yohann
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-01-08 5:00 AM
Hello @AlexKlimaj​ ,
Could you please provide more details in order to analyze your issue.
What is the error message that you have?
Kind Regards,
Imen
Thanks
Imen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-02-16 11:26 AM
I too am wondering about how to leverage this middleware. I have spent a good deal of time looking through the code (DemoUCPD), here is my understanding.
- For a custom board, a new BSP must be written that contains functions such as `BSP_PWR_VBUSInit` which are referenced in many places in the `Devices/STM32G0XX` code.
- For a custom application, many of the files found in `DemoUCPD` such as `usbpd_dpm_user.c` must be rewritten to and tailored to the specific application, but provide the function calls the core library expects .
- All of the Policy Engine code is hidden in `Core/lib`, there may be other code hidden in there as well. Why is this only provided as object code? Might it be useful to see the source?
My main struggle I am having is in understanding the intended usage of this middleware in a custom application. Many of the functions seem very application specific for the EVAL board, and I am having a hard time figuring out what I need to do to make this work for me. Does ST provide any kind of implementation guide or reference for using this middleware outside of the EVAL Demo application? I would really appreciate if someone could detail how to use this middleware, and the appropriate process for implementing the necessary changes such as the BSP and user files.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-04-04 2:13 AM
An user manual is under review and will be provided soon.
It will provide further information how to use different parts of the application.
We will keep in touch as soon as this document will be available.
In waiting for it, if you have any specific questions, let us know!
Yohann
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-04-16 1:28 PM
EDIT: I fixed the hardfault by changing
extern void USBPD_PORT1_IRQHandler(void);
USBPD_PORT1_IRQHandler();
to
extern void USBPD_PORT0_IRQHandler(void);
USBPD_PORT0_IRQHandler();
I was thinking that I needed to change it originally to Port1 since I am using the second USBPD controller on the STM32G0.
https://github.com/AlexKlimaj/LiPow-Firmware
Okay, I've got the USB PD Middleware pulled into my project and building. I had to comment out three calls to tracer since I don't have that in the project nor do I think I need it. Unless there is a way to use STM32CubeMonUCPD through UART? I have a FreeRTOS CLI running on the UART already.
I have it initializing the UCPD peripheral and starting the FreeRTOS task successfully, but I am getting a hardfault on the UCPD interrupt handler on its first call. This is the line that causes the hardfault.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-04-16 7:04 PM
Removed. See above post.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-04-23 6:03 AM
Hello Alex,
To use STM32CubeMonUCPD , you have to integrate GUI_INTERFACE module in your environment. This module is use to communicate with PC application.
FreeRTOS_CLI was used for X-CUBE-USBPD package and it is no more supported on our latest FW delivery done on G0. All the information are displayed now directly on the cubeMon-UCPD.
I suggest to disable FreeRTOS-CLI from your environment and use only GUI interface.
Regards
Yohann
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-06-05 5:12 AM
Hello Alex,
On github, I can see that your solution seems working. Main pb I saw was a conflict between DMA channels used between UCPD and TRACE.
I suggest to close this thread.
Yohann
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-06-05 11:23 PM
​For your information, User Manual UM2552 is now available on ST Website : UM2552: Managing USB power delivery systems with STM32 microcontrollers
