PHY Errors in FX3 - KBA225226
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
Author: SrinathS_16 Version: **
Translation - Japanese: FX3のPHYエラー - KBA225226 - Community Translated (JA)
Question:
How can I obtain the count and nature of PHY errors in FX3?
Answer:
FX3 SDK has the CyU3PUsbGetErrorCounts() API to read the number of PHY errors. To understand the nature of errors, the contents of the LNK_PHY_ERR_STATUS register (Address: 0xE0033044) are to be read. To enable the counting of specific PHY errors, the LNK_PHY_ERR_CONF register 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 the LNK_PHY_ERR_STATUS.
Here is an example code snippet to obtain the count and nature of PHY errors.
uint32_t* LNK_PHY_ERR_STATUS = (uint32_t*) (0xE0033044);
CyU3PDebugPrint(4, "\n\rLink Phy Error Status Register:%d\n", *LNK_PHY_ERR_STATUS);
*LNK_PHY_ERR_STATUS = 0xFFFFFFFF;
CyU3PUsbGetErrorCounts(&phy_err_cnt, &lnk_err_cnt);
CyU3PDebugPrint(4, "\n\rPhy Errors:%d, Link Errors:%d\n", phy_err_cnt, lnk_err_cnt);