Hello Seth Opgenorth,
The Link Down event is indicated in the PEXx_PEX_PME_MES_DR[LDD] and could be signaled by the corresponding interrupt, when PEXx_PEX_PME_MES_DISR[LDDD]=0 and PEXx_PEX_PME_MES_IER[LDDIE]=1.
In normal case it is needed to poll the PEX_LTSSM_STAT until the L0 state is reported. After reset or when recovering from a link down condition, external transactions should not to attempted until the link has successfully trained. Software can poll the LTSSM state status register (PEX_LTSSM_STAT) to check the status of link training before issuing external requests.
For details, please refer to LTSSM State Status Register(LTSSM_State_Status_Register) in the Reference Manual.
Have a great day,
TIC
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------