cancel
Showing results for 
Search instead for 
Did you mean: 

STM32U5 - USB CDC UART not working: USBPD_DPM_CADCallback(..) is not calling

Riscy
Senior

I have build the project with Nucleo_U5A55ZJ-Q with 1.4.0 and 6.2.0 library from the start, following the example code (working) with IOC setup (USBPD and USBX).  After fixing the CSRST issue earlier with missing __HAL_RCC_SYSCFG_CLK_ENABLE() but I note the demo code do not use this command.

The code is running, but there is no COM port (the demo code (2021) did work with COM3). I found the  USBPD_DPM_CADCallback(..) is not calling.

Below is code found in uspd_dpm_core.c where the DEF_TASK_FUNCTION(USBPD_CAD_Task) is working (via breakpoint), which suggests the interrupt is responding okay. 

I have spent 5 hours trying to figure out the difference between the generated code (2024) and the demo code (2021). I'm open to investigating why USBPD_DPM_CADCallback(..) is not calling. I attached ioc file. 

 

DEF_TASK_FUNCTION(USBPD_CAD_Task)

{

uint32_t _timing;

#ifdef _LOW_POWER

UTIL_LPM_SetOffMode(LPM_CAD, UTIL_LPM_DISABLE);

#endif /* _LOW_POWER */

for (;;)

{

_timing = USBPD_CAD_Process();

OS_GETMESSAGE_QUEUE(CADQueueId, _timing);

}

}

 

/**

* @brief CallBack reporting events on a specified port from CAD layer.

* @PAram PortNum The handle of the port

* @PAram State CAD state

* @PAram Cc The Communication Channel for the USBPD communication

* @retval None

*/

void USBPD_DPM_CADCallback(uint8_t PortNum, USBPD_CAD_EVENT State, CCxPin_TypeDef Cc)

{

12 REPLIES 12
Riscy
Senior

Thank you; I found it: USBPDCORE_NOPD_CM33_wc32.a but it is not readable with Notepad++ or CubeIDE. I tried Segger Ozone, but it showed garbage.

I found there Objdump, which is a disassembler, but this works for Linux, which I lacks.

Any suggestion on how to view the .a or .lib file with disassembly via Windows so I can review it without running it or debugging it?

Based on the text message, it appears there is no comment about it. do you have the original disassembly version? 

 

 

Any progress or solution for this query, thanks.
FBL
ST Employee

Hi @Riscy 

 

The source code is not open source. To learn more about mechanisms used to interact with the stack, check UM2552 section 3.4.3.

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.