主题:SysConfig 中讨论的其他器件
工具/软件:
尊敬的 TI 专家:
我正在调试一个非常简单的 PCIe 工程。 以下是代码。
以下代码可以在 CCS 版本 12.4 上良好运行。 读取和写入。
使用 CCS 版本 20.2.0 时、写入正常、但 在我读取 PCIe 时会发生崩溃。
我还发布了两个测试的 SysConfig、它们几乎是相同的。
请帮助我解决这个问题、
内部 main (void)
{
uint32_t * test =(uint32_t *)(0x68000000U + 0x010000000U);
uint32_t READ_TEST = 0;
system_init();
BOARD_INIT ();
drivers_open();
HAL_PCIe_fpgaInit (gPcieHandle[CONFIG_PCIE0]);
*(TEST+0)= 0x1f; //写入
*(TEST+0)= 0x0; //写入
*(TEST+0)= 0x1; //写入
READ_TEST =*(TEST+0x140/4); //读取
BOARD_DEINIT();
system_deinit();
返回 0;
}
这是用于 FPGA-PCIe 的 init 函数。
int32_t HAL_pcie_fpgaInit((Pcie_Handle 句柄)
{
int32_t 状态= SystemP_Success;
pcieHandle =句柄;//gPcieHandle[CONFIG_PCIE0]
//Drivers_open();//如果此驱动程序是此项目中唯一的驱动程序、则需要此行
// Board_drivers Open ();//如果此驱动程序是此项目中唯一的驱动程序、则需要此行
status = pcie_getVendorId (pcieHandle、pcie_location_remote、&vndId、&DevID);
if (SystemP_Success!= status)
{
返回状态;
}
Status = pcieFpgaSetStatusCmd (pcieHandle);
if (SystemP_Success!= status)
{
返回状态;
}
Status = pciefpgaEpBar1Cfg (pcieHandle);
if (SystemP_Success!= status)
{
返回状态;
}
状态= pcieWriteDevStatCtrlReg (pcieHandle);
if (SystemP_Success!= status)
{
返回状态;
}
pcie_initialized_inding = 1;
返回状态;
}


谢谢
春阳

