microblaze: initiate the systemace device

Nov 24, 2004 0 Replies

Hi,



I have a simple program which reads a file from the systemace CF device on vertex II board.



#include "xparameters.h" #include "xutil.h" #include "sysace_stdio.h"



char *Filename = "winter.jpg"; int main (void) { FILE *fp; printf("starting....\r\n"); if ((fp = fopen(Filename, "r")) == NULL) { printf("\r\nCan't open file: %s \r\n", Filename); return 0; } }



Everything goes fine except the program freezes at the "fopen...." line. I use XMD software debugger to trace into the code, and found actually it runs into indefinitely loop at the following line in the driver "sysace.c":



while ((Result = XSysAce_Lock(&Ace, XFALSE)) != XST_SUCCESS);



That means the systemace device is always busy and can't be locked for exclusively reading. That's why it keeps running the "while" loop there.



Anybody could help me to figure out the reason why the device is always busy? Or am I missing some pre-configurations or parameters to the device?



Thanks in advance.


-Yongjie


Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required