Yes we can disable session/vbus comparators inside usb phy.
Add below code at the end of hsu_api_init_phy() corresponding to separate platform will do,
uint8 read_value = 0;
/*Disable session end/session valid/VBUS valid rise interrupt*/
HAL_hsusb_ReadUlpiPhy(0, 0, 0xd, &read_value);
read_value= read_value&0xf1;
HAL_hsusb_WriteUlpiPhy(0, 0, 0xd, read_value);
/*Disable session end/session valid/VBUS valid fall interrupt*/
HAL_hsusb_ReadUlpiPhy(0, 0, 0x10, &read_value);
read_value= read_value&0xf1;
HAL_hsusb_WriteUlpiPhy(0, 0, 0x10, read_value);
Disabling these interrupts may eliminate curious timeouts for IN/OUT transfer when modem work in device mode.
As these interrupts is useful in host mode, these code should not be used to products having host function.
No comments:
Post a Comment