Skip to main content
Gbang
Associate II
October 12, 2019
Question

The difference between demo project and the project from stm32cubemx in B-G474E-DPOW1?

  • October 12, 2019
  • 3 replies
  • 1310 views

I used the project in B-G474E-DPOW1, named "USB-PD_Consumer_1port" as usb pd sink, everthing is ok. However, I create the project with the params from "USB-PD_Consumer_1port" just without the usart trace, the new project can't run normal, got error in “pe set�? in " CHECK_PE_FUNCTION_CALL(USBPD_PE_Init(USBPD_PORT_0, (USBPD_SettingsTypeDef *)&DPM_Settings[USBPD_PORT_0], &DPM_Settings[USBPD_PORT_0], &dpmCallbacks));

". var DPM_Settings and DPM_Settings are the same as the demo project.

btw, I diff the user code in src folder between two project, almost same except the trace code.

Anyone can give more information or clue for this error? thanks.

​

This topic has been closed for replies.

3 replies

Yohann M.
ST Employee
October 14, 2019

Hello

Possible errors behind PE_Init are mainly linked to malloc erros (USBPD_MALLOCERROR). It can be linked to heap size allocated in the project is too small. You may increase this size (0x500 for instance).

Yohann

Gbang
GbangAuthor
Associate II
October 14, 2019

hello, I debuged it, and this is USBPD_ERROR.​

Yohann M.
ST Employee
October 14, 2019

What is the size of your heap? Please try to increase the heap size and let me know it it works or not!