2021-09-17 04:26 AM
2021-09-28 02:44 AM
2021-09-28 03:35 AM
Thanks for the logs... Just a remark, it will be fine to close CubeMonitor-UCPD to reset every time the log!
My analysis:
As you know, STM32G081 does not support USB, can it be an issue for iPAD? Can you try to delay the Data Role Swap to be sure the power contract has been established to 9V? (Usage timer in DPM can be found HERE...)
2021-09-28 03:49 AM
void USBPD_DPM_Notification(uint8_t PortNum, USBPD_NotifyEventValue_TypeDef EventVal)
{
char _str[20];
/* USER CODE BEGIN USBPD_DPM_Notification */
switch(EventVal)
{
case USBPD_NOTIFY_STATE_SRC_READY:
{
/* Check that the current data role is not already in UFP (device) */
if (USBPD_PORTDATAROLE_DFP == DPM_Params[PortNum].PE_DataRole)
{
if (USBPD_DPM_RequestDataRoleSwap(PortNum) != USBPD_OK){
sprintf(_str, "Error with role swap");
USBPD_TRACE_Add(USBPD_TRACE_DEBUG, 0, 0, (uint8_t*)_str, strlen(_str));
DPM_START_TIMER(PortNum, DPM_TimerSRCExtendedCapa, DPM_TIMER_GET_SRC_CAPA_EXT);
}
//while(1); // Should not occur
}
}
break;
default :
break;
}
/* USER CODE END USBPD_DPM_Notification */
}
I attempted this to see if made any difference for iPad but still no display. On the dell it does work I just occasionally get the system trying to do a hardreset then loops doing that very random