This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320C6674: PCIE EP remote configuration does not work

Part Number: TMS320C6674

Hi,

i use a C6674 in PCIE EP configuration. I try to do a pci scan from DSP.

When I try to change bus / device / function setting via CFG_SETUP register ( 0x21800008 ) ,

I get no plausible data from PCIe Remote Config Space (0x218020000).

Is the CFG_SETUP only active in RC mode ?

Thanks in advance

  • Hi,

    Which software is this?

    Best Regards,
    Yordan
  • Hi Yordan,

    i used first the lld functions of pdk_C6678_1_1_2_5, but in my test i use only bare metal code as


    volatile uint32_t *pPcieConfigCFG = (volatile uint32_t *) 0x21800008;
    *pPcieConfigCFG = func | dev <<8 |bus <<16|type<<24;
    volatile uint32_t *pPcieConfigSpace = (volatile uint32_t *)0x21802000;
    uint32_t venDevId = pPcieConfigSpace[0];
    uint32_t revId =pPcieConfigSpace[2];

    Best regards, Andreas
  • Hi,

    I've notified the RTOS team. Their feedback will be posted here.

    Best Regards,
    Yordan
  • Hi,

    "type<<24"=====> did you tried either this to "0" for type 0 access or "1" for type "1" access?

    Regards, Eric
  • Hi Eric,
    i expected to use 1 but i tried both - its the same behaviour.


    i loop over bus, device and function:

    for(int bus =0;bus < 1<<8;++bus){
    for (int dev=0;dev<1<<5;++dev){
    for (int func=0;func<1<<3;++func){

    const int type= 1;
    volatile uint32_t *pPcieConfigCFG = (volatile uint32_t *) 0x21800008;
    *pPcieConfigCFG = func | dev << 8 | bus << 16 | type << 24;
    volatile uint32_t *pPcieConfigSpace = (volatile uint32_t *) 0x21802000;
    uint32_t venDevId = pPcieConfigSpace[0];
    uint32_t revId =pPcieConfigSpace[2];
    (... printfs..when data changes)
    }
    }
    }

    typically I got back values like this:

    pcieFindDevices bus = 0, dev = 0 revId =0x0, vndDevId = 0x8
    pcieFindDevices bus = 0, dev = 1 revId =0x1, vndDevId = 0x8
    pcieFindDevices bus = 0, dev = 2 revId =0x2, vndDevId = 0x8
    pcieFindDevices bus = 0, dev = 2 revId =0x2, vndDevId = 0x8
    pcieFindDevices bus = 0, dev = 3 revId =0x3, vndDevId = 0x8
    pcieFindDevices bus = 0, dev = 4 revId =0x4, vndDevId = 0x8
    pcieFindDevices bus = 0, dev = 5 revId =0x5, vndDevId = 0x8
    pcieFindDevices bus = 0, dev = 5 revId =0x5, vndDevId = 0x0
    pcieFindDevices bus = 0, dev = 5 revId =0x5, vndDevId = 0x8
    pcieFindDevices bus = 0, dev = 6 revId =0x6, vndDevId = 0x8
    ....

    Regards Andreas
  • Hi,

    From processors.wiki.ti.com/.../PCI_Express_(PCIe)_Resource_Wiki_for_Keystone_Devices,
    If C66x device is configured as RC, then CFG_SETUP register is used to specify the target bus/device/function numbers for the target device (switch/EP) and try to read/write the remote device space in MMR (from offset 0x2000 in PCIe MMR space) to generate those configuration requests. This CFG_SETUP only works in RC mode.

    Regards, Eric
  • o.k. Thank you.

    I could not find this last sentence in the wiki

    >>This CFG_SETUP only works in RC mode.<<

    but you ' re shurely right.

    Regards andreas