Other Parts Discussed in Thread: SYSCONFIG, AM625, TMDS64EVM
Tool/software:
Hello,
At the moment we are working on application that will run on r5f0 core whose objective is to configure the pcie as root complex and list the connected endpoints.
We are running the pcie_buf_transfer_rc example on the core provided on the sdk mcu_plus_sdk_am64x_08_05_00_24, however we are facing an issue in the middle of the of the Drivers_pcieOpen execution.
On the first local registers reading, when the command status register is read (Pcie_readStatusCmdReg), the application stops on line "val = swReg->raw = *hwReg_STATUS_COMMAND_REGISTER;"
// Location: Drivers_pcieOpen->Pcie_open->Pci_cfgRC /* Enable memory access and mastership of the bus */ memset (&setRegs, 0, sizeof(setRegs)); memset (&getRegs, 0, sizeof(getRegs)); getRegs.statusCmd = &statusCmd; status = Pcie_readRegs (handle, PCIE_LOCATION_LOCAL, &getRegs); (...)
The hwReg_STATUS_COMMAND_REGISTER value is 0x0D000004. Is a value in this range expected?
Apart of this, two points to take in account:
1) I am not using ccs, we are integrating the source code in our build system, so we don't have the ccs debug setup.
2) I disabled pcie0_ep and pcie0_rc in dts file, to avoid any conflict with the pci kernel setup
Patch summary (...) arch/arm64/boot/dts/ti/k3-am642-evm.dts | 9 ++++++++- (...) &pcie0_rc { - status = "okay"; + status = "disabled"; reset-gpios = <&exp1 5 GPIO_ACTIVE_HIGH>; phys = <&serdes0_pcie_link>; phy-names = "pcie-phy"; num-lanes = <1>; }; +&pcie0_ep { + status = "disabled"; + phys = <&serdes0_pcie_link>; + phy-names = "pcie-phy"; + num-lanes = <1>; +}; + (...)
These changes were confirmed from Linux by executing the following commands. Both commands returned the disabled state:
cat /proc/device-tree/bus@<id>/pcie@<id>/status cat /proc/device-tree/bus@<id>/pcie-ep@<id>/status
Based on this, any suggestions as to where the problem might be? If not, what do you suggest to find the solution?
References
Example : AM64x MCU+ SDK: PCIE buffer transfer RC (ti.com)
Best Regards