USBPD_ERROR in USBPD_DPM_InitCore
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2023-03-27 1:26 AM
I generated my code by stm32cubemx,version6.1.2, and use ucpd2 as sink&dead battery,. But got USBPD_ERROR in USBPD_DPM_InitCore after execute " CHECK_PE_FUNCTION_CALL(USBPD_PE_Init(USBPD_PORT_0, (USBPD_SettingsTypeDef *)&DPM_Settings[USBPD_PORT_0], &DPM_Params[USBPD_PORT_0], &dpmCallbacks));
"
Changing stack size is useless;any other solution?
thanks.
Solved! Go to Solution.
- Labels:
-
USB-PD
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2023-03-27 7:03 AM
Hello @LOMO
Are you sure it's not the line above that is generating the error ? I mean the line calling USBPD_CAD_Init.
Can you try to look at the return code of USBPD_CAD_Init ?
I suspect that it could be a memory allocation error, as your Heap in the linker settings seems too low.
You should try to change the heap to 0xC00 and see if that resolves the issue.
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2023-03-27 7:03 AM
Hello @LOMO
Are you sure it's not the line above that is generating the error ? I mean the line calling USBPD_CAD_Init.
Can you try to look at the return code of USBPD_CAD_Init ?
I suspect that it could be a memory allocation error, as your Heap in the linker settings seems too low.
You should try to change the heap to 0xC00 and see if that resolves the issue.
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2023-03-27 6:58 PM
Changing the size of the heap instead of the stack is effective,my problem.thanks
