summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatt2008-11-09 21:53:11 +0000
committermatt2008-11-09 21:53:11 +0000
commit0532c3a1aed5260a2e3bd5d7947933a33e4dc5e0 (patch)
tree775ee1a3028bb7bc50ffa355af03436a0e12ef5f
parent47edb16f8e956fb652947dd79628ce4ec22b4aba (diff)
downloadgnuradio-0532c3a1aed5260a2e3bd5d7947933a33e4dc5e0.tar.gz
gnuradio-0532c3a1aed5260a2e3bd5d7947933a33e4dc5e0.tar.bz2
gnuradio-0532c3a1aed5260a2e3bd5d7947933a33e4dc5e0.zip
more thorough test
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@9959 221aa14e-8319-0410-a670-987f0aec2ac5
-rw-r--r--usrp2/firmware/apps/test_ram.c42
1 files changed, 34 insertions, 8 deletions
diff --git a/usrp2/firmware/apps/test_ram.c b/usrp2/firmware/apps/test_ram.c
index 776644345..a0bb58251 100644
--- a/usrp2/firmware/apps/test_ram.c
+++ b/usrp2/firmware/apps/test_ram.c
@@ -52,22 +52,48 @@ main(void)
//hal_uart_init();
//puts("\ntest_ram\n");
- output_regs->ram_page = 0;
+ output_regs->ram_page = 1<<10;
- //puts("r[0]=DEADBEEF\n");
extram[0] = 0xDEADBEEF;
extram[1] = 0xF00D1234;
extram[7] = 0x76543210;
- puts("RD\n");
+
+ output_regs->ram_page = 2<<10;
+ extram[7] = 0x55555555;
+ extram[1] = 0xaaaaaaaa;
+ extram[0] = 0xeeeeeeee;
+
+ output_regs->ram_page = 1<<10;
+
i = extram[0];
k = extram[1];
j = extram[7];
- //puts("r0=");
+
+ if((i != 0xDEADBEEF)||(j!=0x76543210)||(k!=0xF00D1234)) {
+ puts("RAM FAIL1!\n");
+ puthex32_nl(i);
+ puthex32_nl(j);
+ puthex32_nl(k);
+ hal_finish();
+ return 0;
+ }
- puthex32_nl(i);
- puthex32_nl(k);
- puthex32_nl(j);
- puts("Done");
+ output_regs->ram_page = 2<<10;
+
+ j = extram[7];
+ k = extram[1];
+ i = extram[0];
+
+ if((i != 0xeeeeeeee)||(j!=0x55555555)||(k!=0xaaaaaaaa)) {
+ puts("RAM FAIL2!\n");
+ puthex32_nl(i);
+ puthex32_nl(j);
+ puthex32_nl(k);
+ hal_finish();
+ return 0;
+ }
+
+ puts("RAM Passes Tests\n");
hal_finish();
return 0;
}