Forum Discussion
Altera_Forum
Honored Contributor
15 years agoJust updated.
I just got a brand new board from hardware engineer. It seems to work with limit time, but it still fails. Nios code: volatile unsigned long w, r; unsigned int i; for (i=5; i<10; i++) { IOWR_32DIRECT(SDRAM_BASE, i*4, i); printf("Write: %x\n", i); usleep(1000); // Note: it only works with 1000. Not 10000 r = IORD_32DIRECT(SDRAM_BASE, i*4); printf(" Read: %x\n\n", r); } nios2-terminal: connected to hardware target using JTAG UART on cable nios2-terminal: "USB-Blaster [USB-0]", device 1, instance 0 nios2-terminal: (Use the IDE stop button or Ctrl-C to terminate) Write: 5 Read: 5 Write: 6 Read: 6 Write: 7 Read: 7 Write: 8 Read: 8 Write: 9 Read: 9 With usleep(10000) nios2-terminal: connected to hardware target using JTAG UART on cable nios2-terminal: "USB-Blaster [USB-0]", device 1, instance 0 nios2-terminal: (Use the IDE stop button or Ctrl-C to terminate) Write: 5 Read: ffffffff Write: 6 Read: ffffffff Write: 7 Read: ffffffff Write: 8 Read: ffffffff Write: 9 Read: ffffffff ~Sean