using the 2nd Race++ channel between Echotek AD 812 and Midas M3220SR2.

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Hello,nice people:

we are now using Echotek AD 812 ,Midas M3220SR2,and VMFC 4310 to
transfer data from AD to vmfc's buffer,but we could only use one
channel of the Race++.Now we want to use the two race channels
simultaneously .And I do the  following function calling:

1st:if((rc = pxb_drv_init(0, NULL)) != PXB_SUCCESS)
2nd:if((rc =
       != PXB_SUCCESS)
3rd:if((rc = pxb_race2pci_win_set(PXB_ID_PRIMARY, RACE2PCI_WIN_MEM,
                                  0x08000000, RACE_SIZE)) != OK)
        pxb_err_info("pxb_race2pci_win_set_secondary",  rc);

but unfortunately the 4th function returns error,and results message as

some extra message that may be helpful is that we had successfully used
one channel of the two race++ channel.

So,my question is :Should I do some other configuration work in bsp or
some other file?How could I add the second window for the second
PXB?After that ,Should I try some other route code accordingly?

Thank you very much for you valuable help!
With Best Regards!

Mei Guodong

the raceInit codes may be helpful as well.
#include "stdio.h"
#include "race_drv.h"

#include "../Common/CommonDef.h"

#define RACE2PCI_WIN_MEM 0
#define RACE2PCI_WIN_MIO 1
#define RACE2PCI_WIN_IO  2

#define RACE_ADDR   (0x00000000)
#define RACE_ROUTE  (0x00000000)
#define RACE_SIZE   (128 * 1024 * 1024)

typedef void* PXB_handle;
typedef void* PXB_device;

/* functions in lib race_drv.o */

extern int sys_pxb_mgr_get_handle(PXB_ID,PXB_handle*,PXB_device*);
extern int sys_pxb_race2pci_win_get
extern int sys_pxb_race2pci_win_set (PXB_handle,int,uint32_t,uint32_t);

int pxb_race2pci_win_set(PXB_ID,int,uint32_t,uint32_t);
int pxb_race2pci_win_get(PXB_ID,int type,uint32_t *pci_base,uint32_t*);

static int pxb_err_info(char *info,int rc)
    mPrint("ERROR: \"%s\" returned error 0x%x (%s), %s\n",
    return rc;

void initRace()
    int                   rc;
    int                   count;
    SMB_handle            my_smb = NULL;
    unsigned long         smb_addr;
    unsigned long         smb_route;
    unsigned long         smb_ret_route;
    unsigned long         nbytes;

    /***** Initialize driver interface *****/
    if((rc = pxb_drv_init(0, NULL)) != PXB_SUCCESS)

        pxb_err_info("pxb_ioctl :PXB_IOCTL_ACCEPT_ACCESS",rc);

    /***** Set window for traffic from RACEway to PCI *****/
    /* BSP 1.2/1.1 */

    if((rc = pxb_race2pci_win_set(PXB_ID_PRIMARY, RACE2PCI_WIN_MEM,
                                  0xc0000000, RACE_SIZE)) != OK)

//new added  by mgd


        pxb_err_info("pxb_race2pci_win_set_secondary",  rc);

//new added by mgd

    mPrint("\nRACE++ mapped to 0x%lx\n", 0xc0000000);


int pxb_race2pci_win_set (
                         PXB_ID         pxbId,
                         int            type,
                         uint32_t       pci_base,
                         uint32_t       pci_size
    PXB_handle handle=0;
    PXB_device device=0;
    int rc;

    return rc;

int pxb_race2pci_win_get (
                         PXB_ID         pxbId,
                         int            type,
                         uint32_t      *pci_base,
                         uint32_t      *pci_size
    PXB_handle handle=0;
    PXB_device device=0;
    int rc;

    return rc;

Site Timeline