Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#2 NIOS II Fail Initialization

open
nobody
None
5
2008-04-05
2008-04-05
Mike Loptien
No

Hello,

I am using the altera Nios II processor on a Cyclone II FPGA. When I run the example code (adapted from the AVR source on the manual) it cant get past the initialization. also, when i print resp variable (from function sd_Init) i get FF. i have included my schematic, and my source code. i am using altium for the schematic. thank you for the help!

Mike

#include "efs.h"

EmbeddedFileSystem efs;
EmbeddedFile file_r, file_w;
unsigned short i, e;
char buf[512];

if (efs_init(&efs, 0) != 0) {
hang();
}
alt_printf("passed init");

if (file_fopen(&file_r, &efs .myFs, "Original.txt", 'r') != 0) {
hang();
}
alt_printf("passed open original");
if (file_fopen(&file_w, &efs .myFs, "copy.txt", 'w') != 0) {
hang();
}
alt_printf("passed open copy");
while (e = file_read(&file_r, 512, buf)) {
file_write(&file_w, e, buf);
}

file_fclose(&file_r);
file_fclose(&file_w);

fs_umount(&efs .myFs);

Discussion

  • Mike Loptien
    Mike Loptien
    2008-04-05

    schematic for my project

     
    Attachments