How can I obtain the count and nature of PHY errors in FX3?
FX3 SDK has theCyU3PUsbGetErrorCounts()API to read the number of PHY errors. To understand the nature of errors, the contents of the LNK_PHY_ERR_STATUSregister (Address: 0xE0033044) are to be read. To enable the counting of specific PHY errors, theLNK_PHY_ERR_CONFregister can be configured correspondingly. By default, all supported PHY errors are enabled to be counted.
The CyU3PUsbGetErrorCounts() API resets the counter every time the API is invoked whereas the firmware has to clear theLNK_PHY_ERR_STATUS.
Here is an example code snippet to obtain the count and nature of PHY errors.