From e8a14852c96a0cd6049236ad34049896b911f535 Mon Sep 17 00:00:00 2001 From: Michael Jones Date: Thu, 12 Mar 2015 17:36:23 -0600 Subject: [PATCH] update config with working pmod and arduino mask/dir/reading values. --- logi-test/sw/common/config.h | 73 +++++++++++++++++------------------- 1 file changed, 35 insertions(+), 38 deletions(-) diff --git a/logi-test/sw/common/config.h b/logi-test/sw/common/config.h index ff5d3dd1..8f057725 100644 --- a/logi-test/sw/common/config.h +++ b/logi-test/sw/common/config.h @@ -1,9 +1,5 @@ - - /* - - -PMOD Diagram +PMOD Diagram - testing sequence vcc gnd 3 2 1 0 vcc gnd 7 6 5 4 @@ -17,22 +13,16 @@ test jiig for PMOD test shorts upper row pins with lower row pins one by one : First test : - set 0, 2 and 5, 7 as output others as inputs - - writes '1' on 0, and 5, espect to read '1' on 1 and 4 - - writes '1' on 2, and 7, espect to read '1' on 6 and 3 + - writes '1' on 0, and 5, expect to read '1' on 1 and 4 + - writes '1' on 2, and 7, expect to read '1' on 6 and 3 Second test : - set 1, 3 and 4, 6 as output others as inputs - - writes '1' on 1, and 4, espect to read '1' on 0 and 5 - - writes '1' on 3, and 6, espect to read '1' on 2 and 7 - + - writes '1' on 1, and 4, expect to read '1' on 0 and 5 + - writes '1' on 3, and 6, expect to read '1' on 2 and 7 */ - - - - - //DEFINE WHICH TESTS TO RUN //COMMENT OUT TESTS YOU DO NOT WANT TO RUN #define TEST_SDRAM //test the SDRAM @@ -49,7 +39,6 @@ Second test : #define TEST_ARD //testing arduino connector pins #define TEST_OPEN //removing test jigs test (open) - #define LED_MASK 0x0003 #define PB_MASK 0x0003 #define SW_MASK 0x000C @@ -59,8 +48,6 @@ Second test : #define SATA_WRITE_SHIFT 2 #define SATA_READ_SHIFT 6 - - #ifdef LOGIPI #define LOAD_CMD "/usr/bin/logi_loader logipi_test.bit" @@ -88,7 +75,6 @@ Second test : #define GPIO_TEST2_2 0x4848 #define GPIO_TEST2_2_EXPECTED 0x8484 - #define ARD_MASK 0x003F #define ARD_TEST1_DIR 0x0015 #define ARD_TEST1_1 0x0011 @@ -106,39 +92,50 @@ Second test : #endif -#endif #ifdef LOGIBONE +//word aligned addressing #define LOAD_CMD "/usr/bin/logi_loader ./logibone_test.bit" -#define GPIO0 0x0004 -#define GPIO0DIR 0x0006 -#define GPIO1 0x0008 -#define GPIO1DIR 0x000A -#define GPIO2 0x000C -#define GPIO2DIR 0x000E -#define REG0 0x0020 -#define REG1 0x0022 -#define REG2 0x0024 -#define REG_DEBUG_RAM 0x0026 -#define MEM0 0x2000 +#define GPIO0 0x0002 +#define GPIO0DIR 0x0003 +#define GPIO1 0x0004 +#define GPIO1DIR 0x0005 +#define GPIO2 0x0006 +#define GPIO2DIR 0x0007 +#define REG0 0x0010 +#define REG1 0x0011 +#define REG2 0x0012 +#define REG_DEBUG_RAM 0x0013 +#define MEM0 0x1000 +#define GPIO_TEST1_DIR 0xA5A5 +#define GPIO_TEST1_1 0x2121 +#define GPIO_TEST1_1_EXPECTED 0x1212 +#define GPIO_TEST1_2 0x8484 +#define GPIO_TEST1_2_EXPECTED 0x4848 -//1-2-3-1-2-3 +#define GPIO_TEST2_DIR 0x5A5A +#define GPIO_TEST2_1 0x1212 +#define GPIO_TEST2_1_EXPECTED 0x2121 +#define GPIO_TEST2_2 0x4848 +#define GPIO_TEST2_2_EXPECTED 0x8484 +//1-2-3-1-2-3 #define ARD_MASK 0x003F -#define ARD_TEST1_DIR 0x0015 +#define ARD_TEST1_DIR 0x0015 #define ARD_TEST1_1 0x0011 -#define ARD_TEST1_1_EXPECTED 0x000A +#define ARD_TEST1_1_EXPECTED 0x0022 #define ARD_TEST1_2 0x0004 -#define ARD_TEST1_2_EXPECTED 0x0020 +#define ARD_TEST1_2_EXPECTED 0x0008 -#define ARD_TEST2_DIR 0x002A + +#define ARD_TEST2_DIR 0x002A #define ARD_TEST2_1 0x0022 -#define ARD_TEST2_1_EXPECTED 0x0014 +#define ARD_TEST2_1_EXPECTED 0x0011 #define ARD_TEST2_2 0x0008 -#define ARD_TEST2_2_EXPECTED 0x0001 +#define ARD_TEST2_2_EXPECTED 0x0004 #define LOG_PATH "/home/ubuntu/tests_log/%ld_test.log"