Forum Discussion
Altera_Forum
Honored Contributor
20 years agoThanks For your response Jesse,
Ive tried 6 different types of cards now up to 512K. All are now working on my unmodified board successfully (as far as Ive been able to test them, all run the auto test and diagnostics etc. read and write blocks) The problem was two fold. Initially only the original 16Mb card was being recognized, and did so flawlessly. no other card would be recognized, however I reloaded the FPGA configuration and all the others started working as well. ( Wouldnt stop all of them working oh no...had to leave the 16Mb card still working...) Second I found that leaving a short delay before the card initialization routine allows all the cards to initialize in run mode. I dont know exactly why this extra delay is needed, but I discovered when I ran in debug mode, all would initialize if I single stepped through the code. But, when I ran in RUN mode, they failed to initialize (even the 16Mb card). Adding this short delay resolved the problem. (read alleviated the symptom) I suspect it has to do with the power up problems you mentioned. or possibly how the NIOS IDE starts up, but, if anyone else is having trouble recognizing their card i suggest adding a short delay at the start of main() before the call to IDE_initialize. Like this: int main(void) { long i; for(i= 0;i<1000000;i++); //bit of a delay if (IDE_initialize()) { printf("Cannot initialize IDE device.\r"); return -1; } else..... Id be interested in any thoughts on this, Embarking on a FAT file system if anyone is interested Andrew