Hi,
I am using TE0320 board for my project. I need to make data transfer between PC and microblaze. I acheived to send data from PC to microblaze but I could not achieve to send data microblaze to PC.
This is my PC side code:
data = new byte [16]; //allocate memory
for (unsigned int j = 0; j < 16; j++)
data[j] = j;
ResetFX2FifoStatus(handle);
if (TE0300_SetData(handle, data, sizeof(data), PI_EP8)) //sizeof(data)
{
cout << "ERROR" << endl;
}
SendFPGAcommand(handle,WRITETOUB); //starts test
Microblaze side code(In the interrupt handler):
XPS_FX2_SetUSB_FIFOadr(XPAR_XPS_FX2_0_BASEADDR, PI_EP8); //dataread
count = XPS_FX2_GetRXFIFOcount(XPAR_XPS_FX2_0_BASEADDR);
DDR_MEM = XPS_FX2_ReadRXFifo(XPAR_XPS_FX2_0_BASEADDR);
When I run PC side code there is no error but every time XPS_FX2_GetRXFIFOcount in microblaze returns zero. so, XPS_FX2_ReadRXFifo(XPAR_XPS_FX2_0_BASEADDR) always zeros.. I connected rs232 port to see the content of the registers.
Could you help me, I dont know what am I doing wrong. I dont need fast data transfer(DMA). It is enough to send data microblaze to PC or PC to microblaze.
best regards,
-umit